Skip to Content Skip to Search Go to Top Navigation Go to Side Menu


How to: Install electroserver on media-temple dv and similar centos setups


Tuesday, March 11, 2008

If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!

Before you start

Before starting anything you should be sure that you have the developer tools package installed. If your not sure, then you don’t. No worries: submit a request to install the developer tools package and you’ll be ready in about 45min to a hour.

Get started

first login as root

next download electroserver:

wget http://www.electro-server.com/downloads/builds/ElectroServer_4_0_4_linux.rpm” title=”http://www.electro-server.com/downloads/builds/ElectroServer_4_0_4_linux.rpm” class=”autohyperlink” target=”_blank”>www.electro-server.com/downloads/builds/ElectroServer_4_0_4_linux.rpm

next install the rpm:

rpm -iv ElectroServer_4_0_4_linux.rpm

You should now have a /opt/ElectroServer_4_0_4/ directory. browse around it and we’ll continue from there.

I had no issues up to this point, but feel free to post any problems and I’ll try to help.

Testing the install

in the /opt/ElectroServer_4_0_4/ you’ll notice a few files. to test your install run the ElectroServer command

If your lucky you’ll have no errors or issues getting the server running. I encountered an issue related to memory available. a quick reboot of the server fixed this.

Configuring the server

For this tutorial we’ll use port 8080 for the web admin, and port 9898 for our chat server. if you need to use other ports just follow along. you can also repeat this process to enable additional ports.

we’ll need to enable access to port 8080 and 9898. port 8080 will be used for the web admin, port 9898 will be used for the text (chat) connection.

to open your ports run the following:

port 8080

/sbin/iptables -A INPUT -p tcp --dport 8080 -j ACCEPT
/sbin/iptables -A OUTPUT -p tcp --dport 8080 -j ACCEPT

port 9898

/sbin/iptables -A INPUT -p tcp --dport 9898 -j ACCEPT
/sbin/iptables -A OUTPUT -p tcp --dport 9898 -j ACCEPT

next edit your ES4Configuration.xml which can be found at: <install directory>/server/config. if your following this tutorial on a media temple dv server this directory is /opt/ElectroServer_4_0_4/server/config/ES4Configuration.xml

ES4Configuration.xml your default configuration should look like this:

<?xml version=”1.0″ encoding=”UTF-8″ standalone=”no”?><ElectroServerConfiguration>

<!– This is the name of the node –>
<Name>StandAlone</Name>

<!– Defines the host and port on which the web server will listen for inbound connections –>
<WebListeners>
<WebListener>
<Host>127.0.0.1</Host>
<Port>8080</Port>
<Ssl enabled=”true”/>
</WebListener>
</WebListeners>

</ElectroServerConfiguration>

to get our server live we’ll need to give it an ip address, change 127.0.0.1 to an ip that is live on your server

Getting the server running and listening

before we can actually test our install we need to make sure that we’ve placed a crossdomain.xml at the root of the website listening at the ip used. if the ip is shared place the crossdomain file in the root of the default domain. the crossdomain.xml should be viewable at http://<electroserver ip>/crossdomain.xml, replace <electroserver ip> with the ip used in your ES4Configuration.xml.

be sure that you create allows for your running host, and any other domains that will access the server.

now restart electroserver if its already running and test if electroserver is excepting connections using telnet.

test that electroserver is running and able to listen by running telnet <electroserver ip> 8080

telnet should successfully connect. if not try shutting down all electroserver processes and start electroserver again. we’re now ready to get moving with getting our chat server running.

Use electroserver admin

the configuration used in this guide uses ssl, if your not using it then remember to use http where the guide says https.

access admin at https://<electroserver ip>:8080/admin

default user name: administrator
default password: password

once logged in go to gateways and edit the default gateway. change 127.0.0.1 to <electroserver ip>, save and restart the gateway

Test Chat Access

Electroserver by default runs chat on port 9898. restart electroserver and telnet to your electroserver ip, this time testing port 9898. your should recieve the contents of your crossdomain file as a response.

Almost Done

we’ll also need to add electroserver to our server startup. First create a file named: StartElectroServer, next  add the following to that file:

/usr/bin/nohup /usr/local/bin/ElectroServer &
exit

Place the script in you opt/electroserver directory with read and execute permissions. Now the final step link your file so it’s called at startup

ln -s /opt/ElectroServer_4_0_4/StartElectroServer /etc/rc.d/init.d/StartElectroServer

thats it, you should now be all set to run electro server.

Also to run electroserver without it closing when your console closes use: nohup ElectroServer &

Got questions? post a comment, or just post a comment to let me know this was helpful.

Sid

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
Might Be Related

6 Responses to “How to: Install electroserver on media-temple dv and similar centos setups”


  1. Alex Says:

    Thanks for this!!

    I am getting an error on
    /sbin/iptables -A INPUT -p tcp –dport 8080 -j ACCEPT
    Bad argument `–dport’
    Try `iptables -h’ or ‘iptables –help’ for more information.

    Any ideas??


    View this Comment in: English Chinese(S) Chinese(T) French Arabic Dutch German Greek Italian Japanese Korean Portuguese Russian Spanish

  2. admin Says:

    Hey Alex,

    wp was having some issues with double dashes, I’ve fixed the post.


    View this Comment in: English Chinese(S) Chinese(T) French Arabic Dutch German Greek Italian Japanese Korean Portuguese Russian Spanish

  3. Alex Says:

    Ah.. should have caught that… Been a while since I had to do any cl work..

    Still having a coupel issues.

    1) Server seems to be runnin.. If I do a
    ps -aux | grep Electro

    I can see its there, but if I try to connect to http://myserver:8080 the browser just downloads an empty binary file…

    2) Electro server does not launch after server restart.. Not sure why, I created the link as per your tutorial, and I can see its there, but after rebooting the server I its just not starting up..


    View this Comment in: English Chinese(S) Chinese(T) French Arabic Dutch German Greek Italian Japanese Korean Portuguese Russian Spanish

  4. Alex Says:

    Ops..
    I wasn’t using https…

    Now I get a “little” further.. Server responds, but I get

    HTTP ERROR: 404
    NOT_FOUND
    RequestURI=/
    Powered by jetty://


    View this Comment in: English Chinese(S) Chinese(T) French Arabic Dutch German Greek Italian Japanese Korean Portuguese Russian Spanish

  5. Alex Says:

    Hmm. I guess adding the /admin at the end helps..

    Im in and all is good, other then the issue with server not launching on reboot..

    Thanks for your great tutorial!!


    View this Comment in: English Chinese(S) Chinese(T) French Arabic Dutch German Greek Italian Japanese Korean Portuguese Russian Spanish

  6. admin Says:

    Hey Alex,

    I just updated the tutorial. Your right electroserver won’t stay running if you just add it to init.d, follow the new instructions and you’ll be ready to rock.


    View this Comment in: English Chinese(S) Chinese(T) French Arabic Dutch German Greek Italian Japanese Korean Portuguese Russian Spanish

Leave a Reply


In order to submit a comment, you need to mention your name and your email address (which won't be published). And ... don't forget your comment!

Comment Form