Chinaunix首页 | 论坛 | 博客
  • 博客访问: 6543141
  • 博文数量: 1159
  • 博客积分: 12444
  • 博客等级: 上将
  • 技术积分: 12570
  • 用 户 组: 普通用户
  • 注册时间: 2008-03-13 21:34
文章分类

全部博文(1159)

文章存档

2016年(126)

2015年(350)

2014年(56)

2013年(91)

2012年(182)

2011年(193)

2010年(138)

2009年(23)

分类: LINUX

2013-04-09 21:15:54




有关 CentOS 6 的问题

Contents


1. 我过往利用 boot.iso 映像进行网络安装。它去了哪里?

由 这个发行版本起、上游决定把 boot.iso 移出 images/ 这个目录并利用另一个独立的媒体来发行它。基于该映像颇大,我们亦决定同样做。网络安装磁盘的映像名为 netinstall.iso,它只收藏在 isos/ 这个目录,当中还有其它的安装映像。


2. 为何我的以太网络不能运作,除非我登录并刻意启用它?

……还有,为什么界面名称完全「逆转」以往惯例?这样做违反了 Unix「不更改预期结果」的原则。

上 游的缺省组态已改用 NetworkManager,而且界面缺省是不会被启用的(针对以太网来说是较难理解)。权宜之计就是在安装过程中,等待安装程序询问你的语系、键盘、 基本安装或其它存储设备后,执行「检查设备」并显示「请为这台计算机命名……」的划面。这个昼面内有一粒「设置网络」的按钮。点击这个按钮会引导 NetworkManager。请选择名为 System eth0 的以太网络连接并编辑它的设置。假如你选用「自动连接」的选项,网络连接在日后开机时便会被引导。你也可以在安装完成后通过 NetworkManager(「系统;选项;网络连接」或右按通知本地内的网络小图示,选择「编辑连接……」)来作出这个改动。

假如你不采用 NetworkManager,你可以通过编辑网络界面的概述文件(正常为 /etc/sysconfig/network-scripts/ifcfg-eth0)并把 ONBOOT=no 改为 ONBOOT=yes 来达到相同効果。某些采用 DHCP 的安装还需要额外一行:BOOTPROTO=dhcp;固定 IP 的安装当然需要:BOOTPROTO=static

假设界面是 eth0,你可以(通过 root 的身份)这样编辑 ONBOOT:

# cd /etc/sysconfig/network-scripts/ # sed -i -e 's@^ONBOOT="no@ONBOOT="yes@' ifcfg-eth0 

关于「更改预期结果」:上述例子采用「传统」的网络设备,eth0。其它设备名称亦可行,例如:em1p3p1 等。不论你喜欢与否,这个为界面命名的改动将会是 Linux 的未来趋势。它已包含在上游的「测试发行版本」作为。此外请参阅:Dell 的介绍及内部员工的网志


3. 但我只想令它运作及手动式编辑配置文件

很多安装无须 NetworkManager 工具的复杂性,而采用人手编辑的配置文件。以下是一个 非 NetworkManager 的 DHCP 界面设置样例:

