nginx菜鸟教程一

编程知识 行业动态 更新时间:2024-06-13 00:19:45

nginx的安装:
下载地址:http://nginx/download/nginx-1.7.7.tar.gz
-- ./configure --prefix=/user/local/nginx
安装准备:ngnix依赖pcre库,要先安装pcre
yum install pcre
yum install pcre-devel
nginx依赖zlib库,要安装
yum install -y zlib-devel
make && make install
启动naginx
cd /user/local/nginx
....conf 配置文件
....html 网页文件
....logs 日志文件
....sbin 主要二进制程序


--错误
[root@localhost sbin]# ./nginx 
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] still could not bind()
--不能绑定80端口,80端口已经被占用(有时候自己装了apache,nginx等,更多情况是操作系统自带了apache并作为服务启动)
解决:把占用80端口的软件或服务关闭
查看80端口是否被占用
netstat -antp
pkill -9 进程号
运行
[root@localhost sbin]# ./nginx 

转载于:https://my.oschina/u/993551/blog/345749

更多推荐

nginx菜鸟教程一

本文发布于:2023-03-28 18:47:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/313e2f12cb3831158aae6f185ab33385.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:菜鸟   教程   nginx

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!