Centos7 安装和卸载 Apache HTTP Server(“ httpd”)服务

    技术2023-10-01  97

    目录

    一、安装 httpd

    二、卸载 httpd


    一、安装 httpd

    1、安装

    yum install httpd -y

    2、启动

    systemctl start httpd.service

    3、停止

    systemctl stop httpd.service

    4、重启

    systemctl restart httpd.service

    5、查看状态

    systemctl status httpd.service

     6、通过访问ip(默认端口80), 进行测试, 出现下图表示安装成功

    二、卸载 httpd

    1、首先停止httpd服务

    systemctl stop httpd.service

    2、搜索httpd相关程序包

    rpm -qa|grep httpd

    3、卸载包

    rpm -e httpd-2.4.6-93.el7.centos.x86_64 rpm -e httpd-tools-2.4.6-93.el7.centos.x86_64

    4、再次搜索httpd相关程序包

    rpm -qa|grep httpd

    此时已卸载完成

     

     

     

    Processed: 0.034, SQL: 9