安装ngnix

yum install -y make apr* autoconf automake curl curl-devel gcc gcc-c++ gtk+-devel zlib-devel pcre-devel

wget http://nginx.org/download/nginx-1.7.2.tar.gz

cd nginx-1.7.2

./configure --prefix=/usr/local/nginx

make && make install

启动 /usr/local/nginx/sbin/nginx

停止 /usr/local/nginx/sbin/nginx -s stop

记得开防火墙80。

出问题看下面内容:

./configure: error: the HTTP rewrite module requires the PCRE library解决

有时候,我们需要单独安装nginx,来处理大量的下载请求。

安装nginx遇到的rewrite和HTTP cache错误解决办法:

./configure --prefix=/usr/local/nginx

安装Nginx时报错

./configure: error: the HTTP rewrite module requires the PCRE library.

安装pcre-devel解决问题

yum -y install pcre-devel

错误提示:./configure: error: the HTTP cache module requires md5 functions

from OpenSSL library. You can either disable the module by using

--without-http-cache option, or install the OpenSSL library into the system,

or build the OpenSSL library statically from the source with nginx by using

--with-http_ssl_module --with-openssl= options.

解决办法:

yum -y install openssl openssl-devel

总结:

yum -y install pcre-devel openssl openssl-devel

./configure --prefix=/usr/local/nginx

make

make install

配置PHP-FPM/fast-cgi

yum -y install libxml2-devel openssl-devel curl-devel libjpeg-devel libpng-devel freetype-devel openldap-devel mysql-devel libtool-ltdl-devel

wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.13.1.tar.gz

tar zxvf libiconv-1.13.1.tar.gz

cd  libiconv-1.13.1

./configure
make && make install

wget http://nchc.dl.sourceforge.net/project/mcrypt/Libmcrypt/2.5.8/libmcrypt-2.5.8.tar.gz

tar zxvf libmcrypt-2.5.8.tar.gz
cd libmcrypt-2.5.8/
./configure
make && make install
/sbin/ldconfig

wget
http://nchc.dl.sourceforge.net/project/mhash/mhash/0.9.9.9/mhash-0.9.
9.9.tar.gz
tar zxvf mhash-0.9.9.9.tar.gz
cd mhash-0.9.9.9/
./configure
make
make install
cd ../

ln -s /usr/local/lib/libmcrypt.* /usr/lib/ (是否为rpm 包安装)
ln -s /usr/local/lib/libmhash.* /usr/lib/ (是否为rpm 包安装)

http://nchc.dl.sourceforge.net/project/mcrypt/MCrypt/2.6.8/mcrypt-2.6.8.tar.gz
tar zxvf mcrypt-2.6.8.tar.gz
cd mcrypt-2.6.8/
/sbin/ldconfig
./configure
make
make install
cd ../

wget http://cn2.php.net/distributions/php-5.5.13.tar.gz
cd php-5.5.13

./configure --with-mysql --with-mysql-sock=/var/lib/mysql/mysql.sock --with-mysql --with-mysqli=/usr/bin/mysql_config --with-iconv=/usr/local --with-freetype-dir --with-jpeg-dir
--with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-discard-path --enable-safe-mode --enable-bcmath --enable-shmop --enable-sysvsem --

enable-inline-optimization --with-curl --with-curlwrappers --enable-mbregex --enable-mbstring --with-mcrypt --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --

enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --with-pdo-mysql --without-pear --enable-fastcgi --enable-force-cgi-redirect --enable-fpm

make && make install

