Tengine的部署
[root@node02 ~]# wget -c http://tengine.taobao.org/download/tengine-2.3.3.tar.gz
[root@node02 ~]# yum install gcc gcc-c++ make -y
[root@node02 ~]# useradd -r -u 998 -c 'tengine user' -d /var/cache/nginx -s /sbin/nologin tengine
[root@node02 ~]# tar xf tengine-2.3.3.tar.gz -C /usr/local/src/
[root@node02 ~]# cd /usr/local/src/tengine-2.3.3/
[root@node02 tengine-2.3.3]# yum install pcre-devel -y
[root@node02 tengine-2.3.3]# yum install openssl-devel -y
[root@node02 tengine-2.3.3]# yum install perl-ExtUtils-Embed -y
[root@node02 tengine-2.3.3]# ./configure --user=tengine --group=tengine \
> --prefix=/usr/local/tengine \
> --with-http_perl_module \
> --with-http_sub_module \
> --with-http_stub_status_module \
> --with-http_ssl_module
[root@node02 tengine-2.3.3]# make
[root@node02 tengine-2.3.3]# make install
[root@node02 tengine-2.3.3]# tree /usr/local/tengine/
/usr/local/tengine/
├── conf
│ ├── fastcgi.conf
│ ├── fastcgi.conf.default
│ ├── fastcgi_params
│ ├── fastcgi_params.default
│ ├── koi-utf
│ ├── koi-win
│ ├── mime.types
│ ├── mime.types.default
│ ├── nginx.conf
│ ├── nginx.conf.default
│ ├── scgi_params
│ ├── scgi_params.default
│ ├── uwsgi_params
│ ├── uwsgi_params.default
│ └── win-utf
├── html
│ ├── 50x.html
│ └── index.html
├── logs
└── sbin
└── nginx
4 directories, 18 files
[root@node02 tengine-2.3.3]# ln -sv /usr/local/tengine/sbin/nginx /usr/sbin/
‘/usr/sbin/nginx’ -> ‘/usr/local/tengine/sbin/nginx’
[root@node02 tengine-2.3.3]# nginx -v
Tengine version: Tengine/2.3.3
nginx version: nginx/1.18.0
[root@node02 tengine-2.3.3]# vim /usr/lib/systemd/system/tengine.service
[Unit]
Description=tengine - high performance web server
Documentation=http://tengine.taobao.org/documentation.html
After=network.target remote-fs.target nss-lookup.target
[Service]
Type=forking
PIDFile=/run/tengine.pid
ExecStartPre=/usr/local/tengine/sbin/nginx -t -c /usr/local/tengine/conf/nginx.conf
ExecStart=/usr/local/tengine/sbin/nginx -c /usr/local/tengine/conf/nginx.conf
ExecReload=/bin/kill -s HUP $MAINPID
ExecStop=/bin/kill -s QUIT $MAINPID
PrivateTmp=true
[Install]
WantedBy=multi-user.target
[root@node02 tengine-2.3.3]# systemctl daemon-reload
[root@node02 tengine-2.3.3]# systemctl start tengine
[root@node02 tengine-2.3.3]# netstat -lnutp | grep 80
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 19947/nginx: master
浏览器访问: