Centos7 编译安装 tengine-2.2.0

原创 Jeff Tang  2018-04-10 13:03  阅读 330 次 次
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

 

本文地址:https://www.easylinux.cn/archives/114
版权声明:本文为原创文章,版权归 Jeff Tang 所有,欢迎分享本文,转载请保留出处!
NEXT:已经是最新一篇了
相关文章 关键词:

发表评论


表情