Centos 编译安装tengine

原创 Jeff Tang  2018-04-03 10:18  阅读 295 次 次
yum install -y wget gcc gcc-c++ pcre-devel openssl-devel zlib-devel
mkdir -p /data/app/tengine/tmp
cd /data/app/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=/data/app/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=/data/tengine/tengine-2.2.0/sbin/nginx
ExecReload=/data/tengine/tengine-2.2.0/sbin/nginx -s reload
ExecStop=/data/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/81
版权声明:本文为原创文章,版权归 Jeff Tang 所有,欢迎分享本文,转载请保留出处!

发表评论


表情