Controller節點:python
一、安裝NTP服務:mysql
# yum install chrony # vi /etc/chrony.conf server 0.centos.pool.ntp.org iburst server 1.centos.pool.ntp.org iburst server 2.centos.pool.ntp.org iburst server 3.centos.pool.ntp.org iburst ... allow 192.100.10.0/24 ... # systemctl enable chronyd.service 開機啓用NTP # systemctl start chronyd.service 開啓NTP服務
驗證NTP服務:linux
# chronyc sources 210 Number of sources = 2 MS Name/IP address Stratum Poll Reach LastRx Last sample =============================================================================== ^- 192.0.2.11 2 7 12 137 -2814us[-3000us] +/- 43ms ^* 192.0.2.12 2 6 177 46 +17us[ -23us] +/- 68ms
二、安裝Openstack相關庫sql
# yum install centos-release-openstack-queens 安裝Openstack庫 # yum upgrade 更新包 # yum install python-openstackclient 安裝Openstack客戶端 # yum install openstack-selinux 安裝openstack-selinux用來管理Openstack服務的安全策略
三、關閉防火牆數據庫
# systemctl stop firewalld 關閉防火牆服務 # systemctl disable firewalld 永久防火牆開機自啓動
四、關閉selinux服務centos
# setenforce 0 關閉selinux服務 # vi /etc/selinux/config 永久關閉selinux服務 SELINUX=disabled
五、安裝數據庫服務緩存
# yum install mariadb mariadb-server python2-PyMySQL # vi /etc/my.cnf.d/openstack.cnf [mysqld] bind-address = 192.100.10.160 default-storage-engine = innodb innodb_file_per_table = on max_connections = 4096 collation-server = utf8_general_ci character-set-server = utf8 # systemctl enable mariadb.service 開機啓用Mysql服務 # systemctl start mariadb.service 開啓Mysql服務 # mysql_secure_installation 設置Mysql密碼->123456
六、安裝消息隊列安全
# yum install rabbitmq-server # systemctl enable rabbitmq-server.service # systemctl start rabbitmq-server.service # rabbitmqctl add_user openstack 123456 # rabbitmqctl set_permissions openstack ".*" ".*" ".*"
七、安裝Memcached緩存memcached
# yum install memcached python-memcached # vi /etc/sysconfig/memcached OPTIONS="-l 127.0.0.1,::1,controller" # systemctl enable memcached.service # systemctl start memcached.service
八、Etcdcode
# yum install etcd # vi /etc/etcd/etcd.conf #[Member] ETCD_DATA_DIR="/var/lib/etcd/default.etcd" ETCD_LISTEN_PEER_URLS="http://192.100.10.160:2380" ETCD_LISTEN_CLIENT_URLS="http://192.100.10.160:2379" ETCD_NAME="controller" #[Clustering] ETCD_INITIAL_ADVERTISE_PEER_URLS="http://192.100.10.160:2380" ETCD_ADVERTISE_CLIENT_URLS="http://192.100.10.160:2379" ETCD_INITIAL_CLUSTER="controller=http://192.100.10.160:2380" ETCD_INITIAL_CLUSTER_TOKEN="etcd-cluster-01" ETCD_INITIAL_CLUSTER_STATE="new" # systemctl enable etcd # systemctl start etcd
Compute節點:
一、安裝NTP服務:
# yum install chrony # vi /etc/chrony.conf server controller iburst ... allow 192.100.10.0/24 ... # systemctl enable chronyd.service 開機啓用NTP # systemctl start chronyd.service 開啓NTP服務
二、安裝Openstack相關庫
# yum install centos-release-openstack-queens 安裝Openstack庫 # yum upgrade 更新包 # yum install python-openstackclient 安裝Openstack客戶端 # yum install openstack-selinux 安裝openstack-selinux用來管理Openstack服務的安全策略
三、關閉防火牆
# systemctl stop firewalld 關閉防火牆服務 # systemctl disable firewalld 永久防火牆開機自啓動
四、關閉selinux服務
# setenforce 0 關閉selinux服務 # vi /etc/selinux/config 永久關閉selinux服務 SELINUX=disabled