LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1542|回复: 9

Arch新手之路---Arch的安装配置以及软件包的构建和安装

[复制链接]
发表于 2005-12-7 16:13:18 | 显示全部楼层 |阅读模式
Installing Arch Linux
Journeys of a Linux-Hack'n Newbie

这是我第一次翻译英文的Linux文章,翻译的不好,请各位原谅并指出错误。
我是一个Arch的初级用户,希望和大家一起进步。--by cqatpku cqatpku@163.com
Chapter 1 - Installation Process
第一部分-安装过程

1.        Boot the ArchLinux installation CD.
使用ArchLinux的安装光盘启动。

2.        Once the initial boot up sequence is done, press <ENTER> at the boot: prompt to load the Arch install environment.
等待初始启动过程结束,在boot:提示符出现后按下<ENTER>载入Arch安装环境。

3.        Begin the install by typing /arch/setup
键入/arch/setup开始安装。

4.        Follow through each of the steps in the installation process.  If you do not know much about partitioning your hard drive, allow Arch to auto-configure that for you.
按照安装过程一步一步进行下去。如果你不是很清楚如何对硬盘进行分区,请使用安装程序中的自动分区。

5.        If you have a high-speed connection to the Internet, you're best bet is probably to do an install from the FTP servers.
如果你有快速连接的网络,你可以使用FTP安装的方式。

6.        When it comes time to install the kernel, I personally had the best success when I chose the 2.4 (scsi) kernel option.
当进行到安装内核的步骤时,我个人建议使用2.4 (scsi)。

7.        If installing via FTP, setting up GRUB should be an automatic process.  Install to the
/dev/hda MBR partition and you should be fine.
如果通过FTP进行安装,则无需手动安装GRUB。最好将其安装在/dev/hda MBR。

8.        After all is said and done, eject the CD and reboot the system.  In a few moments you should be greeted with a boot prompt.  Follow Chapter 2 to start configuring the details of your new Arch system.

Please note, the notes that follow are procedures that have worked for me.  Your mileage may vary, depending on your hardware.  Be sure to refer to the Wiki and forum resourced of the ArchLinux homepage (www.archlinux.org) for more details and help from the resident Arch Gurus.
当以上过程均执行完毕,取出安装光盘,重启系统。不久,你将会看到boot:的提示符。按照第二部分来设置你的新Arch系统的细节部分。

请注意,该笔记所记载的方法和步骤对我来说是适用的,但由于你的情况可能有所不同,这取决于你的硬件。请参考ArchLinux主页(www.archlinux.org) 上的Wiki和论坛等资源以获得更多的细节和帮助。

Chapter 2 – Post Installation
第二部分-安装后设置

1.        Once you reboot your new Arch system (without the installation CD), login as SuperUser by typing root then <ENTER> at the ArchBox login: prompt.
当你重启你的系统后(此刻没有插入安装光盘),在login:的提示符下用超级用户root登录系统。

2.        You should first assign a password to your SuperUser (or root) account for security reasons.  Type password then <ENTER> at the command prompt.
基于安全的考虑,你应该先设置你的root用户的密码,再命令提示符后输入password按下<ENTER>。

