一、electro-server简介
ElectroServer 4 is multiplayer server product that facilitatesinteraction between many connected users. Having been tested with as many as200,000 concurrent users, ElectroServer 4 is highly scalable. In additionto multiplayer capabilities, ElectroServer is used for real-time audio andvideo streaming and recording.
ElectroServer works by allowing client applications, such as Flash,Java, or Silverlight, to connect via socket to it and log in. This connectionis persisted as long as the client wants to stay connected. While connected theserver can push data to the client or the client can make requests of theserver at any time.
Developers often find zones and rooms useful. A room is acollection of users that can all “see” each other. These users can easilycommunicate to achieve chatting or multiplayer game play. A zone is acollection of rooms. Chatting can occur as public messages sent to an entireroom of users, or private messages that are sent to one or more specific usersin any room. Users can add other users as buddies. Users are informedwhen their buddies join and leave the server.
The server is highly extensible using what are called extensions.An extension is a collection of 1 or more ActionScript or Java files/classesthat are used to add more functionality to the server. These extensions can beused as server-level event handlers, such as the Login Event Handler, asManaged Objects which come in handy for things like database connectionpooling, or as Plugins. Plugins are run at the server level or at the roomlevel and are frequently used to execute game logic.
The server is configured and maintained via a powerful web-basedadministration tool. This allows for management of things like user permissionsets, language filters, extensions, and persistent rooms.
二、linux下的安装
1. 安装1.6 JavaVirtual Machine!(electro-server需要java平台的支持)下载jdk:http://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/VerifyItem-Start/jdk-6u20-linux-i586-rpm.bin?BundledLineItemUUID=7viJ_hCx98IAAAEoevoqB72K&OrderID=DVuJ_hCxSQoAAAEobfoqB72K&ProductID=guBIBe.oc_wAAAEnaDJHqPYe&FileName=/jdk-6u20-linux-i586-rpm.bin
chmod +x jdk-6u20-linux-i586-rpm.bin
./jdk-6u20-linux-i586-rpm.bin(安装jdk)
ln -s /usr/java/jdk_20//usr/java/jdk1.6
vi /etc/profile
添加以下内容
export JAVA_HOME=/usr/java/jdk1.6
export PATH=$JAVA_HOME/bin:$PATH
export CLASSPATH=.:/usr/java/jdk1.6/lib/tools.jar:$CLASSPATH
至此java环境安装完毕!
2. 安装ElectroServer 4
下载ElectroServer源文件
http://www.electro-server.com/downloads.aspx
下载最新的.tar.gz包,我下的是ElectroServer_4_0_5_unix.tar.gz
tar xzvf ElectroServer_4_0_5_unix.tar.gz
cd ElectroServer_4_0_5
nohup ./ElectroServer & (用这个命令来启动ElectroServer)
ps aux | grep 8080 启动不报什么错误,那你的ElectroServer就安装成功了!
https://localhost:8080/admin/就能登陆管理界面了,默认的管理装好和密码是:administrator/password
默认的开始只监听127.0.0.1,你可以通过更改ElectroServer_4_0_5/server/config/ ES4Configuration.xml文件来监听其他的IP或端口!
还有不明白的地方你查看:
http://www.electro-server.com/documentation/docs/es4/manual/index.html