现在的位置: 首页 > 综合 > 正文

Chakra Linux 安装指南(三):Chakra Linux 配置

2019年04月29日 ⁄ 综合 ⁄ 共 6613字 ⁄ 字号 评论关闭

Chakra Linux 安装指南(三):Chakra Linux 配置

上文我们已经完成了 Chakra Linux 的安装过程,重启之后在 Grub 2 菜单中选择 Chakra Linux,便可以启动 Chakra Linux 了。但是,启动之后除了 Chakra 美观的界面之外,我们还会注意到:系统界面竟然是英文的!

因此,折腾的道路还没有结束,下面我们一起来对 Chakra 进行设置。

1. 连接网络

在进行设置之前,我们第一件要做的事自然是连接网络,对于无线网络用户来说,可以在通知区域的 Network Manager 管理无线网络连接,此处不再赘叙。

至于使用 ASDL 连接的用户,下面我将介绍一种较为传统的方式来连接网络。(理论上来说,Network Manager 是可以管理 DSL 连接的,但是我尝试了一下没有成功)

首先按下 Alt + F2 快捷键组合,输入 konsole 运行 Konsole。然后输入 sudo pppoe-setup 并回车,需要输入管理员密码。然后按照提示输入相关信息即可完成配置,由于配置信息是全英文的,下面我会给出一个例子(中文提示为本人所加)。

[terry@chakra-pc ~]$ sudo pppoe-setup
Welcome to the Roaring Penguin PPPoE client setup. First, I will run
some checks on your system to make sure the PPPoE client is installed
properly…

Looks good! Now, please enter some information:

USER NAME

>>> Enter your PPPoE user name (default bxxxnxnx@sympatico.ca): (用户名)example@example.com

INTERFACE

>>> Enter the Ethernet interface connected to the DSL modem
For Solaris, this is likely to be something like /dev/hme0.
For Linux, it will be ethn, where ‘n’ is a number.
(default eth0): (选择网卡,绝大多数情况下直接回车选择默认的 eth0 即可,即以太网卡)

Do you want the link to come up on demand, or stay up continuously?
If you want it to come up on demand, enter the idle time in seconds
after which the link should be dropped. If you want the link to
stay up permanently, enter ‘no’ (two letters, lower-case.)
NOTE: Demand-activated links do not interact well with dynamic IP
addresses. You may have some problems with demand-activated links.
>>> Enter the demand value (default no): (此处选择是否在空闲一段时间后断开连接,建议直接回车选择默认的 no)

DNS

Please enter the IP address of your ISP’s primary DNS server.
If your ISP claims that ‘the server will provide DNS addresses’,
enter ‘server’ (all lower-case) here.
If you just press enter, I will assume you know what you are
doing and not modify your DNS setup.
>>> Enter the DNS information here: (DNS 服务器地址,输入 server 则会自动获得 DNS 服务器地址)server

PASSWORD

>>> Please enter your PPPoE password: (输入密码)
>>> Please re-enter your PPPoE password: (确认密码)

FIREWALLING

Please choose the firewall rules to use. Note that these rules are
very basic. You are strongly encouraged to use a more sophisticated
firewall setup; however, these will provide basic security. If you
are running any servers on your machine, you must choose ‘NONE’ and
set up firewalling yourself. Otherwise, the firewall rules will deny
access to all standard servers like Web, e-mail, ftp, etc. If you
are using SSH, the rules will block outgoing SSH connections which
allocate a privileged source port.

The firewall choices are:
0 – NONE: This script will not set any firewall rules. You are responsible
for ensuring the security of your machine. You are STRONGLY
recommended to use some kind of firewall rules.
1 – STANDALONE: Appropriate for a basic stand-alone web-surfing workstation
2 – MASQUERADE: Appropriate for a machine acting as an Internet gateway
for a LAN
>>> Choose a type of firewall (0-2): (防火墙设置,0 为不设置防火墙)0

** Summary of what you entered **(信息摘要)

Ethernet Interface: eth0
User name: example@example.com
Activate-on-demand: No
DNS addresses: Supplied by ISP’s server
Firewalling: NONE

