openstack O版 安装keystone、memcached 、httpd服务

安装keystone、memcached 、httpd服务
[[email protected] ~]# yum -y install openstack-keystone httpd mod_wsgi python-openstackclient memcached python-memcached openstack-utils
[[email protected] ~]# systemctl enable memcached.service
[[email protected] ~]# systemctl start memcached.service
[[email protected] ~]# systemctl status memcached.service
[[email protected] ~]# netstat -anpult | grep memcached


1.修改mamcached服务配置文件
[[email protected] ~]# cat /etc/sysconfig/memcached
PORT="11211"
USER="memcached"
MAXCONN="1024"
CACHESIZE="64"
OPTIONS="-l 127.0.0.1,::1,192.168.0.111"
修改keystone服务的配置文件
[[email protected] ~]# cp /etc/keystone/keystone.conf /etc/keystone/keystone.conf.bak
[[email protected] ~]# >/etc/keystone/keystone.conf
[[email protected] ~]# cat /etc/keystone/keystone.conf
[DEFAULT]
transport_url = rabbit://openstack:[email protected]
[database]
connection = mysql+pymysql://keystone:[email protected]/keystone
[cache]
backend = oslo_cache.memcache_pool
enabled = true
memcache_servers = controller:11211
[memcache]
servers = controller:11211
[token]
expiration = 3600
provider = fernet
2.配置httpd服务
[[email protected] ~]# vi /etc/httpd/conf/httpd.conf
95 ServerName controller
[[email protected] ~]# ln -s /usr/share/keystone/wsgi-keystone.conf /etc/httpd/conf.d/
[[email protected] ~]# systemctl enable httpd.service
Created symlink from /etc/systemd/system/multi-user.target.wants/httpd.service to /usr/lib/systemd/system/httpd.service.
[[email protected] ~]# systemctl start httpd.service
[[email protected] ~]# systemctl status httpd.service
[[email protected] ~]# systemctl list-unit-files |grep httpd.service
3.创建数据库表,使用命令同步
[[email protected] ~]# su -s /bin/sh -c "keystone-manage db_sync" keystone
[[email protected] ~]# mysql -hcontroller -ukeystone -pdevops 数据库检查表
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 15
Server version: 10.1.20-MariaDB MariaDB Server
Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.
Type ‘help;‘ or ‘\h‘ for help. Type ‘\c‘ to clear the current input statement.
MariaDB [(none)]>
初始化
[[email protected] ~]# keystone-manage fernet_setup --keystone-user keystone --keystone-group keystone
[[email protected] ~]# keystone-manage credential_setup --keystone-user keystone --keystone-group keystone
引导身份服务
[[email protected] ~]# keystone-manage bootstrap \
--bootstrap-password devops \
--bootstrap-username admin \
--bootstrap-project-name admin \
--bootstrap-role-name admin \
--bootstrap-service-name keystone \
--bootstrap-region-id RegionOne \
--bootstrap-admin-url http://controller:35357/v3 \
--bootstrap-internal-url http://controller:35357/v3 \
--bootstrap-public-url http://controller:5000/v3
验证:
[[email protected] ~]# openstack project list --os-username admin --os-project-name admin --os-user-domain-id default --os-project-domain-id default --os-identity-api-version 3 --os-auth-url http://controller:5000 --os-password devops
+----------------------------------+-------+
| ID | Name |
+----------------------------------+-------+
| 5315fe00d937450bb1f136aeb02b38e1 | admin |
+----------------------------------+-------+
4.创建admin用户环境变量,创建/root/admin-openrc文件并写入如下内容:
[[email protected] ~]# cat /root/admin-openrc
export OS_USER_DOMAIN_ID=default
export OS_PROJECT_DOMAIN_ID=default
export OS_USERNAME=admin
export OS_PROJECT_NAME=admin
export OS_PASSWORD=devops
export OS_IDENTITY_API_VERSION=3
export OS_IMAGE_API_VERSION=2
export OS_AUTH_URL=http://controller:35357/v3
5.创建service项目,用来管理其他服务用
[[email protected] ~]# openstack project create --domain default --description "Service Project" service
+-------------+----------------------------------+
| Field | Value |
+-------------+----------------------------------+
| description | Service Project |
| domain_id | default |
| enabled | True |
| id | e4fdeb56612d4a4c8ae523a8e8dd64d2 |
| is_domain | False |
| name | service |
| parent_id | default |
+-------------+----------------------------------+
创建一个普通项目demo
[[email protected] ~]# openstack project create --domain default --description "Demo Project" demo
+-------------+----------------------------------+
| Field | Value |
+-------------+----------------------------------+
| description | Demo Project |
| domain_id | default |
| enabled | True |
| id | bd5051c0f91a44d98ccd13eb1d0d180e |
| is_domain | False |
| name | demo |
| parent_id | default |
+-------------+----------------------------------+
创建一个普通用户demo
[[email protected] ~]# openstack user create --domain default demo --password devops
+---------------------+----------------------------------+
| Field | Value |
+---------------------+----------------------------------+
| domain_id | default |
| enabled | True |
| id | 04137b0ef90d443392896120ac8519d3 |
| name | demo |
| options | {} |
| password_expires_at | None |
+---------------------+----------------------------------+
创建user角色将demo用户赋予user角色
[[email protected] ~]# openstack role create user
+-----------+----------------------------------+
| Field | Value |
+-----------+----------------------------------+
| domain_id | None |
| id | 201208f262514a63a102ff47effa8cd5 |
| name | user |
+-----------+----------------------------------+
[[email protected] ~]# openstack role add --project demo --user demo user
去掉环境变量
[[email protected] ~]# unset OS_AUTH_URL OSPASSWORD
[[email protected] ~]# openstack --os-auth-url http://controller:35357/v3 --os-project-domain-name default --os-user-domain-name default --os-project-name admin --os-username admin token issue --os-password devops
+------------+----------------------------------------------------------------------------------------------------+
| Field | Value |
+------------+----------------------------------------------------------------------------------------------------+
| expires | 2017-05-04T06:48:17+0000 |
| id | gAAAAABZCsChgxLzBdT-OeKPYVo7TP1nF4o0PEyOEH7luvvckDA45wDfhd5IbSXK1V9bnJqwQMHaLpekY29GU68xvABw- |
| | BSrLFuCTpF83JLuPknonpDms49KSQTURbV9lEXNm7CxC
-qwzOW-kTwRV1wIqys6tAirkT-33AIIbYCZFA-NPdLiUE |
| project_id | cb0ef8f994df41b2a470e7e0cdd92015 |
| user_id | 2dfa05385ca040eb9a2ff0259c41ebf5 |
+------------+----------------------------------------------------------------------------------------------------+
[[email protected] ~]# openstack --os-auth-url http://controller:5000/v3 --os-project-domain-name default --os-user-domain-name default --os-project-name demo --os-username demo token issue --os-password devops
+------------+----------------------------------------------------------------------------------------------------+
| Field | Value |
+------------+----------------------------------------------------------------------------------------------------+
| expires | 2017-05-04T07:17:13+0000 |
| id | gAAAAABZCsdqy1NtsxXldUEx7xVNNwiuLHbv8nd29OeWW60bGQSD3hudz1mlsv2IMmukoLBvgbvUENy1A4Q- |
| | NRb2eEuPVaDA467EK1HgOd3mduE-T0J0qUwjNdyOYosb3aIme72OAcXEa3LHCxXaB3H3Rq- |
| | rE91NMsmFm3o0e2SfqnTRAQPsquo |
| project_id | bd5051c0f91a44d98ccd13eb1d0d180e |
| user_id | 04137b0ef90d443392896120ac8519d3 |
+------------+----------------------------------------------------------------------------------------------------+

