linux下安装nginx详细步骤
来源:互联网 发布:学化妆的软件 编辑:程序博客网 时间:2024/06/05 16:13
先将需要的压缩包下载好,放到/usr/local下
nginx-1.10.1.tar.gz
openssl-1.0.2h.tar.gz
pcre-8.38.tar.gz
zlib-1.2.8.tar.gz
1.cd /usr/local
2.安装GCC 和GCC-C++
yum install gcc
yum install -y gcc gcc-c++
3.安装pcre库
cd /usr/local/
tar -zxvf pcre-8.38.tar.gz
cd pcre-8.38
./configure
make
make install
4.安装zlib库
cd /usr/local/
tar -zxvf zlib-1.2.8.tar.gz
cd zlib-1.2.8/
./configure
make
make install
5.安装ssl
cd /usr/local/
tar -zxvf openssl-1.0.2h.tar.gz
cd openssl-1.0.2h
./config
make
make install
6.安装nginx
cd /usr/local/
tar -zxvf nginx-1.10.1.tar.gz
./configure --prefix=/usr/local/nginx --user=www --group=www --with-http_stub_status_module --with-http_ssl_module
执行此步若出现报错1,如下,则执行yum -y install openssl-devel
若出现抱错2,如下,则执行
yum downgrade openssl
yum install openssl-devel
然后再执行 ./configure --prefix=/usr/local/nginx --user=www --group=www --with-http_stub_status_module --with-http_ssl_module
make
make install
安装完成
7.启动nginx
cd /usr/local/nginx
./sbin/nginx
启动时若出现nginx:[emerg] getpwnam("www")failed
则将配置文件nginx.conf中user nobody; 的注释去掉
----------------------------------------------------------------------------
报错1:
./configure: error: SSL modules require the OpenSSL library.
You can either do not enable the modules, or install the OpenSSL library
into the system, or build the OpenSSL library statically from the source
with nginx by using --with-openssl=<path> option.
报错2:
Error: Multilib version problems found. This often means that the root
cause is something else and multilib version checking is just
pointing out that there is a problem. Eg.:
1. You have an upgrade for openssl which is missing some
dependency that another package requires. Yum is trying to
solve this by installing an older version of openssl of the
different architecture. If you exclude the bad architecture
yum will tell you what the root cause is (which package
requires what). You can try redoing the upgrade with
--exclude openssl.otherarch ... this should give you an error
message showing the root cause of the problem.
2. You have multiple architectures of openssl installed, but
yum can only see an upgrade for one of those arcitectures.
If you don't want/need both architectures anymore then you
can remove the one with the missing update and everything
will work.
3. You have duplicate versions of openssl installed already.
You can use "yum check" to get yum show these errors.
...you can also use --setopt=protected_multilib=false to remove
this checking, however this is almost never the correct thing to
do as something else is very likely to go wrong (often causing
much more problems).
Protected multilib versions: openssl-1.0.1e-15.el6.i686 != openssl-1.0.1 -48.el6_8.1.x86_64
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
- linux下安装nginx详细步骤
- linux下安装nginx步骤
- Ubuntu下安装Nginx详细步骤
- Linux下安装Nginx详细步骤及nginx多服务器配置
- Linux下源码安装Nginx的步骤
- Linux下Nginx的安装步骤
- Linux下Nginx的安装步骤
- Linux下源码安装Nginx的步骤
- 在Linux下安装mysql详细步骤
- Linux下安装DB2的详细步骤!
- Linux下Oracle的安装详细步骤
- linux下安装DB2的详细步骤!
- Linux下Hadoop集群安装详细步骤
- Linux下Hadoop集群安装详细步骤
- linux下安装DB2的详细步骤
- Linux下Hadoop集群安装详细步骤 .
- linux下安装redmine2.5.1详细步骤
- Linux下Hadoop集群安装详细步骤
- Android6.0 按键流程 读取设备事件(一)
- JS正则表达式方法
- Android 6.0修改系统权限分析(一)
- redis实现控制用户一分钟只能操作一次,不能频繁操作
- MFC扩展DLL与常规DLL的区别
- linux下安装nginx详细步骤
- swift3下通讯录的开发
- webpack2.+入门概念
- MATLAB最小二乘最优问题
- N26--第十二周博客作业
- SS6.2_Hibernate_Hibernate_IdStrategyAnnotation 主键生成策略uuid Annotation注解的配置方式
- 03-S3C2440u-boot学习之u-boot分析之源码第1、2阶段
- C# Task的用法
- Android之SurfaceView学习