Openstack EOL 版本離線安裝源


當Openstack EOL,網上的yum源無法安裝openstack版本和rdo  ,則無法正常通過yum源直接安裝openstack和rdo ,只是直接安裝openstack后,也無法通過yum源獲得rpm安裝包。

正常的鏡像服務器中,已經沒有EOL的包。http://mirror.centos.org/centos/7/cloud/x86_64/

 

實際上並非所有的服務器都刪除EOL版本openstack的包。

在這個服務器http://vault.centos.org/有EOL版本的openstack yum包源歸檔

但是路徑已經發生變化。 需要修改本地相應的源路徑才能進行安裝。

 

如果要經常使用,建議制作本地安裝源:

 

制作本地安裝源步驟(以下mitaka版本為例)

 

yum install http://vault.centos.org/7.3.1611/cloud/x86_64/openstack-mitaka/centos-release-openstack-mitaka-1-3.el7.noarch.rpm

yum install https://repos.fedorapeople.org/repos/openstack/EOL/openstack-mitaka/rdo-release-mitaka-7.noarch.rpm

yum install   yum-utils   createrepo   yum-plugin-priorities –y

#yum -y install reposync   # reposync 包含在yum-utils中

#yum install -y createrepo.noarch

Yum clean all

修改yum源文件,根據vault.centos.org網站資源路徑,修改CentOS-Vault.repo文件。

# C7.3.1611

[C7.3.1611-base]

name=CentOS-7.3.1611 - Base

baseurl=http://vault.centos.org/7.3.1611/os/$basearch/

gpgcheck=0

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

enabled=1

 

[updates]

name=CentOS-7.3.1611 - Updates

baseurl=http://vault.centos.org/7.3.1611/updates/$basearch/

gpgcheck=0

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

enabled=1

 

[extras]

name=CentOS-7.3.1611 - Extras

baseurl=http://vault.centos.org/7.3.1611/extras/$basearch/

gpgcheck=0

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

enabled=1

 

[centosplus]

name=CentOS-7.3.1611 - CentOSPlus

baseurl=http://vault.centos.org/7.3.1611/centosplus/$basearch/

gpgcheck=0

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

enabled=1

 

[fasttrack]

name=CentOS-7.3.1611 - CentOSPlus

baseurl=http://vault.centos.org/7.3.1611/fasttrack/$basearch/

gpgcheck=0

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

enabled=1

 

修改rdo文件

[root@localhost yum.repos.d]# cat rdo-release.repo

[openstack-mitaka]

name=OpenStack Mitaka Repository

baseurl=http://vault.centos.org/7.3.1611/cloud/x86_64/openstack-mitaka/

gpgcheck=0

enabled=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Cloud

 

其它yum源文件全部mv到bak目錄中。在/etc/yum.repos.d下,mkdir bak

 

修改完源文件后 yum list一下,檢查yum源是否正常。

Yum list

 

reposync -p <存放目錄>       #我這里直接把同步下來的目錄放在了/var/www/html目錄,這樣就不需要更改httpd的配置文件了  ,執行命令reposync –p /var/www/html

 

同步好的文件夾下,都要執行createrepo .  生成repoxml文件。

createrepo .

同步好文件的目錄:

[root@localhost html]# ls -al

總用量 96

drwxr-xr-x. 9 root root  4096 11月 29 11:53 .

drwxr-xr-x. 4 root root    33 11月 21 21:36 ..

-rw-r--r--. 1 root root   117 4月  12 2016 00README.txt

drwxr-xr-x. 4 root root    38 11月 29 11:18 C7.3.1611-base

drwxr-xr-x. 3 root root    22 11月 29 03:59 C7.3.1611-centosplus

drwxr-xr-x. 4 root root    38 11月 29 11:18 C7.3.1611-extras

drwxr-xr-x. 3 root root    22 11月 29 11:23 C7.3.1611-fasttrack

drwxr-xr-x. 4 root root    38 11月 29 11:21 C7.3.1611-updates

drwxr-xr-x. 2 root root     6 11月 29 06:03 centos-openstack-mitaka-source

drwxr-xr-x. 4 root root 57344 11月 29 11:14 openstack-mitaka

 

 

 

createrepo .              #在同步下來的目錄都需要執行 生成repo文件。

 

yum -y install httpd

systemctl start httpd

systemctl enable httpd

systemctl stop firewalld

systemctl disable firewalld

setenforce 0

 

以下為安裝EOL Mitaka Openstack關於源部分的過程:

安裝系統的時候,需要確定好軟件的版本,如果版本太新的話,會導致很多依賴的lib包太新,無法安裝舊的程序,導致openstack無法安裝。

 

在安裝好系統后。按照正常的安裝步驟。

在執行yum install -y centos-release-openstack-mitaka之前,需要修改本地的安裝源。把本地的yum源文件,按照慣例,全部mvbak目錄中。然后創建一個rdo-release.repo的文件。然后添加本地yum源。

 

[root@localhost yum.repos.d]# ls -al

總用量 20

drwxr-xr-x.   3 root root   41 11月 28 22:43 .

drwxr-xr-x. 107 root root 8192 11月 29 02:08 ..

drwxr-xr-x    2 root root 4096 11月 28 22:21 bak

-rw-r--r--    1 root root  697 11月 28 23:11 rdo-release.repo

[root@localhost yum.repos.d]# cat rdo-release.repo

[base]

name=CentOS-$releasever - Base

baseurl=http://192.168.0.201/base/

gpgcheck=0

enabled=1

 

[updates]

name=CentOS-$releasever - Updates

baseurl=http://192.168.0.201/updates/

gpgcheck=0

enabled=1

 

[extras]

name=CentOS-$releasever - Extras

baseurl=http://192.168.0.201/extras/

gpgcheck=0

enabled=1

 

[openstack-mitaka]

name=OpenStack Pike Repository

baseurl=http://192.168.0.201/openstack-mitaka/

gpgcheck=0

enabled=1

 

 

[fasttrack]

name=CentOS-7.3.1611 - CentOSPlus

baseurl=http://192.168.0.201/fasttrack/

gpgcheck=0

enabled=1

 

 

[centosplus]

name=CentOS-7.3.1611 - CentOSPlus

baseurl=http://192.168.0.201/centosplus/Packages

gpgcheck=0

enabled=1

[root@localhost yum.repos.d]#

 

設置好本地yum源后,需要清楚本地的yum源緩存信息。

Yum clean all

Yum list

 

然后就可以開始正常的openstack安裝過程

 

#yum install -y centos-release-openstack-mitaka

# yum update -y

# reboot

#yum install -y openstack-packstack

 


免責聲明!

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



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