原文地址:https://blog.51cto.com/343614597/2419405

时间: 07-11

openstack O版 安装keystone、memcached 、httpd服务的相关文章

OpenStack pike版 安装openstack服务(4) 续安装openstack服务(3)    

Compute service overview 计算服务概述 OpenStack用于对主机的计算和管理云计算系统.OpenStack的计算是一个基础设施即服务(IaaS)系统的一个重要组成部分.主要模块是用python实现的. OpenStack计算与OpenStack身份验证交互用来完成认证:OpenStack镜像服务用于磁盘和服务器镜像:用户和管理接口为OpenStack Dashboard.镜像访问受到项目和用户的限制,每个项目的配额是有限的(例如,实例的数量).OpenStack计算可

Linux(CentOS)系统下安装好apache(httpd)服务后,其他电脑无法访问的原因

原文:Linux(CentOS)系统下安装好apache(httpd)服务后,其他电脑无法访问的原因 今天试了下在虚拟机上利用CentOS系统的yum命令安装好了httpd(apache2.4.6),然后在windows系统下访问此虚拟机的ip地址,却访问不了. 因为前段时间有知道过iptable的限制,所以在想是不是因为iptable限制了80端口呢! 所以在网上找了下iptable的命令,并且把tcp的80端口设置成允许任何IP都可以访问: iptables -I INPUT -p TCP

