标签:linux sqli 启动服务 roc centos7 oda 技术 status yun
环境说明
系统:Centos7
版本:CentOS-7-x86_64-Minimal-1908
ISO下载链接:http://mirrors.aliyun.com/centos/7/isos/x86_64/CentOS-7-x86_64-Minimal-1908.iso
Centos7源中包含以下版本的openstack
openstack-queens
openstack-rocky
openstack-stein
openstack-train
OpenStack版本:Train
OpenStack源:
centos:http://mirror.centos.org/centos/7/cloud/x86_64/
北理工:http://mirror.bit.edu.cn/centos/7/cloud/x86_64/
阿里云:http://mirrors.aliyun.com/centos/7/cloud/x86_64/
软件安装
在安装之前建议将yum源修改为国内的源
yum clean all
yum makecache
yum -y install vim createrepo yum-utils httpd net-tools reposync
yum install centos-release-openstack-train
ls -1 /etc/yum.repos.d/
yum repolist
[root@controller ~]# yum repolist
Failed to set locale, defaulting to C
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
repo id repo name status
base/7/x86_64 CentOS-7 - Base 10097
centos-ceph-nautilus/7/x86_64 CentOS-7 - Ceph Nautilus 224
centos-nfs-ganesha28/7/x86_64 CentOS-7 - NFS Ganesha 2.8 140
centos-openstack-stein/7/x86_64 CentOS-7 - OpenStack stein 2415+2
centos-openstack-train/7/x86_64 CentOS-7 - OpenStack train 2323+2
centos-qemu-ev/7/x86_64 CentOS-7 - QEMU EV 87
extras/7/x86_64 CentOS-7 - Extras 341
updates/7/x86_64 CentOS-7 - Updates 1787
repolist: 17414
同步至本地
mkdir -p /var/www/html/yumrepository
reposync -p /var/www/html/yumrepository/
==============================================================================
[root@controller yumrepository]# pwd
/var/www/html/yumrepository
[root@controller yumrepository]# ls
base centos-nfs-ganesha28 centos-openstack-train extras
centos-ceph-nautilus centos-openstack-stein centos-qemu-ev updates
[root@controller yumrepository]#
等待OpenStack安装包下载到本地目录后,需要重新生成yum仓库或者更新原有仓库。因此同步完成后远程yum仓库中的repodata可能不会被同步到本地,仓库路径可能已经改变,因此仅需对同步到本地的yum仓库进行升级。创建或更新本地yum仓库的命令为createrepo,该命令由createrepo安装包提供。
本地制作
创建yum仓库
cd /var/www/html/yumrepository
cd ./base
yum install createrepo -y
createrepo .
[root@controller base]# ls
Packages
[root@controller base]# createrepo .
Spawning worker 0 with 5049 pkgs
Spawning worker 1 with 5048 pkgs
Workers Finished
Saving Primary metadata
Saving file lists metadata
Saving other metadata
Generating sqlite DBs
Sqlite DBs complete
[root@controller base]# ls
Packages repodata
[root@controller base]#
================================================================
注意,在同步下来的每一个yum仓库目录都需要执行,上述操作。
cd /var/www/html/yumrepository/base/
ls
createrepo .
reposync -p /var/www/html/yumrepository/
createrepo --update .
配置服务httpd
systemctl start httpd
systemctl enable httpd
systemctl status httpd
配置目录文件说明:
服务目录 /etc/httpd
主配置文件 /etc/httpd/conf/httpd.conf
网站数据目录 /var/www/html
访问日志 /var/log/httpd/access_log
错误日志 /var/log/httpd/error_log
修改配置文件 /etc/selinux/config
vim /etc/selinux/config
SELINUX=disabled
关闭防火墙,selinux,NetworkManager
systemctl stop firewalld NetworkManager.service
systemctl disable firewalld NetworkManager.service
systemctl status firewalld NetworkManager.service
setenforce 0
验证
在另一台机器,新建一个repo文件
mkdir ori_repo-config
mv /etc/yum.repos.d/* ./ori_repo-config/
touch /etc/yum.repos.d/CentOS-PrivateLocal.repo
vim /etc/yum.repos.d/CentOS-PrivateLocal.repo
注意:
①IP地址更换为yumrepository所在主机的地址。
②为避免安装冲突,[centos-openstack-stein]和[centos-openstack-train]只保留一个。
[base]
name=CentOS-$releasever - Base
baseurl=http://192.168.2.123/yumrepository/base/
gpgcheck=0
enabled=1
[updates]
name=CentOS-$releasever - Updates
baseurl=http://192.168.2.123/yumrepository/updates/
gpgcheck=0
enabled=1
[extras]
name=CentOS-$releasever - Extras
baseurl=http://192.168.2.123/yumrepository/extras/
gpgcheck=0
enabled=1
[centos-openstack-train]
name=CentOS-7 - OpenStack train
baseurl=http://192.168.2.123/yumrepository/centos-openstack-train/
gpgcheck=0
enabled=1
[centos-qemu-ev]
name=CentOS-$releasever - QEMU EV
baseurl=http://192.168.2.123/yumrepository/centos-qemu-ev/
gpgcheck=0
enabled=1
[centos-ceph-nautilus]
name=CentOS-7 - Ceph Nautilus
baseurl=http://192.168.2.123/yumrepository/centos-ceph-nautilus/
gpgcheck=0
enabled=1
[centos-nfs-ganesha28]
name=CentOS-7 - NFS Ganesha 2.8
baseurl=http://192.168.2.123/yumrepository/centos-nfs-ganesha28/
gpgcheck=0
enabled=1
配置完成后,通常需要清除yum中原有的cache,并重新生成cache。清除yum陈旧cache的命令如下:
yum clean all
yum makecache
标签:linux sqli 启动服务 roc centos7 oda 技术 status yun
原文地址:https://www.cnblogs.com/yyuuee/p/14364499.html