分类: LINUX
2016-05-12 23:27:32
主要思路:
Server端启用httpd服务,所有其他客户端修改yum源配置文件指向server端,这样既实现其他客户端使用yum命
令时,不用每一台都重复挂载镜像,而且以后如果有系统软件升级,只需要将Server端重新挂载新的镜像,所有
客户端执行yum命令即可
准备条件:1.所有系统之间,网络已联通
2.在/var/www/html/目录下创建iso1,iso2两个目录(必须在这目录下,否则还要修改http.conf配置文件)
服务器端配置:1.挂载光盘镜像。
2.安装httpd包,并启用httpd服务
3.本地测试简易httpd服务,搭建是否成功
4.关闭防火墙及selinux。
客户端配置:
1.只需配置yum源即可
服务器端配置: 1.挂载光盘镜像。
[root@financial2 iso2]mount -o loop /home/IBM_Installation_Toolkit_55.iso /var/www/html/iso1 (挂载光盘1到http主目录下)
[root@financial2 iso2]mount -o loop /home/RHEL6.5-20131111.0-Server-ppc64-DVD1.iso /var/www/html/iso2(同上)
[root@financial2 iso2]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/mpathap6 4.9G 390M 4.2G 9% /
tmpfs 31G 0 31G 0% /dev/shm
/dev/mapper/mpathap2 985M 60M 876M 7% /boot
/dev/mapper/mpathap3 15G 7.4G 6.4G 54% /home
/dev/mapper/mpathap7 3.9G 475M 3.2G 13% /opt
/dev/mapper/mpathap9 2.9G 69M 2.7G 3% /tmp
/dev/mapper/mpathap10 2.9G 1.6G 1.2G 58% /usr
/dev/mapper/mpathap8 3.9G 228M 3.5G 7% /var
/home/IBM_Installation_Toolkit_55.iso 901M 901M 0 100% /var/www/html/iso1
/home/RHEL6.5-20131111.0-Server-ppc64-DVD1.iso 3.2G 3.2G 0 100% /var/www/html/iso2
服务器端配置: 2.安装httpd包,并启用httpd服务
[root@financial2 iso2]# vi /etc/yum.repos.d/rhel-source.repo (配置服务器端yum源)
[rhel-source]
name=Red1
baseurl=file:///var/www/html/iso1/repos/rhel6.5(ibm引导光盘,需指向对应的操作系统,这里是rhel6.5)
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[rhel-source-beta]
name=Red2
baseurl=file:///var/www/html/iso2(红帽系统盘,指向跟目录即可)
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-beta,file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[root@financial2 iso2]# yum install -y httpd* (安装httpd包)
[root@financial2 iso2]# /etc/init.d/httpd restart(启用httpd服务)
Stopping httpd: [ OK ]
Starting httpd: httpd: apr_sockaddr_info_get() failed for financial2
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
[ OK ]
[root@financial2 iso2]# cd /var/www/html/
[root@financial2 html]# ls
html iso1 iso2
[root@financial2 html]# cd iso1 (进入cd1查看光盘内容)
[root@financial2 iso1]# ls
boot etc ibmit-licenses-and-attributions.pdf license notices ppc repos users_manual.pdf
copyright firmwares install non_ibm_license packages ReleaseNotes.pdf TRANS.TBL utils
[root@financial2 iso1]# cd .. (返回上层目录,注意cd和..之间有空格)
[root@financial2 html]# cd iso2 (进入cd2查看)
[root@financial2 iso2]# ls
etc EULA_ko README RELEASE-NOTES-hi-IN.html RELEASE-NOTES-pa-IN.html repodata
EULA EULA_pt RELEASE-NOTES-as-IN.html RELEASE-NOTES-it-IT.html RELEASE-NOTES-pt-BR.html RPM-GPG-KEY-redhat-beta
EULA_de EULA_zh RELEASE-NOTES-bn-IN.html RELEASE-NOTES-ja-JP.html RELEASE-NOTES-ru-RU.html RPM-GPG-KEY-redhat-release
EULA_en GPL RELEASE-NOTES-de-DE.html RELEASE-NOTES-kn-IN.html RELEASE-NOTES-si-LK.html Server
EULA_es images RELEASE-NOTES-en-US.html RELEASE-NOTES-ko-KR.html RELEASE-NOTES-ta-IN.html TRANS.TBL
EULA_fr media.repo RELEASE-NOTES-es-ES.html RELEASE-NOTES-ml-IN.html RELEASE-NOTES-te-IN.html
EULA_it Packages RELEASE-NOTES-fr-FR.html RELEASE-NOTES-mr-IN.html RELEASE-NOTES-zh-CN.html
EULA_ja ppc RELEASE-NOTES-gu-IN.html RELEASE-NOTES-or-IN.html RELEASE-NOTES-zh-TW.html
服务器端配置:3.本地测试简易httpd服务,搭建是否成功
[root@financial2 ~]# cd /tmp/ (进入/tmp)
[root@financial2 tmp]# wget (本地测试httpd服务搭建是否成功,下载cd2目录下REDAME文件,到/tmp)
--2016-05-11 02:23:51--
Connecting to 9.161.2.203:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 16435 (16K) [text/plain]
Saving to: 鈥淩EADME鈥
100%[=============================================================================================>] 16,435 --.-K/s in 0s
2016-05-11 02:23:51 (524 MB/s) - 鈥淩EADME鈥saved [16435/16435]
[root@financial2 tmp]# ls (查看/tmp目录下是否有README文件,)
cron.prePMLinux diagSEsnap errmbatch lost+found README saved_errmbatch verify.TmpRC (看见README说明http服务在本地启用成功)
服务器端配置:4.关闭防火墙及selinux。
[root@financial2 tmp]# service iptables stop(关闭防火墙,切记。如果不关闭客服端访问会被阻止)
iptables: Setting chains to policy ACCEPT: filter [ OK ]
iptables: Flushing firewall rules: [ OK ]
iptables: Unloading modules: [ OK ]
[root@financial2 tmp]# setenforce 0 (关闭selinux,和防火墙一样也是阻止客服端访问的)
[root@financial2 tmp]# getenforce (查看selinux是否关闭)
Permissive (说明已关闭)
[root@financial2 tmp]#
客户端配置
[root@webstite]# vi /etc/yum.repos.d/rhel-source.repo
[Source]
name=Red1
baseurl= (指向http服务器地址,httpd服务端地址为9.161.2.203,也可用主机名替换)
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[rhel-source-beta]
name=Red2
baseurl=(同上)
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-beta,file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[root@webstite]#yum install -y ibm-power* (安装rpm包)
参考网址:
http://blog.163.com/herod_xiao/blog/static/8718839920106292361296/