您的当前位置:首页正文

centos7.2安装部署cloudstack4.9+ceph0.94

2023-10-31 来源:步旅网
版本:

系统:centos 7.2 ceph : 0.94

cloudstack : 4.92 mysql :5.72

6台机器:

192.168.1.212 :cloudstack-management ,monitor 192.168.1.165 :storage

192.168.1.183 :cloudstack-agent,monitor,osd 192.168.1.127 :cloudstack-agent,monitor,osd 192.168.1.151 :cloudstack-agent,osd 192.168.1.249 :cloudstack-agent,osd

系统环境:

一定要关闭selinux,在/etc/selinux/config修改

iptables,firewalld 实验可以关掉,线上需要添加规则 安装系统的时候最好把Development Tools安装上去 修改主机名如下,其他节点类似

hostnamectl set hostname='mgmt.ptecloud.com'

因为没有dns所以修改hosts

cat >> /etc/hosts << EOF

192.168.1.212 mgmt.ptecloud.com 192.168.1.165 secondary.ptecloud.com 192.168.1.183 nodea1.ptecloud.com 192.168.1.249 nodeb1.ptecloud.com 192.168.1.127 nodeb2.ptecloud.com 192.168.1.151 nodea2.ptecloud.com EOF

上面没有添加短域名,通过sed修改,修改完成之后使用hostname --fqdn

sed -ri 's/(\\<[[:alpha:]].*\\>).ptecloud.com/& \\1/g' /etc/hosts

安装数据库

rpm -ivh mysql57-community-release-el7-11.noarch.rpm ##在官网上下载的yum仓库安装包

repo仓库如下,如果想用哪个把enabled改为1就可以,不用改为0

[mysql-connectors-community] name=MySQL Connectors Community

baseurl=http://repo.mysql.com/yum/mysql-connectors-community/el/7/$basearch/

enabled=1 gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql

[mysql-tools-community] name=MySQL Tools Community

baseurl=http://repo.mysql.com/yum/mysql-tools-community/el/7/$basearch/ enabled=1 gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql

# Enable to use MySQL 5.5 [mysql55-community]

name=MySQL 5.5 Community Server

baseurl=http://repo.mysql.com/yum/mysql-5.5-community/el/7/$basearch/ enabled=0 gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql

# Enable to use MySQL 5.6 [mysql56-community]

name=MySQL 5.6 Community Server

baseurl=http://repo.mysql.com/yum/mysql-5.6-community/el/7/$basearch/ enabled=0 gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql

[mysql57-community]

name=MySQL 5.7 Community Server

baseurl=http://repo.mysql.com/yum/mysql-5.7-community/el/7/$basearch/ enabled=1 gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql

[mysql80-community]

name=MySQL 8.0 Community Server

baseurl=http://repo.mysql.com/yum/mysql-8.0-community/el/7/$basearch/ enabled=0 gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql

[mysql-tools-preview] name=MySQL Tools Preview

baseurl=http://repo.mysql.com/yum/mysql-tools-preview/el/7/$basearch/

enabled=0 gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql

[mysql-cluster-7.5-community] name=MySQL Cluster 7.5 Community

baseurl=http://repo.mysql.com/yum/mysql-cluster-7.5-community/el/7/$basearch/ enabled=0 gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql

[mysql-cluster-7.6-community] name=MySQL Cluster 7.6 Community

baseurl=http://repo.mysql.com/yum/mysql-cluster-7.6-community/el/7/$basearch/ enabled=0 gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql

下面就是安装

yum clean all

yum install -y mysql-community-server systemctl start mysqld

grep 'temporary password' /var/log/mysqld.log ##5.7 初始密码在mysqld.log中 mysql_secure_installation cat >> /etc/my.cnf <添加主存储,注意提供程序选择DefaultPrimary 协议选择:”rbd”

Rados monitor选择ceph集群的任意节点即可,最好填写monitor选举中的leader Rados Pool选择刚才新建的池:cloudstack Rados User选择刚才新建的用户: cloudstack Rados Sercert选择刚才输出的key:

因篇幅问题不能全部显示,请点此查看更多更全内容