wiki:HowTo/RunAWebServerInPlanetLab

Version 1 (modified by nriga@bbn.com, 7 years ago) (diff)

--

Install a Web Server in PlanetLab

Reserver a PlanetLab node

In order to install a web server in a PlanetLab node, it is better if you create a separate slice just for the web server and use the attached rspec to reserve a PlanetLab node. You can use either Omni or Flack to do this. If you are using Flack, then you can see this video about how to create a slice with an existing rspec using Flack. While you follow the video make sure you also choose the plc manager so that you can reserver PlanetLab nodes.

Install and start a Web Server

Be patient, it might take up to 30-40 minutes for you sliver to be ready. Once your sliver is created you can login to your node. If you don't know how to login to your node you can follow these instructions.

After you login :

  • install the apache server by running :
    sudo yum install -y httpd
    
    • modify the default port by running the following commande where <NEW_PORT> is the port you want to use:
      sudo sed 's/^Listen 80$/Listen <NEW_PORT>/' /etc/httpd/conf/httpd.conf > httpd.conf ; sudo mv httpd.conf /etc/httpd/conf/httpd.conf
      
    • start the web server :
      sudo /sbin/service httpd start
      

If you get an error someone else might be using the port you used, change it again by using the following command where <OLD_PORT> is the port you used in the previous command:

sudo sed 's/^Listen <OLD_PORT>$/Listen <NEW_PORT>/' /etc/httpd/conf/httpd.conf > httpd.conf ; sudo mv httpd.conf /etc/httpd/conf/httpd.conf

In order to test that your webserver is up and running open a web brower and point it at http://plnode-03.gpolab.bbn.com:<NEW_PORT>/ you should get the apache welcome page.

Upload files to your webserver

In order to make files publicly available in your server do these two simple steps :

  • transfer the file to the PlanetLab node. You can use scp to do this e.g.:
     scp -i /home/nriga/.ssh/geni_key install-mpich.tar.gz pgenigpolabbbncom_inkisrv@plnode-03.gpolab.bbn.com:
    
  • login to your node and move the file to '/var/www/html', e.g.
     sudo mv install-mpich.tar.gz /var/www/html/
    

Attachments (1)

Download all attachments as: .zip