yum install -y wget gcc gcc-c++ pcre-devel openssl-devel zlib-devel mkdir -p /data0/application/tengine/tmp cd /data0/application/tengine/tmp wget http://tengine.taobao.org/download/tengine-2.2.0.tar.gz tar xf tengine-2.2.0.tar.gz cd tengine-2.2.0 ./configure \ --prefix=/data0/application/tengine/tengine-2.2.0 \ --user=nobody \ --group=nobody \ --with-http_gzip_static_module \ --with-poll_module \ --with-http_ssl_module \ --with-http_flv_module \ --with-http_stub_status_module \ --with-http_realip_module make make install cat > /usr/lib/systemd/system/nginx.service <<EOF [Unit] Description=nginx After=network.target [Service] Type=forking ExecStart=/data0/application/tengine/tengine-2.2.0/sbin/nginx ExecReload=/data0/application/tengine/tengine-2.2.0/sbin/nginx -s reload ExecStop=/data0/application/tengine/tengine-2.2.0/sbin/nginx -s quit PrivateTmp=true [Install] WantedBy=multi-user.target EOF systemctl enable nginx.service service nginx restart