openstack(train版)快速安装部署-基础环境部署(一)

一、环境
1、配置好IP地地址主机名(修改/etc/hosts文件)

[root@controller ~]# cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.2.112 controller
192.168.2.113 compute1
2、所有安装的机器做好对时
3、启用OpenStack库
1)wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
2)yum install centos-release-openstack-train -y
3)yum install python-openstackclient openstack-utils -y
4、安装配置mysql数据库
1)yum install mariadb mariadb-server python2-PyMySQL
2)创建并编辑 /etc/my.cnf.d/openstack.cnf
[mysqld]
bind-address = 192.168.2.112
default-storage-engine = innodb
innodb_file_per_table = on
max_connections = 4096
collation-server = utf8_general_ci
character-set-server = utf8
3)启动服务
systemctl enable mariadb.service
systemctl start mariadb.service
4)mysql安全初始化
mysql_secure_installation
5、安装配置消息队列
1)yum install -y rabbitmq-server
2)systemctl enable rabbitmq-server.service && systemctl start rabbitmq-server.service
3)添加 openstack 用户
rabbitmqctl add_user openstack openstack
4)给``openstack``用户配置写和读权限
rabbitmqctl set_permissions openstack ".*" ".*" ".*"
6、安装配置Memcached
1)yum install memcached python-memcached -y
2)编辑 /etc/sysconfig/memcached,在OPTIONS行增加主机名controller
OPTIONS="-l 127.0.0.1,::1,controller"
3)systemctl enable memcached.service && systemctl enable memcached.service
7、安装配置etcd
1)、yum install etcd -y
2)、修改配置文件/etc/etcd/etcd.conf 和下面的一样,主机名注意修改
ETCD_DATA_DIR="/var/lib/etcd/default.etcd"
ETCD_LISTEN_PEER_URLS="http://localhost:2380"
ETCD_LISTEN_CLIENT_URLS="http://localhost:2379"
ETCD_NAME="controller"
ETCD_INITIAL_ADVERTISE_PEER_URLS="http://localhost:2380"
ETCD_ADVERTISE_CLIENT_URLS="http://localhost:2379"
ETCD_INITIAL_CLUSTER="default=http://localhost:2380"
ETCD_INITIAL_CLUSTER_TOKEN="etcd-cluster-01"
ETCD_INITIAL_CLUSTER_STATE="new"
3、systemctl enable etcd && systemctl start etcd

猜你喜欢

转载自blog.csdn.net/qq_37594711/article/details/107923126