>>> Accept these settings and adjust configuration files (y/n)? (最后确认,输入 y 即可)y
Adjusting /etc/ppp/pppoe.conf
Adjusting /etc/ppp/pap-secrets and /etc/ppp/chap-secrets
(But first backing it up to /etc/ppp/pap-secrets-bak)
(But first backing it up to /etc/ppp/chap-secrets-bak)

Congratulations, it should be all set up!

Type ‘pppoe-start’ to bring up your PPPoE link and ‘pppoe-stop’ to bring
it down. Type ‘pppoe-status’ to see the link status.

设置完毕之后输入 sudo pppoe-start 即可连接网络,输入 sudo pppoe-stop 即可断开连接。

2. 修改配置文件

在 Arch Linux 的安装步骤中,一个非常重要的部分就是修改系统设置,或者更准确地说,就是修改配置文件,因为 Arch Linux 秉承简洁原则,系统的重要设置都是通过修改核心配置文件而非程序工具完成的,虽然修改文本配置文件听起来似乎非常恐怖,但实际上 Arch 的配置文件结构清晰、精简易读,提供了图形配置工具难以比拟的灵活性和全面性,而且用户在熟悉了配置文件结构之后修改系统配置是非常方便的。Chakra 作为起源于 Arch 的发行版,继承了 Arch 的这一特性,但是令我不解的是,Chakra
的安装程序 Tribe 却没有要求用户在安装过程中修改核心配置文件,不过没有关系,现在我们一起来对系统进行配置。

实际说来,我们现在需要修改的配置文件实际上只有两个:rc.conf 和 mirrorlist,配置过 Arch 的用户都知道:前者是 Arch 中非常著名的核心配置文件,后者则是软件包管理器 pacman 的镜像列表。

要修改 rc.conf,在 konsole 中输入 sudo nano /etc/rc.conf(也可以使用 kate 等自己顺手的编辑器),输入密码即可进行修改,由于涉及系统核心设置,请谨慎修改配置文件内容。

下面是 rc.conf 的基本内容,摘自 ArchWiki。

# LOCALIZATION
# ————
HARDWARECLOCK=”UTC”
TIMEZONE=
KEYMAP=”us”
CONSOLEFONT=
CONSOLEMAP=
LOCALE=”en_US.UTF-8″
DAEMON_LOCALE=”yes”
USECOLOR=”yes”

# HARDWARE
# ——–
MODULES=()
USEDMRAID=”no”
USEBTRFS=”no”
USELVM=”no”

# NETWORKING
# ———-
HOSTNAME=”myhost”

interface=
address=
netmask=
broadcast=
gateway=

NETWORK_PERSIST=”no”

# DAEMONS
# ——-
#
DAEMONS=(syslog-ng network crond)

下面我来介绍一下较为常用的设置,关于其他设置,请参阅 ArchWiki。

首先是 LOCALIZATION(本地化)项目,该项所包含的信息大多来自 Chakra 安装过程中的本地化设置,包括时区、语言环境等等,因此无需修改。可能需要修改的一项设置是 HARDWARECLOCK(硬件时间),那么为什么要修改此项设置呢?是因为 Linux 与 Windows 对于硬件时间的默认解释不同,如果安装双系统,没有修改此项设置的情况下会出现两个操作系统时间显示不一致的问题。我们将 HARDWARECLOCK 处的值由默认的 UTC 修改为 localtime,重启之后即可解决。

其次是 HARDWARE(硬件)项目,可能需要修改的设置是 MODULES(内核模块)。如果你在 Chakra 中安装 VirtualBox,会发现安装完毕之后无法使用,按照对话框提示进行操作则会出现错误,实际上这是因为没有加载 vboxdrv 内核模块,在 MODULES 序列中添加 vboxdrv,重启即可解决问题(直接执行 sudo modprobe vboxdrv 可以使该设置立即生效)。

由于 Chakra 中使用 NetworkManager 来管理网络连接,因此通常没有必要修改 NETWORKING(网络)项目中的设置,此处略去不提。

最后是 DAEMONS(守护进程)项目,对于很多应用程序来说,是不需要使用 DAEMONS 的。不过由于 Chakra 默认没有启动 bluetooth(蓝牙),因此会造成蓝牙适配器无法使用的情况,在 DAEMONS 序列中添加 bluetooth,重启即可。

