nginx负载均衡的离线安装方法
2018-01-23 12:08
447 查看
1.下载nginx的tar安装包;
2.下载nginx离线安装需要的依赖包;
3.将下载好的安装包上传到需要安装的目录下,我这里是在/usr/local目录下:
进入该目录,解压nginx的tar包:tar -zxvf nginx-1.6.3.tar.gz
进入nginx中:cd nginx-1.6.3
执行该命令:./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-pcre
到此会看到报错显示有依赖的包没装,用该命令安装提示所依赖的包,安装命令:rpm -ivh rpm包
例如:安装gcc依赖的包cloog
rpm -ivh cloog-ppl-0.15.7-1.2.el6.x86_64.rpm
…………依赖包安装完成后,
4.[root@localhost nginx-1.6.3]# make
[root@localhost nginx-1.6.3]# make install
[root@localhost nginx-1.6.3]# cd ..
然后会有个nginx文件夹,进入该文件夹:cd nginx
[root@localhost nginx]# cd sbin/
[root@localhost sbin]# ./nginx
然后;
[root@localhost local]# rm -rf nginx-1.6.3
然后再进入nginx
[root@localhost local]# cd nginx
[root@localhost nginx]# cd sbin/
[root@localhost sbin]# ./nginx -s reload
查看nginx进程:ps -ef | grep nginx,如果已经启动会看到3个进程
5.查看80端口是否开放,如果没有则开放
[root@localhost sbin]# vi /etc/sysconfig/iptables
修改之后重启防火墙
[root@localhost sbin]# service iptables restart
在浏览器里输入以下地址,如果出现 Welcome to nginx! 这几个大字,那么恭喜喽……
http://10.69.36.130(该服务器ip):80
6.有包冲突,删除rpm包:rpm -e cpp-4.4.7-4.el6.x86_64
7.查询包命令:rpm -qa | grep openssl
8.最后配置nginx.conf文件即可。
2.下载nginx离线安装需要的依赖包;
3.将下载好的安装包上传到需要安装的目录下,我这里是在/usr/local目录下:
进入该目录,解压nginx的tar包:tar -zxvf nginx-1.6.3.tar.gz
进入nginx中:cd nginx-1.6.3
执行该命令:./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-pcre
到此会看到报错显示有依赖的包没装,用该命令安装提示所依赖的包,安装命令:rpm -ivh rpm包
例如:安装gcc依赖的包cloog
rpm -ivh cloog-ppl-0.15.7-1.2.el6.x86_64.rpm
…………依赖包安装完成后,
4.[root@localhost nginx-1.6.3]# make
[root@localhost nginx-1.6.3]# make install
[root@localhost nginx-1.6.3]# cd ..
然后会有个nginx文件夹,进入该文件夹:cd nginx
[root@localhost nginx]# cd sbin/
[root@localhost sbin]# ./nginx
然后;
[root@localhost local]# rm -rf nginx-1.6.3
然后再进入nginx
[root@localhost local]# cd nginx
[root@localhost nginx]# cd sbin/
[root@localhost sbin]# ./nginx -s reload
查看nginx进程:ps -ef | grep nginx,如果已经启动会看到3个进程
5.查看80端口是否开放,如果没有则开放
[root@localhost sbin]# vi /etc/sysconfig/iptables
修改之后重启防火墙
[root@localhost sbin]# service iptables restart
在浏览器里输入以下地址,如果出现 Welcome to nginx! 这几个大字,那么恭喜喽……
http://10.69.36.130(该服务器ip):80
6.有包冲突,删除rpm包:rpm -e cpp-4.4.7-4.el6.x86_64
7.查询包命令:rpm -qa | grep openssl
8.最后配置nginx.conf文件即可。
相关文章推荐
- eclipse中ADT离线安装方法
- Windows Server 2012 离线安装.NET2.0-3.5的方法
- Submit Text2 插件下载列表 20151104 及离线安装方法
- .net 3.5 sp1 完整安装包离线安装方法
- [GitHub]GitHub for Windows离线安装的方法
- python2.7 离线安装 pyinstaller的方法
- Keil 离线安装packet方法
- apache负载均衡的安装和实现方法
- sublime text3 插件Emmet和pyv8离线安装方法
- ADT 离线安装的方法(我用的是第一种,myeclipse8.5成功了)
- 最详细的Cydia使用教程------完全版。新补充Cydia1.1.1离线安装(升级)方法。
- Win10离线安装.NET Framework 3.5的方法技巧
- lrzsz离线安装方法
- Windows Server 2012 离线安装.NET2.0-3.5的方法
- Microsoft .NET Framework 3.5 sp1 安装速度慢,快速离线安装的方法
- nginx负载均衡的session共享问题的解决方法
- firebug离线安装方法:把firebug下载了,直接拖到firefox浏览器中即可。
- Android SDK离线安装方法详解(加速安装)
- ADT 离线安装的方法