ngingx安装错误 ./configure: error: the HTTP rewrite module requires the PCRE library.
有时候,我们需要单独安装nginx,来处理大量的下载请求。单独在Centos5安装nginx遇到的rewrite和HTTP cache错误解决办法:
wget http://nginx.org/download/nginx-0.8.33.tar.gz
tar -zxvf nginx-0.8.33.tar.gz
cd nginx-0.8.33
./configure --prefix=/usr/local/nginx
安装Nginx时报错
./configure: error: the HTTP rewrite module requires the PCRE library.
安装pcre-devel解决问题
yum -y install pcre-devel
解决 RHEL 7/ CentOS 7/Fedora 出现Unit iptables.service failed to load
CentOS 7.0默认使用的是firewall作为防火墙,这里改为iptables防火墙。
firewall:
1 | systemctl start firewalld.service #启动firewall |
2 | systemctl stop firewalld.service #停止firewall |
3 | systemctl disable firewalld.service #禁 |
改成iptables
firewall:
1 | systemctl start iptables.service |
2, 准备编译环境 yum -y install gcc gcc+ gcc-c++ openssl openssl-devel pcre pcre-devel 三台机器都进行安装,并且创建两个新用户fastdfs 和nginx
useradd fastdfs -M -s /sbin/nologin useradd nginx -M -s /sbin/nologin
为了方便测试 请关闭防火墙 service iptables stop
yum [Errno 256] No more mirrors to try 解决方法
- yum clean all
- yum makecache