1. 程式人生 > >用rpm在centos7上安裝httpd的過程

用rpm在centos7上安裝httpd的過程

[[email protected] /]# mkdir cdrom
[[email protected] /]# mount /dev/sr0 /cdrom  #掛載光碟
mount: /dev/sr0 is write-protected, mounting read-only
[[email protected] /]# cd /cdrom/Packages/
[[email protected] Packages]# ls httpd-*
httpd-2.4.6-40.el7.centos.x86_64.rpm
httpd-devel-2.4.6-40.el7.centos.x86_64.rpm
httpd-manual-2.4.6-40.el7.centos.noarch.rpm
httpd-tools-2.4.6-40.el7.centos.x86_64.rpm
[

[email protected] Packages]# rpm -ivh httpd-2.4.6-40.el7.centos.x86_64.rpm
error: Failed dependencies:
        /etc/mime.types is needed by httpd-2.4.6-40.el7.centos.x86_64
        httpd-tools = 2.4.6-40.el7.centos is needed by httpd-2.4.6-40.el7.centos.x86_64
        libapr-1.so.0()(64bit) is needed by httpd-2.4.6-40.el7.centos.x86_64   #
https://www.rpmfind.net上查詢所在包
        libaprutil-1.so.0()(64bit) is needed by httpd-2.4.6-40.el7.centos.x86_64  #https://www.rpmfind.net上查詢所在包
[[email protected] Packages]# ls apr-util-*
apr-util-1.5.2-6.el7.x86_64.rpm  apr-util-devel-1.5.2-6.el7.x86_64.rpm
[[email protected] Packages]# rpm -ivh apr-util-1.5.2-6.el7.x86_64.rpm

error: Failed dependencies:
        libapr-1.so.0()(64bit) is needed by apr-util-1.5.2-6.el7.x86_64
[[email protected] Packages]# ls apr-*
apr-1.4.8-3.el7.x86_64.rpm  apr-devel-1.4.8-3.el7.x86_64.rpm  apr-util-1.5.2-6.el7.x86_64.rpm  apr-util-devel-1.5.2-6.el7.x86_64.rpm
[[email protected] Packages]# rpm -ivh apr-1.4.8-3.el7.x86_64.rpm
Preparing...                          ################################# [100%]
Updating / installing...
   1:apr-1.4.8-3.el7                  ################################# [100%]
[[email protected] Packages]# rpm -ivh apr-util-1.5.2-6.el7.x86_64.rpm
Preparing...                          ################################# [100%]
Updating / installing...
   1:apr-util-1.5.2-6.el7             ################################# [100%]
[[email protected] Packages]# ls  httpd-tools*
httpd-tools-2.4.6-40.el7.centos.x86_64.rpm
[[email protected] Packages]# rpm -ivh httpd-tools-2.4.6-40.el7.centos.x86_64.rpm
Preparing...                          ################################# [100%]
Updating / installing...
   1:httpd-tools-2.4.6-40.el7.centos  ################################# [100%]
[[email protected] Packages]# yum search mime.types
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
============================= Matched: mime.types ==============================
mailcap.noarch : Helper application and MIME type associations for file types
perl-LWP-MediaTypes.noarch : Guess media type for a file or a URL    
[[email protected] Packages]# ls mailcap*
mailcap-2.1.41-2.el7.noarch.rpm
[[email protected] Packages]# rpm -ivh mailcap-2.1.41-2.el7.noarch.rpm
Preparing...                          ################################# [100%]
Updating / installing...
   1:mailcap-2.1.41-2.el7             ################################# [100%]
[[email protected] Packages]# rpm -ivh httpd-2.4.6-40.el7.centos.x86_64.rpm
Preparing...                          ################################# [100%]
Updating / installing...
   1:httpd-2.4.6-40.el7.centos        ################################# [100%]
[[email protected] Packages]# rpm -q httpd
httpd-2.4.6-40.el7.centos.x86_64  #>>>>>>>>>>>>>>>>安裝完成

[[email protected] /]# umount /cdrom
umount: /cdrom: target is busy.
        (In some cases useful info about processes that use
         the device is found by lsof(8) or fuser(1))
[[email protected] Packages]# lsof +d /cdrom
COMMAND  PID   USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
bash    2345 hadoop  cwd    DIR   11,0   612352 2176 /cdrom/Packages
bash    2441   root  cwd    DIR   11,0   612352 2176 /cdrom/Packages
lsof    2497   root  cwd    DIR   11,0   612352 2176 /cdrom/Packages
lsof    2498   root  cwd    DIR   11,0   612352 2176 /cdrom/Packages
[[email protected] Packages]# kill -9 2345
[[email protected] Packages]# lsof +d /cdrom
COMMAND  PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
bash    2441 root  cwd    DIR   11,0   612352 2176 /cdrom/Packages
lsof    2500 root  cwd    DIR   11,0   612352 2176 /cdrom/Packages
lsof    2501 root  cwd    DIR   11,0   612352 2176 /cdrom/Packages
[[email protected] Packages]# cd /
[[email protected] /]# lsof +d /cdrom
[[email protected] /]# mount /cdrom
mount: /dev/sr0 is already mounted or /cdrom busy
       /dev/sr0 is already mounted on /cdrom
[[email protected] /]# 

相關推薦

no