[b]1.下载pcre[/b]
#wget http://jaist.dl.sourceforge.net/project/pcre/pcre/8.33/pcre-8.33.tar.gz
[b]2.安装pcre-8.33.tar.gz[/b]
[b]3.下载nginx[/b]
#wget http://nginx.org/download/nginx-1.5.3.tar.gz
[b]4.解压[/b]
[b]5.选项[/b]
-c </path/to/config> 为 Nginx 指定一个配置文件,来代替缺省的。
-t 不运行,而仅仅测试配置文件。nginx 将检查配置文件的语法的正确性,并尝试打开配置文件中所引用到的文件。
-v 显示 nginx 的版本。
-V 显示 nginx 的版本,编译器版本和配置参数。
[b]6.中止运行的进程:[/b]
平滑改变 nginx 配置的选项(请注意,在重载前,要先测试一下配置文件):
开启目录文件索引
squid的安装
#wget http://jaist.dl.sourceforge.net/project/pcre/pcre/8.33/pcre-8.33.tar.gz
[b]2.安装pcre-8.33.tar.gz[/b]
#tar zxvf pcre-8.33.tar.gz
#cd pcre-8.33/
#./configure
#make && make install
[b]3.下载nginx[/b]
#wget http://nginx.org/download/nginx-1.5.3.tar.gz
[b]4.解压[/b]
#tar -zxvf nginx-1.5.3.tar.gz
#cd nginx-1.5.3
#./configure --prefix=/usr/local/nginx --with-pcre=/root/pcre-8.33/ --with-http_stub_status_module --with-http_realip_module
#make
#make install
[b]5.选项[/b]
-c </path/to/config> 为 Nginx 指定一个配置文件,来代替缺省的。
-t 不运行,而仅仅测试配置文件。nginx 将检查配置文件的语法的正确性,并尝试打开配置文件中所引用到的文件。
-v 显示 nginx 的版本。
-V 显示 nginx 的版本,编译器版本和配置参数。
[b]6.中止运行的进程:[/b]
#ps aux | egrep '(PID|nginx)'
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 2213 0.0 0.0 6784 2036 ? Ss 03:01 0:00 nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.conf
#kill -15 2213
平滑改变 nginx 配置的选项(请注意,在重载前,要先测试一下配置文件):
#nginx -t -c /etc/nginx/nginx.conf
2006/09/16 13:07:10 [info] 15686#0: the configuration file /etc/nginx/nginx.conf syntax is ok
2006/09/16 13:07:10 [info] 15686#0: the configuration file /etc/nginx/nginx.conf was tested successfully
#ps aux | egrep '(PID|nginx)'
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 2213 0.0 0.0 6784 2036 ? Ss 03:01 0:00 nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.conf
#kill -HUP 2213
开启目录文件索引
location ~ /index/ {
autoindex on;
autoindex_exact_size off;
autoindex_localtime on;
break;
}
squid的安装
--prefix=/usr/local/squid' '--sysconfdir=/etc/squid' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--enable-gnuregex' '--enable-removal-policies=lru' '--enable-icmp' '--enable-referer-log' '--enable-useragent-log' '--enable-snmp' '--enable-arp-acl' '--enable-htcp' '--enable-default-err-language=Simplify_Chinese' '--enable-err-languages=Simplify_Chinese' '--enable-epoll' '--enable-kill-parent-hack' '--enable-cache-digests' '--enable-linux-netfilter