1、安装nginx所须的pcre(pcre-7.7.tar.gz)库:
3、安装nginx,安装nginx_upstream_jvm_route时,加上--add-module=jvm代码的目录
4、创建nginx配置文件
./configure
make && make install
make && make install
2、安装nginx所须的openssl(openssl-1.0.0c.tar.gz)库:
./config
make && make install
make && make install
3、安装nginx,安装nginx_upstream_jvm_route时,加上--add-module=jvm代码的目录
tar zxvf nginx-0.8.53.tar.gz
./configure --user=www --group=www --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-openssl=/home/wang/ openssl-1.0.0c
make && make install
注:--with-openssl=后面指定openssl源代码的包,即上面安装的openssl源路径。
./configure --user=www --group=www --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-openssl=/home/wang/ openssl-1.0.0c
make && make install
4、创建nginx配置文件
依照自己的情况进行配置,
首行user www www 配置的www为configure中使用的www
首行user www www 配置的www为configure中使用的www
创建www
/usr/sbin/useradd www -s /sbin/nologin -M
/usr/local/nginx/sbin/nginx
注:默认安装的apache如果已启动的话,会占用80端口,导致nginx无法启动:
停止 httpd :
service httpd stop
chkconfig httpd off
其他:
可通过 ulimit -SHn 4096配置连接数
通过/etc/rc.local配置开机启动
通过加上-s参数来进行其他操作,比如 nginx -s reload等
停止 httpd :
service httpd stop
chkconfig httpd off
其他:
可通过 ulimit -SHn 4096配置连接数
通过/etc/rc.local配置开机启动
通过加上-s参数来进行其他操作,比如 nginx -s reload等