系统配置
- hostname
hostnamectl --static set-hostname controller
- hosts
cat >> /etc/hosts << OFF
# controller
10.0.0.11 controller
# network
10.0.0.21 network
# compute1
10.0.0.31 compute1
OFF
- 安装软件源
yum -y install http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
yum -y install http://rdo.fedorapeople.org/openstack-kilo/rdo-release-kilo.rpm
- 升级系统软件包(升级完重启查看系统配置)
yum upgrade
reboot
#hostname
controller
cat /etc/redhat-release
CentOS Linux release 7.1.1503 (Core)
- 安装openstack-selinux
yum -y install openstack-selinux
ntp-server
- 安装软件包
yum -y install ntp
- 修改配置文件
sed -i 's/server 0.centos.pool.ntp.org iburst/#server 0.centos.pool.ntp.org iburst/g' /etc/ntp.conf
sed -i 's/server 1.centos.pool.ntp.org iburst/#server 1.centos.pool.ntp.org iburst/g' /etc/ntp.conf
sed -i 's/server 2.centos.pool.ntp.org iburst/#server 2.centos.pool.ntp.org iburst/g' /etc/ntp.conf
sed -i 's/server 3.centos.pool.ntp.org iburst/#server 3.centos.pool.ntp.org iburst/g' /etc/ntp.conf
echo "server 127.127.1.0" >>/etc/ntp.conf
echo "fudge 127.127.1.0 stratum 10" >>/etc/ntp.conf
启动ntp并设置开机启动
systemctl enable ntpd.service
systemctl restart ntpd.service
mariadb
- 安装软件包
yum -y install mariadb mariadb-server MySQL-python
- 修改配置文件
sed -i "/\[mysqld\]$/a character-set-server = utf8" /etc/my.cnf
sed -i "/\[mysqld\]$/a init-connect = 'SET NAMES utf8'" /etc/my.cnf
sed -i "/\[mysqld\]$/a collation-server = utf8_general_ci" /etc/my.cnf
sed -i "/\[mysqld\]$/a innodb_file_per_table" /etc/my.cnf
sed -i "/\[mysqld\]$/a default-storage-engine = innodb" /etc/my.cnf
sed -i "/\[mysqld\]$/a bind-address = 10.0.0.11" /etc/my.cnf
sed -i "/\[mysqld\]$/a max_connections = 1000" /etc/my.cnf
- 启动mariadb并设置开机启动
systemctl enable mariadb.service
systemctl restart mariadb.service
- 配置mariadb(安全配置)
mysql_secure_installation
rabbitmq-server
- 安装软件包
yum -y install rabbitmq-server
- 启动rabbitmq-server并设置开机启动
systemctl enable rabbitmq-server.service
systemctl restart rabbitmq-server.service
- 创建openstack用户
rabbitmqctl add_user openstack RABBIT_PASS
- 给openstack用户设置权限
rabbitmqctl set_permissions openstack ".*" ".*" ".*"