Redhat中关于httpd仓库安装的简要步骤

创建repo-server:

yum install httpd
yum  install  httpd  -y       < -y 表示在安装过程中与界面交互时自动答复yes >
systemctl  start  httpd      < 开启 httpd 服务 >
systemctl enable httpd    < 将 httpd 服务添加到开机自动启动 >
cd /var/www/html/
mkdir temd ttpd
createrepo -v /var/www/html/temd/
createrepo -v /var/www/html/ttpd/

查看httpd:ps -ef|grep httpd   

SS -natl

使用yum源

编辑 repo 文件

 在本机或其他机器上,进入文件夹:/etc/yum.repos.d/   将其中的文件移除掉

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

[root@linfan html]# vi /etc/yum.repos.d/temd.repo
[doudou]
name=This is a cute ttpd
baseurl=http://httpd -server-ip/temd
enabled=1 

gpgcheck=0

[root@linfan html]# vi /etc/yum.repos.d/ttpd.repo
[doudou]
name=This is a cute ttpd
baseurl=http://httpd -server-ip/ttpd
enabled=1 

gpgcheck=0

更新 yum源

yum clean  清除yum源缓存

yum repolist 列出可用yum源

8.关闭防火墙(iptables)

iptables -L  //列出所有规则

getenforce    //查看selinux状态

setenforce 0   //临时关闭selinux

 iptables -F  //清除所有规则

iptables -X //清除所有自定义规则 iptables -Z //清空规则链中的数据包计算器和字节计数器
8.关闭防火墙(firewalld)
systemctl stop firewalld
systemctl disable firewalld

猜你喜欢

转载自www.cnblogs.com/ppp1314520818/p/10398884.html
今日推荐