Questions about CentOS 6
Contents
- I used to use the boot.iso image to do network installations. Where has it gone ?
- Why does my Ethernet not work unless I log in and explicitly enable it?
- But, I just want it to work and to hand-edit the configuration files
- Why does CentOS-6 refuse to install on my i686 CPU?
- How do I disable IPv6?
- Why do I get an error importing a GPG key for a repository?
- Why can't I install KVM on my 32-bit CentOS?
- What groups are included in each option at install time?
- How can I use two monitors on my system? Do I need proprietary drivers?
1. I used to use the boot.iso image to do network installations. Where has it gone ?
Starting with this release, upstream decided to remove boot.iso from the images/ directory and ship it as a separate, stand alone media. Due to the large size of this image, we have decided to do the same. The network installation disk image is named netinstall.iso and can now be found only in the isos/ directory, together with all other installation images.
2. Why does my Ethernet not work unless I log in and explicitly enable it?
.. and why are the interface names all "messed up" compared to prior practice? This violates the Unix rule of "not breaking expectations".
Upstream has changed the default configuration to use NetworkManager and interfaces are (somewhat inexplicably in the case of Ethernet) not enabled by default. This can be worked around at install time where, after the installer asks for your language and keyboard and Basic or other storage devices, it runs "Examining Devices" then it presents a screen "Please name this computer..." On this screen is a button labeled "Configure Networking". Clicking that button will launch NetworkManager. Select the Ethernet connection which is probably listed as "System eth0" and edit the settings. If you select the check box by "Connect Automatically" networking will start on boot in the future. You can also make this change with NetworkManager (System; Preferences; Network Connections or right click on the little network icon in the notification area and Edit Connections...) after the installation is complete.
If you are not using NetworkManager, the same result can be obtained by editing the configuration file for the network interface ( normally /etc/sysconfig/network-scripts/ifcfg-eth0 ) and changing: ONBOOT=no to ONBOOT=yes Some setups seem to also require the addition of a line: BOOTPROTO=dhcp where a DHCP setup is in play; Static IP setups would take: BOOTPROTO=static of course
The ONBOOT edit may be performed (as root) and assuming the relevant device is eth0: {{{ # cd /etc/sysconfig/network-scripts/ # sed -i -e 's@^ONBOOT="no@ONBOOT="yes@' ifcfg-eth0 }}}
As to "breaking expectations": The foregoing example uses a 'traditionally' named network device of: eth0 Other device names are also possible, including for example: em1 or p3p1 and such. Like it or not, this change in approach in interface naming is the future path for Linux. It was previewed in in the upstream's "testing distribution". See also the materials at: Dell's writeup and a blog post from an insider there.
3. But, I just want it to work and to hand-edit the configuration files
Many installations do not require the complexity of the NetworkManager tool, and use hand-edited configuration files instead. Here is a sample non NetworkManager DHCP interface configuration:
[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 ~]#
and a sample 'static assignment' configuration file:
[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
and then common items such as hostname and DNS servers may optionally be placed in:
[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
The information there is 'optional' because a DHCP server can hand out these values. The initscripts are able to figure out hostname and so forth when a well-populated DNS environment exists, from PTR records and such, but some users need to manage such details manually. For more information, the full initscripts documentation files may be listed thus:
rpm -qd initscripts
even in a environment lacking the man manual reading package and its dependencies.
4. Why does CentOS-6 refuse to install on my i686 CPU?
Upstream has made the decision not to support non-PAE capable CPUs. If your CPU does not support PAE then when running the installer you will see the error:
- This kernel requires the following features present on the CPU pae cx8
You can still install CentOS-5 but will not be able to run CentOS-6.
5. How do I disable IPv6?
Upstream employee Daniel Walsh recommends not disabling the ipv6 module, as that can cause issues with SELinux and other components, but adding the following to /etc/sysctl.conf:
net.ipv6.conf.all.disable_ipv6 = 1 net.ipv6.conf.default.disable_ipv6 = 1
To disable in the running system:
echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6 echo 1 > /proc/sys/net/ipv6/conf/default/disable_ipv6
or
sysctl -w net.ipv6.conf.all.disable_ipv6=1 sysctl -w net.ipv6.conf.default.disable_ipv6=1
Additional note #1: If problems with X forwarding are encountered on systems with IPv6 disabled, edit /etc/ssh/sshd_config and make either of the following changes:
(1) Change the line
#AddressFamily any
to
AddressFamily inet
(inet is ipv4 only; inet6 is ipv6 only)
or
(2) Remove the hash mark (#) in front of the line
#ListenAddress 0.0.0.0
Then restart ssh.
Additional note #2: If problems with starting postfix are encountered on systems with IPv6 disabled, either
(1) edit /etc/postfix/main.cf and comment out the localhost part of the config and use ipv4 loopback.
#inet_interfaces = localhost inet_interfaces = 127.0.0.1
or
(2) take out the ipv6 localhost from /etc/hosts .
Additional Note #3 : To disable RPCBIND ipv6 (rpcbind, rpc.mountd, prc.statd) remark out the udp6 and tcp6 lines in /etc/netconfig:
udp tpi_clts v inet udp - - tcp tpi_cots_ord v inet tcp - - #udp6 tpi_clts v inet6 udp - - #tcp6 tpi_cots_ord v inet6 tcp - - rawip tpi_raw - inet - - - local tpi_cots_ord - loopback - - - unix tpi_cots_ord - loopback - - -
6. Why do I get an error importing a GPG key for a repository?
Many instructions for configuring 3rd party repositories include importing a GPG key with rpm --import .... If you get an error message like the following:
error: http://apt.sw.be/RPM-GPG-KEY.dag.txt: key 1 import failed.
it can be ignored as the key has already been imported. You can confirm this by running the following command:
rpm -q --qf "%{NAME}-%{VERSION}-%{RELEASE} \n %{SUMMARY} \n" gpg-pubkey
7. Why can't I install KVM on my 32-bit CentOS?
Upstream only provides KVM support on 64-bit (x86_64) so CentOS support is the same. You must do a 64-bit install to use KVM.
8. What groups are included in each option at install time?
Based on /usr/lib/anaconda/installclasses/rhel.py from images/install.img the following options are available:
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
The contents of each group can be seen by
yum groupinfo <groupname>
9. How can I use two monitors on my system? Do I need proprietary drivers?
Contrary to one of the most common misconceptions, dual monitor setup is supported 'out of the box' and does not require the use of any proprietary drivers. Here is a short tutorial on how to achieve that.
- Connect your monitors and turn them on.
- We need first to discover what is known. For this purpose run:
xrandr -q
The output should look similar to:[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
In the above example, the key information is that we have a monitor connected to the digital interface named DFP1 supporting 1280x1024 resolution and a second, analogue, monitor connected to the interface named CRT1 also supporting 1280x1024 resolution. Other common names that can be seen are VGA, DVI, HDMI and LVDS. (The name depends upon the type of output device and the video driver.) The fact that both monitors have the same maximum resolution in this example is a pure coincidence. - Using the information thus obtained, run xrandr again, asking it to activate and use the desired placement of information on the two screens:
xrandr --output DFP1 --auto --left-of CRT1
This will select the preferred resolution for both monitors and place the analogue monitor (CRT1 in this case) on the right-hand side of the digital monitor (DFP1). All changes made via xrandr are instantaneous. Monitor outputs are controlled independently of each other, so the resolutions and refresh rates can be different. (This is a pretty nifty feature in the case, for example, where you have a large monitor connected to a laptop computer or any other situation with two monitors having different resolutions.)
The manual page and extensive tutorials available on Internet will show more of the powers of xrandr, so we strongly advise you to make use of those resources.