nginx于resin集成(nginx安装)

1.ngiux的安装。

1)我的系统是linux(debian),首先从www.nginx.net上下载LINUX的版本。下载后我的目录是/usr/local/tuping/tools/server/nginx-0.8.53.tar.gz

然后解压root:$tar zxvf nginx-0.8.53.tar.gz

2)解压完成以后,

通过./configure --with-http_stub_status_module 进行配置文件设置。

对于我的linux环境,提示我还要安装pcre的包和OPENSSL的包

aptitude search pcre

然后找到libpcre3-dev

apt-get install libpcre3-dev

再次安装,提示我还要我安装openssl环境。

aptitude search ssl

找到libssl-dev

然后安装:apt-get install libssl-dev

安装完成以后:

./configure --with-http_stub_status_module 再次进行配置文件设置.(我的该设置,只是配置了nginx的状态监视器)

这样就设置完成。

3)然后通过make进行编译。

root:$cd /usr/local/tuping/tools/server/nginx-0.8.53

root:$make

4)编译完成,进行安装

root:$make install

安装完成。因为我没有设置安装路径,那么nginx默认就在/usr/local/nginx进行安装。

ngiux的启动

root:$cd /usr/local/nginx/sbin

查看./nginx -h

然后看到通过:

root:$./nginx 启动服务

root:$./nginx -s stop 停止服务

你可以通过ps -ef |grep nginx

查看是否有nginx的线程信息。

同时也可以通过在目录:/usr/local/nginx/logs/error.log

查看服务器的启动信息。

在NGINX的安装目录,可以通过:

root:$./nginx -t -c /usr/local/nginx/conf/nginx.conf

查看nginx配置文件是否正确。

如果正确显示如下信息:

the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
configuration file /usr/local/nginx/conf/nginx.conf test is successful

附件中是nginx服务器在LINUX下的安装包,和NGINX的学习文档。

NGINX安装指南

http://67054.blog.51cto.com/57054/128245

猜你喜欢

转载自baobeituping.iteye.com/blog/835648