1. 程式人生 > >linux下部署springboot專案用到的一些命令

linux下部署springboot專案用到的一些命令

1.檢視埠情況

netstat –apn | grep 8080

2.殺死一個程序

kill -9 pid #pid 為相應的程序號

3.刪除資料夾

rm -rf /home/java/jdk1.8

4.檢視是否已經安裝了mysql

rpm -qa | grep -i mysql有值輸出則說明已經安裝過了,若空白則沒有安裝

5.安裝mysql時遇到的一篇比較靠譜的帖子

https://www.oschina.net/code/snippet_2426852_49915

6.用rpm安裝的過程中可能會提示簽名的錯誤,可以用如下命令安裝

rpm -ivh MySQL-server-5.5.46-1.linux2.6.x86_64.rpm --force --nodeps

7.安裝zk(zookeeper)並配置

7.1 tar -zxvf /home/zookeeper/zookeeper-3.3.6.tar.gz

7.2 cd /home/zookeeper/zookeeper-3.3.6/conf

7.3 cp zoo_sample.cfg zoo.cfg

7.4 vi zoo.cfg

7.5編輯效果如下:

# The number of milliseconds of each tick  
tickTime=2000  
# The number of ticks that the initial  
# synchronization phase can take  
initLimit=10  
# The number of ticks that can pass between  
# sending a request and getting an acknowledgement  
syncLimit=5  
# the directory where the snapshot is stored.  
dataDir=/usr/zookeeper  
dataLogDir=/usr/zookeeper/log  
# the port at which the clients will connect  
clientPort=2181

7.6設定環境變數

export ZOOKEEPER_INSTALL=/home/zookeeper/zookeeper-3.3.6

export PATH=$PATH:$ZOOKEEPER_INSTALL/bin 

7.7啟動zk    ./zkServer.sh start

寫的比較亂,想寫給自己看,也能夠幫助到其他人。


我們曾如此渴望命運的波瀾,到最後才發現:人生最曼妙的風景,竟是內心的淡定與從容……我們曾如此期盼外界的認可,到最後才知道:世界是自己的,與他人毫無關係