Centos7 安装kilo-2 controller(ntp mariadb rabbitmq)

来源:互联网 发布:全球域名注册局 编辑:程序博客网 时间:2024/05/16 17:02

系统配置

  • hostname
hostnamectl --static set-hostname controller
  • hosts
 cat >>  /etc/hosts << OFF# controller10.0.0.11 controller# network10.0.0.21 network# compute110.0.0.31 compute1OFF
  • 安装软件源
yum -y install http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpmyum -y install http://rdo.fedorapeople.org/openstack-kilo/rdo-release-kilo.rpm
  • 升级系统软件包(升级完重启查看系统配置)
yum upgradereboot#hostnamecontrollercat /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.confsed -i 's/server 1.centos.pool.ntp.org iburst/#server 1.centos.pool.ntp.org iburst/g' /etc/ntp.confsed -i 's/server 2.centos.pool.ntp.org iburst/#server 2.centos.pool.ntp.org iburst/g' /etc/ntp.confsed -i 's/server 3.centos.pool.ntp.org iburst/#server 3.centos.pool.ntp.org iburst/g' /etc/ntp.confecho "server 127.127.1.0" >>/etc/ntp.confecho "fudge 127.127.1.0 stratum 10" >>/etc/ntp.conf

启动ntp并设置开机启动

systemctl enable ntpd.servicesystemctl restart ntpd.service

mariadb

  • 安装软件包
yum -y install mariadb mariadb-server MySQL-python
  • 修改配置文件
sed -i "/\[mysqld\]$/a character-set-server = utf8" /etc/my.cnfsed -i "/\[mysqld\]$/a init-connect = 'SET NAMES utf8'" /etc/my.cnfsed -i "/\[mysqld\]$/a collation-server = utf8_general_ci" /etc/my.cnfsed -i "/\[mysqld\]$/a innodb_file_per_table" /etc/my.cnfsed -i "/\[mysqld\]$/a default-storage-engine = innodb" /etc/my.cnfsed -i "/\[mysqld\]$/a bind-address = 10.0.0.11" /etc/my.cnfsed -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.servicesystemctl restart rabbitmq-server.service
  • 创建openstack用户
 rabbitmqctl add_user openstack  RABBIT_PASS
  • 给openstack用户设置权限
rabbitmqctl set_permissions openstack ".*" ".*" ".*"
0 0
原创粉丝点击