Game Server Pomelo installation configuration
First, installation environment
Debian 7.0 AMD64
Second, install the required components
1, installation Nodejs
Note: Debian under Nodejs does not have the corresponding apt package, so can not be installed with Apt-get, only through Nodejs source package installation,
Here are all the other ways to install Nodejs in other system environments Https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager
A, install the required components, Python g++
#apt-get Install python g++ make Checkinstall fakeroot
b, to http://nodejs.org/to obtain the download address of the source package, download Nodejs GZ Package
wget http://nodejs.org/dist/v0.10.28/node-v0.10.28.tar.gz
C, unzip the installation of the compilation
Tar zxvf node-v0.10.28.tar.gz
CD node-v0.10.28
./configure
Make
sudo make install
D. Check if installation is successful
#node-V
v0.10.28
Third, installation Pomelo
Description of installation: Https://github.com/NetEase/pomelo/wiki/%E5%AE%89%E8%A3%85pomelo
Mode one, use NPM (node Package management tool) to install pomelo globally:
$ NPM Install Pomelo-g
Wait for a moment to start downloading the package installation, and finally prompt the following information to indicate that the installation was successful
> ws@0.4.25 Install/usr/local/lib/node_modules/pomelo/node_modules/ws
> (Node-gyp rebuild 2> builderror.log) | | (Exit 0)
Mode two, install by downloading the source code
$ git clone https://github.com/NetEase/pomelo.git
$ CD Pomelo
$ NPM Install-g
Four, installation problems
When installing pomelo, prompt
Gyp WARN eacces User "root" does not has permission to access the dev dir "/root/.node-gyp/0.10.28"
Gyp WARN eacces Attempting to reinstall using temporary dev dir "/root/.nvm/v0.10.28/lib/node_modules/pomelo/node_ Modules/pomelo-rpc/node_modules/toobusy/.node-gyp "
command replaced with NPM install POMELO-G--unsafe-perm to be successful, when running to Gyp http GET http://nodejs.org/dist/v0.10.28/node-v0.10.28.tar.gz, The entire installation process will be a bit long and you need to wait patiently
V. First game Server Project
Pomelo command-line manual https://github.com/NetEase/pomelo/wiki/pomelo%E5%91%BD%E4%BB%A4%E8%A1%8C%E5%B7%A5%E5%85%B7%E4%BD%BF%E7%94%A8
1. Create a project
#pomelo init./mygameserver
2. Install the dependent package:
#cd Mygameserver
#sh npm-install.sh
3. Start the Game-server server:
$ CD Game-server
$ pomelo Start
4. Start the Web-server server:
$ CD Web-server
$ node App
4, start the browser, run HTTP.//Your server ip:3001/, see pomelo Welcome page
5, click the ' Test Game Server ' button, no response at this time,
Enter the project directory under the Mygameserver
#cd./web-server/public
#vim index.html
Modify the var host = "127.0.0.1" in index.html, and the var host = "Your server IP";
The game server is OK message box appears when you click the ' Test Game Server ' button.
All right, build a success.
From the East Brother's blog Fujian Hand Tour Development Technology Group: 13734312