Centos7 httpd、createrepo安裝


1、安裝httpd

yum install -y httpd
[root@cdh03 ~]# yum install -y httpd
已加載插件:fastestmirror
Loading mirror speeds from cached hostfile
 * base: ftp.sjtu.edu.cn
 * extras: ftp.sjtu.edu.cn
 * updates: centosh9.centos.org
正在解決依賴關系
--> 正在檢查事務
---> 軟件包 httpd.x86_64.0.2.4.6-93.el7.centos 將被 安裝
--> 正在處理依賴關系 httpd-tools = 2.4.6-93.el7.centos,它被軟件包 httpd-2.4.6-93.el7.centos.x86_64 需要
--> 正在處理依賴關系 /etc/mime.types,它被軟件包 httpd-2.4.6-93.el7.centos.x86_64 需要
--> 正在檢查事務
---> 軟件包 httpd-tools.x86_64.0.2.4.6-93.el7.centos 將被 安裝
---> 軟件包 mailcap.noarch.0.2.1.41-2.el7 將被 安裝
--> 解決依賴關系完成

依賴關系解決

=======================================================================================================================
 Package                      架構                    版本                                 源                     大小
=======================================================================================================================
正在安裝:
 httpd                        x86_64                  2.4.6-93.el7.centos                  base                  2.7 M
為依賴而安裝:
 httpd-tools                  x86_64                  2.4.6-93.el7.centos                  base                   92 k
 mailcap                      noarch                  2.1.41-2.el7                         base                   31 k

事務概要
=======================================================================================================================
安裝  1 軟件包 (+2 依賴軟件包)

總下載量:2.8 M
安裝大小:9.6 M
Downloading packages:
(1/3): httpd-tools-2.4.6-93.el7.centos.x86_64.rpm                                               |  92 kB  00:00:03     
(2/3): mailcap-2.1.41-2.el7.noarch.rpm                                                          |  31 kB  00:00:03     
(3/3): httpd-2.4.6-93.el7.centos.x86_64.rpm                                                     | 2.7 MB  00:00:06     
-----------------------------------------------------------------------------------------------------------------------
總計                                                                                   432 kB/s | 2.8 MB  00:00:06     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  正在安裝    : mailcap-2.1.41-2.el7.noarch                                                                        1/3 
  正在安裝    : httpd-tools-2.4.6-93.el7.centos.x86_64                                                             2/3 
  正在安裝    : httpd-2.4.6-93.el7.centos.x86_64                                                                   3/3 
  驗證中      : httpd-tools-2.4.6-93.el7.centos.x86_64                                                             1/3 
  驗證中      : mailcap-2.1.41-2.el7.noarch                                                                        2/3 
  驗證中      : httpd-2.4.6-93.el7.centos.x86_64                                                                   3/3 

已安裝:
  httpd.x86_64 0:2.4.6-93.el7.centos                                                                                   

作為依賴被安裝:
  httpd-tools.x86_64 0:2.4.6-93.el7.centos                        mailcap.noarch 0:2.1.41-2.el7                       

完畢!

2、啟用htttpd

service httpd start
[root@cdh03 ~]# service httpd start
Redirecting to /bin/systemctl start httpd.service
[root@cdh03 ~]#

3、打開IP地址驗證,出現以下界面及配置成功

http://192.168.43.103

 

 4、 設置httpd服務開機自啟

systemctl enable httpd.service
[root@cdh03 html]# systemctl enable httpd.service
Created symlink from /etc/systemd/system/multi-user.target.wants/httpd.service to /usr/lib/systemd/system/httpd.service.
[root@cdh03 html]# 

 5、安裝createrepo

[root@cdh03 mysql80]# yum -y install  createrepo
已加載插件:fastestmirror
Loading mirror speeds from cached hostfile
 * base: ftp.sjtu.edu.cn
 * extras: ftp.sjtu.edu.cn
 * updates: centosc6.centos.org
正在解決依賴關系
--> 正在檢查事務
---> 軟件包 createrepo.noarch.0.0.9.9-28.el7 將被 安裝
--> 正在處理依賴關系 python-deltarpm,它被軟件包 createrepo-0.9.9-28.el7.noarch 需要
--> 正在處理依賴關系 deltarpm,它被軟件包 createrepo-0.9.9-28.el7.noarch 需要
--> 正在檢查事務
---> 軟件包 deltarpm.x86_64.0.3.6-3.el7 將被 安裝
---> 軟件包 python-deltarpm.x86_64.0.3.6-3.el7 將被 安裝
--> 解決依賴關系完成

依賴關系解決

=======================================================================================================================
 Package                          架構                    版本                             源                     大小
=======================================================================================================================
正在安裝:
 createrepo                       noarch                  0.9.9-28.el7                     base                   94 k
