MariaDB for openstack

本文介绍如何在CentOS 7上安装并配置MariaDB作为默认数据库。包括使用系统自带repos进行安装、配置MySQL-python.x86_64以支持Python访问数据库、修改配置文件以指定特定参数等步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

MySQL是目前使用最多的开源数据库 Mariadb是mysql的一个分支,开源

centos7,默认的是 Mariadb而不是mysql!

使用系统自带的repos安装很简单:

yum install mariadb mariadb-server

配置

yum install MySQL-python.x86_64 ;python访问mysqldb的工具

cd /etc/my.cnf.d 

touch  /etc/my.cnf.d/openstack.cnf 

[root@controller ~]# cat /etc/my.cnf.d/openstack.cnf 
[mysqld]
bind-address = 172.16.0.4
default-storage-engine = innodb
innodb_file_per_table
collation-server = utf8_general_ci

character-set-server = utf8

只需要controller安装即可


systemctl start mariadb ==> 启动mariadb

systemctl enable mariadb ==> 开机自启动

mysql_secure_installation ==> 设置 root密码等相关

mysql -uroot -p123456 ==> 测试登录!



### Galaxy Kylin OpenStack Deployment and Configuration #### Prerequisites Before deploying OpenStack on the Galaxy Kylin server operating system, ensure that hardware requirements are met and network configurations are properly set up. Additionally, verify that all necessary software dependencies are installed. #### Installation Steps To deploy OpenStack on Galaxy Kylin Server OS, follow these detailed steps: 1. **Update System Packages** Ensure the system is fully updated with the latest packages. ```bash sudo apt-get update && sudo apt-get upgrade -y ``` 2. **Install Required Dependencies** Install essential tools required for OpenStack installation such as Python development libraries, pip, virtualenv, etc. ```bash sudo apt-get install python3-dev libffi-dev gcc git curl wget vim jq -y ``` 3. **Download DevStack or Use Official Installer Scripts** DevStack can be used to quickly spin up an environment suitable for testing purposes. Alternatively, use official installer scripts provided by Canonical or Red Hat depending on preference. For using DevStack: ```bash git clone https://opendev.org/openstack/devstack.git ~/devstack cd ~/devstack ./stack.sh ``` 4. **Configure Network Settings** Properly configure networking settings including external bridge interfaces (br-ex), internal bridges, floating IP ranges, fixed IPs pools among others within local.conf file located inside devstack directory before running stack script[^1]. 5. **Initialize Database Services** Set up MariaDB/MySQL databases needed for various services like Keystone, Nova, Neutron which will store metadata about instances, networks, users & projects respectively. ```sql CREATE DATABASE keystone; GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'localhost' IDENTIFIED BY 'KEYSTONE_DBPASS'; FLUSH PRIVILEGES; ``` 6. **Launch Horizon Dashboard Service** Horizon dashboard provides a web interface allowing administrators and end-users alike easy access management capabilities over cloud resources without needing command line knowledge. ```bash openstack-service start horizon ``` 7. **Verify Successful Setup** After completing above procedures successfully, validate setup correctness via CLI commands checking status of each component service individually ensuring they report healthy state. ```bash source /root/keystonerc_admin # Load admin credentials into shell session nova list # List VMs managed under nova compute service neutron net-list # Display available neutron-managed networks cinder snapshot-list # Show cinder volume snapshots present currently ``` 8. **Post-installation Security Hardening Measures** Apply security hardening measures following best practices guidelines published officially from sources trusted regarding Linux distributions specifically tailored towards production environments hosting sensitive workloads. 9. **Backup Regularly** Implement regular backups covering both configuration files along with database dumps stored offsite securely encrypted preventing potential data loss scenarios arising due unforeseen circumstances beyond control. #### Conclusion Deploying OpenStack on Galaxy Kylin involves several stages starting from preparing underlying infrastructure through configuring components until finally verifying operational integrity post-deployment phase while adhering closely documented instructions throughout entire process flow meticulously.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值