RHEL 7 安装 ngnix的更多相关文章

  1. 在CentOS或RHEL上安装Nux Dextop仓库

    介绍 Nux Dextop是类似CentOS.RHEL.ScientificLinux的第三方RPM仓库(比如:Ardour,Shutter等等).目前,Nux Dextop对CentOS/RHEL ...

  2. ubuntu14.04下安装ngnix,mediawiki,nodebb,everything,gitlab

    本周折腾了以下几个东西,mediawiki(维基),nodebb(论坛),gitlab(私有git服务器). 本来的目的是搭建一个wiki,选用了mediawiki后,使用apache搭建好了. 搭论 ...

  3. 在RHEL上安装Thrift(支持C++)的若干问题 » 编码无悔 / Intent & Focused

    在RHEL上安装Thrift(支持C++)的若干问题 » 编码无悔 / Intent & Focused [原创]在RHEL上安装Thrift(支持C++)的若干问题    2010年12月1 ...

  4. Red Hat Enterprise Linux Server(RHEL) yum安装软件时This system is not registered with RHN. RHN support will be disabled. 的解决方法(转)

    新安装了redhat6.5.安装后,登录系统,使用yum update 更新系统.提示: This system is not registered to Red Hat Subscription M ...

  5. RHEL自动安装zookeeper的shell脚本

    RHEL自动安装zookeeper的shell脚本 A:本脚本运行的机器,Linux RHEL6 B,C,D,...:待安装zookeeper cluster的机器, Linux RHEL6 首先在脚 ...

  6. RHEL/CentOS 安装最新版Nginx

    本篇简单介绍如何在RHEL/CentOS安装最新版本的Nginx. Step 1:安装yum-utils [root@localhost ~]# cat /etc/redhat-release Cen ...

  7. Linux(Centos7)安装ngnix服务器

    Ngnix服务器是一款优秀的静态页服务器软件和反向代理服务器软件 目前,centos安装ngnix可以yum安装也可以下载安装,我们为了扩展方便,选择下载安装.yum一键安装没什么好说的. 一.安装编 ...

  8. 理解RHEL上安装oracle的配置参数

    无论安装什么版本的oracle,在安装之前,都需要配置 /etc/pam.d/login   /etc/profile   /etc/security/limits.conf这三个文件 那这三个文件究 ...

  9. RHEL 5 安装phpqrcode生成二维码

    VMWARE中全新安装(默认)RHEL. 之后,yum 安装备apache/php 下载并上传phpqrcode 1.1.4版本,并将其解压至/var/www/html/phpqrcode (去掉ip ...

随机推荐

  1. 用js判断页面是否加载完成

    这可以通过用document.onreadystatechange的方法来监听状态改变, 然后用document.readyState == “complete”判断是否加载完成. 可以采用2个div ...

  2. <转载> Jquery的使用技巧-实用!

    1.使用方法在需要使用JQuery的页面中引入JQuery的js文件即可.例如:<script type="text/javascript" src="js/jqu ...

  3. phpstorm将多个int数字拼接成字符串

    场景:将程序输出的多个int数字拼成以','分隔的字符串 数据为 8680 24399 37619 45425 49635 139334 386918 429498 461616 523384 561 ...

  4. (转载)java提高篇(五)-----抽象类与接口

    接口和内部类为我们提供了一种将接口与实现分离的更加结构化的方法. 本文是转载的(尊重原著),原文地址:http://www.cnblogs.com/chenssy/p/3376708.html 抽象类 ...

  5. 网络摄像机进行互联网视频直播录像方案的选择,EasyNVS or EasyCloud or EasyGBS?

    背景需求 互联网视频直播越来越成为当前大势:直播的需求往往都伴随在录像的需求,对于录像,不同的场景又有不同的方案选择: 本篇博客将会介绍对应的几种录像方案,可以帮助有互联网录像需求的用户进行对应的录像 ...

  6. SharePoint服务器端对象模型 之 访问文件和文件夹(Part 2)

    4.添加文件夹 文件夹的创建方法在文档库和普通列表中稍有不同. 在文档库中,与一般的集合操作相同,直接使用SPFolderCollection的Add(string name)方法即可添加文件夹,例如 ...

  7. MySQL中常用字符串函数

    1.字符串长度函数CHAR_LENGTH(str),LENGTH(str)  CHAR_LENGTH()返回值为字符串str的长度,长度的单位为字符.一个多字节字符算作一个单字符.对于一个包含五个二字 ...

  8. Selenium IDE的使用

    Selenium IDE 的作用 Selenium IDE 是Firefox 浏览器的一个插件, 它会记录你对Firefox的操作,并且可以回放它的操作. 在实际自动化测试中,不会用Selenium ...

  9. 动态加载和卸载 DLL

    using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.T ...

  10. python多线程安全local()

    import time import threading from threading import local class Foo(local): pass # 实例化(创建)对象 foo = Fo ...