DevOps学院

DevOps学院

中国新一代IT在线教育平台
运维知识体系

运维知识体系

运维知识体系总结,持续更新,欢迎转载。
缓存知识体系

缓存知识体系

运维知识体系之缓存,分层多级缓存体系。
速云科技

速云科技

DevOps咨询、企业内训、落地解决方案。

基于OpenStack构建企业私有云(1)实验环境准备

OpenStack赵班长 发表了文章 • 3 个评论 • 1124 次浏览 • 2018-04-04 19:47 • 来自相关话题

一.基础软件包安装

1.安装EPEL仓库# rpm -ivh [url]http://mirrors.aliyun.com/epel ... h.rpm[/url]

2.安装OpenStack仓库# yum install -y centos-release-openstack-queens
3.安装OpenStack客户端# yum install -y python-openstackclient
 4.安装openstack SELinux管理包# yum install -y openstack-selinux

二.MySQL数据库部署

1.MySQL安装[root@linux-node1 ~]# yum install -y mariadb mariadb-server python2-PyMySQL
2.修改MySQL配置文件[root@linux-node1 ~]# vim /etc/my.cnf.d/openstack.cnf
[mysqld]
bind-address = 192.168.56.11 #设置监听的IP地址
default-storage-engine = innodb #设置默认的存储引擎
innodb_file_per_table = on#使用独享表空间
collation-server = utf8_general_ci #服务器的默认校对规则
character-set-server = utf8 #服务器安装时指定的默认字符集设定
max_connections = 4096 #设置MySQL的最大连接数,生产请根据实际情况设置。



3.启动MySQL Server并设置开机启动[root@linux-node1 ~]# systemctl enable mariadb.service
[root@linux-node1 ~]# systemctl start mariadb.service

4.进行数据库安全设置[root@linux-node1 ~]# mysql_secure_installation

5.数据库创建

[root@linux-node1 ~]# mysql -u root -p
Enter password:

MariaDB [(none)]>

Keystone数据库
CREATE DATABASE keystone;
GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'localhost' IDENTIFIED BY 'keystone';
GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'%' IDENTIFIED BY 'keystone';

Glance数据库
CREATE DATABASE glance;
GRANT ALL PRIVILEGES ON glance.* TO 'glance'@'localhost' IDENTIFIED BY 'glance';
GRANT ALL PRIVILEGES ON glance.* TO 'glance'@'%' IDENTIFIED BY 'glance';

Nova数据库
CREATE DATABASE nova;
GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'localhost' IDENTIFIED BY 'nova';
GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'%' IDENTIFIED BY 'nova';
CREATE DATABASE nova_api;
GRANT ALL PRIVILEGES ON nova_api.* TO 'nova'@'localhost' IDENTIFIED BY 'nova';
GRANT ALL PRIVILEGES ON nova_api.* TO 'nova'@'%' IDENTIFIED BY 'nova';
CREATE DATABASE nova_cell0;
GRANT ALL PRIVILEGES ON nova_cell0.* TO 'nova'@'localhost' IDENTIFIED BY 'nova';
GRANT ALL PRIVILEGES ON nova_cell0.* TO 'nova'@'%' IDENTIFIED BY 'nova';

Neutron 数据库
CREATE DATABASE neutron;
GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'localhost' IDENTIFIED BY 'neutron';
GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'%' IDENTIFIED BY 'neutron';

Cinder数据库
CREATE DATABASE cinder;
GRANT ALL PRIVILEGES ON cinder.* TO 'cinder'@'localhost' IDENTIFIED BY 'cinder';
GRANT ALL PRIVILEGES ON cinder.* TO 'cinder'@'%' IDENTIFIED BY 'cinder';

三:消息代理RabbitMQ
1.安装RabbitMQ[root@linux-node1 ~]# yum install -y rabbitmq-server
2.设置开启启动,并启动RabbitMQ[root@linux-node1 ~]# systemctl enable rabbitmq-server.service
[root@linux-node1 ~]# systemctl start rabbitmq-server.service
3.添加openstack用户。[root@linux-node1 ~]# rabbitmqctl add_user openstack openstack
Creating user "openstack" ...



4.给刚才创建的openstack用户,创建权限。[root@linux-node1 ~]# rabbitmqctl set_permissions openstack ".*" ".*" ".*"
Setting permissions for user "openstack" in vhost "/" ...
5.启用Web监控插件[root@linux-node1 ~]# rabbitmq-plugins list
[root@linux-node1 ~]# rabbitmq-plugins enable rabbitmq_management

  查看全部
