Build Ubuntu Server 9.10 64 bit All-in-One LAMP server – Linux Apache MySQL PHP Subversion Trac and Samba – Part 1

This guide is provided for users who want to test these in testing environment. Please use this guide at your own risk.

I have been in love with Ubuntu Desktop for its polished user friendlyness and it motivated me to take a look at its server edition. I googled a bit about what kind of reviews Ubuntu Server gets nowadays but other than Ubuntu’s breif survey there are only debates about whether Debian is better or Ubuntu is better. I personally do not think there is an absolute answer for this debate because they both have its strengths and weaknesses. Anyhow I thought it would be interesting to try Ubuntu Server myself.

I picked up Ubuntu Server 9.10 64 bit because I wanted to try the newest features and it makes sense to go with 64 bit OS nowadays due to increased memory usage and so forth.

This brief guide is built based on the following assumptions.

1. In terms of security concerns, it relies on router firewall configuration to allow only port 80 from the outside. Anything that should be available internally will have different port set up.
For example, phpmyadmin will be set up for port 8080 and router firewall will not allow port 8080 traffic from the outside; however, it is openly available from the inside.

2. Each application requires its own authentication and authorization mechanisms. They will not be covered by this guide so please refer to each application’s manual to tighten up security.

I will start with basic vanilla install as part 1.

Ubuntu Server Vanilla Install

  1. Download Ubuntu Server ISO from Ubuntu
  2. Burn a CD and boot up with the CD
  3. Select Language – English
  4. Install Ubuntu Server
  5. Choose a language – English
  6. Choose a country – United States
  7. Detect keyboard layout – No
  8. Origin of keyboard – USA
  9. Keyboard layout – USA
  10. Hostname – ubuntu
  11. Select your time zone – Central
  12. Guided – use entire disk
  13. Select disk to partition – SCSI1 (0,0,0) (sda)
  14. Write changes – Yes
  15. Full name for the new user – user
  16. Username for your account – user
  17. Choose a password for the new user – (password)
  18. Re-enter password to verify – (password)
  19. Encrypt your home directory – No
  20. HTTP proxy information – (blank)
  21. How do you want to manage upgrades on this system? – No automatic updates
  22. Choose software to install – (None)
  23. Restart

Change root password after logging in as user

sudo passwd

Type user’s password once, enter new root password and confirmation

Elevate to privileged user

su -

Run full-upgrade and reboot

aptitude update
aptitude full-upgrade
reboot

Install etckeeper for system configuration version control

aptitude install etckeeper

This will automatically start version control under /etc/ directory using bzr

Install favorite text editor [Optional]

aptitude install emacs

* Substitute emacs with your favorite text editor from here and on

Assign a static IP address

emacs /etc/network/interfaces

Example file content

...
auto eth0
iface eth0 inet static
     address 192.168.0.10
     netmask 255.255.255.0
     gateway 192.168.0.1

Restart networking

/etc/init.d/networking restart

Change hostname [Optional]

echo "ubuntu" > /etc/hostname
emacs /etc/hosts

Example file content

127.0.0.1       localhost
192.168.0.10    ubuntu.jakeyoon.com    ubuntu

# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

Install SSH server

aptitude install openssh-server

Install time synchronization
Sync time now with Ubuntu ntp server

ntpdate ntp.ubuntu.com

Install ntp daemon

aptitude install ntp

Install SNMP/SNMPD for network monitoring [Optional]

aptitude install snmp snmpd

Accept snmp request from remote servers

emacs /etc/default/snmpd

Remove “127.0.0.1” from snmpd options SNMPDOPTS

# snmpd options (use syslog, close stdin/out/err).
SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid'
emacs /etc/snmp/snmpd.conf

Comment out line com2sec paranoid default public and uncomment com2sec readonly default public

#com2sec paranoid default public
com2sec readonly default public

Restart SNMPD

/etc/init.d/snmpd restart

To be added: mail relay, webalizer

3 thoughts on “Build Ubuntu Server 9.10 64 bit All-in-One LAMP server – Linux Apache MySQL PHP Subversion Trac and Samba – Part 1

  1. The aptitude install openssh-server part did not work.
    failed to connect to us.archive.ubuntu.com

    Other sites give this same instruction, I will come back to it

  2. @Peter
    I set the networking back to dhcp and then I was able to install the openssh-server.
    So somehow I am not setting the static IP correctly.

  3. Peter, yes, it looks like it was a networking issue. Let me know if you need any help setting static ip address.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>