Arch Linux

From LinodeWiki

Jump to: navigation, search

Contents

[edit] How to set up your Linode with Arch Linux

By Mark Grimes Peculier.com

[edit] Introduction

Arch Linux is a lightweight distribution that feels very much like an improved version of Slackware. It has a nice package management system (that deals with dependencies) and a good size package repository that is complimented by a community repository.

[edit] Basic Configuration

First off you will probably want to set your hostname, timezone, and locale. You can find YOURIPADDRESS and YOURHOSTNAME on the Network Information page under Members at [www.linode.com linode]. Either use the default hostname provided by Linode (i.e., ????.members.linode.com) or a registered name that already points to YOURIPADDRESS.

Open /etc/rc.conf and update the following variables (modify for your locale and timezone):

       HOSTNAME="YOURHOSTNAME" 
       TIMEZONE="US/Pacific"
       LOCALE="en_US.utf8"

In /etc/locale.gen, uncomment the locales that you want available (probably en_US.*). Then run:

       locale-gen

[edit] System Update

Arch makes a system upgrade very simple. Just run:

       pacman -Syu

and follow the prompts. You may need to run it a couple of time if, for instance, there is an update to pacman or another package that needs to install prior to a general upgrade.

Now you probably want to update you pacman mirror list to use the most efficient mirrors. Uncomment US mirrors in /etc/pacman.d/mirrorlist then execute:

       pacman -S python
       cd /etc/pacman.d
       mv mirrorlist mirrorlist.bak
       rankmirrorrs mirrorlist.bak > mirrorlist

[edit] Add a New Users

You probably shouldn't login as root very often. It is best to create a new user to handle just about everything. Use sudo when you need root privileges. So add a user with (replace NEWUSERID with your preferred username):

       useradd -m -g users -s /bin/bash -G wheel NEWUSERID
       passwd NEWUSERID

[edit] Install the sudo Package

The sudo package enables selected users to run commands as root. Install the sudo package with:

       pacman -S sudo

Then you need to edit the /etc/sudoers file:

       cd /etc
       visudo

Refer to the sudo manual to set this up, but if you stuck your user in the wheel group (as done in the example above) something along the lines of adding the following should work.

       %wheel  ALL=(ALL) NOPASSWD: ALL

Now logout as root and back in as NEWUSERID. You should be able to execute commands as root with sudo [command].

[edit] Install Apache

You probably want a webserver, so install apache:

       sudo pacman -S apache

Edit /etc/httpd/httpd.conf. At a minimum you want to edit ServerAdmin. To start the daemon run:

       sudo /etc/rc.d/rc.httpd start

To get apache to run each time you restart, add httpd to DAEMONS in /etc/rc.conf.

Check the installation by pointing a browser to http://YOURHOSTNAME/. Your web files are in /home/httpd/html.

[edit] Install Basic Packages

Optional. The following will install what I consider to be basic packages that you would want to run your linode server. You may or may not need these packages:

       pacman -S screen vim cvs subversion tcp_wrappers links lynx make gzip gcc zlib postfix

[edit] Conclusion

To slim down on the size of the install, you can delete the cached package files:

       pacman -Sc
       or
       pacman -Scc

A full install clocked in with less than 1GB install. Good luck with the new server.

-Mark

Personal tools