zoukankan      html  css  js  c++  java
  • CentOS6.5搭建LNMP环境

    配置防火墙

    vi /etc/sysconfig/iptables
    
    -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT 
    -A INPUT -p icmp -j ACCEPT -A INPUT -i lo -j ACCEPT 
    -A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT 
    -A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT 
    -A INPUT -m state --state NEW -m tcp -p tcp --dport 8080 -j ACCEPT 
    -A INPUT -m state --state NEW -m tcp -p tcp --dport 8081 -j ACCEPT 
    -A INPUT -m state --state NEW -m tcp -p tcp --dport 8082 -j ACCEPT 
    -A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT 
    -A INPUT -j REJECT --reject-with icmp-host-prohibited 
    -A FORWARD -j REJECT --reject-with icmp-host-prohibited
    
    /etc/init.d/iptables restart

    二、编译安装Nginx

    yum -y install make zlib zlib-devel gcc-c++ libtool  openssl openssl-devel
    wget http://downloads.sourceforge.net/project/pcre/pcre/8.35/pcre-8.35.tar.gz
    ./configure
    make && make install

    yum install -y gcc gcc-c++

    wget http://nginx.org/download/nginx-1.6.2.tar.gz
    ./configure --prefix=/usr/local/nginx --without-http_rewrite_module
    --without-http_gzip_module
    make && make install
    /usr/local/webserver/nginx/sbin/nginx -v
    /usr/local/webserver/nginx/sbin/nginx
    ps -ef|grep nginx

    二、编译安装PHP
    http://www.dannyxu.com/39.html
    http://blog.aboutc.net/linux/65/compile-and-install-php-on-linux
    wget http://cn2.php.net/distributions/php-5.6.0.tar.xz

    #添加组
    groupadd www
    #添加php-fpm用户
    useradd -c php-fpm-user -g www -M php-fpm
     


    
    
     



  • 相关阅读:
    推广项目难点-隐藏IP上
    推广项目难点之数据清洗
    推广项目难点之数据随机分发
    推广项目新架构测试报告
    notepad++正则表达式
    MySQL查询时构建自增ID
    ASP.NET MVC页面UI之多级数据选择UI(行业信息、专业信息、职位信息的选择)
    DesignMode_EasyFactory
    Arithmetic_Thinking -- greedy algorithm
    JDBC--SQL(DDL)
  • 原文地址:https://www.cnblogs.com/wangwanchao/p/5628118.html
Copyright © 2011-2022 走看看