源码安装nginx
2014-03-05 19:52
716 查看
准备工作:
1)确保以安装开发工具和开发库2)卸载已安装的其他web服务软件
3)新建用户:nginx
4)安装依赖库
# yum -y install pcre-devel
1、解包
[root@web01 nginx-package]# tar -zxfnginx-0.8.55.tar.gz
2、配置
./configure常用选项--prefix=PATH //指定安装路径
--user=USER
--group=GROUP
//为进程设置非特权用户的组
--with-http_stub_status_module //添加stub模块
--with-http_ssl_module//添加ssl模块
[root@web01 nginx-0.8.55]# ./configure--prefix=/usr/local/nginx --user=nginx --group=nginx --with-http_stub_status_module --with-http_ssl_module
3、编译安装
[root@web01 nginx-0.8.55]# make &&make install
4、将nginx加入环境变量
[root@web01 ~]# vim .bash_profile 10 PATH=$PATH:$HOME/bin:/usr/local/nginx/sbin [root@web01 ~]# source .bash_profile
5、启动nginx,并查看状态
[root@web01 ~]# nginx [root@web01 ~]# netstat -anltp | grep nginx tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 8212/nginx [root@web01 ~]#
监听端口:80
进程名:nginx
传输协议:tcp
6、访问测试
[root@web01 ~]# elinks --dump http://localhost Welcome to nginx! [root@web01 ~]#
本文出自 “小风” 博客,请务必保留此出处http://huanglianfeng.blog.51cto.com/4813074/1368832
相关文章推荐
- Ubuntu 源码安装 nginx 1.9.2
- Nginx实战基础篇一 源码包编译安装部署web服务器 推荐
- Linux中nginx的源码安装
- Nginx源码安装及调优配置
- Centos 源码安装 nginx
- centos下源码安装Nginx详细操作步骤和方法
- 图解Linux下源码安装PHP7.0.9 +Nginx
- Linux系统 - 源码编译安装Nginx
- nginx服务器详细安装过程(使用yum 和 源码包两种安装方式,并说明其区别)
- ubuntu源码方式安装nginx
- 源码方式安装nginx
- Nginx源码方式安装
- LAMP环境部署:Apache源码安装+MySQL二进制安装+PHP源码安装+Nginx源码安装
- centos源码安装Nginx问题解决
- CentOS7.2下源码安装Nginx 1.10.2
- nginx + mysql + php相关源码包及安装
- 源码编译安装Nginx服务
- CentOS 6.5 + Nginx 1.8.0 + PHP 5.6(with PHP-FPM) 负载均衡源码安装 之 (一)Nginx安装篇
- 源码编译安装nginx和python
- linux RedHat7LNMP构架搭建论坛之源码安装Nginx(1)