2018-02-23 蓝鲸安装过程之基础服务-不管过程,最终结果是失败

预先工作:

  • 关闭防火墙,打开免密登录

  • 改源(软件包版本冲突问题)

  • 网易源和 epel release源

  • yum install epel-release

  • 内网安装 修改 hosts文件

配置 默认不是22 端口进行ssh和文件分发: ~/.ssh/config: http://www.jianshu.com/p/86fa5852ba7c

配置免密登录的时候,复制完 id_rsa.pub 到对方主机 authorized_keys 之后如果一直无法登陆

​ vi /etc/hosts.allow

一定注意,把本机也添加进去,因为分发文件会分发到本机

2、配置内网IP(util.fc要求有内网ip)

%%、安装的时候不要放在/data目录下进行就不需要使用第三方独立服务器(可以认为用户手册在解压安装这一步是错误的)

3、(这是失败之后选用的方法,配置完内网ip和使用额外服务器部署成功之后此步骤就不用了)


cp ./src/service/consul-0.8.3/bin/consul  /data/bkce/service/consul/bin/consul

scp ./src/service/consul-0.8.3/bin/consul  root@218.92.219.82:/data/bkce/service/consul/bin/consul

scp ./src/service/consul-0.8.3/bin/consul  root@45.124.124.149:/data/bkce/service/consul/bin/consul


cp ./src/service/consul-0.8.3/bin/consul.sh /data/bkce/service/consul/bin/

scp ./src/service/consul-0.8.3/bin/consul.sh root@218.92.219.82:/data/bkce/service/consul/bin/

scp ./src/service/consul-0.8.3/bin/consul.sh root@218.92.219.82:/data/bkce/service/consul/bin/

失败经历: 应该使用一台额外的主机进行分发安装,否则会导致文件冲突被删除

重装的话需要把所有服务停止: ./bkcec stop all, 删除所有临时文件

在 vim /data/bkce/public/zk/data/myid 创建myid 就是服务器编号

utils.fc #line 639

[192.168.111.11] zk: EXIT

[192.168.111.12] zk: EXIT

[192.168.111.11] kafka: EXIT

[192.168.111.12] kafka: EXIT. 解决

修改 vim /data/bkce/service/kafka/config/server.properties 文件

broker.id=

修改为

broker.id=1(随意设置正整数,多个实例不能相同,我设置为跟myid一样)

下面横线之间是错误的,不用修改:


hosts 里面有的话不用修改

zookeeper.connect=zk_1:2181/common_kafka

修改为

zookeeper.connect=192.168.111.11:2181/common_kafka

yum install beanstalkd --enablerepo=epel

运行第二步骤的时候,出现:


Connecting to 218.92.219.41:2181

log4j:WARN No appenders could be found for logger (org.apache.zookeeper.ZooKeeper).

log4j:WARN Please initialize the log4j system properly.

log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.

Exception in thread "main" org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /gse

        at org.apache.zookeeper.KeeperException.create(KeeperException.java:99)

        at org.apache.zookeeper.KeeperException.create(KeeperException.java:51)

        at org.apache.zookeeper.ZooKeeper.create(ZooKeeper.java:783)

        at org.apache.zookeeper.ZooKeeperMain.processZKCmd(ZooKeeperMain.java:706)

        at org.apache.zookeeper.ZooKeeperMain.processCmd(ZooKeeperMain.java:599)

        at org.apache.zookeeper.ZooKeeperMain.run(ZooKeeperMain.java:362)

        at org.apache.zookeeper.ZooKeeperMain.main(ZooKeeperMain.java:290)

连接zookeeper失败,说明上面一步配置错误了,应该统一使用内网ip或者公网ip,现在混合使用了,而zookeeper集群只接受指定ip

修改/data/bkce/service/kafka/config/server.properties:

zookeeper.connect=218.92.219.41:2181/common_kafka

修改:/data/bkce/service/zk/conf/

clientPortAddress=218.92.219.41


kafka 启动不起来:


cd /data/bkce/service/kafka

./bin/kafka-server-start.sh ./config/server.properties

出现报错信息,提示 Connecting to 218.92.219.41:2181 连接失败,根据上面错误信息参考,kafka连接的是zookeeper,现在需要把 zookeeper 服务器地址改为公网ip而不是使用内网ip。


vim /data/bkce/service/zk/conf/zoo.cfg

重启zookeeper进程,./bkcec stop zk ./bkcec start zk 再次启动kafka,检查运行状态,进行第二步安装,安装蓝鲸产品。

(错误的步骤). 为了允许第三方独立服务器初始化mysql,现在测试把第三方服务器写入服务器清单配置文件(会在第三方服务器上面安装consoul,由于是NAT,ip地址不对步骤进行不下去导致安装失败)

数据库操作提示信息,备用:


To start mysqld at boot time you have to copy

support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !

To do so, start the server, then issue the following commands:

/data/bkce/service/mysql/bin/mysqladmin -u root password 'new-password'

/data/bkce/service/mysql/bin/mysqladmin -u root -h 127.0.0.1

127.0.0.1 password 'new-password'

Alternatively you can run:

/data/bkce/service/mysql/bin/mysql_secure_installation

which will also give you the option of removing the test

databases and anonymous user created by default.  This is

strongly recommended for production servers.

See the manual for more instructions.

You can start the MySQL daemon with:

cd /data/bkce/service/mysql ; /data/bkce/service/mysql/bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl

cd /data/bkce/service/mysql/mysql-test ; perl mysql-test-run.pl

Please report any problems with the /data/bkce/service/mysql/scripts/mysqlbug script!

配置文件都在这里:/data/bkce/etc/ consul consul.conf my.cnf redis.conf zoo.cfg

nginx 配置文件:


[192.168.240.3]20180223-135006 145  >> rsync -aL --delete /data/src/miniweb root@218.92.219.41:/data/src/

[192.168.111.11]20180223-135028 420  expr: find /data/src/service/support-files/templates -name "*nginx*"

[192.168.111.11]20180223-135028 424  templates file: #etc#nginx#job.conf

[192.168.111.11]20180223-135028 437  target file: /data/bkce//etc/nginx/job.conf

[192.168.111.11]20180223-135028 455  render configuration file:/data/bkce//etc/nginx/job.conf

[192.168.111.11]20180223-135028 424  templates file: #etc#nginx#cmdb.conf

[192.168.111.11]20180223-135028 437  target file: /data/bkce//etc/nginx/cmdb.conf

[192.168.111.11]20180223-135028 455  render configuration file:/data/bkce//etc/nginx/cmdb.conf

[192.168.111.11]20180223-135028 424  templates file: #etc#nginx#paas.conf

[192.168.111.11]20180223-135028 437  target file: /data/bkce//etc/nginx/paas.conf

[192.168.111.11]20180223-135028 455  render configuration file:/data/bkce//etc/nginx/paas.conf

[192.168.111.11]20180223-135029 424  templates file: #etc#nginx#miniweb.conf

[192.168.111.11]20180223-135029 437  target file: /data/bkce//etc/nginx/miniweb.conf

[192.168.111.11]20180223-135029 455  render configuration file:/data/bkce//etc/nginx/miniweb.conf

[192.168.111.11]20180223-135029 424  templates file: #etc#nginx.conf

[192.168.111.11]20180223-135029 437  target file: /data/bkce//etc/nginx.conf

[192.168.111.11]20180223-135029 455  render configuration file:/data/bkce//etc/nginx.conf

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值