為依賴而安裝:
 deltarpm                         x86_64                  3.6-3.el7                        base                   82 k
 python-deltarpm                  x86_64                  3.6-3.el7                        base                   31 k

事務概要
=======================================================================================================================
安裝  1 軟件包 (+2 依賴軟件包)

總下載量:207 k
安裝大小:558 k
Downloading packages:
(1/3): deltarpm-3.6-3.el7.x86_64.rpm                                                            |  82 kB  00:00:00     
(2/3): python-deltarpm-3.6-3.el7.x86_64.rpm                                                     |  31 kB  00:00:00     
(3/3): createrepo-0.9.9-28.el7.noarch.rpm                                                       |  94 kB  00:00:00     
-----------------------------------------------------------------------------------------------------------------------
總計                                                                                   226 kB/s | 207 kB  00:00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
警告:RPM 數據庫已被非 yum 程序修改。
** 發現 2 個已存在的 RPM 數據庫問題, 'yum check' 輸出如下:
2:postfix-2.10.1-9.el7.x86_64 有缺少的需求 libmysqlclient.so.18()(64bit)
2:postfix-2.10.1-9.el7.x86_64 有缺少的需求 libmysqlclient.so.18(libmysqlclient_18)(64bit)
  正在安裝    : deltarpm-3.6-3.el7.x86_64                                                                          1/3 
  正在安裝    : python-deltarpm-3.6-3.el7.x86_64                                                                   2/3 
  正在安裝    : createrepo-0.9.9-28.el7.noarch                                                                     3/3 
  驗證中      : createrepo-0.9.9-28.el7.noarch                                                                     1/3 
  驗證中      : deltarpm-3.6-3.el7.x86_64                                                                          2/3 
  驗證中      : python-deltarpm-3.6-3.el7.x86_64                                                                   3/3 

已安裝:
  createrepo.noarch 0:0.9.9-28.el7                                                                                     

作為依賴被安裝:
  deltarpm.x86_64 0:3.6-3.el7                            python-deltarpm.x86_64 0:3.6-3.el7                           

完畢!

 創建一個repo

[root@cdh02 yum.repos.d]# pwd
/etc/yum.repos.d
[root@cdh02 yum.repos.d]# cat cloudera-repo.repo 
[cloudera-repo]
name=cloudera-repo
baseurl=http://192.168.43.103/cm6/
enabled=1
gpgcheck=0

刷新

[root@cdh02 yum.repos.d]# yum clean all && yum makecache
已加載插件:fastestmirror
正在清理軟件源: base cloudera-repo cloudera-repo-cdh extras updates
已加載插件:fastestmirror
Determining fastest mirrors
 * base: mirrors.nju.edu.cn
 * extras: mirrors.nju.edu.cn
 * updates: mirrors.nju.edu.cn
base                                                                                            | 3.6 kB  00:00:00     
cloudera-repo                                                                                   | 2.9 kB  00:00:00     
cloudera-repo-cdh                                                                               | 2.9 kB  00:00:00     
extras                                                                                          | 2.9 kB  00:00:00     
updates                                                                                         | 2.9 kB  00:00:00     
(1/16): cloudera-repo/filelists_db                                                              | 102 kB  00:00:00     
(2/16): cloudera-repo/primary_db                                                                | 6.6 kB  00:00:00     
(3/16): cloudera-repo/other_db                                                                  |  864 B  00:00:00     
(4/16): cloudera-repo-cdh/filelists_db                                                          |  586 B  00:00:00     
(5/16): cloudera-repo-cdh/primary_db                                                            | 1.1 kB  00:00:00     
(6/16): cloudera-repo-cdh/other_db                                                              |  575 B  00:00:00     
(7/16): base/7/x86_64/group_gz                                                                  | 153 kB  00:00:03     
(8/16): extras/7/x86_64/filelists_db                                                            | 217 kB  00:00:03     
(9/16): extras/7/x86_64/other_db                                                                | 124 kB  00:00:00     
(10/16): base/7/x86_64/primary_db                                                               | 6.1 MB  00:00:05     
(11/16): updates/7/x86_64/primary_db                                                            | 3.8 MB  00:00:01     
(12/16): updates/7/x86_64/filelists_db                                                          | 2.1 MB  00:00:03     
(13/16): updates/7/x86_64/other_db                                                              | 314 kB  00:00:00     
(14/16): extras/7/x86_64/primary_db                                                             | 206 kB  00:00:04     
(15/16): base/7/x86_64/other_db                                                                 | 2.6 MB  00:00:10     
(16/16): base/7/x86_64/filelists_db                                                             | 7.1 MB  00:00:12     
元數據緩存已建立
[root@cdh02 yum.repos.d]# 

 

 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM