RHEL 7 安装 ngnix
安装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的更多相关文章
- 在CentOS或RHEL上安装Nux Dextop仓库
介绍 Nux Dextop是类似CentOS.RHEL.ScientificLinux的第三方RPM仓库(比如:Ardour,Shutter等等).目前,Nux Dextop对CentOS/RHEL ...
- ubuntu14.04下安装ngnix,mediawiki,nodebb,everything,gitlab
本周折腾了以下几个东西,mediawiki(维基),nodebb(论坛),gitlab(私有git服务器). 本来的目的是搭建一个wiki,选用了mediawiki后,使用apache搭建好了. 搭论 ...
- 在RHEL上安装Thrift(支持C++)的若干问题 » 编码无悔 / Intent & Focused
在RHEL上安装Thrift(支持C++)的若干问题 » 编码无悔 / Intent & Focused [原创]在RHEL上安装Thrift(支持C++)的若干问题 2010年12月1 ...
- 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 ...
- RHEL自动安装zookeeper的shell脚本
RHEL自动安装zookeeper的shell脚本 A:本脚本运行的机器,Linux RHEL6 B,C,D,...:待安装zookeeper cluster的机器, Linux RHEL6 首先在脚 ...
- RHEL/CentOS 安装最新版Nginx
本篇简单介绍如何在RHEL/CentOS安装最新版本的Nginx. Step 1:安装yum-utils [root@localhost ~]# cat /etc/redhat-release Cen ...
- Linux(Centos7)安装ngnix服务器
Ngnix服务器是一款优秀的静态页服务器软件和反向代理服务器软件 目前,centos安装ngnix可以yum安装也可以下载安装,我们为了扩展方便,选择下载安装.yum一键安装没什么好说的. 一.安装编 ...
- 理解RHEL上安装oracle的配置参数
无论安装什么版本的oracle,在安装之前,都需要配置 /etc/pam.d/login /etc/profile /etc/security/limits.conf这三个文件 那这三个文件究 ...
- RHEL 5 安装phpqrcode生成二维码
VMWARE中全新安装(默认)RHEL. 之后,yum 安装备apache/php 下载并上传phpqrcode 1.1.4版本,并将其解压至/var/www/html/phpqrcode (去掉ip ...
随机推荐
- java php 3des实现
php.java.android.ios通用的3des方法:http://blog.csdn.net/zcjwsrf/article/details/47659137 PHP使用3DES算法加密解密字 ...
- MySQL中enum类型数据,要传入字符串
问题来源:公司业务,某张表中一个字段定义为: enum('0','1','2','3','4','5','6','7','8','9','10') NOT NULL DEFAULT '0' 某天跑脚本 ...
- cocos2d-x:Layer::setPosition
如果Node的实际类型是Layer或者其派生类, setPosition是不是有猫腻? std::string menuImage = "menu.png"; auto menuI ...
- Invalid bound statement (not found) 问题处理
最近开发过程中遇到一个BUG:Invalid bound statement (not found): com.mapper.ResourceIdMappingsBatchMapper.deleteR ...
- PowerDesigner之设置(1)
这里用到的数据库为SQL2000. PowerDesigner 16. 原始格式: (个人认为的缺点) 创建表前先将原来的表删除(创建表逻辑,假如存在则drop.假如原来有数据,用drop就有问题.新 ...
- 不恰当使用线程池处理 MQ 消息引起的故障
现状 业务部门反应网站访问特别慢,负责运维监控的同事说MQ消息队列积压了,中间件的说应用服务器内存占用很高,GC 一直回收不了内存,GC 线程占了近 100% 的 CPU,其他的基本上都在等待,数据库 ...
- 洛谷 P2523 [HAOI2011]Problem c
洛谷1或洛谷2,它们是一样的题目,手动滑稽- 这一题我是想不出来, 但是我想吐槽一下坐我左边的大佬. 大佬做题的时候,只是想了几分钟,拍了拍大腿,干脆的道:"这不是很显然吗!" 然 ...
- 内置函数: filter 和 map
内置函数———filter和map filter filter() 函数用于过滤序列,过滤掉不符合条件的元素,返回由符合条件元素组成的新列表.接收两个参数,第一个为函数,第二个为序列,序列的每个元素作 ...
- m进制转n进制
http://www.cnblogs.com/pkuoliver/archive/2010/10/27/Convert-m-number-to-n-number.html 从这道题中可以看出,数论中存 ...
- boost之定时器和io_service
1.定时器的使用,sleep是等待线程,asio封装了操作系统的异步系统调用select,epoll. io_servie 实现了一个任务队列,这里的任务就是void(void)的函数.Io_serv ...