== Install a Web Server in PlanetLab == === Reserve 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 [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. === 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 [wiki:HowTo/LoginToNodes 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 is the port you want to use: {{{ sudo sed 's/^Listen 80$/Listen /' /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 is the port you used in the previous command: {{{ sudo sed 's/^Listen $/Listen /' /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:/''' 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/ }}}