I would like to know if it is possible to create a web server in a pen drive. The Web Server must have python, PHP, MySQL etc... installed on it and run without any trouble.
I saw a few articles about XAMPP running on a pen drive, but I would like to know if it is possible to add python and if it is viable to do such thing.
Also, would it work fine between computers? It is possible to make the server run once it is connected to a computer? And it is possible to make some python scripts run automatically once the the server starts up?
Many thanks
11 Answer
1. Is it possible to create a web server in a pen drive?Yes. You can use something like Turnkey Linux's LAMP Container to make a bootable Live image on a USB stick.
2. Is it possible to add python and if it is viable to do such thing?Yes. The above Turnkey Linux container, for example, already features Python, PHP, and MySQL. LAMP is a common package and is very viable to use for small servers AFAIK. There is the small issue of write wear on flash media like USB drives to contend with.
3. Would it work fine between computers?This is a little harder to answer with any degree of completeness, but generally if the computers are properly configured, reasonably modern and reasonably-specced, yes.
4&5. It is possible to make the server run once it is connected to a computer? And it is possible to make some python scripts run automatically once the the server starts up?Yes; I believe this is already how the above container is configured, for example. In any case, it would simply be a matter of configuring your live linux environment to run the LAMP stack and whatever else you need to run at start up by changing what is in the init.d directory (for the above solution; other linux distros may have different ways of handling automatic script/program execution).
1