Introduction
I recently wrote a post entitled "5 Ways To Use Puppy Linux" which gives a short list of possible uses for Puppy LINUX.One of the ideas mentioned was to use Puppy LINUX as a small development web server enabling web development on the move. Simply take your laptop/netbook and a USB pen drive pre-installed with Puppy LINUX and the LAMP stack and you can develop web pages whilst travelling on the train. Someone left a comment asking how this could be done.
This is the 1st of a series of posts detailing how to set up the LAMP stack within Puppy LINUX.
Initial Setup
I have taken a 2gb USB drive and I have installed Lucid Puppy on it as this is the easiest and for me most complete version of Puppy LINUX.I installed Firefox and set up the wireless connection and then I created a 512mb save file and rebooted the PC.
The following steps will show you how to install Apache within Lucid PUPPY.
Installing Apache
1. Click the install icon on the top row.2. Click the "Configure Package Manager" button in the bottom left corner.
3. Select the 3 Ubuntu repositories and click OK.
4. Exit the installer and restart it by clicking install again.
5. Type Apache into the find box and click "Go"
6. Click the Apache HTTP Server Metapackage
7. Click the examine dependencies button
8. Install the selected packages
9. Run through all the installers until all the packages are installed
10. Open a console a nd type /etc/init.d/apache2 restart
11. You will receive an error stating that libaprutil-1.so.0 could not be found. You now need to install this from the repositories. Click install to bring up the package manager and type libapr
12. Install the libapr-1 package.
13. Install the libaprutil1 package
14. From the console window type /etc/init.d/apache2 restart again. You will get a window just like the one above.
15. Typing Apache2 brings up the real issue which is that httpd.conf could not be found. Go to /etc/apache2 and type "nicoedit httpd.conf". Nicoedit is the default editor within Lucid Puppy.
16. Enter the following line in the Nicoedit window DocumentRoot "/var/www/htdocs"
17. Save the file
NB: You can add all the httpd.conf commands you would normally use within httpd.conf. The steps above create a basic shell required to get Apache running
18. Type /etc/init.d/apache2 restart again. Still it does not work.
19. Type adduser www-data. When asked for a password you can just press return. (Although adding a password would make it more secure the point of this exercise is to set up a development server for when you are on the move).
20. Type /etc/init.d/apache2 restart again. Still it does not work.This time you get an error about missing modules.
21. The above screenshot gives the commands that need to be entered to load the modules in.
a2enmod authz_host22. Type /etc/init.d/apache2 restart again. Still it does not work but we are getting close now. The error is basically stating that the folder we set in httpd.conf does not exist. Enter mkdir /var/www/htdocs.
a2enmod mime
a2enmod alias
a2enmod setenvif
23. Type /etc/init.d/apache2 restart again. It should now work.
24. Navigate to /var/www/htdocs and create a file called test.html.
25. Enter the following code into test.html
<!DOCTYPE>26. Open Firefox and type http://localhost/test.html.
<html>
<head>
<title>Testing Apache for the 1st time</title>
</head>
<body>
Testing Apache for the 1st time
</body>
</html>
Summary
It took a fair bit of effort getting Apache working but it is possible to do so and as you can see from the screenshot above it runs.This guide should not be used to create a production Apache server using Puppy. The concept of this guide is to get a working version of Apache within Puppy LINUX for use as a development platform when on the move.
The next guide will show how to install PHP.
Thanks for reading.
0 comments:
Post a Comment