Tagged with Ubuntu

Installing Ubuntu 10.04 Lucid Lynx for PHP development

Lucid-LynxLast year I have written a small how-to for installing an Ubuntu 9.04 work environment as virtualbox environment (though it also works for native systems). Recently I have updated this guide to 10.04 as kind of check list to get a working environment to develop PHP/MySQL applications.

Continue reading

Tagged , , , ,

Ubuntu 10.04 LTS (Lucid Lynx)

On April 29th the new Release of Ubuntu, named Lucid Lynx, will be available to download from the official Ubuntu site. Currently the release candidate is already available, so if you want to try out, you can get it now and upgrade to the full version later.

One of the biggest changes is the new default style in Gnome, which puts the menu buttons to the upper left part of the window instead of the upper right. This is a little bit confusing, but you can change back to a more traditional layout.

Only problem so far was installing apc but I guess I will solve that one soon :)

Tagged ,

How to install an Ubuntu based Web Server

I recently upgraded my old VPS, which was running with Ubuntu 6.06, to a fresh new Hardy Heron version. That gave me the opportunity to make a clean installation and configuration and then transfer my websites to the new server.

Hint: I did all the install and update stuff as root user. If you have another user with sudo rights, then apply a sudo before most of the commands here.

Updating the Apt

First step I did was updating the packages.

apt-get update
apt-get upgrade

LAMP

After that i installed the primary components, like Apache, PHP5 and MySQL:

First the webserver itself:

apt-get install apache2

I installed additional Apache modules. An easy way to do that is to use a3enmod:

a2enmod ssl
a2enmod rewrite
a2enmod suexec
a2enmod include

Just don’t forget to reload your apache afterwards:

/etc/init.d/apache2 force-reload

Afterwards install PHP5:

apt-get install php5
apt-get install php5-cli
apt-get install php5-dev
apt-get install php-pear

Some more PHP5 modules are following later.

PEAR is a package repository which enables you to install additional PHP package libraries.

To make sure that my link to PEAR is up to date, I use the following command:

pear channel-update pear.php.net

Installing MySQL is rather simple:

apt-get install mysql-client mysql-server libmysqlclient15-dev

Afterwards you get asked to enter a MySQL root password. Make sure to keep that one safe!

I say I need some more PHP5 modules, so here they come:

apt-get install php5-gd
apt-get install php5-mcrypt
apt-get install php5-imagick
apt-get install php5-curl
apt-get install php5-xmlrpc php5-xsl
apt-get install php5-mhash

Additional tools

To create statistics based on my webserver’s log files, I use awstats:

apt-get install awstats

Just make sure that the folder /usr/lib/cgi-bin is password protected (or move the file awstats.pl to a more secure location.

Configuration of awstats is another topic, I don’t want to talk too much about right now. There is an example file in the folder /etc/awstats just digg through it :)

To keep the server time up to date you can install ntp:

apt-get install ntp ntpdate

Now there is always the correct time on your server.

Finally

I did some more stuff but those are the basics to install on a fresh web server. Another hint: make sure your server is able to send mails to the outside world (maybe install another MTA, but make sure only the server itself can relay mails, unless you want to use the server as SMTP server as well).

If you have anything to add to this howto, I am happy for every comment on it.

Tagged , , , , , ,