1. 程式人生 > 其它 >Centons8下安裝常用軟體

Centons8下安裝常用軟體

1.安裝vim yum -y install vim 2.安裝wget yum -y install wget

安裝JDK1.8:

#檢視是否安裝

yum list installed |grep java

#如存在之前的版本 先解除安裝JDK相關檔案 yum -y remove java-1.8.0-openjdk* yum -y remove tzdata-java.noarch #線上檢視java的安裝包列表 yum -y list java* 安裝選擇的java版本 yum install java-1.8.0-openjdk* -y #安裝完成後檢視版本 java -version
安裝nginx:
#.安裝工具和庫 安裝路徑:/usr/local/nginx yum -y install gcc-c++ pcre pcre-devel zlib zlib-devel openssl openssl-devel #下載並解壓nginx wget -c https://nginx.org/download/nginx-1.18.0.tar.gz tar -zxvf nginx-1.18.0.tar.gz #編譯與安裝nginx 在解壓後的目錄下 [root@localhost nginx-1.18.0]# ./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-http_v2_module --with-http_sub_module --with-http_gzip_static_module --with-pcre
#--prefix 指定安裝路徑 #--with-http_stub_status_module允許檢視nginx狀態的模組 # --with-http_ssl_module支援https的模組 #安裝make 命令 yum -y install gcc automake autoconf libtool make #編譯並安裝 [root@localhost nginx-1.18.0]# make [root@localhost nginx-1.18.0]# make install #啟動nginx 進入到安裝nginx目錄下面的sbin cd /usr/local/nginx/sbin 啟動命令
[root@localhost sbin]#./nginx ./nginx -s quit:(溫和)此方式停止步驟是待nginx程序處理任務完畢進行停止。 ./nginx -s stop:(強硬)此方式相當於先查出nginx程序id再使用kill命令強制殺掉程序。 ./nginx -s reload重啟nginx(不推薦此方法,推薦先停止在啟動)