一. 源码包编译安装部署web服务器
1.安装nginx必须的依赖包
[root@test01 ~]# yum -y install gcc openssl-devel pcre-devel zlib-devel
2.安装编译nginx,目前系统测试环境为CentOS6.3 软件版本为nginx-1.2.6
[root@test01 ~]# useradd nginx -s /sbin/nologin
[root@test01 ~]# tar zxvf nginx-1.2.6.tar.gz
[root@test01 ~]# cd nginx-1.2.6
[root@test01 nginx-1.2.6]# ./configure --user=nginx --group=nginx --prefix=/usr/local/nginx/ --with-http_stub_status_module --with-http_ssl_module
// --with-http_stub_status_module 安装允许状态模块
// --with-http_ssl_module 安装ssl模块
[root@test01 ~]# /usr/local/nginx/sbin/nginx -v //查看Nginx的相关环境配置信息是否正确
nginx version: nginx/1.2.6
[root@test01 ~]#
[root@test01 nginx-1.2.6]# make & make install
//编译安装过程略
3.通过nginx自身脚本机器nginx服务器,并通过各种命令查看是否启动成功
[root@test01 ~]# /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
// -c指向nginx主配置文件
[root@test01 ~]# lsof -i :80 //查看nginx进程号及运行情况
COMMAND
PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
nginx
21910 root 9u IPv4 262148 0t0 TCP *:http (LISTEN)
nginx
21911 nginx 9u IPv4 262148 0t0 TCP *:http (LISTEN)
[root@test01 ~]# ps -ef | grep nginx //查看nginx进程号及运行情况
root
21910 1 0 10:41 ? 00:00:00 nginx: master process /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
nginx
21911 21910 0 10:41 ? 00:00:00 nginx: worker process
root
21957 21755 0 10:42 pts/0 00:00:00 grep nginx
[root@test01 ~]# netstat -nltp | grep 80 //查看nginx进程监听端口
[root@test01 ~]# netstat -an |grep 80
tcp
0 0 0.0.0.0:80 0.0.0.0:* LISTEN
4.通过windows服务器IE浏览器测试
2017最新鑫众游戏大厅源码架设和全套手机版运营级别源码下载:http://aqiulian/thread-91-1-1.html
更多推荐
2017最新鑫众游戏大厅源码架设和全套手机版运营级别源码下载
发布评论