一.基础软件包安装

1.安装EPEL仓库
# rpm -ivh [url]http://mirrors.aliyun.com/epel ... h.rpm[/url]


2.安装OpenStack仓库
# yum install -y centos-release-openstack-queens

3.安装OpenStack客户端
# yum install -y python-openstackclient

 4.安装openstack SELinux管理包
# yum install -y openstack-selinux


二.MySQL数据库部署

1.MySQL安装
[root@linux-node1 ~]# yum install -y mariadb mariadb-server python2-PyMySQL

2.修改MySQL配置文件
[root@linux-node1 ~]# vim /etc/my.cnf.d/openstack.cnf
[mysqld]
bind-address = 192.168.56.11 #设置监听的IP地址
default-storage-engine = innodb #设置默认的存储引擎
innodb_file_per_table = on#使用独享表空间
collation-server = utf8_general_ci #服务器的默认校对规则
character-set-server = utf8 #服务器安装时指定的默认字符集设定
max_connections = 4096 #设置MySQL的最大连接数,生产请根据实际情况设置。



3.启动MySQL Server并设置开机启动
[root@linux-node1 ~]# systemctl enable mariadb.service
[root@linux-node1 ~]# systemctl start mariadb.service


4.进行数据库安全设置
[root@linux-node1 ~]# mysql_secure_installation


5.数据库创建

[root@linux-node1 ~]# mysql -u root -p
Enter password:

MariaDB [(none)]>

Keystone数据库
CREATE DATABASE keystone;
GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'localhost' IDENTIFIED BY 'keystone';
GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'%' IDENTIFIED BY 'keystone';

Glance数据库
CREATE DATABASE glance;
GRANT ALL PRIVILEGES ON glance.* TO 'glance'@'localhost' IDENTIFIED BY 'glance';
GRANT ALL PRIVILEGES ON glance.* TO 'glance'@'%' IDENTIFIED BY 'glance';

Nova数据库
CREATE DATABASE nova;
GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'localhost' IDENTIFIED BY 'nova';
GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'%' IDENTIFIED BY 'nova';
CREATE DATABASE nova_api;
GRANT ALL PRIVILEGES ON nova_api.* TO 'nova'@'localhost' IDENTIFIED BY 'nova';
GRANT ALL PRIVILEGES ON nova_api.* TO 'nova'@'%' IDENTIFIED BY 'nova';
CREATE DATABASE nova_cell0;
GRANT ALL PRIVILEGES ON nova_cell0.* TO 'nova'@'localhost' IDENTIFIED BY 'nova';
GRANT ALL PRIVILEGES ON nova_cell0.* TO 'nova'@'%' IDENTIFIED BY 'nova';

Neutron 数据库
CREATE DATABASE neutron;
GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'localhost' IDENTIFIED BY 'neutron';
GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'%' IDENTIFIED BY 'neutron';

Cinder数据库
CREATE DATABASE cinder;
GRANT ALL PRIVILEGES ON cinder.* TO 'cinder'@'localhost' IDENTIFIED BY 'cinder';
GRANT ALL PRIVILEGES ON cinder.* TO 'cinder'@'%' IDENTIFIED BY 'cinder';

三:消息代理RabbitMQ
1.安装RabbitMQ
[root@linux-node1 ~]# yum install -y rabbitmq-server

2.设置开启启动,并启动RabbitMQ
[root@linux-node1 ~]# systemctl enable rabbitmq-server.service
[root@linux-node1 ~]# systemctl start rabbitmq-server.service

3.添加openstack用户。
[root@linux-node1 ~]# rabbitmqctl add_user openstack openstack
Creating user "openstack" ...



4.给刚才创建的openstack用户,创建权限。
[root@linux-node1 ~]# rabbitmqctl set_permissions openstack ".*" ".*" ".*"
Setting permissions for user "openstack" in vhost "/" ...

5.启用Web监控插件
[root@linux-node1 ~]# rabbitmq-plugins list
[root@linux-node1 ~]# rabbitmq-plugins enable rabbitmq_management


 

用python制作一个带有web界面的简易服务器监控工具,求解

回复

运维杂谈zhangye 发起了问题 • 1 人关注 • 0 个回复 • 662 次浏览 • 2018-03-20 21:11 • 来自相关话题

Google Python命名规范

默认分类liushiqi_1001 发表了文章 • 0 个评论 • 663 次浏览 • 2018-01-18 15:37 • 来自相关话题

