安装命令:
最新稳定版:
wget -qO- http://c.ly/install | bash
开发版:
wget -qO- http://c.ly/install | bash -s dev
可能遇到的问题1:
ERROR: Failed to download Chromium r549031! Set "PUPPETEER_SKIP_CHROMIUM_DOWNLOAD" env variable to skip download.
{ Error: read ECONNRESET
at TLSWrap.onread (net.js:622:25) errno: 'ECONNRESET', code: 'ECONNRESET', syscall: 'read' }
npm WARN countly-server@18.8.2 No license field.
解决:需要切换国内npm源,重新运行下{countlydir}/bin/countly.install.sh即可.
(也可在执行过程中当nodejs安装后执行此命令,可防止报错)
npm install -g cnpm --registry=https://registry.npm.taobao.org
cnpm i puppeteer
可能遇到的问题2:
nodejs可能一开始连接不上mongodb,这属于正常现象,原因在于 mongodb 需要一段时间为 countly 数据库预分配文件。如出现此错误,只需在稍等,如果实在不行,重新运行下{countlydir}/bin/countly.install.sh即可。
可能遇到的问题3:
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
Package sendmail-8.14.7-5.el7.x86_64 already installed and latest version
Nothing to do
Redirecting to /bin/systemctl start sendmail.service
/usr/bin/grunt -> /usr/lib/node_modules/grunt-cli/bin/grunt
+ grunt-cli@1.3.2
updated 1 package in 16.697s
> puppeteer@1.3.0 install /opt/countly/node_modules/puppeteer
> node install.js
卡死在这里很久,卸载nodejs
yum remove nodejs npm -y
重新运行下{countlydir}/bin/countly.install.sh
可能遇到的问题4:
coutly:dash(6001)起来了,countly:api(3001)没起来
npm rebuild
grunt dist-all
安装成功的日志:
Running "locales" task
Preparing locale files for core & plugins: ["mobile","web","desktop","plugins","density","locale","browser","sources","views","enterpriseinfo","logger","systemlogs","errorlogs","populator","reports","crashes","push","star-rating","slipping-away-users","compare","server-stats","dbviewer","assistant","plugin-upload","times-of-day","compliance-hub","video-intelligence-monetization","alerts","onboarding","EChartMap"]
Done preparing locale files
Running "concat:locales_" (concat) task
Running "concat:locales_ar" (concat) task
Running "concat:locales_bs" (concat) task
Running "concat:locales_ca" (concat) task
Running "concat:locales_de" (concat) task
Running "concat:locales_el" (concat) task
Running "concat:locales_es" (concat) task
Running "concat:locales_et" (concat) task
Running "concat:locales_fa" (concat) task
Running "concat:locales_fr" (concat) task
Running "concat:locales_hi" (concat) task
Running "concat:locales_hu" (concat) task
Running "concat:locales_it" (concat) task
Running "concat:locales_ja" (concat) task
Running "concat:locales_ko" (concat) task
Running "concat:locales_lv" (concat) task
Running "concat:locales_my" (concat) task
Running "concat:locales_nb" (concat) task
Running "concat:locales_nl" (concat) task
Running "concat:locales_pt" (concat) task
Running "concat:locales_ro" (concat) task
Running "concat:locales_ru" (concat) task
Running "concat:locales_sl" (concat) task
Running "concat:locales_sv" (concat) task
Running "concat:locales_tr" (concat) task
Running "concat:locales_vi" (concat) task
Running "concat:locales_zh" (concat) task
Running "concat:locales_pl" (concat) task
Done.
验证:
[root@app-dev-h5 bin]# countly status
* countly.service - countly-supervisor
Loaded: loaded (/etc/systemd/system/countly.service; enabled; vendor preset: disabled)
Active: active (running) since Wed 2018-12-12 17:44:02 CST; 15h ago
Docs: http://count.ly
Main PID: 24133 (supervisord)
CGroup: /system.slice/countly.service
|-24133 /usr/bin/python2 /usr/bin/supervisord --nodaemon --configuration /root/countly/bin/config/supervisord.conf
`-24136 countly: dashboard node /root/countly/frontend/express/app.
Dec 12 17:44:02 app-dev-h5 systemd[1]: Started countly-supervisor.
Dec 12 17:44:02 app-dev-h5 systemd[1]: Starting countly-supervisor...
Dec 12 17:44:02 app-dev-h5 supervisord[24133]: 2018-12-12 17:44:02,111 CRIT Server 'unix_http_server' running without any...ecking
Hint: Some lines were ellipsized, use -l to show in full.
常用命令:
• countly start: 启动 Countly 进程
• countly stop: 停止 Countly 运行
• countly restart: 重启 Countly
• countly status: 输出进程状态,输出与初始化系统类型有关
• countly upgrade: 开始更新操作
• countly usage: 打印使用信息
• countly version: 显示 Countly 版本
• countly test: 运行 countly 测试装置
• countly dir: 输出到 Countly 安装目录的绝对路径