Linux中關於httpd倉庫安裝的簡要步驟
阿新 • • 發佈:2018-07-13
所有 ins mark img 臨時 log code bin tar #創建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源是否搭建成功
Linux中關於httpd倉庫安裝的簡要步驟