module_name, package_name, ClassName, method_name, ExceptionName, function_name, GLOBAL_VAR_NAME, instance_var_name, function_parameter_name, local_var_name. 查看全部
module_name, package_name, ClassName, method_name, ExceptionName, function_name, GLOBAL_VAR_NAME, instance_var_name, function_parameter_name, local_var_name.

有没有自动化运维管理类的工具?

运维监控[已注销] 回复了问题 • 7 人关注 • 6 个回复 • 3791 次浏览 • 2018-01-09 14:53 • 来自相关话题

linux内核

回复

DevOpsliuhhhhh 发起了问题 • 1 人关注 • 0 个回复 • 878 次浏览 • 2018-01-02 13:49 • 来自相关话题

【驻外】【12-25K】优凯软件 招募运维工程师 2人

回复

默认分类优凯123 回复了问题 • 1 人关注 • 1 个回复 • 1916 次浏览 • 2018-01-02 11:12 • 来自相关话题

安装wordpress只显示白底黑字

Web架构赵班长 回复了问题 • 2 人关注 • 1 个回复 • 640 次浏览 • 2017-12-29 16:32 • 来自相关话题

CentOS7云主机,通过mail命令发,使用465端口(smtps协议)发送邮件

默认分类liushiqi_1001 发表了文章 • 0 个评论 • 1367 次浏览 • 2017-12-25 12:20 • 来自相关话题

#创建证书
mkdir -p /root/.certs/
echo -n | openssl s_client -connect smtp.qq.com:465 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > ~/.certs/qq.crt
certutil -A -n "GeoTrust SSL CA" -t "C,," -d ~/.certs -i ~/.certs/qq.crt
certutil -A -n "GeoTrust Global CA" -t "C,," -d ~/.certs -i ~/.certs/qq.crt
certutil -L -d /root/.certs
#信任证书
certutil -A -n "GeoTrust SSL CA - G3" -t "Pu,Pu,Pu"  -d ./ -i qq.crt 

# 配置/etc/mail.rcE繁忙
set smtp="smtps://smtp.qq.com:465"
set smtp-auth=login
set smtp-auth-user="228444347@qq.com"  #换成你的qq邮箱
set smtp-auth-password="fwmazaxbllqrcajg"  # 换成你的qq邮箱第三方登录密码
set ssl-verify=ignore 
#set nss-config-dir=/etc/pki/nssdb
set nss-config-dir=/root/.certs

说明:
#smtp-auth-password的密码是qq邮箱里面设置的第三方登录密码,不是你qq的密码,在qq邮箱设置界面配置
 
测试:
echo message3 | mail -v -r "228444347@qq.com" -s "hello world" 228444347@qq.com
注意:一定要带-r参数,生产上去掉-v参数 查看全部
#创建证书
mkdir -p /root/.certs/
echo -n | openssl s_client -connect smtp.qq.com:465 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > ~/.certs/qq.crt
certutil -A -n "GeoTrust SSL CA" -t "C,," -d ~/.certs -i ~/.certs/qq.crt
certutil -A -n "GeoTrust Global CA" -t "C,," -d ~/.certs -i ~/.certs/qq.crt
certutil -L -d /root/.certs
#信任证书
certutil -A -n "GeoTrust SSL CA - G3" -t "Pu,Pu,Pu"  -d ./ -i qq.crt 

# 配置/etc/mail.rcE繁忙
set smtp="smtps://smtp.qq.com:465"
set smtp-auth=login
set smtp-auth-user="228444347@qq.com"  #换成你的qq邮箱
set smtp-auth-password="fwmazaxbllqrcajg"  # 换成你的qq邮箱第三方登录密码
set ssl-verify=ignore 
#set nss-config-dir=/etc/pki/nssdb
set nss-config-dir=/root/.certs

说明:
#smtp-auth-password的密码是qq邮箱里面设置的第三方登录密码,不是你qq的密码,在qq邮箱设置界面配置

 
测试:
echo message3 | mail -v -r "228444347@qq.com" -s "hello world" 228444347@qq.com
注意:一定要带-r参数,生产上去掉-v参数

对已有大数据集群,如果做到监控和异常处理

运维监控z836441256 回复了问题 • 3 人关注 • 2 个回复 • 1121 次浏览 • 2017-12-07 18:49 • 来自相关话题

求一款SQL自动备份恢复带邮件功能的工具

MySQLz836441256 回复了问题 • 3 人关注 • 2 个回复 • 1142 次浏览 • 2017-12-07 18:47 • 来自相关话题