linux 安裝 Nginx
来源:互联网 发布:网络调研常见的方法 编辑:程序博客网 时间:2024/05/14 16:35
1.下載nginx url:http://nginx.org/en/download.html
2.安裝
1 )解压 : tar -zxvf nginx-xxx.tar.gz
2)cd 到解压的目录
3)执行./configure
发现报错
./configure: error: the HTTP rewrite module requires the PCRE library.You can either disable the module by using --without-http_rewrite_moduleoption, or install the PCRE library into the system, or build the PCRE librarystatically from the source with nginx by using --with-pcre=<path> option.报错信息说缺少以来PCRE
3.安装依赖
yum -y install pcre-devel
4.再次执行./configure
发现还是报错
./configure: error: the HTTP gzip module requires the zlib library.You can either disable the module by using --without-http_gzip_moduleoption, or install the zlib library into the system, or build the zlib librarystatically from the source with nginx by using --with-zlib=<path> option.继续安装依赖
yum -y install zlib-devel
5.再次执行./configure
Configuration summary + using system PCRE library + OpenSSL library is not used + using system zlib library nginx path prefix: "/usr/local/nginx" nginx binary file: "/usr/local/nginx/sbin/nginx" nginx modules path: "/usr/local/nginx/modules" nginx configuration prefix: "/usr/local/nginx/conf" nginx configuration file: "/usr/local/nginx/conf/nginx.conf" nginx pid file: "/usr/local/nginx/logs/nginx.pid" nginx error log file: "/usr/local/nginx/logs/error.log" nginx http access log file: "/usr/local/nginx/logs/access.log" nginx http client request body temporary files: "client_body_temp" nginx http proxy temporary files: "proxy_temp" nginx http fastcgi temporary files: "fastcgi_temp" nginx http uwsgi temporary files: "uwsgi_temp" nginx http scgi temporary files: "scgi_temp"
出现上面的信息,表示成功了 (虽然没有报错,但还是建议安装上openssl,yum -y install openssl)
然后依次
make
make install
cd 到解压的nginx文件夹下的sbin目录
./nginx -v 查看版本
./nginx 运行
6.查看进程
[root@localhost sbin]# ps -A | grep nginx16509 ? 00:00:00 nginx16510 ? 00:00:00 nginx访问 http://localhost (nginx默认端口80,所以不需要指定端口号)
阅读全文
0 0
- linux 安裝 Nginx
- ubuntu 安裝 nginx
- centos7 安裝nginx
- centos7 安裝 Nginx
- 自学nginx(一): nginx的快速安裝
- Linux 安裝 rtorrent
- VMware 安裝LINUX
- linux安裝mongodb
- Nginx配置----安全篇
- Liunx安转Nginx
- Linux五筆輸入法fcitx安裝
- Linux安裝虚拟磁带机
- Linux 解除安裝 Java?
- Linux 安裝 Redis 教程
- Linux Nginx
- linux(nginx)
- linux nginx
- Linux nginx
- Github本地仓库与远程仓库使用心得
- Docker 使用总结
- xv6上下文切换代码
- 关于使用dataBinding时无法自动生成binding类的问题
- 【Linux】MySQL数据库服务器的安装配置
- linux 安裝 Nginx
- OPNET仿真常见错误
- TCP/UDP简单理解
- 【物联网云端对接-2】通过MQTT协议与阿里云物联网套件进行云端通信
- Struts2的学习之路(三)
- 多网卡绑定配置-bonding
- 数组中出现次数超过一半的数字
- 创建者模式
- java--正则表达式