|
Running an web server on your desktop may be a handy thing. If you like to take advantage of some of the terrific functionality afforded to web scripts, like a movie database or something related - then maybe running a web server could make sense. I run a web server on the box that also serves up file and printing services to my LAN. We like document managers and the like as well as contact managers, inventory and personnel managers, calendars, etc. There is a whole world of terrific programming and function available to you in the form of php/mysql scripts.
Running a local web server is no sweat. Since it's not served up live to the world, meaning that anybody could "surf" to your locally run web sites, you can relax a little with security. Leave defaults alone. However, should you decide to host your own web sites locally that the world may visit then you had better get your security kung-fu hat on. Here is another tutorial for setting up a web server on Etch that is OK to serve up beyond locally, however, please put your security hat on.
I run a server on a Debian Etch box. Simplest thing in the world to set up. Command line action as simple as cut and paste. For all of you following along, here is what I just did to get LAMP going locally on my laptop. Keep in mind that I will be removing all of this, I only just installed it in order to write this little ditty up for some friends.
# apt-get install phpmyadmin php5-gd php5-mcrypt php-pear mysql-server
You'll see results like the following:
Reading package lists... Done
Building dependency tree... Done
The following extra packages will be installed:
apache2-mpm-prefork apache2-utils apache2.2-common libapache2-mod-php5
libapr1 libaprutil1 libdbd-mysql-perl libdbi-perl libgd2-xpm libltdl3
libmysqlclient15off libnet-daemon-perl libplrpc-perl libpq4 mysql-client-5.0
mysql-common mysql-server-5.0 php5-cli php5-common php5-mysql
Suggested packages:
dbishell libgd-tools libcompress-zlib-perl tinyca php5-dev php4-dev
Recommended packages:
apache2 httpd
The following NEW packages will be installed:
apache2-mpm-prefork apache2-utils apache2.2-common libapache2-mod-php5
libapr1 libaprutil1 libdbd-mysql-perl libdbi-perl libgd2-xpm libltdl3
libmysqlclient15off libnet-daemon-perl libplrpc-perl libpq4 mysql-client-5.0
mysql-common mysql-server mysql-server-5.0 php-pear php5-cli php5-common
php5-gd php5-mcrypt php5-mysql phpmyadmin
0 upgraded, 25 newly installed, 0 to remove and 0 not upgraded.
Need to get 46.7MB of archives.
After unpacking 126MB of additional disk space will be used.
Do you want to continue [Y/n]?
Of course, type y and then hit enter. In a moment my new LAMP stack was in. The only configuration of files that I did was to #nano /etc/php5/apache2/php.ini I searched for mysql by hitting ctrl+w. Then I un-commented ;extension=mysql.so
;extension=gd.so both the mysql line and the gd line by deleting the semi-colons. Save and close the file and run # /etc/init.d/apache2 force-reload I next exited from my root terminal in order to change my admin password for mysql. I issued the following command: $ mysqladmin -u root password [password] as a regular user. Next up, I alt+tab'd to my open web browser, ctrl+n for a new tab and entered the address for the local default Apache2 web site: http://127.0.0.1. There I was reading all about my new web server. To get to phpmyadmin just go there like this: http://127.0.0.1/phpmyadmin Cake. Remember, this is local, just for you and your LAN if that's where you set this up. There are a whole mess of things to discuss further should you want a live web server or should you require troubleshooting. That's what the forum is for. This a very simple, quick install. I use Joomla for a bunch of sites. In order for me to really use Joomla I have to install more than this simple tutorial covers. What we have here is just the tip of the iceberg. --machiner 25 may 2007
|