A Debian LEMP system
- April 5th, 2008
- Posted in Linux . Server
- By Jason Zerbe
- Write comment
Yesterday was spent perfecting a Linux, nGinx, MySQL, and PHP setup on the lower end Optiplex I picked up last week. For those of you new to the Linux scene I suggest Debian or some other Linux distribution that has an automated package management system. The base install for Debian is about 200MB and has many of the core libraries you need, preinstalled, which makes it great for putting together a server on just about any old hardware. I am running my setup from a 20GB hard drive, 128MB of PC 133 RAM, 866MHz Pentium 3 processor, and an on-board 3com 10/100Mbps network interface (a Dell Optiplex GX150).
In case your Debian netinstall doesn’t have network connectivity while installing, you might find the following tutorials helpful once you get log in as root.
For those of you like me who don’t use ‘nix machines everyday a quick refresher on bash commands might be handy. You don’t want to forget how to extract tar.gz archives: tar xzf filename.tar.gz
I started out flying solo on this one, piecing together each bit of software I needed. After trying many different software combinations, I landed upon a tutorial on How to Install a Complete LEMP on Debian or Ubuntu. It is a great tutorial that I followed after failing to get PHP to work on my nGinx install.
Deviations from the tutorial:
- I didin’t need any email functionality so I skipped the Postfix and Dovecot install
- You don’t really need the package php5-xcache, plus it is no longer available.
- The command: “apt-get install mysql mysql-server” should be –> “apt-get install mysql-client mysql-server“
After you are done with the entire setup, I suggest installing a few Nginx modules:
- ngx_http_access_module
- ngx_http_autoindex_module – for showing a directory listing instead of 403 errors
- ngx_http_upstream – in case you need to load balance multiple backend hosts
Need PhpMyAdmin? It works great on nGinx as well, once you have phpfastcgi installed. [Link Slicehost.com]
Finally for ftp access, I suggest installing vsFTPd.
- apt-get install vsftpd
- vi /etc/vsftpd.conf
- Change the configuration file to suit your needs.
- vsFTPd uses the user accounts of the local system, so if you need to add an ftp user, add a user account for the local system. [About adding user accounts]
Why did I decide to try out nginx?
- nginx is the most efficiant when it comes to handling large amounts of traffic
- the nginx configuration file is very easy to update
- when updating nginx, no downtime is required
No comments yet.