zoukankan      html  css  js  c++  java
  • 学习服务器配置之路~~(2)

    配置PHP与Apache (CENTOS 6.5)

    原文参考链接:Click me

    第一步:安装Apache
    下载Apache源码到目录 如:/home/apache/
    解压(linux下我用.tar.gz 可以用tar工具命令:tar -zxvf  your-file.tar.gz)到当前目录

    第二部:编译、安装
    ./configure --enable-so --enable-ssl --with-mpm=prefork --with-included-apr

    中间报错 apr没有找到等错误

    下载:Apr and Apr-devel


    APR and APR-Util
    Make sure you have APR and APR-Util already installed on your system. If you don't, or prefer to not use the system-provided versions, download the latest versions of both APR and APR-Util from Apache APR, unpack them into ./srclib/apr and ./srclib/apr-util (be sure the directory names do not have version numbers; for example, the APR distribution must be under ./srclib/apr/) and use ./configure's --with-included-apr option. On some platforms, you may have to install the corresponding -dev packages to allow httpd to build against your installed copy of APR and APR-Util.

    这是Apache官方的说明

    所以解压完后,你要重名名


    #http-2.4.7是你刚才下载Apache解压出来的那个目录
    mv apr-1.4.6 /usr/src/httpd-2.4.7/srclib/apr
    mv apr-util-1.5.3 /usr/src/httpd-2.4.7/srclib/apr-util

    然后开启ssl
    cd /usr/local/apache2/conf/
    vim httpd.conf
    找到
    # LoadModule ssl_module modules/mod_ssl.so
    并注释掉
    wq保存退出
    cd /usr/local/apache2/conf/
    执行如下命令:
    openssl genrsa -des3 -out server.key 1024
    按提示操作
    然后:
    openssl req -new -key server.key -out server.csr
    然后
    openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
    启动服务
    /usr/local/apache2/bin/apachectl start



    第三部:安装配置PHP





  • 相关阅读:
    (转)贝叶斯推理及应用
    (转)zero copy原理
    (转)c指针问题
    (转)c++ new/delete,new[]/delete[]原理解析
    (转)Spring AOP编程原理、Demo
    (转)spring IOC、DI理解
    Django小例子 – 模型数据的模板呈现
    初探Django Admin(一)
    Windows7下搭建Django运行环境
    初探Django线程发送邮件
  • 原文地址:https://www.cnblogs.com/-Doraemon/p/4700064.html
Copyright © 2011-2022 走看看