OpenStack pike版 安装openstack服务(3) 续基本环境部署(2)

安装openstack服务 所有openstack服务的安装指南链接:https://docs.openstack.org/pike/install/ 最小化部署,需要按照下面指定的顺序安装以下服务: Identity service – keystone installation for Pike Image service – glance installation for Pike Compute service – nova installation for Pike Networkin

openstack-o版安装keystone

Keustone身份认证组件是openstack项目中默认的身份认证管理系统,所有的服务都需要keystone认证.根据用户的等级分配相应的权限. 那么我们现在配置最新版本openstack的认证服务keystone 前提准备:Centos7.3.163yum源.openstack-o版源.DNS.时间同步.数据库.rabbitmq.memcache 创建数据库 create database keystone: 为数据库用户赋予权限(赋予一个本地用户权限,一个远程登入权限) GRANT ALL

openstack M版安装 compute(nova)服务篇

配置安装nova compute服务 安装controller节点 一.创建nova数据库 [[email protected] ~]# mysql -u root -p >>CREATE DATABASE nova_api; >>CREATE DATABASE nova; >>GRANT ALL PRIVILEGES ON nova_api.* TO 'nova'@'localhost'   IDENTIFIED BY 'NOVA_DBPASS'; >>G

OpenStack主要逻辑模块–Keystone身份验证服务

Keystone作为Openstack的核心模块,为Nova(计算),Glance(镜像),Swift(对象存储),Cinder(块存储),Neutron(网络)以及Horizon(Dashboard)提供认证服务 Keystone基本概念介绍之一 User User即用户,他们代表可以通过keystone进行访问的人或程序.Users通过认证信息(credentials,如密码.API Keys等)进行验证. Tenant Tenant即租户,它是各个服务中的一些可以访问的资源集合.例如,在N

CentOS 7部署OpenStack(2)—安装keystone服务

1.创建数据库 [[email protected] ~]# mysql -u root -p -e "CREATE DATABASEkeystone;" Enter password: [[email protected] ~]# mysql -uroot -p -e "GRANT ALL PRIVILEGES ONkeystone.* TO 'keystone'@'localhost' IDENTIFIED BY 'keystone';" Enter passw

【openstack N版】——认证服务keystone

一. 基础环境 1.1环境介绍 linux-node1(控制节点) 1 #系统版本 2 [[email protected] ~]# cat /etc/redhat-release 3 CentOS Linux release 7.2.1511 (Core) 4 #内核版本 5 [[email protected] ~]# uname -r 6 3.10.0-327.36.3.el7.x86_64 7 #主机名 8 [[email protected] ~]# hostname 9 linux-

CentOS7安装apache httpd服务

虚拟机:192.168.2.21     [停止防火墙]   sudo systemctl stop firewalld.service      --停止防火墙   sudo systemctl disable firewalld.service   --开机关闭防火墙    [安装apache httpd服务]   cat /etc/yum.repos.d/CentOS-Media.repo   -----查看镜像配置   yum --disablerepo=\* --enablerepo=

httpd服务的安装、配置

httpd服务是架设网站的必须服务下面我就来说下怎么安装配置 1.安装httpd服务 输入下面命令进行安装(如果没网络或者安装速度慢的请设置本地yum源进行安装,设置教程请点击这里查看) yum install httpd -y 安装完成后,输入下面的命令重启httpd服务 service httpd restart或者systemctl start httpd.service (有关systemctl的用法请到Linux分类里查看) 4关闭系统防火墙. service iptables sto