`

centos6.5 下nginx的部署填各种坑

阅读更多
1、本人第一次安装nginx;
nginx下载路径http://nginx.org/en/download.html
版本: nginx-1.12.2  pgp
步骤:
  a、解压nginx-1.12.2.tar.gz
    
tar -zxvf nginx-1.12.2.tar.gz

  b、进入nginx-1.12.2目录
  
      [root@jshy190 crxy]# cd nginx-1.12.2
[root@jshy190 nginx-1.12.2]# ls
auto  CHANGES  CHANGES.ru  conf  configure  contrib  html  LICENSE  Makefile  man  objs  README  src
[root@jshy190 nginx-1.12.2]# ./configure 
checking for OS
 + Linux 2.6.32-431.el6.x86_64 x86_64
checking for C compiler ... found
 + using GNU C compiler
 + gcc version: 4.4.7 20120313 (Red Hat 4.4.7-4) (GCC) 
checking for gcc -pipe switch ... found
checking for -Wl,-E switch ... found
checking for gcc builtin atomic operations ... found
checking for C99 variadic macros ... found
checking for gcc variadic macros ... found
checking for gcc builtin 64 bit byteswap ... found
checking for unistd.h ... found
checking for inttypes.h ... found
checking for limits.h ... found
checking for sys/filio.h ... not found
checking for sys/param.h ... found
checking for sys/mount.h ... found
checking for sys/statvfs.h ... found
checking for crypt.h ... found
checking for Linux specific features
checking for epoll ... found
checking for EPOLLRDHUP ... found
checking for EPOLLEXCLUSIVE ... not found
checking for O_PATH ... not found
checking for sendfile() ... found
checking for sendfile64() ... found
checking for sys/prctl.h ... found
checking for prctl(PR_SET_DUMPABLE) ... found
checking for sched_setaffinity() ... found
checking for crypt_r() ... found
checking for sys/vfs.h ... found
checking for nobody group ... found
checking for poll() ... found
checking for /dev/poll ... not found
checking for kqueue ... not found
checking for crypt() ... not found
checking for crypt() in libcrypt ... found
checking for F_READAHEAD ... not found
checking for posix_fadvise() ... found
checking for O_DIRECT ... found
checking for F_NOCACHE ... not found
checking for directio() ... not found
checking for statfs() ... found
checking for statvfs() ... found
checking for dlopen() ... not found
checking for dlopen() in libdl ... found
checking for sched_yield() ... found
checking for SO_SETFIB ... not found
checking for SO_REUSEPORT ... found
checking for SO_ACCEPTFILTER ... not found
checking for SO_BINDANY ... not found
checking for IP_BIND_ADDRESS_NO_PORT ... not found
checking for IP_TRANSPARENT ... found
checking for IP_BINDANY ... not found
checking for IP_RECVDSTADDR ... not found
checking for IP_PKTINFO ... found
checking for IPV6_RECVPKTINFO ... found
checking for TCP_DEFER_ACCEPT ... found
checking for TCP_KEEPIDLE ... found
checking for TCP_FASTOPEN ... not found
checking for TCP_INFO ... found
checking for accept4() ... found
checking for eventfd() ... found
checking for int size ... 4 bytes
checking for long size ... 8 bytes
checking for long long size ... 8 bytes
checking for void * size ... 8 bytes
checking for uint32_t ... found
checking for uint64_t ... found
checking for sig_atomic_t ... found
checking for sig_atomic_t size ... 4 bytes
checking for socklen_t ... found
checking for in_addr_t ... found
checking for in_port_t ... found
checking for rlim_t ... found
checking for uintptr_t ... uintptr_t found
checking for system byte ordering ... little endian
checking for size_t size ... 8 bytes
checking for off_t size ... 8 bytes
checking for time_t size ... 8 bytes
checking for AF_INET6 ... found
checking for setproctitle() ... not found
checking for pread() ... found
checking for pwrite() ... found
checking for pwritev() ... found
checking for sys_nerr ... found
checking for localtime_r() ... found
checking for posix_memalign() ... found
checking for memalign() ... found
checking for mmap(MAP_ANON|MAP_SHARED) ... found
checking for mmap("/dev/zero", MAP_SHARED) ... found
checking for System V shared memory ... found
checking for POSIX semaphores ... not found
checking for POSIX semaphores in libpthread ... found
checking for struct msghdr.msg_control ... found
checking for ioctl(FIONBIO) ... found
checking for struct tm.tm_gmtoff ... found
checking for struct dirent.d_namlen ... not found
checking for struct dirent.d_type ... found
checking for sysconf(_SC_NPROCESSORS_ONLN) ... found
checking for openat(), fstatat() ... found
checking for getaddrinfo() ... found
checking for PCRE library ... not found
checking for PCRE library in /usr/local/ ... not found
checking for PCRE library in /usr/include/pcre/ ... not found
checking for PCRE library in /usr/pkg/ ... not found
checking for PCRE library in /opt/local/ ... not found

./configure: error: the HTTP rewrite module requires the PCRE library.
You can either disable the module by using --without-http_rewrite_module
option, or install the PCRE library into the system, or build the PCRE library
statically from the source with nginx by using --with-pcre=<path> option.
   

发现PCRE 不可用,好吧,遇到这种错误,想到的是没有安装。顺便检查一下是否安装呗。
[root@jshy190 nginx-1.12.2]# rpm -qa pcre
pcre-7.8-6.el6.x86_64

尼玛的,居然存在,那就是版本不对咯,卸载的了。继续吧兄弟:
[root@jshy193 nginx-1.12.2]# rpm   -e  --nodeps    pcre
[root@jshy193 nginx-1.12.2]# rpm -qa pcre
[root@jshy193 nginx-1.12.2]# 

卸载完了开始安装pcre了。
[root@jshy193 nginx-1.12.2]# yum -y install pcre-devel
Loaded plugins: fastestmirror, refresh-packagekit, security
Determining fastest mirrors
 * base: mirrors.cn99.com
 * extras: mirrors.163.com
 * updates: mirrors.cn99.com
base                                                                                                                                                                  | 3.7 kB     00:00     
extras                                                                                                                                                                | 3.4 kB     00:00     
extras/primary_db                                                                                                                                                     |  29 kB     00:00     
updates                                                                                                                                                               | 3.4 kB     00:00     
updates/primary_db                                                                                                                                                    | 5.8 MB     00:02     
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package pcre-devel.x86_64 0:7.8-7.el6 will be installed
--> Processing Dependency: pcre = 7.8-7.el6 for package: pcre-devel-7.8-7.el6.x86_64
--> Processing Dependency: libpcreposix.so.0()(64bit) for package: pcre-devel-7.8-7.el6.x86_64
--> Processing Dependency: libpcrecpp.so.0()(64bit) for package: pcre-devel-7.8-7.el6.x86_64
--> Processing Dependency: libpcre.so.0()(64bit) for package: pcre-devel-7.8-7.el6.x86_64
--> Running transaction check
---> Package pcre.x86_64 0:7.8-7.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================================================================================================================================
 Package                                         Arch                                        Version                                         Repository                                 Size
=============================================================================================================================================================================================
Installing:
 pcre-devel                                      x86_64                                      7.8-7.el6                                       base                                      320 k
Installing for dependencies:
 pcre                                            x86_64                                      7.8-7.el6                                       base                                      196 k

Transaction Summary
=============================================================================================================================================================================================
Install       2 Package(s)

Total download size: 516 k
Installed size: 1.4 M
Downloading Packages:
(1/2): pcre-7.8-7.el6.x86_64.rpm                                                                                                                                      | 196 kB     00:00     
(2/2): pcre-devel-7.8-7.el6.x86_64.rpm                                                                                                                                | 320 kB     00:00     
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                        1.5 MB/s | 516 kB     00:00     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
** Found 8 pre-existing rpmdb problem(s), 'yum check' output follows:
gnote-0.6.3-3.el6.x86_64 has missing requires of libpcre.so.0()(64bit)
gnote-0.6.3-3.el6.x86_64 has missing requires of libpcrecpp.so.0()(64bit)
grep-2.6.3-4.el6.x86_64 has missing requires of libpcre.so.0()(64bit)
httpd-2.2.15-29.el6.centos.x86_64 has missing requires of libpcre.so.0()(64bit)
httpd-tools-2.2.15-29.el6.centos.x86_64 has missing requires of libpcre.so.0()(64bit)
less-436-10.el6.x86_64 has missing requires of libpcre.so.0()(64bit)
2:postfix-2.6.6-2.2.el6_1.x86_64 has missing requires of libpcre.so.0()(64bit)
2:postfix-2.6.6-2.2.el6_1.x86_64 has missing requires of pcre
  Installing : pcre-7.8-7.el6.x86_64                                                                                                                                                     1/2 
  Installing : pcre-devel-7.8-7.el6.x86_64                                                                                                                                               2/2 
  Verifying  : pcre-7.8-7.el6.x86_64                                                                                                                                                     1/2 
  Verifying  : pcre-devel-7.8-7.el6.x86_64                                                                                                                                               2/2 

Installed:
  pcre-devel.x86_64 0:7.8-7.el6                                                                                                                                                              

Dependency Installed:
  pcre.x86_64 0:7.8-7.el6                                                                                                                                                                    

Complete!

这个就把pcre-devel解决了。OK。接下啦继续nginx步骤了。下面
[root@jshy193 nginx-1.12.2]# ./configure
[root@jshy193 nginx-1.12.2]# make
[root@jshy193 nginx-1.12.2]# make install

运气不错,make操作正常
分享到:
评论

相关推荐

    Centos 6.5 下安装部署Nginx.pdf 高清下载

    本文档主要记录了Nginx 在Centos 6.5系统下的搭建过程,简洁的安装步骤,详细的安装内容及方法一定是您期待的

    CentOS6.5+mysql+nginx+php+memcached安装指南

    Windows8上安装虚拟机VirtualBox,然后新建虚拟电脑,搭建CentOS6.5 + mysql + nginx + php + memcached平台环境,部署网站。文档中记录了部分FAQ。

    docker 部署体验

    CentOS6.5 升级内核 部署docker 并运行几个简单的容器

    CentOS 6.5编译安装Nginx 1.10.2+MySQL 5.5.52+PHP5.5.38

    准备篇 一、配置防火墙,开启80端口、3306端口 vi /etc/sysconfig/iptables #编辑防火墙配置文件 # Firewall configuration written by system-config-firewall # Manual customization of this file is not ...

    CentOS6.5下Tomcat7 Nginx Redis配置步骤教程详解

    所有配置均在一台机器上完成,部署拓扑信息如下: 注意:由于Redis配置对jar包和tomcat版本比较严格,请务必使用tomcat7和本文中提供的jar包。 下载地址: http://pan.baidu.com/s/1bO67Ky tomcat: tomcat1 ...

    Centos 6.5 64位中Nginx详细安装部署教程

    Nginx是一个web服务器也可以用来做负载均衡及反向代理使用,目前使用最多的就是负载均衡,具体简介我就不介绍了百度一下有很多,下面直接进入安装步骤,需要的朋友可以参考下

    Nginx+Tomcat+Mencached负载均衡集群部署笔记

    本文档主要讲解,如何在CentOS6.5下搭建Nginx+Tomcat+Memcached负载均衡集群服务器,Nginx负责负载均衡,Tomcat负责实际服务,Memcached负责同步Tomcat的Session,达到Session共享的目的。

    Nginx Linux安装部署详细教程

    Linux系统是Centos 6.5 64位,我直接切换到root用户下安装 进入用户目录下载程序 下载相关组件 [root@localhost src]# wget http://nginx.org/download/nginx-1.10.2.tar.gz 省略安装内容... [root@localhost src...

    zabbix一键部署

    支持CentOS 6.5系统的zabbix一键部署脚本Nginx 1.6.2 + mysql5.5.x + PHP-FPM 5.4.x + Zabbix 2.4.4

    服务器部署-02-应用及数据库环境搭建.docx

    基于操作系统Centos 6.5,包含网络配置,tomcat,jdk,nginx,vsftpd,redis,mysql,openssh,的安装配置过程。

    详解阿里云LINUX服务器配置HTTPS(NGINX)

    服务器为阿里云 ECS,操作系统为 CentOS 6.5。 部署配置说明 第一步,安装nginx 之所以要先安装 nginx,是因为下面配置域名解析的时候可以直接在浏览器看到效果,当然了,先配置域名,然后 ping 一下也是可以的 下载...

    auto_install:一个离线自动部署Nginx,Redis,JDK环境的简单脚本

    auto_install 一个离线自动部署环境的简单脚本 部署Nginx,Redis,JDK包括其...Centos6.5 Centos7.5 编辑脚本文件设置: make=4 #编译使用的线程数,一般为CPU数量的俩倍 nginx(){ prefix="/opt/nginx" #软件安装的位置: }

    PHP的Laravel框架结合MySQL与Redis数据库的使用部署

    相对于熟读官方文档,更重要的是要... Linux阿里云已经自带了,本文使用的是centOS 6.5 64位的ECS 关于Nginx和Apache的选择看自己喜好,本文使用的是反向代理能手Nginx 是否安装Mysql也要看自己的情况,例如你使用阿

    微信小程序的部署方法步骤

    centos6.5 1资料准备 1)linux服务器,推荐使用阿里云,这里预算有限,所以使用了香港的低配服务器。 2)域名,这里是在阿里云平台上申请的,没有申请到cn,因为身份证信息和网上查询的有问题,我是转到学校的,...

    ansible-wordpress:安装WordPress + Nginx + PHP-FPM的ansible角色

    Ansible WordPress + Nginx + PHP-FPM部署这是从派生的ansible角色,以显示如何将高级Ansible剧本安装到由mist.io设置的服务器上。... 已在DigitalOcean的CentOS 6.7 64位,Azure的CentOS 6.5 64位上进行了测试。

    阿里云ECS Linux服务器项目部署实战视频课程

    本套课程建立在阿里云linux(centos6.5)具体内容如下:1,购买云主机&安装上传工具2,安装nginx3,绑定域名(域名备案,虚拟主机绑定等)4,安装mysql(设定开机启动,环境变量,更改连接密码等)5,安装php6,配置nginx...

    wcdog迷你新闻发布系统 v1.0

    os CentOs 6.5 nginx 1.12.2wcdog说明1.mysql数据库,见项目根目录wcdog.sql,需手动导入,可自行添加数据。 2.注意tomcat端口,管理系统和H5前端baseUrl均为8081端口,也可以自行修改。 3.使用管理后台(wcdog-...

    wcdog迷你新闻发布系统-其他

    os CentOs 6.5 nginx 1.12.2 wcdog说明: 1.mysql数据库,见项目根目录wcdog.sql,需手动导入,可自行添加数据。 2.注意tomcat端口,管理系统和H5前端baseUrl均为8081端口,也可以自行修改。 3.使用管理后台(wcdog-...

    chef-tiddlywiki5:用于部署 TiddlyWiki5 的厨师食谱

    CentOS (6.5) Ubuntu (14.04) 目前与 Chef 12 不兼容,因为它依赖于 application_nginx 说明书: : 属性 钥匙 类型 描述 默认 ['tiddlywiki5']['用户'] 细绳 将“拥有”TW5 安装的操作系统用户帐户。 tw5 ['...

Global site tag (gtag.js) - Google Analytics