Sign up to Submit Content

Sign Up / Login
feed image
Guests 23
If you can walk and chew gum at the same time, you can run Linux

debian tutorials | debian support forum
I invite anyone familiar with Linux or Debian to register here at debiantutorials.org and write tutorials or related articles in order that everyone in the community can benefit. I'm talking to you. You say it better than I do. Your ideas just flow like a smile that swerves all over the road. There's so much more that needs to be written in ways that your cousin or an office manager can benefit from. Consider it.
debiantutorials.org is built on and runs on Debian.
Creative Commons License
Simple local web server on Etch
Quick and easy local web server on Debian Etch PDF Print E-mail
Written by Administrator   
Friday, 25 May 2007 12:19

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



Add this page to your favorite Social Bookmarking websites
Reddit! Del.icio.us! Mixx! Free and Open Source Software News Google! Live! Facebook! StumbleUpon! Yahoo! Free Joomla PHP extensions, software, information and tutorials.
Comments
Add New RSS
+/-
Write comment
Name:
Email:
 
Website:
Title:
UBBCode:
[b] [i] [u] [url] [quote] [code] [img] 
 
 
:angry::0:confused::cheer:B):evil::silly:
:dry::lol::kiss::D:pinch::(:shock:
:X:side::):P:unsure::woohoo::huh:
:whistle:;):s:!::?::idea::arrow:
 
Please input the anti-spam code that you can read in the image.
steve  - web server...   |24.195.200.xxx |2008-02-06 21:02:12
Hi !

On the very first box marked #nano/ect/php5/apacche2php.ini, you uncommented
;extension=mysql.so
;extension=gd.so... What did you remove ? the ; perhaps ? Also what line # is it, I only
found it writtin as an "Example."

Thank you.
machiner  - Check your email :)   |Publisher |2008-02-07 03:13:55
Depends how LAMP is installed - some distros tweak so this isn't necessary. Some don't. On my own server
install, described on debtoots, it's necessary. I have received reports that this is moot. Some visitors
have told me that they can't even find mysql.so to uncomment.

When I install LAMP it's always there, always
necessary. Fill me in with specifics and we'll tweak what's necessary in any article on the site.

3.26 Copyright (C) 2008 Compojoom.com / Copyright (C) 2007 Alain Georgette / Copyright (C) 2006 Frantisek Hliva. All rights reserved."

Last Updated on Sunday, 09 March 2008 04:20