Installing Selenium server 2 as a service on Ubuntu

This post follows on from the earlier how to install selenium as a service on mac os x , with details of how to install the same standalone server on the Ubuntu server.  In this case, it was 8.04, but it should work in later versions too.

First, browse to click on selenium-server-standlone-2.*.jar link, and then copy the url of the selenium-server-standlone-2.*.jar file.

Next, open up a terminal window and type:

sudo su
mkdir /usr/lib/selenium/
cd /usr/lib/selenium/
wget url-you-copied-above
mkdir -p /var/log/selenium/
chmod a+w /var/log/selenium/

Next, take this attachment, and save it as /etc/init.d/selenium

Now edit the file, and change the filename of the standalone server file (currently selenium-server-standalone-2.0a5.jar) to the name of the server file you downloaded above.

Finally, make the script executable:

chmod 755 /etc/init.d/selenium

To test:

/etc/init.d/selenium start

Finally, add the script so that it starts automatically when the server does:

update-rc.d selenium defaults

Comments are closed.