Centos7 installation Tengine

yum  install - and gcc  gcc - c ++
 
wget    https://netix.dl.sourceforge.net/project/pcre/pcre/8.40/pcre-8.40.tar.gz
tar -zxvf pcre-8.40.tar.gz
cd pcre-8.40

./configure
make && make install

pcre-config --version
 
cd /usr/local/src
wget http://www.openssl.org/source/openssl-1.0.2.tar.gz
tar zxvf openssl-1.0.2.tar.gz
cd openssl-1.0.2.tar.gz
./config
make && make install
 
cd /usr/local/src
wget http://zlib.net/zlib-1.2.11.tar.gz
tar zxvf zlib-1.2.11.tar.gz
cd zlib-1.2.11
./configuremake && make install
 
cd /usr/local/src
wget http://tengine.taobao.org/download/tengine-2.2.0.tar.gz
tar -zxvf tengine-2.2.0.tar.gz
cd tengine-2.2.0

./configure --prefix=/usr/local/nginx \ --with-pcre=/usr/local/src/pcre-8.40 \
--with-openssl=/usr/local/src/openssl-1.0.2 \
--with-zlib=/usr/local/src/zlib-1.2.11 \
--with-http_v2_module


make && make install

 

vim /lib/systemd/system/nginx.service

[Unit]
Description=The nginx HTTP and reverse proxy server
After=syslog.target network.target remote-fs.target nss-lookup.target

[Service]
Type=forking
PIDFile=/usr/local/nginx/logs/nginx.pid
ExecStartPre=/usr/local/nginx/sbin/nginx -t
ExecStart=/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
ExecReload=/bin/kill -s HUP $MAINPID
ExecStop=/bin/kill -s QUIT $MAINPID
PrivateTmp=true

[Install]
WantedBy=multi-user.target

chmod 745 nginx.service

systemctl enable nginx.service

 

Guess you like

Origin www.cnblogs.com/enumx/p/12296906.html