環境:git
OS:Red Hat Enterprise Linux Server release 6.3 (Santiago)vim
kernel:Linux vgui 2.6.32-358.el6.x86_64 #1 SMP Tue Jan 29 11:47:41 EST 2013 x86_64 x86_64 x86_64 GNU/Linuxcentos
arch:x86_64ide
目標:在安裝好的OS基礎上,進行軟件安裝與升級ui
須要說明的是,rhel6,5,centos6,5,等每一個版本都稍有不一樣
url
例:git 升級
rest
原版本:git version 1.7.1,升級後:git version 1.7.6.4server
1. 架設http server,it
vim /etc/httpd/conf/httpd.conf ->DocumentRoot "/rsc/sa"io
/rsc/sa/ 本身隨便定義!
service httpd restart;chkconfig --list httpd on;
2. 建立repository 的index 檔案
注意:不一樣OS上的index,須要在不一樣的OS上建立(感謝black_lin 提醒)!
createrepo $path_repo;
例如:rpm文件放在 /rsc/sa/install/install_tree_customized/rhel-6.3-x86_64
createrepo:/rsc/sa/install/install_tree_customized/rhel-6.3-x86_64
3. 將安裝CD中的內容所有拷貝到/rsc/sa/install/install_tree/rhel-6.3-x86_64
-------------------------------------------------
以上步驟,yum server就已經架設好,下面開始client
-------------------------------------------------
在 client /etc/yum.repos.d/下面創建:rhel6.3x8664.repo
vi rhel6.3x8664.repo
[Base]
Name=Base
baseurl=http://xxx/install/install_tree/rhel-6.3-x86_64
enabled=1
gpgcheck=0
[Server]
Name=Server
baseurl=http://xxx/install/install_tree/rhel-6.3-x86_64/Server
enabled=1
gpgcheck=0
[HighAvailability]
Name=HighAvailability
baseurl=http://xxx/install/install_tree/rhel-6.3-x86_64/HighAvailability
enabled=1
gpgcheck=0
[LoadBalancer]
Name=LoadBalancer
baseurl=http://xxx/install/install_tree/rhel-6.3-x86_64/LoadBalancer
enabled=1
gpgcheck=0
[ResilientStorage]
Name=LoadBalancer
baseurl=http://xxx/install/install_tree/rhel-6.3-x86_64/ResilientStorage
enabled=1
gpgcheck=0
[ScalableFileSystem]
Name=LoadBalancer
baseurl=http://xxx/install/install_tree/rhel-6.3-x86_64/ScalableFileSystem
enabled=1
gpgcheck=0
[xxx]
name=xxx
baseurl=http://xxx/install/install_tree_customized/rhel-6.3-x86_64
enabled=1
gpgcheck=0
--------------------------------------------------
client 設置OK,設置依據是根據repodata設置的!每一個版本的OS不同,不能徹底copy!
yum clean;yum update git
就所有完成!