centos tengine 安装

  1. 安装基础依赖
yum -y install gcc gcc-c++ pcre-devel openssl-devel openssl
  1. tengine 官网下载压缩包
wget http://tengine.taobao.org/download/tengine-2.3.3.tar.gz
tar -xzvf tengine-2.3.3.tar.gz
  1. 进入解压目录
cd tengine-2.3.3
  1. 编译tengine
./configure --prefix=/data/opt/nginx
make & make install
  1. 配置nginx到系统服务
vim /usr/lib/systemd/system/nginx.service

# 内容如下
[Unit]
Description=nginx
After=network.target

[Service]
Type=forking
ExecStart=/data/opt/nginx/sbin/nginx
ExecReload=/data/opt/nginx/sbin/nginx -s reload
ExecStop=/data/opt/nginx/sbin/nginx -s quit
PrivateTmp=true

[Install]
WantedBy=multi-user.target
  1. 设置开机启动
systemctl enable nginx
# 启动服务
systemctl start nginx

评论

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×