zoukankan      html  css  js  c++  java
  • 安装apache

    1.安装依赖软件

    • pcre
    • gcc
    • expat
    • apr(Apache portable Run-time libraries,Apache可移植运行库)
    • apr-util
    $ yum install gcc
    $ yum install pcre-devel
    $ yum install expat-devel
    $ cd /usr/local/src
    $ wget http://mirror.bit.edu.cn/apache//apr/apr-1.6.2.tar.gz
    $ wget http://mirror.bit.edu.cn/apache//apr/apr-util-1.6.0.tar.gz
    $ tar -zxvf apr-1.6.2.tar.gz
    $ cd apr-1.6.2
    $ ./configure --prefix=/usr/local/apr
    $ make && make install
    $ cd ..
    $ tar -zxvf apr-util-1.6.0.tar.gz
    $ cd apr-util-1.6.0
    $ ./configure --prefix=/usr/local/apr-util  --with-apr=/usr/local/apr
    $ make && make install

    2.安装apache httpd server

    $ cd..
    $ wget http://mirrors.aliyun.com/apache/httpd/httpd-2.4.28.tar.gz
    $ tar -zxvf httpd-2.4.28.tar.gz
    $ cd httpd-2.4.28
    $ ./configure --prefix=/usr/local/httpd --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --enable-so
    $ make && make install
    $ /usr/local/httpd/bin/apachectl start
    $ ps -aux | grep http #查看进程检查apache是否正常启动
    root 1215 0.0 0.2 70900 2136 ? Ss 12:06 0:00 /usr/local/httpd/bin/httpd -k start
    daemon 1216 0.0 0.4 359864 4252 ? Sl 12:06 0:00 /usr/local/httpd/bin/httpd -k start
    daemon 1217 0.0 0.4 359864 4252 ? Sl 12:06 0:00 /usr/local/httpd/bin/httpd -k start
    daemon 1218 0.0 0.4 359864 4252 ? Sl 12:06 0:00 /usr/local/httpd/bin/httpd -k start
    root 1305 0.0 0.0 112660 968 pts/0 R+ 12:07 0:00 grep --color=auto httpd
    
  • 相关阅读:
    C++数字与字符串相互转化
    NextDate问题
    Mac使用host屏蔽某指定网站
    Pycharm里面使用anaconda配置环境
    Logisim
    XML有关知识
    Mac环境下的Tomcat
    Allow apps downloaded from Anywhere
    寻找两数之和
    最大子序列
  • 原文地址:https://www.cnblogs.com/justlikeheaven/p/7728179.html
Copyright © 2011-2022 走看看