137 | | == Where are the log files for my script? == |
138 | | |
139 | | == Install a Web Server in PlanetLab == |
140 | | |
141 | | === Reserver a PlanetLab node === |
142 | | 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. |
143 | | |
144 | | === Install and start a Web Server === |
145 | | 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]. |
146 | | |
147 | | After you login : |
148 | | * install the apache server by running : |
149 | | {{{ |
150 | | sudo yum install -y httpd |
151 | | }}} |
152 | | * modify the default port by running the following commande where <NEW_PORT> is the port you want to use: |
153 | | {{{ |
154 | | sudo sed 's/^Listen 80$/Listen <NEW_PORT>/' /etc/httpd/conf/httpd.conf > httpd.conf ; sudo mv httpd.conf /etc/httpd/conf/httpd.conf |
155 | | }}} |
156 | | * start the web server : |
157 | | {{{ |
158 | | sudo /sbin/service httpd start |
159 | | }}} |
160 | | 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: |
161 | | {{{ |
162 | | 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 |
163 | | }}} |
164 | | |
165 | | 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. |
166 | | |
167 | | === Upload files to your webserver === |
168 | | In order to make files publicly available in your server do these two simple steps : |
169 | | * transfer the file to the PlanetLab node. You can use scp to do this e.g.: |
170 | | {{{ |
171 | | scp -i /home/nriga/.ssh/geni_key install-mpich.tar.gz pgenigpolabbbncom_inkisrv@plnode-03.gpolab.bbn.com: |
172 | | }}} |
173 | | * login to your node and move the file to '/var/www/html', e.g. |
174 | | {{{ |
175 | | sudo mv install-mpich.tar.gz /var/www/html/ |
176 | | }}} |