• 源码安装Apache


    一、下载Apache,源码安装Apache

    #下载
    [root@localhost opt]# wget -c https://mirrors.aliyun.com/apache/httpd/httpd-2.4.58.tar.gz
    [root@localhost opt]# ls
    httpd-2.4.58.tar.gz
    [root@localhost opt]# tar -xf httpd-2.4.58.tar.gz 
    [root@localhost opt]# ls
    httpd-2.4.58  httpd-2.4.58.tar.gz
    [root@localhost opt]#
    [root@localhost opt]# cd httpd-2.4.58
    
    #安装PCRE APR相关优化模块
    [root@localhost httpd-2.4.58]# yum  install  pcre-devel apr apr-devel apr-util apr-util-devel –y
    
    #预编译Apache,启用rewrite规则,启用动态加载库。
    [root@localhost httpd-2.4.58]# ./configure --prefix=/usr/local/apache2/ --enable-rewrite --enable-so
    
    #编译安装
    [root@localhost httpd-2.4.58]# make && make install
    
    #启动服务
    [root@localhost opt]# ps -ef |grep apache2
    root      40275   7750  0 11:31 pts/0    00:00:00 grep --color=auto apache2
    [root@localhost opt]# /usr/local/apache2/bin/apachectl start
    [root@localhost opt]# ps -ef |grep apache2
    root      40279      1  0 11:31 ?        00:00:00 /usr/local/apache2//bin/httpd -k start
    daemon    40280  40279  0 11:31 ?        00:00:00 /usr/local/apache2//bin/httpd -k start
    daemon    40281  40279  0 11:31 ?        00:00:00 /usr/local/apache2//bin/httpd -k start
    daemon    40282  40279  0 11:31 ?        00:00:00 /usr/local/apache2//bin/httpd -k start
    root      40365   7750  0 11:31 pts/0    00:00:00 grep --color=auto apache2
    [root@localhost opt]#
    
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31

    二、浏览器测试
    输入主机地址:http://192.168.145.129
    在这里插入图片描述

  • 相关阅读:
    两个路由器如何连接设置的方法攻略
    Vue iView DatePicker时间组件踩坑
    电脑老系统怎么换新系统?
    【Flink】复函数的使用,时间服务和定时器,值、列表、字典状态变量
    QT多线程之:moveToThread
    python实现矩阵转置
    LearnOpenGL1.3:着色器
    AppStore 图标 A/B Test
    STL map的几种赋值方式
    Kubernetes Pod调度策略
  • 原文地址:https://blog.csdn.net/robin_cai/article/details/134528276