现在 rc.conf 的设置大致完成,保存即可。

现在我们来修改 /etc/pacman.d/mirrorlist,在 konsole 中输入 sudo nano /etc/pacman.d/mirrorlist(也可以使用 kate 等自己顺手的编辑器),输入密码即可进行修改。

Chakra 默认的软件源是位于美国的服务器,即下面的 http://mirror.rit.edu/kdemod/$repo/i686,在这一行前面添加 #,将其注释掉即可。

# United States
Server = http://mirror.rit.edu/kdemod/$repo/i686
#Server = ftp://mirror.dacentec.com/chakra/$repo/i686
#Server = http://mirror.dacentec.com/chakra/$repo/i686

翻到配置文件的后面,找到 China 地区的服务器列表,从下列三个服务器中选择一个,去掉行前的 # 符号即可,个人推荐最后一项 163 软件源。

# China
#Server = http://oss.ustc.edu.cn/kdemod/$repo/i686
#Server = http://debian.cn99.com/kdemod/$repo/i686
#Server = http://mirrors.163.com/kdemod/$repo/i686

注意:不要在 mirrorlist 中加入 Arch 的软件源,Chakra 已经是独立的发行版,混用软件源会导致兼容性问题。

现在 mirrorlist 的设置也完成了,保存即可。然后在 konsole 中输入 sudo pacman -Syu,同步软件源信息并更新系统。

3. 安装 Bundle

之前在介绍 Chakra 时提到,重要的 GTK+ 软件都被打包,以 Bundle 的形式提供(一个例外是 Adobe Flash Player,直接输入 sudo pacman -S flash-plugin 即可安装)。以 Bundle 形式提供的软件包括 FireFox、ThunderBird、Pidgin 等很常用的软件,那么如何安装 Bundles 呢?其实是非常简单的,只要通过 Bundle Manager 安装即可。

在 KickOff 菜单中找到 Bundle Manager,点击运行,界面如下图所示:

选择自己想要下载的程序,点击即可开始下载,无需管理员权限,等待其安装完毕就可以在 KickOff 菜单中启动,与一般程序无异。不过使用 Firefox 时有一个比较烦人的地方,就是 Firefox 无法自动调用相应的程序来打开下载的文件(在 ThunderBird 中甚至无法调用默认浏览器以打开链接),需要手动制定程序路径,如果一一制定非常麻烦,我们可以将常用文件类型的打开程序全部设为 /usr/bin/xdg-open 脚本即可,FireFox 或 ThunderBird 便会自动运行默认程序打开文件。

4. 中文化

虽然我们之前在安装过程中将系统语言设置为中文,但是由于 Chakra DVD 中并没有包含 KDE 中文语言包,因此安装完成之后仍然是英文的,解决方法是安装中文语言包,在 konsole 中执行 sudo pacman -S kde-l10n-zh_CN 即可。

LibreOffice 同样需要安装中文语言包,执行 sudo pacman -S libreoffice-zh-CN 即可。

除此之外,Firefox 的语言包也需要另外安装,在 Arch Linux 中可以直接通过 pacman 安装,不过在 Chakra 中由于 FireFox 是 GTK+ 程序将其从软件源中移除,只能以下述方法安装:访问 http://releases.mozilla.org/pub/mozilla.org/firefox/releases/10.0.2/linux-i686/xpi/(此处
10.02 为版本号,请自行修改为对应版本号),点击 zh-CN.xpi下载并允许安装,安装完毕之后访问 about:config,双击 general.useragent.locale,并将其修改为 zh-CN,重新启动 FireFox 即可生效。

下面是完成语言包安装之后的截图:

现在还有一个问题,就是还没有中文输入法,Chakra 软件源中有 fcitx 和 sunpinyin 可供使用,在 konsole 中输入 sudo pacman -S fcitx fcitx-sunpinyin kcm-fcitx,安装之后在 ~/.xprofile 中加入(没有则新建一个):

export XMODIFIERS=@im=xim

export QT_IM_MODULE=xim

然后在 KDE 的设置中心将 fcitx 加入自动启动程序即可,现在基本设置也可以说告一段落了,最后重新启动以便设置生效,我们的折腾过程也就到此结束了

抱歉!评论已关闭.