Set up a pomelo chat example

Source: Internet
Author: User

Last night, I set up a pomelo chat example on the public network. I still feel a lot of pitfalls. record it. First and last.





Endpoint: http://chat.xiaodao.co/


Procedure:


Prepare a host with a public IP address. I use the Linode1024 Ubuntu 14.04 LTS.


Here, according to my sub-IP Address: 178.79.185.180, and my installation directory/opt, You need to modify it on your own.

# Ssh connection, the following will prompt to lose the password ssh root@178.79.185.180 # install the relevant software apt-get install gccapt-get install gmakeapt-get install g ++ apt-get install makeapt-get install git # get node Code cd/optgit clone https://github.com/joyent/node.gitcd node # This checkout is very important, if you try the latest version, it seems that git checkout v0.10.29-release # cannot install node. /configure -- prefix =/opt/nodejsmakesudo make install # Set the environment variable vi ~ /. Bashrcexport PATH = $ PATH:/opt/nodejs/binsource ~ /. Bashrc # install the required package npm install-g gypnpm install-g node-gypnpm install-g pomelo # Get the chat project code git clone https://github.com/ichenxiaodao/chatofpomelo-websocket.gitcd chatofpomelo-websocketgit checkout master # install the chat project needed package sh npm-install.sh # start game servercd game-server/pomelo start # start web servercd .. /web-servernode app. js # Open the following URL in the browser: http: // 178.79.185.180

# Tips
1. If there is A domain name, you can bind the domain name through the record;
2. Run the game sever command in the background: pomelo start-D;
3. Run node in the background. First install: npm install-g forever, and then use: forever start app. js when starting the web server.



Document Information

  • Copyright statement: Free Reprint-non commercial-Non derivative-keep the signature | Creative Commons BY-NC-ND 3.0
  • Http://blog.csdn.net/cdztop/article/details/35785213
  • Last modification time:, January 1, June 29, 2014

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.