Categories: 工作

安装Nginx

安装;
#tar -xzf nginx-1.4.0.tar.gz
#yum -y install gcc pcre-devel openssl-devel
#cd nginx-1.4.0
#./configure –help 查找下安装的帮助
先在/usr/local 下面新建nginx文件夹 ,命令mkdir nginx.
# ./configure –prefix=/usr/local/nginx/ –with-http_mp4_module –with-http_ssl_module –with-http_flv_module –with-http_realip_module
报错OpenSSL没装,安装OpenSSL
#yum -y install openssl-devel
#make && make install
安装完毕…
#cd /usr/local/nginx/ 打开nginx安装目录
#ls 看下目录下面是否有conf html logs sbin
#cd sbin
#./nginx 启动nginx
启动时候报错
80端口被占用了.
#netstat -ntpl 先查看80端口占用的程序
#kill 7878
防火墙开放80端口
#vi /etc/sysconfig/iptables
加上-A INPUT -m state –state NEW -m tcp -p tcp –dport 80 -j ACCEPT
# service iptables restart 重启防火墙
如果外网访问还是不行的话,关闭下防火墙就可以了
Kai

Share
Published by
Kai

Recent Posts

VC 6.0 挂服务 提示503

我们有一台VC 6.0的服务挂…

2 周 ago

零成本grass挖矿教程

最近发现个新币,还没上交易所,…

3 周 ago

Windows Server 2025 的AD架构版本

   Windows 2025…

3 周 ago

【项目】跨数据中心(跨站点)Exchange Server 2013恢复/高可用

今年换到一家乙方公司了,主要工…

3 周 ago

主域挂了怎么办?

假设在极端情况下,没有备份的前…

1 月 ago

为什么在AD管理中只能看到3个操作主机?

我们在日常的Windows域管…

1 月 ago