100字范文,内容丰富有趣,生活中的好帮手!
100字范文 > 腾讯蓝鲸智云平台搭建

腾讯蓝鲸智云平台搭建

时间:2018-07-11 16:18:33

相关推荐

腾讯蓝鲸智云平台搭建

文章目录

1. 安装开发者工具2. 关闭selinux和防火墙3. 停止并禁用 NetWorkManager4. 增加127.0.0.1的nameserver5. 安装 rsync 命令6. 调整最大文件打开数7. 确认服务器时间同步8. 检查是否存在全局HTTP代理9. 安装mysql10. 安装pip11. 上传bkce包并解压到/data目录下12. 配置ssl证书13. 配置 SSH 免密登陆14. 安装前校验环境是否满足15. 标准部署

准备环境,至少准备三台

1. 安装开发者工具

[root@localhost ~]# yum -y groupinstall "Development Tools"[root@localhost ~]# yum -y install net-tools

2. 关闭selinux和防火墙

[root@localhost ~]# cat /etc/selinux/config [root@localhost ~]# sed -i 's/\$releasever/7/g' /etc/yum.repos.d/CentOS7-Base-163.repo[root@localhost ~]# systemctl stop firewalld //停止firewalld[root@localhost ~]# systemctl disable firewalld //禁用firewall开机启动Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service.Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.

3. 停止并禁用 NetWorkManager

[root@localhost ~]# systemctl stop NetworkManager[root@localhost ~]# systemctl disable NetworkManagerRemoved symlink /etc/systemd/system/multi-user.target.wants/NetworkManager.service.Removed symlink /etc/systemd/system/dbus-workManager.service.Removed symlink /etc/systemd/system/dbus-org.freedesktop.nm-dispatcher.service.Removed symlink /etc/systemd/system/network-online.target.wants/NetworkManager-wait-online.service.

4. 增加127.0.0.1的nameserver

[root@localhost ~]# chmod +x /etc/rc.d/rc.local [root@localhost ~]# echo "nameserver 127.0.0.1" >>/etc/resolv.conf[root@localhost ~]# echo "nameserver 127.0.0.1" >>/etc/rc.d/rc.local[root@localhost ~]# cat /etc/resolv.confnameserver 127.0.0.1//127.0.0.1要放在首行nameserver 192.168.110.2

5. 安装 rsync 命令

[root@localhost ~]# yum -y install rsync

6. 调整最大文件打开数

如果为默认的 1024,建议通过修改配置文件调整为 102400 或更大。

注意: limits.conf 初始文件的备份。

//检查当前root账号下的max open files值[root@localhost ~]# ulimit -n1024[root@localhost ~]# ulimit -n 102400[root@localhost ~]# ulimit -n102400[root@localhost ~]# cat <<EOF > /etc/security/limits.d/99-nofile.conf> root soft nofile 102400> root hard nofile 102400> EOF[root@localhost ~]# cat /etc/security/limits.d/99-nofile.confroot soft nofile 102400root hard nofile 102400

7. 确认服务器时间同步

服务器后台时间不同步会对时间敏感的服务带来不可预见的后果。务必在安装和使用蓝鲸时保证时间同步。

//检查每台机器当前时间和时区是否一致,若相互之间差别大于3s(考虑批量执行时的时差),建议校时。[root@localhost ~]# date -RMon, 16 Nov 11:10:39 +0800//查看和ntp server的时间差异(需要外网访问,如果内网有ntpd服务器,自行替换域名为该服务的地址)[root@localhost ~]# yum -y install ntpdate[root@localhost ~]# ntpdate -d cn.//没有安装ntpdate,先安装注:如果输出的最后一行 offset 大于 1s 建议校时。//和 ntp 服务器同步时间[root@localhost ~]# ntpdate cn.16 Nov 11:13:46 ntpdate[23493]: step time server 84.16.73.33 offset 1.434140 sec

8. 检查是否存在全局HTTP代理

//检查 http_proxy https_proxy 变量是否设置,若为空可以跳过后面的操作。[root@localhost ~]# echo "$http_proxy" "$https_proxy"

注明:三台都需要操作以上步骤,原理如上

//在192.168.110.10中控机上操作如下:

9. 安装mysql

