Bigdata-countly需要迁移

Posted by Yancy on 2017-03-29

Countly 搭建

1
2
3
4
5
6
7
wget https://github.com/Countly/countly-server/releases/download/v17.05.1/countly-community-edition-v17.05.1.tar.gz
tar -zxvf countly-community-edition-v17.05.1.tar.gz
sudo su -
cd COUNTLY_INSTALLATION_DIRECTORY/bin
bash countly.install.sh
禁用SELinux

官方安装文档:Countly install

目前countly需要迁移,所需countly版本于官方提供的安装方案有冲突,安装官方countly让其设置所需环境变量及其启动脚本,手动指定安装nojs版本,拷贝原countly文件,具体如下:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
1、cd /data #countly安装在data目录 我看了安装脚本,是当前在哪个目录,安装文件就在哪个目录
wget -qO- http://c.ly/install | bash
2、rpm -qa | grep -i nodejs | xargs -I{} yum remove {} -y
卸载掉官网安装的最新nodejs 然后新建如下yum源,用于安装旧版所需nodejs,也可以到nodejs官网下载所需nodejs
cat /etc/yum.repos.d/nodesource-el.repo
[nodesource]
name=Node.js Packages for Enterprise Linux 7 - $basearch
baseurl=https://rpm.nodesource.com/pub_5.x/el/7/$basearch
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/NODESOURCE-GPG-SIGNING-KEY-EL
[nodesource-source]
name=Node.js for Enterprise Linux 7 - $basearch - Source
baseurl=https://rpm.nodesource.com/pub_5.x/el/7/SRPMS
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/NODESOURCE-GPG-SIGNING-KEY-EL
gpgcheck=1

安装老版本所需nodejs

1
yum install nodejs
1
2
3
3、拷贝源countly文件到/data/countly目录
修改 /data/countly/api/config.js 和 /data/countly/frontend/express/config.js
3001端口和 6001端口监听地址换成 本地私有地址 #源文件是监听的原来机器的内网地址,不修改的话,服务启动不了。
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
4、拷贝mongo数据目录到/data/mongo目录,修改mongo配置文件.
cat /etc/mongod.conf
systemLog:
destination: file
logAppend: true
path: /data/mongodb/mongod.log
storage:
dbPath: /data/mongo
journal:
enabled: true
engine: mmapv1
processManagement:
fork: true
pidFilePath: /data/mongodb/mongod.pid
net:
port: 27017
bindIp: 127.0.0.1
security:
authorization: enabled
operationProfiling:
slowOpThresholdMs: 40960

1
2
5、修改硬盘block:
blockdev --setra 256 /dev/mapper/xvdc--vg-xvdc–lv ##按照mongo提示操作
1
2
6、修改nginx配置文件 conf.d/default.conf
将127.0.0.1修改为本地私有地址
1
2
3
4
5
6
7
8
7、重启countly mongodb nginx
countly restart
/etc/init.d/mongod restart
service nginx restart
迁移完毕

交流学习:

🐧 Linux shell_高级运维派: 459096184 圈子 (系统运维-应用运维-自动化运维-虚拟化技术研究欢迎加入)
🐧 BigData-Exchange School : 521621407 圈子(大数据运维)(Hadoop开发人员)(大数据研究爱好者) 欢迎加入

相应Bidata有内部微信交流群互相学习,加入QQ群有链接。