Changes between Initial Version and Version 1 of HowTo/RunAWebServerInPlanetLab


Ignore:
Timestamp:
09/26/12 10:45:53 (12 years ago)
Author:
nriga@bbn.com
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • HowTo/RunAWebServerInPlanetLab

    v1 v1  
     1== Install a Web Server in PlanetLab ==
     2
     3=== Reserver a PlanetLab node ===
     4In 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 [attachment:plc-bbn-onenode.rspec 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 [http://www.youtube.com/watch?v=-XF6wyNu1BE 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.
     5
     6=== Install and start a Web Server ===
     7Be 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 [wiki:HowTo/LoginToNodes these instructions].
     8
     9After you login :
     10  * install the apache server by running :
     11   {{{
     12sudo yum install -y httpd
     13}}}
     14   * modify the default port by running the following commande where <NEW_PORT> is the port you want to use:
     15{{{
     16sudo sed 's/^Listen 80$/Listen <NEW_PORT>/' /etc/httpd/conf/httpd.conf > httpd.conf ; sudo mv httpd.conf /etc/httpd/conf/httpd.conf
     17}}}
     18   * start the web server :
     19{{{
     20sudo /sbin/service httpd start
     21}}}
     22       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:
     23{{{
     24sudo sed 's/^Listen <OLD_PORT>$/Listen <NEW_PORT>/' /etc/httpd/conf/httpd.conf > httpd.conf ; sudo mv httpd.conf /etc/httpd/conf/httpd.conf
     25}}}
     26
     27In 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.
     28
     29=== Upload files to your webserver ===
     30In order to make files publicly available in your server do these two simple steps :
     31  * transfer the file to the PlanetLab node. You can use scp to do this e.g.:
     32  {{{
     33 scp -i /home/nriga/.ssh/geni_key install-mpich.tar.gz pgenigpolabbbncom_inkisrv@plnode-03.gpolab.bbn.com:
     34}}}
     35  * login to your node and move the file to '/var/www/html', e.g.
     36    {{{
     37 sudo mv install-mpich.tar.gz /var/www/html/
     38}}}