CentOS 6.X x64 編譯安裝 Countly

丶小炒肉發表於2016-05-31

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

相關文章