What is the minimum size of the LAMP server?

I installed server 10.10 with LAMP+OpenSSH. It is about 1.1GB. Can I reduce the total size of the server?

AFTER SOME EXPERIMENTS

The full LAMP server is under 1.0gb

/dev/sda1             7.5G  914M  6.3G  13% /

It contains PHP/Mysql/Apache and Gearman-job-server with PHP support + libFAM


First off, consider using 32-bits if you are space conscious. The binaries are smaller, as is the memory footprint, and if you have a small disk footprint system, its likely you won't even have 4GB of RAM to take advantage of the 64-bit memory management.

If you just choose the "LAMP Server" task then base system + all of that can be a lot. However, LAMP itself is just Linux, Apache, Mysql, and PHP, so really all you need are the bits to tie those together. That would be:

mysql-server php5-mysql libapache2-mod-php5

Also you can try installing it with --no-install-recommends" which will avoid bringing in things that are normally used, but not absolutely necessary, for the operation of a LAMP site (like SSL, and the php CLI command).

SO you can run

apt-get --no-install-recommends install mysql-server php5-mysql libapache2-mod-php5

When I do this in a 64-bit EC2 10.10 instance I get this:

Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1              15G  793M   14G   6% /
none                  290M  108K  290M   1% /dev
none                  297M     0  297M   0% /dev/shm
none                  297M   52K  297M   1% /var/run
none                  297M     0  297M   0% /var/lock

And on a 32-bit instance:

Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1              15G  761M   14G   6% /
none                  294M  108K  294M   1% /dev
none                  298M     0  298M   0% /dev/shm
none                  298M   52K  298M   1% /var/run
none                  298M     0  298M   0% /var/lock

BTW, if you're curious where the space is used up:

sudo du -m /* | sort -rn | head -20

Will show you the top 20 (the numbers are MB of space used)