//安装系统环境python,默认安装2.7版本[root@localhost src]# yum install python//安装mysql[root@localhost src]# cd /usr/local/src/[root@localhost src]# wget /mysql57-community-release-el7-8.noarch.rpm[root@localhost src]# rpm -ivh mysql57-community-release-el7-8.noarch.rpm//重启mysql[root@localhost src]# service mysqld restartRedirecting to /bin/systemctl restart mysqld.service//获取mysql创建的随机密码[root@localhost ~]# grep "password" /var/log/mysqld.log-11-16T02:27:18.557687Z 1 [Note] A temporary password is generated for root@localhost: na-=dib!h0sL//通过随机密码登录[root@localhost ~]# mysql -uroot -p'na-=dib!h0sL'mysql: [Warning] Using a password on the command line interface can be insecure.Welcome to the MySQL monitor. Commands end with ; or \g.Your MySQL connection id is 2Server version: 5.7.32Copyright (c) 2000, , Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql> //使用命令重置密码mysql> alter user 'root'@'localhost' identified by 'Passwd123!';Query OK, 0 rows affected (0.00 sec)mysql> exitBye//退出验证[root@localhost ~]# mysql -uroot -p'Passwd123!'mysql: [Warning] Using a password on the command line interface can be insecure.Welcome to the MySQL monitor. Commands end with ; or \g.Your MySQL connection id is 3Server version: 5.7.32 MySQL Community Server (GPL)Copyright (c) 2000, , Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql> //修改f这个配置文件[root@localhost ~]# vim /etc/f[root@localhost ~]# tail -2 /etc/fpid-file=/var/run/mysqld/mysqld.pidskip-grant-tables #添加这一行

10. 安装pip

[root@localhost ~]# yum -y install epel-release[root@localhost ~]# yum -y install python-pip//在线安装时,依赖 pip,需要配置可用的 pip 源。[root@localhost ~]# vim /data/src/.pip/pip.conf[global]index-url = https://mirrors./pypi/simpletrusted-host = mirrors.

声明:选择任意一台机器作为蓝鲸的运维中控机。之后的安装命令执行,如果没有特别说明,均在这台中控机上执行。

//将下载的蓝鲸社区版完整包上传到中控机,并解压到 同级 目录下。下载如下:/download/,以解压到 /data 目录为例:

11. 上传bkce包并解压到/data目录下

[root@localhost ~]# mkdir /data[root@localhost ~]# lsanaconda-ks.cfg bkce_src-5.1.29.tar.gz[root@localhost ~]# tar xf bkce_src-5.1.29.tar.gz -C /data///将 install.config.3ip.sample 复制为 install.config[root@localhost ~]# cd /data/install/[root@localhost install]# cp install.config.3ip.sample install.config//修改install.config配置文件[root@localhost install]# vim install.config[bkce-basic]192.168.110.10 nginx,rabbitmq,kafka(config),zk(config),es,appt,fta,consul,bkdata(databus)192.168.110.20 mongodb,appo,kafka(config),zk(config),es,mysql,consul,bkdata(dataapi),beanstalk192.168.110.30 paas,cmdb,job,gse,license,kafka(config),zk(config),es,redis,influxdb,consul,bkdata(monitor)

12. 配置ssl证书

访问/download/#ssl

//填入192.168.110.20和192.168.110.30的mac地址,将生成的ssl_certificates.tar.gz上传到192.168.110.10的/data下,登录192.168.110.10,执行如下操作[root@localhost ~]# tar xf ssl_certificates.tar.gz -C /data/src/cert/

13. 配置 SSH 免密登陆

[root@localhost ~]# cd /data/install/[root@localhost install]# bash configure_ssh_without_pass

14. 安装前校验环境是否满足

[root@localhost ~]# cd /data/install/[root@localhost install]# bash precheck.sh -rstart <<check_ssh_nopass>> ... [OK]start <<check_password>> ... [OK]start <<check_cert_mac>> ... [OK]start <<check_get_lan_ip>> ... [OK]start <<check_install_config>> ... [OK]start <<check_selinux>> ... [OK]start <<check_umask>> ... [OK]start <<check_rabbitmq_version>> ... [OK]start <<check_http_proxy>> ... [OK]start <<check_open_files_limit>> ... [OK]start <<check_domain>> ... [OK]start <<check_rsync>> ... [OK]start <<check_service_dir>> ... [OK]start <<check_networkmanager>> ... [OK]start <<check_firewalld>> ... [OK]

15. 标准部署

cd /data/install#该步骤后,可以打开 paas 平台./bk_install paas #安装paas平台及其依赖服务#该步骤完成后, 可以打开 cmdb, 看到蓝鲸业务及示例业务./bk_install cmdb # 安装cmdb及其依赖服务#该步骤完成后, 可以打开作业平台, 并执行作业#同时在配置平台中可以看到蓝鲸的模块下加入了主机./bk_install job # 安装作业平台及其依赖组件,并在安装蓝鲸的服务器上装好 gse_agent 供验证

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。