<--Back
Simple Ubuntu Server Setup
A quick and dirty way to configure an Ubuntu Linux multipurpose server. The recommended minimun system requirements should be a Pentium II with 128 MB of RAM, 2 GB hard drive, CD-ROM, ethernet card and a basic VGA video card.
Before you begin:
Linksys routers issue IP's in the 192.168.1.X range. D-link's issue IP's in the 192.168.0.X range.
Install Ubuntu Server on the target computer. http://www.ubuntu.com/getubuntu
Plug the server into a router.
Set the router to issue the server a static IP address e.g. 192.168.1.20
The following setup instructions assume a 192.168.1.X address.
Create a user account on your computer. (username is "tom" in the following examples)
Grub splash screen (optional)
Create a custom picture that is displayed during computer startup.- The image file must be:
640 x 480
14 colors
saved as an xpm file (for example: splash1.xpm) - Compress the image. At the command prompt type:
gzip splash1.xpm (creates splash1.xpm.gz)
Then copy the newly compressed file "splash1.xpm.gz" to the "/boot/grub" directory
- Edit: /boot/grub/menu.list
#Pretty colors
#Color cyan/blue white/blue
#hidden menu (comment out)
splashimage = (hd0,0)/boot/grub/splash1.xpm.gz - Update the changes to Grub. At the command prompt type:
sudo update-grub
Edit Ubuntu Package List
- Edit: /etc/apt/sources.list
Comment out references to CD-ROM
(Otherwise apt-get will keep requesting the original install CD)
Add/uncomment any other repositories
Install and Configure NFS (*nix file sharing)
- Install the NFS software on the server. At the command prompt type:
sudo apt-get install nfs-kernel-server
sudo apt-get install nfs-common-portmap - Create the shared NFS directory in the users home directory. At the command prompt type:
mkdir /home/tom/nfsshare
- Change permissions/ownership. At the command prompt type:
chown tom:users /home/tom/nfsshare
chmod 755 /home/tom/nfsshare - Configure NFS to share the directory
Edit: /etc/exports
/home/tom/nfsshare 192.168.1.0/255.255.255.0(rw)
Edit: /etc/hosts.allowportmap: 192.168.1.0/255.255.255.255.0
At the command prompt type:
portmap: 255.255.255.255/0.0.0.0#exportfs -ra
- To automount the NFS directory on a client.
Create a mount point on the client. At the command prompt type:
sudo mkdir /media/upload
Edit: /etc/fstab (Edit the client's fstab file, not the server's)192.168.1.20:/home/tom/nfsshare /media/upload nfs users,rw 0 0
At the command prompt type:sudo mount -a
Install and Configure Samba (Windows file sharing)
- Install the Samba software. At the command prompt type:
sudo apt-get samba
- Create the shared Samba directory in the users home directory. At the command prompt type:
mkdir /home/tom/sambashare
- Change permissions/ownership of the shared directory. At the command prompt type:
chown tom:users /home/tom/sambashare
chmod 777 /home/tom/sambashare
(This makes the directory world writable and not at all secure.) - Configure Samba to share the directory
Edit: /etc/samba/smb.conf
NOTE:[global]
security = share
[sambashare]
path = /home/tom/sambashare
comment = Linux Samaba Share
writable = yes
read only = no
guest ok = yes
If you have multiple users and don't want them overwriting each others files use "security=user". You'll need to do more configuration with regards to directory permissions and linking Linux and Samba password files.
Install SSH (Remote Login)
SSH is a useful for logging into the server remotely. That way you don't need a keyboard and monitor plugged into the server.- Install the SSH software. At the command prompt type:
sudo apt-get ssh
- log into the server from another machine. From another computer's command prompt type:
ssh -l tom 192.168.1.20 (or whatever the server's IP address is.)
Install MC (Midnight Commander)
Midnight Commander is a great file manager similar to Norton Commander from the old DOS days.- Install MC. At the command prompt type:
sudo apt-get mc
- To run MC with root privileges, at the command prompt type:
sudo mc
(Careful as root you can really mess things up. Whatever you do, make sure you know how to undo) - To run MC as a regular user, at the command prompt type:
mc
(Much safer but you won't be able to edit system files)
Things to read up
If you are new to Linux, the following are some things you really should get your head around. Remember that this applies to the SERVER setup only. If you install a graphical desktop version of Linux, you can get away with not needing a lot of this stuff.- File ownership and user privileges.
- Linux directory structure.
- Get to know the /etc directory
- Linux is not difficult, it's just different.