云计算
1、环境准备
单机部署:官方建议硬件要求为 4c/16g 以上
1 台 4 核 16g
2 台 4 核 8g
1.1:获取软件包
访问:https://bk.tencent.com/download/
1.2:系统环境设置
官方建议:要求 centos-7.0 以上版本,推荐 centos-7.5
安装一些常用命令
[root@localhost ~]# yum -y install vim lrzsz net-tools ntp wget1.2.1:关闭 selinux
[root@localhost ~]# setenforce 0#修改配置文件[root@localhost ~]# sed -ri \\\'s/selinux=enforcing/selinux=disabled/\\\' /etc/selinux/config1.2.2:重启系统
[root@localhost ~]# reboot1.2.3:安装 rsync
# 检查是否有rsync命令,如果有返回rsync路径,可以跳过后面的命令[root@localhost ~]# which rsync# 安装rsync[root@localhost ~]# yum -y install rsync1.2.4:关闭防火墙
# 检查默认防火墙状态, 如果返回not running,可以跳过后面的命令[root@localhost ~]# firewall-cmd --state#停止并禁用firewalld:[root@localhost ~]# systemctl stop firewalld # 停止firewalld[root@localhost ~]# systemctl disable firewalld # 禁用firewall开机启动1.2.5:调整最大文件打开数
# 检查当前root账号下的max open files值[root@localhost ~]# ulimit -n#如果为默认的1024,建议通过修改配置文件调整为102400或更大。[root@localhost ~]# vim /etc/security/limits.d/99-nofile.conf root soft nofile 102400 root hard nofile 102400这里使用的单独的配置文件覆盖/etc/security/limits.conf默认值的方式,请根据系统环境自行调整。修改后,重新使用root登录检查是否生效[root@localhost ~]# su[root@localhost ~]# ulimit -n1.2.6:时间同步
服务器后台时间不同步会对时间敏感的服务带来不可预见的后果。务必在安装和使用蓝鲸时保证时间同步。
# 检查每台机器当前时间和时区是否一致,若相互之间差别大于3s(考虑批量执行时的时差),建议校时。[root@localhost ~]# yum -y install ntp[root@localhost ~]# date -r# 查看和ntp server的时间差异(需要外网访问,如果内网有ntpd服务器,自行替换域名为该服务的地址)[root@localhost ~]# ntpdate -d cn.pool.ntp.org#如果输出的最后一行offset大于1s建议校时#和ntp服务器同步时间[root@localhost ~]# ntpdate cn.pool.ntp.org1.2.7:检查是否存在全局 http 代理
蓝鲸服务器之间会有的 http 请求,如果存在 http 代理,且未能正确代理这些请求,会发生不可预见的错误。
#检查http_proxy https_proxy变量是否设置,若为空可以跳过后面的操作[root@localhost ~]# echo $http_proxy $https_proxy对于本机配置http_proxy变量的方式,请依次查找文件/etc/profile、/etc/bashrc、$home/.bashrc等是否有设置。1.2.8:关闭 networkmanager
#查看networkmanager状态[root@localhost ~]# systemctl status networkmanager.service#关闭networkmanager [root@localhost ~]# systemctl stop networkmanager.service#将networkmanager 服务设置开机不启动[root@localhost ~]# systemctl disable networkmanager.service 1.3:配置 yum 源
1.3.1:获取 base 源
#备份默认源[root@localhost ~]# mv /etc/yum.repos.d/centos-base.repo /etc/yum.repos.d/centos-base.repo.backup#获取网络源[root@localhost ~]# wget -o /etc/yum.repos.d/centos-base.repo http://mirrors.cloud.tencent.com/repo/centos7_base.repo1.3.2:获取 epel 源
[root@localhost ~]# wget -o /etc/yum.repos.d/epel.repo http://mirrors.cloud.tencent.com/repo/epel-7.repo#更新缓存[root@localhost ~]# yum clean all[root@localhost ~]# yum makecache1.4:获取证书
https://bk.tencent.com/download_ssl/
通过命令得到本机的 mac 地址,然后复制到上面网址中进行下载证书文件
2、安装前准备
2.1:解压程序包
#上传包至服务器并解压程序包到/data目录下[root@localhost ~]# mkdir /data[root@localhost ~]# tar -xf bkce_src-5.0.4.tar.gz -c /data/#解压后/data目录下有2个目录install 和 src目录#解压ssl证书文件[root@localhost ~]# tar -xf ssl_certificates.tar.gz -c /data/src/cert/2.2:修改配置文件
2.2.1:install.conf
install.config 是模块和服务器对应关系的配置文件,描述在哪些机器上安装哪些模块。 每行两列,第一列是 ip 地址;第二列是以英文逗号分隔的模块名称。
[root@localhost ~]# cd /data/install/[root@localhost install]# cp install.config.3ip.sample install.config[root@localhost install]# vim install.config注意:此处云服务器写公网ip[root@localhost install]# curl ip.sb[root@localhost install]# vim globals.env下面的域名根据实际情况进行修改为自己的export bk_domain=bk.cloud.tencent.com # 蓝鲸根域名(不含主机名)export paas_fqdn=yppaas.$bk_domain # paas 完整域名export cmdb_fqdn=ypcmdb.$bk_domain # cmdb 完整域名export job_fqdn=ypjob.$bk_domain # job 完整域名 paas_admin_pass为`bwvqeayo`修改其余默认即可
2.2.3:pip.conf
[root@localhost ~]# mkdir -p /data/src/.pip/[root@localhost ~]# vim /data/src/.pip/pip.conf [global]index-url = https://pypi.tuna.tsinghua.edu.cn/simple[root@localhost ~]# curl -i http://mirrors.cloud.tencent.com/pypi/simple2.3:配置免密登入
[root@localhost ~]# cd /data/install/[root@localhost install]# bash configure_ssh_without_pass # 根据提示输入各主机的 root 密码完成免密登陆配置2.4:安装前检查环境
[root@localhost ~]# cd /data/i
天路云服务器怎么样阿里云怎么租服务器的云服务器租用的价格行情珠海云服务器散热器价格云计算配置web服务器云工坊服务器租用相关云计算内容云服务器配置环境phpmysql网络比较慢-云服务器问题