标签:org chm 方式 des cps div pat worker idf
Tengine是由淘宝网发起的Web服务器项目。它在Nginx的基础上,针对大访问量网站的需求,添加了很多高级功能和特性。Tengine的性能和稳定性已经在大型的网站如淘宝网,天猫网等得到了很好的检验。它的最终目标是打造一个高效、稳定、安全、易用的Web平台。
Tengine完全兼容Nginx,因此可以参照Nginx的方式来配置Tengine。
wget http://tengine.taobao.org/download/tengine-2.2.0.tar.gz
yum install pcre pcre-devel zlib zlib-devel open openssl-devel gcc gcc-c++
./configure --prefix=/usr/local/nginx --pid-path=/usr/local/nginx/logs/nginx.pid --error-log-path=/usr/local/logs/error.log --http-log-path=/usr/local/logs/access.log --with-http_gzip_static_module --http-client-body-temp-path=/var/temp/nginx/client --http-proxy-temp-path=/var/temp/nginx/proxy --http-fastcgi-temp-path=/var/temp/nginx/fastcgi --http-uwsgi-temp-path=/var/temp/nginx/uwsgi --http-scgi-temp-path=/var/temp/nginx/scgi --prefix=/usr/local/nginx --pid-path=/usr/local/nginx/logs/nginx.pid --error-log-path=/usr/local/logs/error.log --http-log-path=/usr/local/logs/access.log --with-http_gzip_static_module 部分模块配置安装在/var/temp/nginx,所以事先要在创建/var/temp/nginx目录
make;make install
[root@localhost]/usr/local/nginx/sbin# ./nginx [root@localhost]/usr/local/nginx/sbin# ps -aux|grep nginx Warning: bad syntax, perhaps a bogus ‘-‘? See /usr/share/doc/procps-3.2.8/FAQ root 38247 0.0 0.1 46836 1124 ? Ss 13:40 0:00 nginx: master process ./nginx nobody 38248 0.0 0.1 47276 1768 ? S 13:40 0:00 nginx: worker process root 38251 0.0 0.0 103260 848 pts/1 S+ 13:40 0:00 grep nginx
[root@localhost]/usr/local/nginx# sbin/nginx -c conf/nginx.conf [root@localhost]/usr/local/nginx# ps -aux|grep nginx Warning: bad syntax, perhaps a bogus ‘-‘? See /usr/share/doc/procps-3.2.8/FAQ root 38450 0.0 0.1 46836 1124 ? Ss 14:02 0:00 nginx: master process sbin/nginx -c conf/nginx.conf nobody 38451 0.0 0.1 47276 1768 ? S 14:02 0:00 nginx: worker process root 38453 0.0 0.0 103260 848 pts/1 S+ 14:02 0:00 grep nginx
[root@localhost]/usr/local/nginx/sbin# ./nginx -s quit [root@localhost]/usr/local/nginx/sbin# ps -aux|grep nginx Warning: bad syntax, perhaps a bogus ‘-‘? See /usr/share/doc/procps-3.2.8/FAQ root 38258 0.0 0.0 103260 844 pts/1 S+ 13:43 0:00 grep nginx
[root@localhost]/usr/local/nginx/sbin# ./nginx -s stop [root@localhost]/usr/local/nginx/sbin# ps -aux |grep nginx Warning: bad syntax, perhaps a bogus ‘-‘? See /usr/share/doc/procps-3.2.8/FAQ root 38272 0.0 0.0 103260 848 pts/1 S+ 13:46 0:00 grep nginx [root@localhost]/usr/local/nginx/sbin# [root@localhost]/usr/local/nginx/logs# ps -aux|grep nginx Warning: bad syntax, perhaps a bogus ‘-‘? See /usr/share/doc/procps-3.2.8/FAQ root 38287 0.0 0.1 46836 1124 ? Ss 13:47 0:00 nginx: master process ../sbin/nginx nobody 38288 0.0 0.1 47276 1768 ? S 13:47 0:00 nginx: worker process root 38294 0.0 0.0 103260 848 pts/1 S+ 13:48 0:00 grep nginx [root@localhost]/usr/local/nginx/logs# kill $(cat nginx.pid) [root@localhost]/usr/local/nginx/logs# ps -ef|grep nginx root 38298 2255 0 13:48 pts/1 00:00:00 grep nginx
[root@localhost]/usr/local/nginx/sbin# ./nginx -s reload
#!/bin/bash # nginx Startup script for the Nginx HTTP Server # it is v.0.0.2 version. # chkconfig: - 85 15 # description: Nginx is a high-performance web and proxy server. # It has a lot of features, but it‘s not for everyone. # processname: nginx # pidfile: /var/run/nginx.pid # config: /usr/local/nginx/conf/nginx.conf nginxd=/usr/local/nginx/sbin/nginx nginx_config=/usr/local/nginx/conf/nginx.conf nginx_pid=/usr/local/nginx/logs/nginx.pid RETVAL=0 prog="nginx" # Source function library. . /etc/rc.d/init.d/functions # Source networking configuration. . /etc/sysconfig/network # Check that networking is up. [ ${NETWORKING} = "no" ] && exit 0 [ -x $nginxd ] || exit 0 # Start nginx daemons functions. start() { if [ -e $nginx_pid ];then echo "nginx already running...." exit 1 fi echo -n $"Starting $prog: " daemon $nginxd -c ${nginx_config} RETVAL=$? echo [ $RETVAL = 0 ] && touch /var/lock/subsys/nginx return $RETVAL } # Stop nginx daemons functions. stop() { echo -n $"Stopping $prog: " killproc $nginxd RETVAL=$? echo [ $RETVAL = 0 ] && rm -f /var/lock/subsys/nginx /var/run/nginx.pid } # reload nginx service functions. reload() { echo -n $"Reloading $prog: " #kill -HUP `cat ${nginx_pid}` killproc $nginxd -HUP RETVAL=$? echo } # See how we were called. case "$1" in start) start ;; stop) stop ;; reload) reload ;; restart) stop start ;; status) status $prog RETVAL=$? ;; *) echo $"Usage: $prog {start|stop|restart|reload|status|help}" exit 1 esac exit $RETVAL
chmod a+x /etc/init.d/nginx(a+x ==> all user can execute 所有用户可执行)
vi /etc/rc.local
任意行加入:/etc/init.d/nginx start
保存退出: wq
[root@localhost]/usr/local/nginx# service nginx start 正在启动 nginx: [确定] [root@localhost]/usr/local/nginx# service nginx restart 停止 nginx: [确定] 正在启动 nginx: [确定] [root@localhost]/usr/local/nginx# service nginx reload 重新载入 nginx: [确定] [root@localhost]/usr/local/nginx# service nginx stop 停止 nginx: [确定]
原文链接:http://blog.csdn.net/KingBoyWorld/article/details/62888918
标签:org chm 方式 des cps div pat worker idf
原文地址:http://www.cnblogs.com/chenjian/p/7628311.html