3.        The system will then ask you for a new UNIX password.  Type the password of your choosing (note: the screen will not show you what you're typing) and press <ENTER>. You will be asked for the password again, for confirmation.  So re-enter the password and then press <ENTER>.
此时,系统会向你询问新的密码。输入你想要设定的新的密码后按<ENTER>。(注意:屏幕上并不会显示你输入的密码,也不会显示*,而是一片空白。)你会要求再次输入密码以便确认。再次输入同样的密码后按<ENTER>。

4.        Next thing is to get your network card configured and a connection to the Internet established.  At the command prompt type modprobe tulip <ENTER> (replace tulip with your particular network card module), then type dhcpcd eth0 <ENTER> (if your web host supports dynamic IPs) to get an Internet connection.  If your network card is located on another port (ie: eth1, eth2, etc.) then make the appropriate adjustments.
下一步你应该设置你的网卡以便连接网络。在命令提示符下输入modprobe tulip <ENTER>(将tulip替换成你的网卡的模块名称),然后键入dhcpcd eth0 <ENTER>连接到Internet。(如果你的网络提供动态IPs)如果你的网卡在其他插槽,(如:eth1, eth2等等)请做相应修改。

5.        To make these network settings permanent, you will need to manually edit a file called rc.conf that is in your /etc directory.  To do this, type nano /etc/rc.conf
为了保存刚才所做的网络设置,你应该手动修改位于/etc/目录下的rc.conf文件,键入nano /etc/rc.conf。

6.        Scroll down to the line MODULES=(!usbserial) and add the modprobe module you specified in the step above.  In this example, the new line would be MODULES=(!usbserial tulip)
将光标下移到MODULES=(!usbserial)这一行,添加modprobe module,请将module改为你的网卡的模块名称,依我的情况为例,这一行应该被改为:MODULES=(!usbserial tulip)

7.        Now, scroll down to the line that begins with DAEMONS=( and add dhcpcd eth0 at the end of the line, left of the closing bracket.  Replace eth0 with eth1 or 2 or which ever network card your Internet connection is plugged in to.
然后,将光标下移到DAEMONS=这一行,在这一行的最后添加dhcpcd eth0,当然是添加在括号内。同样的道理,将eth0修改为你的具体的情况如eth1或者eth2等。

8.        Save the changes by typing <CTRL> <X>, and answer Y to save the changes to rc.conf.
同时按下<CTRL>和 <X>保存修改,当询问是否保存对rc.conf进行的修改时键入Y。

9.        Now you should update the Pacman repositories and ensure you have all of the latest packages installed on to your system.  To do this, type pacman -Syu <ENTER> at the command prompt.  Pacman will now access the default Arch Linux repositories, download the latest package database and compare to the files installed on your computer.
现在你可以连接网络更新你的Pacman仓库,这样你可以安装最新的软件包。键入pacman -Syu <ENTER>,Pacman会连接默认的ArchLinux仓库,下载最新的包的数据与你机器上已经安装的的软件包进行比较。

10.        If there are updates to be done, Pacman will list the files that need updating and ask you to confirm the process.  Type Y and press <ENTER> to continue with the update.
如果存在可更新的软件包,Pacman会列出这些需要更新的文件然后询问是否进行跟新,键入Y后按下<ENTER>开始更新。

11.        Arch Linux also has its own hardware auto detection tool, called HWD.  To replace Hotplug with HWD, first download the application by typing pacman -Sy hwd <ENTER> at the command prompt.
ArchLinux拥有它自己的硬件自动检测工具,叫做HWD。如果要用HWD替代Hotplug,先用pacman -Sy hwd <ENTER>下载和安装HWD工具包。

12.        Now, we'll update the rc.conf file to use HWD instead of Hotplug.  At the command prompt, type nano /etc/rc.conf
仙子啊你可以用HWD来替代Hotplug升级rc.conf文件。命令行下键入nano /etc/rc.conf。

13.        Scroll down to the line that begins as DAEMONS=( and put an exclamation point ! in front of the word hotplug (ie: !hotplug), then at the end of the line (just left of the closing bracket), type hwd
将光标下移到以DAEMONS=开始的一行,在hotplug前加上一个惊叹号!,即!hotplug,然后在这一行的最后出添加hwd。

14.        Save your changes by pressing <CTRL> <X> and answer Y to save rc.conf.
按下<CTRL> <X>并键入Y保存修改。

15.        At this point, you should also add a regular user to the system for your everyday, non-system maintenance tasks.  To do this type adduser <ENTER>.
你还应该添加一个普通的用户作为日常和非系统维护等工作时所用。键入type adduser <ENTER>。

16.        You will then be asked for the user's name.  Enter one and press <ENTER>.
请输入新的用户名后按<ENTER>。

17.        You can then press <ENTER> to default the user ID, then you'll be asked for the groups you wish to add the user too.  Users will be the default, but you should add audio and optical.  To do this press <ENTER>, then at the Additional groups prompt, type audio,optical <ENTER>.
直接按下<ENTER> 接受默认的用户ID,然后你将会被问到你希望将该用户加入什么组中。Users组是默认的答案,但是你应该添加audio and optical这两个组,键入<ENTER>,然后在Additional groups提示符后键入audio,optical,按下<ENTER>。

18.        Press <ENTER> to default home directory, press <ENTER> to default Shell editor, press <ENTER> to skip expiry date setting, and finally press <ENTER> to accept your changes.
直接键入<ENTER>接受默认的主目录和Shell,键入<ENTER>跳过有效日期设置,最后键入<ENTER>保存修改。

19.        You will now be asked for the new user's full name, phone number, etc.  You can leave these blank by pressing <ENTER>.  But when you get to the password setup, enter a password for  this new user.  You'll have to enter it twice.
你将会被询问有关新用户的全名,电话等问题,你可以直接键入<ENTER>跳过去,当到位新用户设置密码时,和前面一样,你要输入两次完全一致的密码。

Chapter 3 – Setting Up Xorg and KDE
第三部分-设置Xorg和KDE

1.        Login as root and configure Xorg by typing xorgconfig at the command prompt and press <ENTER>.
用root登录,键入xorgconfig设置Xorg。

2.        This will launch the Xorg configuration program.  You'll need to know some specifics regarding your PC's hardware, like monitor resolutions and frequencies, as well as graphics card settings.  To help with this process, you may wish to try booting your PC with a Linux Live CD, like Kanotix, Knoppix, or Archie... something that can can help auto-detect your PC settings.

Write down the details as they appear on the screen (make sure you initiate the Verbose mode, usually by pressing F2 at boot-up) and use them when you're setting up Xorg.
这时,Xorg设置程序开始了。你需要知道你机器硬件的情况,如显示器的分辨率和刷新频率,显卡的情况等。你可事先用Linux Live CD如Kanotix, Knoppix, 或者Archie等启动你的机器,这些Live CD会自动检测你的硬件的情况。

记录在用Live CD启动过程中屏幕上出现的相关信息(请确保你处于字符启动模式,通常是在启动的时候按F2)以进行后来的Xorg的设置。

3.        Something to note, if you're using an older serial cable mouse:  Arch uses the designations /dev/ttyS0 and ttyS1 to identify serial ports.
需要注意的是,如果你使用比较老的串口鼠标的话,Arch使用指定的/dev/ttyS0 和 ttyS1来表示。

4.        When you're done, the Xorg configuration file will be stored in the directory /etc/X11 as xorg.config, and the configuration can be tested by typing startx at the command prompt and press <ENTER> .
完成之后,Xorg的设置信息保存在/etc/X11文件下的xorg.conf文件中,你可以键入startx检验设置是否成功。

5.        To set-up KDE as your default desktop environment, first you'll have to download the KDE packages from the Arch repositories.  To do this, at the command prompt, type pacman -Sy kdebase then press <ENTER>.
如果要把KDE设成你的默认的桌面环境的话,你需要下载并安装KDE包,键入pacman -Sy kdebase进行下载和安装。

6.        Answer Y to the confirmation question.  The KDE base system files will be installed onto your system.
键入Y确认下载和安装,这样KDE基本系统已经安装好了。

7.        You may want some other KDE packages as well, such as kdeutils, kdeaddons, kdemultimedia, and kdegraphics.  You can install these individually by preceding each with the pacman -Sy command, or you can type pacman -Sy kdeutils kdeaddons kdemultimedia kdegraphics all on one line, then press <ENTER>.
你可能需要其他的KDE的软件包,如kdeutils, kdeaddons, kdemultimedia, and kdegraphics等。你可以通过键入pacman -Sy kdeutils kdeaddons kdemultimedia kdegraphics进行安装。

8.        Now you'll need to tell Arch to start the KDE window manager, KDM, at the time of boot-up.  To do this, you can simply type nano /etc/rc.conf followed by <ENTER>.
现在你需要告诉Arch在系统启动的时候启动KD窗口管理器,KDM,你可以通过键入nano /etc/rc.conf作如下修改。

9.        Scroll down to the DAEMONS= line and add kde to the end of the line, just left of the closing bracket.
将光标下移到DAEMONS=这一行,在这一行的末尾处添加kde.

10.        Press <CTRL><X> and then Y <ENTER> to save your changes.
键入<CTRL><X> 然后键入Y保存修改。

11.        Re-boot your PC by typing shutdown -r now at the command prompt, followed by <ENTER>
键入shutdown -r重启系统。

12.        If all has gone according to plan, you should be greeted with the KDE login screen after the system reboots.
如果以上所有的设置都成功的话,你应该可以在重启之后看到KDE的登录界面。

13.        It may happen that you do not have any sound support when you try KDE for the first time.  It may be that Arch was not able to auto-detect your sound card.  To remedy this, you may need to add your sound driver to the rc.conf file manually.  For me, I had to add the driver snd-sbawe for my on-board sound chip.
你会发现KDE第一次启动时没有声音出现,这是因为Arch不能自动监测并帮你安装声卡驱动,你需要在rc.conf中手动添加你的声卡模块。对于我来说,我是添加snd-sbawe来搞定我的板载声卡。

If you do not know your sound card's appropriate driver setting, use a Live CD to help with the auto detection.  Make a note of it and add it to the Modules= line in the /etc/rc.conf file.
如果你不知道你的声卡模块,同样用一张Live CD事先检测。

Chapter 4 – Installing Packages From the AUR (Arch User Repositories)
第四部分-从AUR(Arch User Repositories)安装软件包

You can find and install many of the common place applications for Arch by simply typing pacman -Sy {package name} at the command prompt.  But, there are also many “unofficial” packages available to you, contributed by users just like you, at the Arch User's Repositories (or AUR) at: http://aur.archlinux.org
你可以通过键入pacman -Sy {软件包名}来安装大多数常见的软件,但在Arch User's Repositories (or AUR) at: http://aur.archlinux.org同样 ... l”的软件包。

When you search for packages on the AURs, you'll notice that the files you download are named PKGBUILD.  What this is is not a complete application package, like you'd get with a .deb file (for example), but rather instructions that tell Pacman how to build the required application and install it onto your system.
当你查询AURs中的软件包的时候,你会注意到你下载的文件的文件名为PKGBUILD,这些并不是象.deb文件一样的完整的软件包,这些文件只是告诉Pacman程序如何创建所需的程序并安装它们。

1.        In order to keep your ABS (Arch Build System) in order, you should download all PKGBUILD files into your /var/abs/local directory, making a new directory within for each package you wish to install.  Example: Let's say we want to install the KDE IRC chat program “Konversation”.  As superuser, change directory to /var/abs/local, type mkdir konversation and press <ENTER>.
为了使你的ABS (Arch Build System)有序,你应该把下载的PKGBUILD文件放在/var/abs/local文件夹中,并且在其中为每个你想要安装的包建立新的文件夹。例如,我想要安装KDE IRC chat程序“Konversation”,我使用root帐户将当前工作目录切换到/var/abs/local,键入mkdir konversation并按下<ENTER>。

2.        Now, using your preferred method, download the PKGBUILD file found on the AUR site, under the Konversation package web page and save in the new konversation sub-directory.
现在,用你自己的方式,下载AUR网站的Konversation包的网页上的PKGBUILD文件并保存在在konversation子目录中。

3.        Once you've downloaded the PKGBUILD file, ensure you're in the konversation directory and type makepkg then press <ENTER>.  Arch will now download the required files to build the Konversation package that will be installed on your system. Depending on the speed of your CPU, this could take a bit of time.
下载完毕之后,确认你的工作目录是konversation,然后键入makepkg并按下<ENTER>。Arch会自动帮你下载构建Konversation软件包所需的文件并打包成以.pkg.tar.gz为后缀的文件。这可能需要一段时间,取决于你的CPU的速度。

4.        Once the process is complete and you have your command prompt back, type pacman -A konversation-{version #}.pkg.tar.gz and press <ENTER>.  Pacman will now install the package you've just built.
当这个过程完成之后,你可以在命令行下键入pacman -A konversation-{版本号 #}.pkg.tar.gz,Pacman会帮你安装你自己打包的软件。

5.        That's all there is to it.  If you want to update Konversation at some time in the future, simply type pacman -U konversation-{version #}.pkg.tar.gz
这样就算完了,如果你将来需要升级Konversation,你可以通过简单的键入pacman -U konversation-{版本号 #}.pkg.tar.gz来完成。
发表于 2005-12-7 23:16:38 | 显示全部楼层
先支持一把!我也在翻译 arch 0.7安装手册。

http://web25.kuitoo.net
回复 支持 反对

使用道具 举报

发表于 2005-12-8 08:49:38 | 显示全部楼层
http://arch.linuxsir.cn/main/?q=node/61

你们来这里看过了么?这里已经翻译了好多东西了。翻译完的最好来这里发一下帖子吧。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-12-8 12:50:59 | 显示全部楼层
Post by EricNeon
先支持一把!我也在翻译 arch 0.7安装手册。

http://web25.kuitoo.net


Arch 0.7的安装手册不是已经翻译过了吗?
http://arch.linuxsir.cn/main/?q=node/61
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-12-8 12:56:56 | 显示全部楼层
Post by wd_afei
http://arch.linuxsir.cn/main/?q=node/61

你们来这里看过了么?这里已经翻译了好多东西了。翻译完的最好来这里发一下帖子吧。

绝大多数我都已经看多了,而且打印下来了,前面的大哥辛苦了,给我们带了这么好的中文文档,特别是Arch的Wiki上居然有那么多的翻译好的简体中文的文档,太让人感动了!
回复 支持 反对

使用道具 举报

发表于 2005-12-8 13:17:05 | 显示全部楼层
Contribute your part please.
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-12-8 14:53:12 | 显示全部楼层
Post by ganloo
Contribute your part please.

这篇文章是我从一个国外的Arch用户的blog上引过来的,他并没有把原文发在Arch的Wiki上,我这样做是不是不太合适啊?
回复 支持 反对

使用道具 举报

发表于 2005-12-10 16:58:07 | 显示全部楼层
各位多多支持 http://arch.linuxsir.cn 啊。由于工作忙,很久没有维护了。添砖加瓦就靠兄弟们了!多发些翻译或原创的精品到那里。
回复 支持 反对

使用道具 举报

发表于 2005-12-10 17:15:43 | 显示全部楼层
如何加入arch.linuxsir.cn的工作?
我自己翻译了一些文章,不知道怎么加入。(如果tx-cary大哥不嫌我太newbie )
回复 支持 反对

使用道具 举报

发表于 2005-12-10 19:49:18 | 显示全部楼层
Post by philix
如何加入arch.linuxsir.cn的工作?
我自己翻译了一些文章,不知道怎么加入。(如果tx-cary大哥不嫌我太newbie )


只要注册一下就可以发东西了。注意分类。

如果谁希望加入管理团队(现在我都没有时间管理)和我说一声,审核过后就给管理权限。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表