安装
安装依赖库和模块
yum -y install make zlib zlib-devel gcc-c++ libtool openssl openssl-devel
安装 PCRE 模块
PCRE 作用是让 Ngnix 支持 Rewrite 功能。
wget http://downloads.sourceforge.net/project/pcre/pcre/8.35/pcre-8.35.tar.gz
tar zxvf pcre-8.35.tar.gz
cd pcre-8.36
./configure
make && make install
编译安装@R_404_196@
wget http://@R_404_196@.org/download/@R_404_196@-1.8.0.tar.gz
tar zxvf @R_404_196@-1.8.0.tar.gz
cd @R_404_196@-1.8.0
./configure --prefix=/usr/local/webserver/@R_404_196@ --with-http_stub_status_module --with-http_ssl_module --with-pcre=/usr/local/@R_404_196@Module/pcre-8.35
make
make install
usr/local/@R_404_196@Module/pcre-8.35
这个用自己的安装目录,如果安装新模块,就像上面安装pcre类似,然后在重写编译安装@R_404_196@即可。也可以把 /usr/local/@R_404_196@/sbin 加到环境变量中。
常用命令
@R_404_196@ -v //查看版本信息
@R_404_196@ -V //查看安装了那些模块
/usr/local/@R_404_196@/sbin/@R_404_196@ –s reload //重启
/usr/local/@R_404_196@/sbin/@R_404_196@ –s stop //停止
/usr/local/@R_404_196@/sbin/@R_404_196@ –t //测试配置文件是否正常
pkill @R_404_196@ //强制关闭
killall @R_404_196@