CentOS 6.X x64 编译安装 Countly

时间:2021-03-02 02:26:17

原创作品,允许转载,转载时请务必以超链接形式标明文章   原始出处  、作者信息和本声明。否则将追究法律责任。 http://jicki.blog.51cto.com/1323993/1547811

CentOS 6.X  x64 编译安装Countly


安装所需的软件

yum -y install supervisor ImageMagick sendmail



1. 安装 node.js

wget http://nodejs.org/dist/v0.10.1/node-v0.10.1.tar.gz

tar zxvf node-v0.10.1.tar.gz

cd node-v0.10.1

./configure --prefix=/opt/local/node

make

make install

ln -s /opt/local/node/bin/node /usr/bin/node

ln -s /opt/node/bin/node-waf /usr/bin/node-waf

ln -s /opt/local/node/bin/npm /usr/bin/npm


2. 安装node_modules   -   time

cd /opt/htdocs/countly-server-master/api/node_modules

npm install time



3. 安装 Mongo-10gen


wget http://downloads-distro.mongodb.org/repo/redhat/os/x86_64/RPMS/mongo-10gen-2.4.11-mongodb_1.x86_64.rpm


rpm -ivh mongo-10gen-2.4.11-mongodb_1.x86_64.rpm

Preparing...                ########################################### [100%]

   1:mongo-10gen            ########################################### [100%]

  



4. 编译安装Nginx  !! 略!


5. 安装 Mongodb !! 略!


6. 编译安装 supervisord

https://pypi.python.org/packages/source/s/supervisor/


wget https://pypi.python.org/packages/source/s/supervisor/supervisor-3.1.1.tar.gz

tar zxvf supervisor-3.1.1.tar.gz

cd supervisor-3.1.1

python setup.py install



7. 下载 Countly-server 源码


https://github.com/Countly/countly-server


cd countly-server-master


cp /opt/htdocs/countly-server-master/frontend/express/public/javascripts/countly/countly.config.sample.js /opt/htdocs/countly-server-master/frontend/express/public/javascripts/countly/countly.config.js


(cat /opt/htdocs/countly-server-master/bin/config/countly-supervisor.conf ; echo "exec /usr/bin/supervisord --nodaemon --configuration /opt/htdocs/countly-server-master/bin/config/supervisord.conf") > /etc/init/countly-supervisor.conf


cp /opt/htdocs/countly-server-master/api/config.sample.js /opt/htdocs/countly-server-master/api/config.js


cp /opt/htdocs/countly-server-master/frontend/express/config.sample.js /opt/htdocs/countly-server-master/frontend/express/config.js


start countly-supervisor


cp /opt/htdocs/countly-server-master/bin/config/nginx.server.conf /opt/local/nginx/conf/vhost/www.xxx.com.conf


/opt/local/nginx/sbin/nginx


本文出自 “学习之路” 博客,请务必保留此出处http://jicki.blog.51cto.com/1323993/1547811