CentOS 6.X x64 编译安装 Countly
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
如果无法使用 npm install time 直接安装,请下载 node-time 进行安装
https://github.com/TooTallNate/node-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