[root@example ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE="eth0" BOOTPROTO=dhcp NM_CONTROLLED="no" PERSISTENT_DHCLIENT=1 ONBOOT="yes" TYPE=Ethernet DEFROUTE=yes PEERDNS=yes PEERROUTES=yes IPV4_FAILURE_FATAL=yes IPV6INIT=yes IPV6_AUTOCONF=yes IPV6_DEFROUTE=yes IPV6_PEERDNS=yes IPV6_PEERROUTES=yes IPV6_FAILURE_FATAL=no NAME="eth0" [root@none ~]# 

以及一个「静态配置」配置文件的样例:

[username@hostname]$ cat /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE="eth0" HWADDR="00:21:70:10:7E:CD" NM_CONTROLLED="no" ONBOOT="yes" BOOTPROTO=static # BOOTPROTO=dhcp IPADDR=10.16.1.106 NETMASK=255.255.255.0 # # the GATEWAY is sometimes in: /etc/sysconfig/network GATEWAY=10.16.1.1 

此外,通用项目如主机名称及 DNS 服务器可选择性地放置在:

[username@hostname]$ cat /etc/sysconfig/network HOSTNAME=acme.example.com DNS1=10.16.1.112 DNS2=8.8.8.8 ## DNS2=76.242.0.28 SEARCH=example.com 

这些信息是「选择性」的,因为一台 DHCP 服务器能派发这些数值。当一个良好部署的 DNS 环境存在时,initscripts 能够从 PTR 等记录找出主机名称等信息,但有些用户需要以人手管理这些细节。要最得更多信息,你可用以下方式列出整全的 initscripts 文档:

rpm -qd initscripts 

不论该环境是否安装了 man 阅读说明手册的组件及所依赖的组件。


4. 为何 CentOS-6 拒绝在我的 i686 处理器上安装?

上游决定了不支持非 PAE 的处理器。如果你的处理器不支持 PAE,执行安装程序时你将会看见以下错误:

  • This kernel requires the following features present on the CPU pae cx8

你仍可安装 CentOS-5 但将会不能运行 CentOS-6。


5. 我如何停用 IPv6?

上游雇员 Daniel Walsh 不要停用 ipv6 模块,因为这样会导致 SELinux 及其它组件出现问题。你可改而在 /etc/sysctl.conf 加入:

net.ipv6.conf.all.disable_ipv6 = 1 net.ipv6.conf.default.disable_ipv6 = 1 

要在运作中的系统停用它:

echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6 echo 1 > /proc/sys/net/ipv6/conf/default/disable_ipv6 

sysctl -w net.ipv6.conf.all.disable_ipv6=1 sysctl -w net.ipv6.conf.default.disable_ipv6=1 

要是你在停用 IPv6 的系统上转接 X 时遇到问题,请编辑 /etc/ssh/sshd_config 及作出以下一组改动:

(1) 更改这一行

#AddressFamily any 

AddressFamily inet 

(inet 指定 ipv4;inet6 指定 ipv6)

或者

(2) 删除这行行首的井号(#)

#ListenAddress 0.0.0.0 

然后重新引导 ssh。


6. 为何我在输入某个软件库的 GPG 金钥时出现错误?

很多设置第三方软件库的指引都包括以 rpm --import ... 输入 GPG 金钥。如何你遇到以下错误:

error:  key 1 import failed.

你可以忽略它,因为该金钥已经被输入。你可执行以下指令来确定:

rpm -q --qf "%{NAME}-%{VERSION}-%{RELEASE} \n %{SUMMARY} \n" gpg-pubkey


7. 为何我不能在我的 32 位元 CentOS 上安装 KVM?

上游只为 64 位元(x86_64)提供 KVM 支持,因此 CentOS 的支持亦相同。你必需选用 64 位元的安装才能使用 KVM。


8. 安装时的各个选项包含哪些群组?

根据 images/install.img 上的 /usr/lib/anaconda/installclasses/rhel.py,以下选项可供选择:

Desktop: base, core, debugging, directory-client, java-platform, network-file-system-client, server-platform, fonts, print-client, basic-desktop, desktop-debugging, desktop-platform, general-desktop, graphical-admin-tools, input-methods, legacy-x, x11, internet-applications, internet-browser, office-suite, remote-desktop-clients

Minimal Desktop: base, core, debugging, directory-client, java-platform, network-file-system-client, server-platform, fonts, print-client, basic-desktop, desktop-debugging, desktop-platform, input-methods, legacy-x, x11, internet-browser, remote-desktop-clients

Minimal: core

Basic Server: base, console-internet, core, debugging, directory-client, hardware-monitoring, java-platform, large-systems, network-file-system-client, performance, perl-runtime, server-platform

Database Server: base, console-internet, core, debugging, directory-client, hardware-monitoring, java-platform, large-systems, network-file-system-client, performance, perl-runtime, server-platform, mysql-client, mysql, postgresql-client, postgresql, system-admin-tools

Web Server: base, console-internet, core, debugging, directory-client, java-platform, network-file-system-client, performance, perl-runtime, server-platform, web-server, web-servlet, php, turbogears, mysql-client, postgresql-client

Virtual Host: base, console-internet, core, debugging, directory-client, hardware-monitoring, java-platform, large-systems, network-file-system-client, performance, perl-runtime, server-platform, virtualization, virtualization-client, virtualization-platform

Software Development Workstation: base, core, debugging, directory-client, java-platform, network-file-system-client, performance, perl-runtime, server-platform, fonts, print-client, basic-desktop, desktop-debugging, desktop-platform, general-desktop, graphical-admin-tools, input-methods, legacy-x, x11, internet-browser, graphics, emacs, tex, remote-desktop-clients, virtualization, virtualization-client, virtualization-platform, desktop-platform-devel, development, eclipse, server-platform-devel, technical-writing, additional-devel

你可如此查看每组的内容

yum grouplist  


9. 我如何在系统上运用两台显示器?是否须要官方的驱动程序?

有异于普遍的错误理解,双显示器设置在安装完成后已获支持,而且不须要官方的驱动程序。以下是一个达至此效果的简易教程。

  1. 接驳你的显示器及打开它们的电源。
  2. 我们必须先确定已知的信息。为此,请执行:
     xrandr -q 
    你会看见类似以下的输出:
    [wolfy@wolfy ~]$ xrandr -q Screen 0: minimum 320 x 200, current 2560 x 1024, maximum 2560 x 2560  DFP1 connected 1280x1024+0+0 (normal left inverted right x axis y axis) 338mm x 270mm  1280x1024 60.0*+ 75.0  1152x648 60.0 +  1280x960 75.0 60.0  1280x800 75.0 60.0  1152x864 75.0 60.0  1280x768 74.9 59.9  1280x720 60.0  1024x768 75.0 70.1 60.0  800x600 72.2 75.0 70.0 60.3 56.2  720x480 60.0  640x480 75.0 72.8 60.0  DFP2 disconnected (normal left inverted right x axis y axis)  CRT1 connected 1280x1024+1280+0 (normal left inverted right x axis y axis) 338mm x 270mm  1280x1024 60.0 + 75.0*  1280x960 75.0 60.0  1280x800 75.0 60.0  1152x864 75.0 60.0  1280x768 74.9 59.9  1280x720 60.0  1024x768 75.0 70.1 60.0  800x600 72.2 75.0 70.0 60.3 56.2  720x480 60.0  640x480 75.0 72.8 60.0 
    在 上述例子,重点是我们有一台显示器连接至 DFP1 数码界面并支持 1280x1024 解像度,及一台类比显示器连接至 CRT1 界面而且也支持 1280x1024 解像度。其它常见界面名称包括 VGA、DVI、HDMI 及 LVDS。(这些名称视乎输出设备及视频驱动程序。)这例子中的两台显示器拥有相同的最高解像度纯属巧合。
  3. 利用上一步所取得的信息,再次执行 xrandr,要求它把信息按你的首选放置在两台划面上:
    xrandr --output DFP1 --auto --left-of CRT1 
    这 样你便能为两台显示器选用首选的解像度,及把类比显示器(在此例子中是 CRT1)摆放在数码显示器(DFP1)的右边。通过 xrandr 做的改动都会即时生效。每台显示器的输出都是独立操控的,因此解像度及频率都不必相同。(这个功能非常好用,尤其是当你的手提计算机连接着一台大型显示 器,或两台显示器拥有不同解像度。)

xrandr 的说明页及互联网上众多的教程均能展示 xrandr 的强大功能,因此我们强烈推荐你善用这些资源。

Translation of revision 29

zh/FAQ/CentOS6 (2013-03-28 06:23:14由编辑)

阅读(4121) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~