声明:最近在进行openstack的kilo版本的安装,发现现有的网络教程非常少,而且多数教程并不能安装成功,故写此教程。openstack的安装较为复杂,本教程并不能保证在不同环境下也能将其安装成功。个人安装教程,也难免出错。同时,安装是在虚拟机环境下,真实安装环境需要进行更改。
转载请声明出处:
作者:张某人ER
原文链接:http://blog.csdn.net/xinxing__8185/article/details/51154549
vim /etc/httpd/conf/httpd.conf
ServerName 一行改为 ServerName controller
新建文件:
vim /etc/httpd/conf.d/wsgi-keystone.conf
写入如下内容:
Listen 5000 Listen 35357 <VirtualHost *:5000> WSGIDaemonProcess keystone-public processes=5 threads=1 user=keystone group=keystone display-name=%{GROUP} WSGIProcessGroup keystone-public WSGIScriptAlias / /var/www/cgi-bin/keystone/main WSGIApplicationGroup %{GLOBAL} WSGIPassAuthorization On LogLevel info ErrorLogFormat "%{cu}t %M" ErrorLog /var/log/httpd/keystone-error.log CustomLog /var/log/httpd/keystone-access.log combined </VirtualHost> <VirtualHost *:35357> WSGIDaemonProcess keystone-admin processes=5 threads=1 user=keystone group=keystone display-name=%{GROUP} WSGIProcessGroup keystone-admin WSGIScriptAlias / /var/www/cgi-bin/keystone/admin WSGIApplicationGroup %{GLOBAL} WSGIPassAuthorization On LogLevel info ErrorLogFormat "%{cu}t %M" ErrorLog /var/log/httpd/keystone-error.log CustomLog /var/log/httpd/keystone-access.log combined </VirtualHost>
创建目录
mkdir - p /var/www/cgi-bin/keystone
curl http://git.openstack.org/cgit/openstack/keystone/plain/httpd/keystone.py?h=stable/kilo | tee /var/www/cgi-bin/keystone/main /var/www/cgi-bin/keystone/admin
赋权
chown -R keystone:keystone /var/www/cgi-bin/keystone chmod 755 /var/www/cgi-bin/keystone/*
启动
systemctl enable httpd.service systemctl start httpd.service
(注:按照kilo版的安装手册,我在这里遇到了无法启动的问题,下面给出解决办法,原因主要是Apache和keystone service 服务存在冲突,官方手册建议使用Apache提供restful API 服务):
设置环境变量:
export OS_TOKEN=openstack export OS_URL=http://controller:35357/v2.0
openstack service create --name keystone --description "Opentack Identity" identity
注:我在此处遇到错误:HTTP 500
如下解决:
首先尝试:
systemctl enable openstack-keystone.service systemctl start openstack-keystone.service
注:出现Failed to start OpenStack Identity Service
解决办法:
ln -s /usr/lib/systemd/system/httpd.service /etc/systemd/system/openstack-keystone.service
然后启动:
systemctl enable openstack-keystone.service systemctl start openstack-keystone.service
注:出现:Failed to start the Apache Http server
最后尝试:
vim /usr/lib/systemd/system/httpd.service
在Type下添加一行 PIDFile= /var/run/httpd/httpd.pid
启动服务:
systemctl enable openstack-keystone.service systemctl start openstack-keystone.service
解决问题.