58 Openstack基础、openstack之glance、openstack之keystone
03 openstack之keystone
配置環(huán)境
Controller CentOS release 6.7 controller
eth0:僅主機 192.168.28.121
eth1:橋接 192.168.1.121
node2 192.168.1.122 CentOS release 6.7 compute1
eth0:僅主機,eth1:VMnet2 不會直接與外部網(wǎng)絡通信
node3 192.168.1.123 CentOS release 6.7 networking
eth0:僅主機,eth1:VMnet2,eth2:橋接
[root@Controller ~]# vim /etc/hosts
添加
192.168.28.121 ? ? ?controller.magedu.com controller
192.168.28.122 ? ? ?compute1.magedu.com compute1
192.168.28.123 ? ? ?network1.magedu.com network1
#配置安裝Mariadb
[root@Controller ~]# yum -y groupinstall "Development tools" "Desktop Platform Development" -y
[root@Controller ~]# yum -y install cmake
[root@Controller ~]# groupadd -r -g 306 mysql
[root@Controller ~]# useradd -r -g 306 -u 306 mysql
[root@Controller ~]# mkdir -p /mydata/data
[root@Controller ~]# chown ?mysql.mysql /mydata/data/
[root@Controller ~]# tar xf mariadb-5.5.53.tar.gz?
[root@Controller ~]# cd mariadb-5.5.53
[root@Controller mariadb-5.5.53]#cmake ?\
-DCMAKE_INSTALL_PREFIX=/usr/local/mariadb-5.5.53 \
?-DMYSQL_DATADIR=/mydata/data \
?-DSYSCONFDIR=/etc \
?-DWITH_INNOBASE_STORAGE_ENGINE=1 \
?-DWITH_ARCHIVE_STORAGE_ENGINE=1 \
?-DWITH_BLACKHOLE_STORAGE_ENGINE=1 \
?-DWITH_READLINE=1 \
?-DWITH_SSL=system \
?-DWITH_ZLIB=system \
?-DWITH_LIBWRAP=0 \
?-DMYSQL_UNIX_ADDR=/tmp/mysql.sock \
?-DDEFAULT_CHARSET=utf8 \
?-DDEFAULT_COLLATION=utf8_general_ci
[root@Controller mariadb-5.5.53]# make && make install
[root@Controller mariadb-5.5.53]# cd /usr/local/mariadb-5.5.53/
[root@Controller mariadb-5.5.53]# chown -R root.mysql ./*
[root@Controller mariadb-5.5.53]# cd ..
[root@Controller local]# ln -s mariadb-5.5.53/ mysql
[root@Controller local]# cd mysql
[root@Controller mysql]# scripts/mysql_install_db --user=mysql --datadir=/mydata/data/
[root@Controller mysql]# mkdir /etc/mysql
[root@Controller mysql]# cp support-files/my-large.cnf /etc/mysql/my.cnf
[root@Controller mysql]# vim /etc/mysql/my.cnf?
添加
datadir = /mydata/data
innodb_file_per_table = ON
skip_name_resolv = ON ?
[root@Controller mysql]# cp support-files/mysql.server /etc/rc.d/init.d/mysqld
[root@Controller mysql]# chmod +x /etc/rc.d/init.d/mysqld?
[root@Controller mysql]# chkconfig --add mysqld
[root@Controller ~]# vim /etc/profile.d/mysql.sh
export PATH=/usr/local/mysql/bin:$PATH
[root@Controller ~]# . /etc/profile.d/mysql.sh
#配置openstack-controller
[root@Controller ~]# cd /etc/sysconfig/netwok-scripts?
[root@Controller network-scripts]# cp ifcfg-eth{0,1}
[root@Controller network-scripts]# vim ifcfg-eth1
替換所有的eth0為eth1
刪除UUID、MAC、MM_CONTROLLED行
其它保持不變
[root@Controller network-scripts]# vim ifcfg-eth0
刪除UUID、MAC、MM_CONTROLLED、網(wǎng)關(guān)、DNS
修改IP地址為192.168.28.121
[root@Controller network-scripts]# service NetworkManager stop
[root@Controller network-scripts]# chkconfig NetworkManager off
[root@Controller network-scripts]# service network restart
[root@Controller network-scripts]# ifconfig
eth0 ? ? ?Link encap:Ethernet ?HWaddr 00:0C:29:AF:63:D0 ?
?inet addr:192.168.28.121 ?Bcast:192.168.28.255 ?Mask:255.255.255.0
?inet6 addr: fe80::20c:29ff:feaf:63d0/64 Scope:Link
?UP BROADCAST RUNNING MULTICAST ?MTU:1500 ?Metric:1
?RX packets:25 errors:0 dropped:0 overruns:0 frame:0
?TX packets:47 errors:0 dropped:0 overruns:0 carrier:0
?collisions:0 txqueuelen:1000?
?RX bytes:1962 (1.9 KiB) ?TX bytes:3146 (3.0 KiB)
eth1 ? ? ?Link encap:Ethernet ?HWaddr 00:0C:29:AF:63:DA ?
?inet addr:192.168.1.121 ?Bcast:192.168.1.255 ?Mask:255.255.255.0
?inet6 addr: fe80::20c:29ff:feaf:63da/64 Scope:Link
?UP BROADCAST RUNNING MULTICAST ?MTU:1500 ?Metric:1
?RX packets:1745 errors:0 dropped:0 overruns:0 frame:0
?TX packets:115 errors:0 dropped:0 overruns:0 carrier:0
?collisions:0 txqueuelen:1000?
?RX bytes:316460 (309.0 KiB) ?TX bytes:13880 (13.5 KiB)
?
#同步服務器時間 ?
[root@Controller network-scripts]# crontab -l
*/3 * * * * /usr/sbin/ntpdate 192.168.1.1 &> /dev/null
#配置openstack-Compute1
[root@Compute1 ~]# cd /etc/sysconfig/netwok-scripts?
[root@Compute1 network-scripts]# cp ifcfg-eth{0,1}
[root@Compute1 network-scripts]# vim ifcfg-eth1
替換所有的eth0為eth1
刪除UUID、MAC、MM_CONTROLLED、DNS、網(wǎng)關(guān)、網(wǎng)關(guān)、掩碼行
其它保持不變
[root@Compute1 network-scripts]# vim ifcfg-eth0
刪除UUID、MAC、MM_CONTROLLED
修改IP地址為192.168.28.122
修改網(wǎng)關(guān)為192.168.28.121
[root@Compute1 network-scripts]# service NetworkManager stop
[root@Compute1 network-scripts]# chkconfig NetworkManager off
[root@Compute1 network-scripts]# service network restart
[root@Compute1 network-scripts]#route add default gw 192.168.28.121
#同步服務器時間
[root@Compute1 ~]# crontab -l
*/3 * * * * /usr/sbin/ntpdate 192.168.1.1 &> /dev/null
[root@Controller ~]# scp /etc/hosts compute1:/etc/
[root@Controller ~]# iptables -t nat -A POSTROUTING -s 192.168.28.0/24 -j SNAT --to-source 192.168.1.121
[root@Controller ~]# service iptables save
[root@Controller ~]# vim /etc/sysctl.conf?
修改
net.ipv4.ip_forward = 0
為
net.ipv4.ip_forward = 1
[root@Controller ~]# cd /etc/yum.repos.d/
[root@Controller yum.repos.d]# vim openstack.repo
[openstack]
name=openstack-icehouse
baseurl=http://192.168.56.2/openstack
enabled=1
gpgcheck=0
[root@Controller yum.repos.d]# yum install openstack-keystone python-keystoneclient #沒有安裝成功
[root@Controller yum.repos.d]# yum install -y openstack-utils
[root@Controller yum.repos.d]# openstack-db --init --service keystone --pass keystone
[root@Controller yum.repos.d]# cd
[root@Controller ~]# mysql
mysql> GRANT ALL ON keystone.* to 'keystone'@'%' IDENTIFIED BY 'keystone';
mysql> FLUSH PRIVILEGES;
mysql> \q
[root@Controller ~]# su -s /bin/sh -c 'keystone-manage db_sync' keystone
[root@Controller ~]# service mysqld stop
[root@Controller ~]# yum install mariadb-galera-server
[root@Controller ~]# rm -f /etc/profile.d/mysql.sh
截止 93:0(84558)
由于openstack-keystone無法安裝成功,本視頻無法繼續(xù)進行
04 openstack之glance
截止 11:33(10512)
由于openstack-keystone無法安裝成功,本視頻無法繼續(xù)進行
轉(zhuǎn)載于:https://blog.51cto.com/sihua/1892009
與50位技術(shù)專家面對面20年技術(shù)見證,附贈技術(shù)全景圖總結(jié)
以上是生活随笔為你收集整理的58 Openstack基础、openstack之glance、openstack之keystone的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: java中Class.getResour
- 下一篇: 3252: 攻略