[[PageOutline]] When getting ready to run experiments in GENI, it is always a good idea to automate the setup of your experiment. In GENI [wiki:GENIExperimenter/RSpecs RSpecs], you have the capability of instructing an Aggregate Manager to download software from the web, and execute install scripts at boot up time. This page provides step by step instructions about how to write and use install scripts. = 1. Write your script = == Things to remember == * your script '''does not run in the context of your user''', make sure that you change the permissions of anything installed in your home directory so that you have access to them when you login * your script '''does run as a user with [http://en.wikipedia.org/wiki/Sudo sudo privileges]'''. Make sure you use `sudo` when: * you execute privileged commands (e.g. `yum`, `apt-get`, `service`) * you place things in your home directory * you try to write files in protected directories (e.g. `/usr/locac/bin/, /local/) * the [http://en.wikipedia.org/wiki/PATH_(variable) $PATH environment variable] is not necessarily set, make sure you use the full path of commands in your scripts; for example don't use `ifconfig`, but use `/sbin/ifconfig`. This is also true for the interpreters used for your script.Make sure you start your script with a line like {{{ #! does not exist: create file run one-time commands endif run boot-time commands }}} }}} = 2. Test your script = = 3. Find a Web Server = == 3.a. Use an existing Web Server == == 3.b. Install a Web Server == === 3.b.i Use a PlanetLab Host === = 4. Upload your script = = Useful tips =