httpd安装教程linux,Linux中关于httpd仓库安装的简要步骤

#创建httpd仓库步骤

1.配置本地yum源

此步骤略

2.搭建http 启动服务

[root@linfan ~]# yum install -y httpd

[root@linfan ~]# systemctl start httpd

[root@linfan ~]# ps -ef|grep httpd

root 2232 1 0 18:53 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND

apache 2233 2232 0 18:53 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND

apache 2234 2232 0 18:53 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND

apache 2235 2232 0 18:53 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND

apache 2236 2232 0 18:53 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND

apache 2237 2232 0 18:53 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND

root 2252 2183 0 18:55 pts/1 00:00:00 grep --color=auto httpd

[root@linfan ~]# ss -antl

State Recv-Q Send-Q Local Address:Port Peer Address:Port

LISTEN 0 128 *:22 *:*

LISTEN 0 100 127.0.0.1:25 *:*

LISTEN 0 128 :::80 :::*

LISTEN 0 128 :::22 :::*

LISTEN 0 100 ::1:25 :::*

3.创建http源的目录

[root@linfan ~]# ls /var/www/html

[root@linfan ~]# cd /var/www/html

[root@linfan html]# mkdir lin.d

4.把光盘内容拷贝到新创建的目录

[root@linfan html]# cp -r /mnt/* /var/www/html/lin.d/

5.创建并配置httpd源的配置文件

[root@linfan html]# vi /etc/yum.repos.d/doudou.repo

[doudou]

name=This is a cute boy

baseurl=http://192.168.24.232/lin.d

enabled=1

gpgcheck=0

6.删掉本地yum源

[root@linfan html]# mv /etc/yum.repos.d/doudou.repo .

7.清空本地yum源

[root@linfan html]# yum clean all

8.关闭防火墙

[root@linfan html]# iptables -L //列出所有规则

[root@linfan html]# getenforce //查看selinux状态

[root@linfan html]# setenforce 0 //临时关闭selinux

[root@linfan html]# iptables -F //清除所有规则

[root@linfan html]# iptables -X //清除所有自定义规则

[root@linfan html]# iptables -Z //清空规则链中的数据包计算器和字节计数器

9.验证httpd源是否搭建成功

5867a71bd190a86d9f4327fe046ab0f9.png

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值