Tengine 下载地址
安装
$ ./configure
$ make&&make install
- Tengine默认将安装在/usr/local/nginx目录。你可以用'--prefix'来指定你想要的安装目录。
在/etc/profile
添加
export PATH=$PATH:/usr/local/nginx/sbin
开机自启
创建/etc/systemd/system/tengine.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
重新加载 systemd 配置systemctl daemon-reload
启动systemctl start tengine
开机自启systemctl enable tengine