2018-07-06
2018-07-06 本文已影响0人
子曾经曰过了
安装Tengine
20161129102934401.png
cd /home/package
wget http://tengine.taobao.org/download/tengine-2.1.2.tar.gz
tar -zxvf tengine-2.1.2.tar.gz
cd tengine-2.1.2
./configure --prefix=/usr/local/nginx --with-http_lua_module
make & make install
添加$PATH环境变量
vim /etc/profile
# 在文件末尾加上
export PATH=$PATH:/usr/local/nginx/sbin
source /etc/profile
echo $PATH
开放 firewall 80端口
firewall-cmd --zone=public --add-port=80/tcp --permanent
systemctl restart firewalld.service
设置开机启动Tengine
vim /usr/lib/systemd/system/nginx.service
---------------------------------------------- nginx.service 文件内容(开始) ----------------------------------------------
[Unit]
Description=The nginx HTTP and reverse proxy server
After=syslog.target network.target remote-fs.target nss-lookup.target
[Service]
Type=forking
PIDFile=/usr/local/nginx/logs/nginx.pid
ExecStartPre=/usr/local/nginx/sbin/nginx -t
ExecStart=/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
ExecReload=/bin/kill -s HUP $MAINPID
ExecStop=/bin/kill -s QUIT $MAINPID
PrivateTmp=true
[Install]
WantedBy=multi-user.target
---------------------------------------------- nginx.service 文件内容(结束) ----------------------------------------------
chmod 745 nginx.service
systemctl enable nginx.service
[图片上传失败...(image-d202b-1530889442416)]