zoukankan      html  css  js  c++  java
  • linux gcc nginx

    1.安装GCC
    [root@rekfan.com opt]# rpm -ivh cpp-4.1.2-48.el5.i386.rpm
    [root@rekfan.com opt]# rpm -ivh kernel-headers-2.6.18-194.el5.i386.rpm
    [root@rekfan.com opt]# rpm -ivh glibc-headers-2.5-49.i386.rpm
    [root@rekfan.com opt]# rpm -ivh glibc-devel-2.5-49.i386.rpm
    [root@rekfan.com opt]# rpm -ivh libgomp-4.4.0-6.el5.i386.rpm
    [root@rekfan.com opt]# rpm -ivh gcc-4.1.2-48.el5.i386.rpm
    [root@rekfan.com opt]# rpm -ivh pcre-devel-6.6-6.el5.x86_64.rpm

    2.安装nginx
    ./configure --prefix=/usr/local/nginx1.12/ --without-http_gzip_module

    make -f objs/Makefile
    make[1]: Entering directory `/data/source/nginx'
    cd /usr/local/ufo/lib/pcre
    && if [ -f Makefile ]; then make distclean; fi
    && CC="gcc" CFLAGS="-O2 -fomit-frame-pointer -pipe "
    ./configure --disable-shared
    /bin/sh: ./configure: No such file or directory
    make[1]: *** [/usr/local/services/lib/pcre/Makefile] Error 127
    make[1]: Leaving directory `/data/source/nginx-0.7.61'
    make: *** [build] Error 2

    --with-pcre force PCRE library usage
    --with-pcre=DIR set path to PCRE library sources


    3.测试
    [root@rekfan.com opt]# cd /usr/local/nginx1.12/sbin
    [root@localhost sbin]# ./nginx -t
    nginx: the configuration file /usr/local/nginx1.12//conf/nginx.conf syntax is ok
    nginx: configuration file /usr/local/nginx1.12//conf/nginx.conf test is successful

    4. 启动

    [root@rekfan.com opt] ./nginx

      停止nginx : nginx -s stop
     
      重启nginx : nginx -s reload

    5 配置防火墙80端口
    #修改防火墙配置:
    # vi + /etc/sysconfig/iptables
    #添加配置项
    -A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
    #重启防火墙
    # service iptables restart

  • 相关阅读:
    Windows Phone7 开发工具简介
    peration not supported. Unknown error: 0x8973190e
    C/C++学习建议(摘抄自:程序员2010年8月P61页)
    OpenOffice/LibreOffice的行距问题
    Finder打开剪切功能
    设备资源管理系统-用户管理
    设备资源管理系统-数据字典
    设备资源管理系统-代办事宜
    设备资源管理系统-首页显示
    设备资源管理系统-DAO底层方法-查询
  • 原文地址:https://www.cnblogs.com/myibm/p/7644601.html
Copyright © 2011-2022 走看看