您好,登錄后才能下訂單哦!
1、服務(wù)器版本:CentOS Linux release 7.4.1708 (Core)
2、nginx版本:nginx-1.14.2.tar.gz
3、部署步驟
/usr/sbin/groupadd -f www /usr/sbin/useradd -g www www yum install -y pcre-devel openssl-devel yum -y install gcc gcc-c++ autoconf automake make cd /data/application tar xf /data/pkg/nginx-1.14.2.tar.gz cd nginx-1.14.2
./configure --prefix=/data/application/nginx --conf-path=/data/application/nginx/conf/nginx.conf --error-log-path=/data/application/nginx/log/error.log --http-log-path=/data/application/nginx/log/access.log --pid-path=/data/application/nginx/conf/nginx.pid --http-proxy-temp-path=/data/application/nginx/cache/proxy_temp --http-fastcgi-temp-path=/data/application/nginx/cache/fastcgi_temp --user=www --group=www --with-http_realip_module --with-http_gunzip_module --with-http_stub_status_module --with-http_ssl_module --with-http_gzip_static_module --with-http_sub_module --with-http_realip_module --with-http_sub_module
make && make install
firewall-cmd --add-port=80/tcp --permanent
firewall-cmd --reload
4、增加自啟動(dòng):
vim /lib/systemd/
system
/nginx.service
[Unit] Description=nginx After=network.target [Service] Type=forking ExecStart=/data/application/nginx/sbin/nginx ExecReload=/data/application/nginx/sbin/nginx -s reload ExecStop=/data/application/nginx/sbin/nginx -s quit PrivateTmp=true [Install] WantedBy=multi-user.target
systemctl enable nginx systemctl start nginx
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。