Update: Some of the steps here are now deprecated.
Today I started a new position as a Software Developer at NTI Leeds. I'm going to be working on Android projects initially but may move on to iPhone development later in the year. As with most first days I spent some time setting up a development environment.
The machine I am using is a pretty average hardware spec, so I decided to install Arch Linux as it's supposedly pretty good for performance.
Arch Linux is a lightweight rolling-release distribution, that is to say that once it is installed the the system can be continually updated to keep up with the latest version rather than a new version being released periodically as is commonly done with other distros such as Ubuntu or Fedora. As Arch Linux can be a little more daunting for new users I have documented some steps on this page which I use for my system. As I use a 64-bit system and am in the UK some of these steps may need to be changed depending on your requirements. Additional help can be found on the Arch Linux Wiki.
Some steps to take during the Arch Linux Installation:Most of the steps required can be found on the Official Installation Guide. Once the install cd has been booted you can start the installation process by using:
Partitioning the Hard Drives:When partitioning the hard drive I opted for setting fixed partitions using the Ext4 filesystem (it's a bit too soon to use Btrfs). On hindsight I think I would have been better off using LVM (Logical Volume Manager) and will do so next time. If you intend to do development work you may find /usr/lib taking up a lot of space. Also, ~/.pacmanCache can grow fairly large so it's a good idea to give yourself enough space. The installer uses the following defaults:
- 32 MB ext2 /boot partition
- 256 MB swap partition
- 7.5 GB root partition
- /home partition with the remaining space
- 32 MB ext2 /boot partition
- 512 MB swap partition
- 15 GB ext4 root partition
- /home ext4 partition with the remaining space
Locale:Some localization information is kept in /etc/rc.conf. This file is the main configuration file for the system so you will need to return here fairly often to change settings. For the UK make sure the LOCALIZATION block in /etc/rc.conf looks like the following:
Now create the following file /etc/locale.conf and add the following:
A list of available locales is stored in /etc/locale.gen. Edit the file and uncomment the lines for UK then save and exit the file (keep the US also as a fallback):
Once this is done you need to run locale-gen as the root user
Arch Linux Post Installation:Once your new system has been installed it's time to start configuring it. First you'll need need some packages. Packages are installed on Arch Linux using pacman:
Before we start installing any packages make sure that pacman is downloading packages from servers in your location by editing /etc/pacman.d/mirrorlist. On my system I simply uncommented all of the UK mirrors:
Once the file has been saved you need to run pacman -Syy to force a refresh of all package lists.
Install useful tools and libs:As this is a 64-bit system if you install packages such as 'base-devel' you will encounter problems later when dealing with software that requires 32-bit libs. Use the multilib-devel instead to be able to deal with 32 bit and 64 bit.
Install 'sudo' and create a user that is a sudoer:Now that sudo is installed you'll need to make your user a sudoer. This is done using 'visudo', however now that vim has been installed you can use the following to use vim as the editor:
My preferred way to do this is to uncomment the following line so that any user that belongs to the 'wheel' group can use sudo.
Install audio:Edit /etc/modprobe.d/modprobe.conf by adding the following (this is to ensure that the 'snd-pcsp' module loads last):
Now install alsa:
Install a graphical desktop environment (Gnome 3 in this case):To get Xorg to use my UK keyboard layout I had to edit /etc/X11/xorg.conf.d/10-evdev.conf:
then add the following to the 'evdev keyboard catchall' section:
If you want your system to boot into a graphical environment rather than the command line then you'll need to edit your /etc/rc.conf file again. This time you need to edit the DAEMONS section. It should look similar to the following: