Centos安装Tengine

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

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。