| 
	 Nginx一个高性能的HTTP和反向代理服务器,也是一个IMAP/POP3/SMTP服务器,一个Apache服务器不错的替代品。 
	            能够支持高达 50,000 个并发连接数的响应 
	            负载均衡服务器 
	            邮件代理服务器 
	   它,一款轻量级的web服务器越来越被人们所熟知。作为即将要步上运维的我,也不得不去学习、了解、专研它,说实话这是我第一篇博客,也是我一个新的起点,我希望我能够在这条路上越走越远。 
	以下是我全部正确的安装过程: 
	1.安装Nginx依赖包 
	yum install -y pcre pcre-devel 
	yum install -y openssl openssl-devel 
	2.将下载的Nginx源码包上传到/home下  然后解压 
	tar zxvf nginx-1.9.9.tar.gz 
	3.进入到解压文件下 
	cd nginx-1.9.9 
	4.创建Nginx的用户组及用户 
	groupadd nginx 
	useradd -s /sbin/nologin -M -g nginx nginx 
	5.编译及安装 
	./configure --user=nginx --group=nginx --prefix=/home/nginx-1.9.9 --conf-path=/home/nginx-1.9.9/nginx.conf --with-http_stub_status_module --with-http_ssl_module 
	make && make install 
	6.配置 
	ln -s /home/nginx1.9.9/ /home/nginx 
	echo 'PATH=/home/nginx-1.9.9/sbin:$PATH' >>/etc/profile 
	source /etc/profile 
	7.启动 
	nginx -v 
	/home/nginx/sbin/nginx -t 
	/home/nginx/sbin/nginx 
	8.检查 
	ps -ef |grep nginx 
	netstat -antup |grep 80 
	 安装过程中的问题: 
	问题1: 
	make && make install 
	…… 
	cp conf/koi-win '/home/nginx-1.9.9/conf' 
	cp: `conf/koi-win' and `/home/nginx-1.9.9/conf/koi-win' are the same file 
	make[1]: *** [install] Error 1 
	make[1]: Leaving directory `/home/nginx-1.9.9' 
	make: *** [install] Error 2 
	解决方法: 
	将这一步改一下 
	./configure --prefix=/usr/local/nginx   
	TO 
	./configure --prefix=/usr/local/nginx --conf-path=/usr/local/nginx/nginx.conf   
	注:之前我没有加这句,安装过程中各个组件需要对应的安装路径。 
	问题2: 
	[root@CC nginx-1.9.9]# /home/nginx/sbin/nginx -t 
	nginx: the configuration file /home/nginx-1.9.9/nginx.conf syntax is ok 
	nginx: [emerg] getpwnam("nginx") failed 
	nginx: configuration file /home/nginx-1.9.9/nginx.conf test failed 
	[root@CC nginx-1.9.9]# /home/nginx/sbin/nginx 
	nginx: [emerg] getpwnam("nginx") failed 
	解决方法1: 
	      在nginx.conf中 把user nobody的注释去掉既可 
	解决方法2: 
	      错误的原因是没有创建www这个用户,应该在服务器系统中添加www用户组和用户www,如下命令: 
	[root@CC nginx-1.9.9]# groupadd nginx 
	[root@CC nginx-1.9.9]# useradd -s /sbin/nologin -M -g nginx nginx 
	[root@CC nginx-1.9.9]# /home/nginx/sbin/nginx -t  
	nginx: the configuration file /home/nginx-1.9.9/nginx.conf syntax is ok 
	nginx: configuration file /home/nginx-1.9.9/nginx.conf test is successful 
	注:之前没添加用户和用户组。(责任编辑:最模板) | 



 SuperShop跨境电子商务多用
							人气:451
							SuperShop跨境电子商务多用
							人气:451
						 茶叶商城整站源码特价
							人气:1976
							茶叶商城整站源码特价
							人气:1976
						 免费ecshop仿米奇网化妆品
							人气:4400
							免费ecshop仿米奇网化妆品
							人气:4400
						 酒美网模板之shopex免费模
							人气:3505
							酒美网模板之shopex免费模
							人气:3505
						 shopex也买酒模板
							人气:630
							shopex也买酒模板
							人气:630
						 ecshop简洁通用外贸模板
							人气:1429
							ecshop简洁通用外贸模板
							人气:1429