| 109 | == Install a Web Server in PlanetLab == |
| 110 | |
| 111 | === Reserver a PlanetLab node === |
| 112 | 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. |
| 113 | |
| 114 | === Install and start a Web Server === |
| 115 | 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]. |
| 116 | |
| 117 | After you login : |
| 118 | * install the apache server by running : |
| 119 | {{{ |
| 120 | sudo yum install -y httpd |
| 121 | }}} |
| 122 | * modify the default port by running the following commande where <NEW_PORT> is the port you want to use: |
| 123 | {{{ |
| 124 | sudo sed 's/^Listen 80$/Listen <NEW_PORT>/' /etc/httpd/conf/httpd.conf |sudo tee /etc/httpd/conf/httpd.conf >/dev/null |
| 125 | }}} |
| 126 | * start the web server : |
| 127 | {{{ |
| 128 | sudo /sbin/service httpd start |
| 129 | }}} |
| 130 | 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: |
| 131 | {{{ |
| 132 | sudo sed 's/^Listen <OLD_PORT>$/Listen <NEW_PORT>/' /etc/httpd/conf/httpd.conf |sudo tee /etc/httpd/conf/httpd.conf >/dev/null |
| 133 | }}} |