1、 计算节点初始化配置:(1).配置/etc/hosts文件rootopenstack # vi /etc/hosts127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4:1 localhost localhost.localdomain localhost6 localhost6.localdomain6192.168.10.21 openstack192.168.10.22 node01(2).配置网络rootopenstack # vi /etc/sysconfig/network-scri
2、pts/ifcfg-eth0DEVICE=eth0TYPE=EthernetONBOOT=yesBOOTPROTO=staticIPADDR=192.168.20.200NETMASK=255.255.255.0GATEWAY=192.168.20.2rootopenstack # vi /etc/sysconfig/network-scripts/ifcfg-eth1DEVICE=eth1BOOTPROTO=none(3).关闭selinux:rootopenstack # vi /etc/selinux/config# This file controls the state of SEL
3、inux on the system.# SELINUX= can take one of these three values:# enforcing - SELinux security policy is enforced. permissive - SELinux prints warnings instead of enforcing. disabled - SELinux is fully disabled.SELINUX=disabled# SELINUXTYPE= type of policy in use. Possible values are: targeted - On
4、ly targeted network daemons are protected. strict - Full SELinux protection.SELINUXTYPE=targetedrootopenstack # setenforce 0(4).修改/etc/sysctl.conf参数:rootopenstack #vi /etc/sysctl.confnet.ipv4.ip_forward=1net.ipv4.conf.all.rp_filter=0net.ipv4.conf.default.rp_filter=0rootopenstack #sysctl -p #使sysctl.
5、conf配置生效(5).关闭多余的服务(可选):#!/bin/bashSERVICE_SUM=auditd blk-availability iscsi iscsid lvm2-monitor mdmonitor multipathd netconsole postfix rdisc restorecond saslauthdecho $SERVICE_SUM | xargs -n1 | while read SERVICEdo chkconfig $SERVICE offservice $SERVICEstopdone(6).导入第三方安装源:yum -y install http:/rep
6、os.fedorapeople.org/repos/openstack/openstack-icehouse/rdo-release-icehouse-2.noarch.rpm/dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm(7).更新kernel:yum -y install kernel-2.6.32-358.123.2.openstack*(8).安装OpenStack工具包:rootopenstack#yum-y install openstack-utilsopenstack-selinux(9).
7、重启:rootopenstack # reboot2.安装配置NTP服务(1).安装NTP服务:rootopenstack # yum -y install ntp(2).配置NTP服务:rootopenstack # vi /etc/ntp.confdriftfile /var/lib/ntp/driftrestrict default ignorerestrict 127.0.0.1restrict192.168.10.0mask 255.255.255.0 nomodify notrapserver ntp.api.bzserver 127.127.1.0 # local clockfu
8、dge 127.127.1.0 stratum 10keys /etc/ntp/keys(3).启动NTP服务,设置开机自启动:rootopenstack # service ntpd startrootopenstack # chkconfig ntpd on3.配置安装MySQL:(1).安装MySQL服务:rootopenstack # yum -y installmysql mysql-server MySQL-python (yum install MySQL-python in node)(2).修改MySQL配置文件:mysqlddatadir=/var/lib/mysqlsoc
9、ket=/var/lib/mysql/mysql.sockuser=mysql# Disabling symbolic-links is recommended to prevent assorted security riskssymbolic-links=0bind-address = 0.0.0.0 #设置监听IP地址0.0.0.0default-storage-engine = innodbcollation-server = utf8_general_ciinit-connect = SET NAMES utf8character-set-server = utf8mysqld_sa
10、felog-error=/var/log/mysqld.logpid-file=/var/run/mysqld/mysqld.pid(3).启动MqSQL服务,设置开机自启动:rootopenstack # service mysqld startrootopenstack # chkconfig mysqld on(4).修改MySQL密码为passwd:mysqladmin -uroot password passwd; history -c4.安装配置qpid服务(1).安装qpid服务:-yinstall qpid-cpp-server memcached(2).修改/etc/qpid
11、d.conf配置文件,将auth设置为no:vi/etc/qpidd.confauth=no(3).启动qpid服务,设置开机启动:rootopenstack # service qpidd startrootopenstack # chkconfig qpidd on5.安装配置KeyStone(1).安装KeyStone服务:yum -y install openstack-keystone python-keystoneclient(2).创建keystone数据库,修改配置文件中的数据库链接:openstack-db -init -service keystone -rootpw pa
12、sswd(3).修改配置文件中的数据库链接:openstack-config -set /etc/keystone/keystone.conf sql connection mysql:/keystone:keystonelocalhost/keystone(4).使用openssl随即生成一个令牌,将其存储在配置文件中:rootopenstack # export SERVICE_TOKEN=$(openssl rand -hex 10) /随机生成SERVICE_TOKEN值,请牢记rootopenstack # export SERVICE_ENDPOINT=http:/127.0.0.1:35357/v2.0rootopenstack # mkdir /root/configrootopenstack # echo $SERVICE_TOKEN /root/config/ks_admin_token.txtrootopenstack # cat /root/config/ks_admin_token.txt12dd70ede7c9d9d3ed3crootopenstack # openstack-config -set /etc
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1