Firefly Environment Construction (September 25, 2013 latest, win under the most detailed pictures)

Source: Internet
Author: User

Original address: http://bbs.gameres.com/forum.php?mod=viewthread&tid=224026

First, install Python
Firefly is a high-performance, distributed game server framework written in Python, so using Firefly is a prerequisite to having Python installed.
python has versions of Linux, Windows, and other operating systems that work properly, regardless of the operating system. You can use it across platforms unless you are using platform-related features or a platform-specific library.
1. Install Python under Windows
1) Download the Python version of the corresponding system (go to the official Python websitehttp://www.python.org/download)
2) Installation is simple, always point to the next step, the only thing to note is, be sure to remember the Python installation path
3) Configure environment variables
A. Finding the path in a system variable




B. Edit the Path value to add the Python installation path




C. Verify that Python is installed successfully, open cmd, enter Python, and if the following interface appears, your Python installation is successful.





install python under 2.Linux
1) Download the Python version of the corresponding system (go to the official Python websitehttp://www.python.org/download)
2) Installation is not difficult, take my download python2.7.3 for example, download the source package file named python-2.7.3.tar.bz2
Installation Commands
$ tar–jxvf python-2.7.3.tar.bz2
$ cd Python-2.7.3
$./configure
$ Make
$ make Install
3) test, enter Python in the terminal, for example, then install successfully.




Second, installation memcached
to avoid frequent interaction with the database, Firefly uses the memcached cache system to store common information in memcached, significantly reducing the number of server-to-database interactions and improving performance.
1. Install memcached under Windows
1) Download memcached for Windows (official source only, but there are many third-party compiled win version), unzip and put under a disk, such as in c:\memcached
2) Under CMD, enter "c:\memcached\memcached.exe-d Install" installation.
3) Re-enter: "C:\memcached\memcached.exe-d start" is started, and later memcached will be automatically launched as a service for Windows every time it is powered on. This way the server side is already installed.
4) The above installation is carried out in the default environment, at the time of installation, the following parameters can be set
-P Listening Port
-L connected IP address, default is native
- D start memcached service
- d Restart Restart memcached service
-D Stop|shutdown Close the running memcached service
- D install memcached service
- D Uninstall uninstall memcached service
-U Run as (only valid when running as root)
-m maximum memory usage, in megabytes. Default 64MB
-M running out of memory and returning an error instead of deleting an item
-C Maximum number of simultaneous connections, default is 1024x768
-F Block size growth factor, default is 1.25
-N Minimum allocated space, key+value+flags default is
- h Display Help
such as "memcached-d install-l 127.0.0.1-m 1024-c 2048", indicating that the memcached connection IP is 127.0.0.1, the maximum use memory is 1024MB, the maximum number of simultaneous connections is 2048.
If you do not add parameters to the installation, you can set it by modifying the registry information, open the registry, find
hkey_local_machine\system\currentcontrolset\services\memcached Server
in which there is a "ImagePath" item, the corresponding data is appended with the parameters to be added.




2. Install memcached under Linux
1) memcache used the libevent this library for socket processing, so you also need to install libevent. (If your system already has libevent installed, you can not install it)
you can go to Libevent's website.http://libevent.org/Download the required version
take the 1.2 version I downloaded as an example
# tar zxvf libevent-1.2.tar.gz
# CD libevent-1.2
#./CONFIGURE–PREFIX=/USR
# make
# make install
Verify that the installation is successful after the installation is complete:
# Ls-al/usr/lib | grep libevent




2) Download memcached. (Available at memcached websitehttp://memcached.org/download)
3) Install memcached
# tar zxvf memcached-1.2.0.tar.gz
# CD memcached-1.2.0
#./CONFIGURE–WITH-LIBEVENT=/USR
# make
# make install
If there is an error in the middle, please carefully check the errors, follow the error message to configure or add the appropriate library or path.
when the installation is complete, the memcached will be placed on the/usr/local/bin/memcached
4) test for successful installation of memcached
# ls-al/usr/local/bin/mem*

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.