CentOS 7 5 系統下安裝nginx

2021-10-01 14:31:27 字數 829 閱讀 1039

選擇你想要安裝的位址

cd /usr/local/etc

wget

安裝nginx執行庫

yum -y install gcc gcc-c++ automake autoconf libtool make

yum -y install pcre zlib openssl openssl-devel

解壓nginx

tar -zxvf nginx-1.16.1.tar.gz

建立nginx安裝位址-根據個人喜好選擇乙個目錄進行建立本人直接在etc目錄安裝

mkdir nginx

進入解壓的安裝目錄

cd nginx-1.16.1/

指向安裝nginx目錄

./configure --prefix=/usr/local/etc/nginx

進行安裝nginx

make

make install

安裝完成後內容會安裝到指定的路徑 /usr/local/etc/nginx下,否則會在預設目錄/usr/local/nginx

vim /usr/local/etc/nginx/conf/nginx.conf

可根據實際情況進行配置

nginx 基礎操作:

在nginx的sbin目錄:

cd /usr/local/etc/nginx/sbin/

檢視nginx配置引數

./nginx -v

檢查配置檔案是否存在問題

./nginx -t

啟動./nginx

停止./nginx -s stop

重啟./nginx -s reload

vmware 下安裝centos7 5配置靜態網路

etc sysconfig network scripts ifcfg ens33 type ethernet proxy method none browser only no bootproto static 靜態ip defroute yes ipv4 failure fatal no ipv...

Centos7 5下rpm方式安裝apache

systemctl enable httpd.service 取消 disable systemctl start httpd.service 啟動 等價於service httpd start 等價於systemctl start httpd systemctl stop httpd.servic...

CentOS7 5下Redis5 0 5安裝與配置

安裝redis需要知道自己需要哪個版本,有針對性的安裝。比如如果需要redis geo這個地理集合的特性,那麼redis版本就不能低於3.2版本,由於這個特性是3.2版本才有的。另外需要注意的是,redis約定次版本號 即第乙個小數點後的數字 為偶數的版本是穩定版 如2.8版 3.0版 奇數版本是非...