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

时间: 2024-10-19 15:26:43

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

安装Apache(httpd服务)

安装Apache(httpd服务) ① 移动所有压缩包到root文件夹下(root的家) ② 解压httpd压缩包(.tar.gz) 使用tar指令解压.tar.gz压缩包 tar 指令 -zxf :解压文件 -v :解压时显示解压进度 ③ 使用configure来设置配置信息 设置完成后,单击回车即可. ④ 使用make指令编译源码生成可执行文件 ⑤ 使用make install指令对编译后的文件进行安装 ⑥ 安装完成后,还不能直接使用,必须手工启动apache服务 执行以上指令后,代表apa

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 M版安装 network(neutron)服务篇

安装配置network(neutron) 服务 Mitaka版本网络有两个选择,Provider network 和Self-service network,这里我们选择第二种. controller 节点 一.创建数据库 [[email protected] ~]# mysql -u root -p >>CREATE DATABASE neutron; >>GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'localhost'   I

OpenStack(i版)之Keystone,Glance,Nova,Neutron,Horizon

一.前期准备 1.1.linux-node1端: [[email protected]1 ~]# egrep '(vmx|svm)' /proc/cpuinfo ##有输出就支持虚拟化 [[email protected] ~]# cat /etc/redhat-release CentOS release 6.8 (Final) [[email protected] ~]# uname -r 2.6.32-642.el6.x86_64 [[email protected] ~]# getenf

openstack-o版安装keystone

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

openstack M版安装 Dashboard (horizon)篇

安装配置Dashboard (horizon) web管理 一.安装Dashboard [[email protected] ~]# yum install openstack-dashboard 二.编辑配置Dashboard [[email protected] ~]#vim   /etc/openstack-dashboard/local_settings OPENSTACK_HOST = "controller" ALLOWED_HOSTS = ['*', ] SESSION_

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