用户工具

站点工具


linux:tengine

yum

yum install -y gcc gcc-c++ autoconf automake
xslt => libxml2/libxslt
geoip => libgeoip-dev

pcre

wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.42.tar.gz
cd /usr/local/src
tar zxvf pcre-8.42.tar.gz
./configure --prefix=/usr/local/pcre

openssl

wget https://www.openssl.org/source/openssl-1.1.0h.tar.gz
./config --prefix=/usr/local/openssl

zlib

wget http://zlib.net/zlib-1.2.11.tar.gz
./configure -prefix=/usr/local/zlib

jemalloc

wget https://github.com/jemalloc/jemalloc/releases/download/5.0.1/jemalloc-5.0.1.tar.bz2
tar jxvf jemalloc-5.0.1.tar.bz2
./configure --prefix=/usr/local/jemalloc

tengine

wget http://tengine.taobao.org/download/tengine-2.2.2.tar.gz
./configure --prefix=/usr/local/nginx \
--user=nginx \
--group=nginx \
--with-pcre=/usr/local/src/pcre-8.42 \
--with-openssl=/usr/local/src/openssl-1.1.0h \
--with-jemalloc=/usr/local/src/jemalloc-5.0.1 \
--with-zlib=/usr/local/src/zlib-1.2.11 \
--with-http_gzip_static_module \
--with-http_realip_module \
--with-http_stub_status_module \
--with-http_ssl_module \
--with-http_sysguard_module \
--with-http_concat_module \
--with-http_v2_module \
--with-http_secure_link_module \
--with-select_module \
--with-http_slice_module \
--with-http_random_index_module

系统服务:vi /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
service start nginx
systemctl list-units --type=service #查看正运行服务

基础密码认证

printf "ttlsa:$(openssl passwd -crypt 123456)\n" >>conf/htpasswd
linux/tengine.txt · 最后更改: 2019/09/09 22:52 由 admin