ArchLinux 2009.2安装配置笔记

之前ABitNo是个純正的Ubuntu用户,不过在最近我用上了ArchLinux,下面就写下自己的一些使用经验,全当是给自己的笔记,不期望能给别人帮上忙,如果能自然更好。

我是从官方下载的那个300M左右的USB img,用dd命令写入到U盘里就可以安装了。安装过程是没有图形界面的,这也是符合ArchLinux的简洁哲学

Arch Linux 将简洁定义为一个轻量级基础结构,没有任何不必要的添加、修改和复杂,使得每个用户都可以按照他们的需要打造自己的系统。简而言之,即优雅、极简之道。

安装时只有一点要注意的就是grub不认识ext4,所以/boot不能用ext4格式。其他的就不多说了,因为在ABitNo看来用ArchLinux的应该是个懂得基本Linux知识的人,如果想入门我依然是非常推荐Ubuntu!

1、用Linux首先就是配置网络

我用的静态IP,在/etc/rc.conf里

lo=(lo 127.0.0.1)
eth0=”eth0 121.***.***.*** netmask 255.255.255.0 broadcast 121.***.***.255INTERFACES=(lo eth0)
gateway=”default gw 121.***.***.1ROUTES=(gateway)

2、源/etc/pacman.d/mirrorlist

我用的是美国Southern Utah大学的

Server=ftp://locke.suu.edu/linux/dist/archlinux/$repo/os/i686

另外在/etc/pacman.conf里找到下面这句,把它的注释解开,这样就可以用wget下载软件包了

XferCommand = /usr/bin/wget –passive-ftp -c -O %o %u

3、更新系统

pacman -Syu

4、我可不想一直用CLI,先装个X

pacman -S xorg

5、装驱动

我用的是N卡,就直接

pacman -S nvidia

6、配置Xorg

创建文件/etc/X11/xorg.conf,我的内容如下

Section "ServerLayout"
	Identifier     "X.org Configured"
	Screen      0  "Screen0" 0 0
	InputDevice    "Mouse0" "CorePointer"
	InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"
	ModulePath   "/usr/lib/xorg/modules"
	FontPath     "/usr/share/fonts/misc"
	FontPath     "/usr/share/fonts/100dpi:unscaled"
	FontPath     "/usr/share/fonts/75dpi:unscaled"
	FontPath     "/usr/share/fonts/TTF"
	FontPath     "/usr/share/fonts/Type1"
EndSection

Section "Module"
	Load  "glx"
	Load  "extmod"
	Load  "record"
	Load  "dri2"
	Load  "dbe"
	Load  "dri"
EndSection

Section "InputDevice"
	Identifier  "Keyboard0"
	Driver      "kbd"
EndSection

Section "InputDevice"
	Identifier  "Mouse0"
	Driver      "mouse"
	Option	    "Protocol" "auto"
	Option	    "Device" "/dev/input/mice"
	Option	    "ZAxisMapping" "4 5 6 7"
EndSection

Section "Monitor"
	Identifier   "Monitor0"
	VendorName   "Monitor Vendor"
	ModelName    "Monitor Model"
EndSection

Section "Device"
	Identifier  "Card0"
	Driver      "nvidia"
	VendorName  "nVidia Corporation"
	BoardName   "G70 [GeForce 7300 GT]"
	BusID       "PCI:1:0:0"
EndSection

Section "Screen"
	Identifier "Screen0"
	Device     "Card0"
	Monitor    "Monitor0"
	SubSection "Display"
		Viewport   0 0
		Depth     1
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     4
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     8
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     15
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     16
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     24
	EndSubSection
EndSection

这个xorg.conf可以通过Xorg自身或者nvidia来生成,还可以用hwd

7、安装桌面,我还是喜欢gnome

pacman -S gnome

装的时候我没有选择epiphany,其余的都选择了

8、装GDM

pacman -S gdm

然后就可以运行下面的命令启动GDM了

/etc/rc.d/gdm start

如果运行成功,就可以在/etc/rc.conf里添加gdm开机启动了。

9、装hal

pacman -S hal dbus

在/etc/rc.conf里添加hal启动(这个arch的rc.conf真好用!)

10、声音

pacman -S alsa-utils

alsaconf自动配置声卡
alsamixer调节声音大小
alsactl store保存配置
在/etc/rc.conf里添加alsa开机启动

11、字体

这都是我喜欢的字体

pacman -S wqy-bitmapfont wqy-zenhei ttf-arphic-uming ttf-arphic-ukai ttf-bitstream-vera

另外,Google给Android开发的那款Droid字体也相当不错,要自己下载放到/usr/share/fonts目录下就可以了

12、Bash自动补齐

pacman -S bash-completion
echo source /etc/bash_completion >> /etc/profile

13、添加用户

当然,如果觉得用root用户不危险可以不加普通用户。用下面的命令添加好用户,同时设定了用户组

useradd -mG users,audio,optical,storage,hal,dubs,wheel -s /bin/bash yourusername

给用户设定密码

passwd yourusername

14、Accessories软件

pacman -S gnome-terminal gedit p7zip unrar unzip file-roller

15、Graphics

pacman -S gthumb gimp

16、Internet

pacman -S firefox firefox-i18n flashplugin pidgin skype

17、Office

pacman -S openoffice-base openoffice-zh_cn xpdf xpdf-chinese-simplified xpdf-chinese-traditional

18、Sound & Video

pacman -S codecs gstreamer0.10-bad gstreamer0.10-ugly gstreamer0.10-ffmpeg gstreamer0.10-mad gstreamer0.10-mpeg2dec rhythmbox mplayer mplayer-plugin

19、输入法

ABitNo在Ubuntu上一直都用scim,不知道为什么在arch上配置不好这个scim,只好叛逃到ibus阵营,这才发现ibus比scim好用多了,可说是因祸得福。

我是下载源码自己编译的,不过用ArchLinux的老手都说在ArchLinux下很少用编译,主要是ArchLinux下有强大的PKGBUILD、AUR 和 ABS,不过刚开始用我还是习惯了编译。安装好后在用户的~/.profile里加入下面的内容

export XMODIFIERS=@im=ibus
export GTK_IM_MODULE=ibus
export QT_IM_MODULE=ibus
ibus-daemon -d -x

好了,基本上就这样了。。。ABitNo很累。。。
ibus安装的具体细节请看ArchLinux 2009.2编译安装ibus输入法

4 COMMENTS >>LEAVE<<

  1. junmin

    命令自动补齐,不需要做一下设置

    echo source /etc/bash_completion >> /etc/profile

    因为 bash-completion 会在 /etc/profile.d/ 添加一个脚本 bash_completion.sh
    用户登录的时候默认就会运行这个脚本来设置环境

  2. ABitNo
    @junmin

    谢谢,这个我不知道,我是从LinuxSir上看到的,就这样学来了。。。

  3. vzomik

    哈哈,我在学ArchLinux安装,到了这里,留言~

  4. vzomik

    弄了一晚,还是不能进GNOME。。。

LEAVE A RESPONSE >>CANCEL<<

loader