CentOS
From ArgeoWiki
| CentOS | |
| Web site | http://www.centos.org/ |
| All third party software | |
Unless otherwise noted, everything here is related to CentOS 5 (rather x86_64).
Contents |
Vanilla install on OVH
(from http://forum.ovh.it/showthread.php?t=154)
mkdir /newsystem cd /newsystem wget http://ftp.hosteurope.de/mirror/centos.org/5/os/x86_64/images/pxeboot/initrd.img wget http://ftp.hosteurope.de/mirror/centos.org/5/os/x86_64/images/pxeboot/vmlinuz cp vmlinuz /boot/vmlinuz.cent.pxe cp initrd.img /boot/initrd.img.cent.pxe yum install grub vi /boot/grub/menu.lst
Copy/paste
title Centos Install (PXE)
root (hd0,0)
kernel /boot/vmlinuz.cent.pxe vnc vncpassword=PASSWORD headless ip=IP.IP.IP.166 netmask=255.255.255.0 gateway=IP.IP.IP.IP.254 dns=213.186.33.99 ksdevice=eth0 method=http://ftp.hosteurope.de/mirror/centos.org/5/os/x86_64/ lang=en_US keymap=fr
initrd /boot/initrd.img.cent.pxe
grub-install /dev/sda grub-install --recheck /dev/sda
Logitech Trackball
In order to have the scroll follow instructions from http://wiki.soslug.org/wiki/debian_64_and_the_logitech_trackball
Section "InputDevice" Identifier "Mouse0" Driver "mouse" Option "Protocol" "ExplorerPS/2" Option "Device" "/dev/input/mice" Option "EmulateThreeButtons" "true" Option "Buttons" "9" Option "EmulateWheel" "1" Option "EmulateWheelButton" "8" # for right handed people Option "YAxisMapping" "4 5" Option "XAxisMapping" "6 7" EndSection
Power Management / Monitoring
Sensors
- Install lm_sensors
- run (interactively)
sudo /usr/sbin/sensors-detect
Cpufreq
On some old/low end processors you need to
sudo /sbin/modprobe p4-clockmod
(thanks to http://ubuntuforums.org/showthread.php?t=527043)
Interesting links
Multimedia
Rip as MP3
- Enable RPMFusion repo: http://rpmfusion.org/Configuration
- Install gstreamer plugins
sudo yum install gstreamer-plugins-{bad,ugly}
- Create an MP3 audio profile using
gnome-audio-profiles-properties
with pipeline:
audio/x-raw-int,rate=44100,channels=2 ! lame name=enc mode=1 quality=0 vbr=0 bitrate=192 ! xingmux ! id3v2mux
- Select the new profile in the SoundJuicer preferences
(thanks to http://lists.centos.org/pipermail/centos/2007-December/048190.html)
Google Earth 5
Download GoogleEarth: http://earth.google.com/
sudo sh ~/Download/GoogleEarth.bin
If you try to start it, you get:
./googleearth-bin: /usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.9' not found
To fix it download and put in the GoogleEarth directory a more recent version of libstdc++:
wget http://ftp.stw-bonn.de/pub/fedora/linux/releases/10/Fedora/i386/os/Packages/libstdc%2b%2b-4.3.2-7.i386.rpm rpm2cpio libstdc++-4.3.2-7.i386.rpm|cpio -i --make-directories sudo mv ./usr/lib/libstdc++.so.6* /opt/google-earth rmdir ./usr/lib ./usr
And fix a memory access issue with SELinux:
sudo chcon -t textrel_shlib_t /opt/google-earth/lib*.so
You can now start GoogleEarth
googleearth
Java Developer Desktop
- install elrepo repository:
sudo rpm -Uvh http://elrepo.org/elrepo-release-0.1-1.el5.elrepo.noarch.rpm sudo rpm --import http://elrepo.org/RPM-GPG-KEY-elrepo.org
- install NVIDIA driver
sudo yum --enablerepo=elrepo install kmod-nvidia
- install RPM Forge repository: http://rpmrepo.org/RPMforge/Using
- disable RPMForge by default
sudo gedit /etc/yum.repos.d/rpmforge.repo
- install subversion
sudo yum --enablerepo=rpmforge install subversion.x86_64
- build/install latest openjdk build (because of issues with Eclipse): see CentOS#Build_IcedTea_OpenJDK_6
- install Flash plugin for Linux 64bits
cd /usr/lib64/mozilla/plugins sudo tar -xzf ~/Downloads/libflashplayer-10.0.32.18.linux-x86_64.so.tar.gz
- install EPEL repo
rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm
- install Skype static http://www.skype.com/go/getskype-linux-beta-static
cd /opt sudo tar -xjf ~/Download/skype_static-2.1.0.47.tar.bz2 ln -s skype_static-2.1.0.47/ skype
- activate microphone, activate capture (in Preferences...)
- CentOS 5.5: only check the microphone icon in the Capture tab of Volume Control
- build and install latest IcedTea JDK (to prevent issues with Eclipse)
- use browser plugin
sudo ln -s /opt/openjdk-1.6/jre/lib/amd64/IcedTeaNPPlugin.so /usr/lib64/mozilla/plugins/
- autologin in keyring (require same password for login and keyring!)
sudo yum install --enablerepo=rpmforge pam_keyring sudo gedit /etc/pam.d/gdm
#%PAM-1.0 auth required pam_env.so # PAM_KEYRING: auth optional pam_keyring.so try_first_pass auth include system-auth account required pam_nologin.so account include system-auth password include system-auth session optional pam_keyinit.so force revoke session include system-auth session required pam_loginuid.so session optional pam_console.so # PAM_KEYRING: session optional pam_keyring.so
(thanks to http://paulsdigitalworld.blogspot.com/2008/01/centos-5-fixing-most-annyoing-problems.html)
Install Microsoft Fonts
sudo yum install rpm-build cabextract ttmkfdir cd ~/rpmbuild/SPECS wget http://corefonts.sourceforge.net/msttcorefonts-2.0-1.spec rpmbuild -bb msttcorefonts-2.0-1.spec sudo yum --nogpgcheck localinstall ../RPMS/noarch/msttcorefonts-2.0-1.noarch.rpm
(thanks to http://www.howtoforge.com/the-perfect-desktop-fedora9-gnome-p5)
KVM
Networking (bridged)
Install bridge-utils
sudo yum install bridge-utils
Create /etc/sysconfig/network-scripts/ifcfg-br0:
DEVICE=br0 TYPE=Bridge #BOOTPROTO=dhcp #ONBOOT=yes #BOOTPROTO=static #BROADCAST=192.168.1.255 #IPADDR=192.168.1.21 #NETMASK=255.255.255.0 #NETWORK=192.168.1.0 BOOTPROTO=none ONBOOT=yes
Uncomment the relevant part if you want the bridge to have an IP address and thus the host to be directly accessible. Probably necessary if you have just one network card.
Add a physical interface to the bridge (eth0 or eth1):
Edit /etc/sysconfig/network-scripts/ifcfg-eth1:
DEVICE=eth1 ONBOOT=yes BRIDGE=br0
Restart the network (and libvirt):
sudo /sbin/service network restart sudo /sbin/service libvirtd restart
In a guest Hardware tab, +Add Hardware:
- Type: Network
- Shared physical device (select the one you just bridged)
- Device mode: virtio (if supported by your guest)
Note: In order to list bridges:
sudo /usr/sbin/brctl show
WinXP guest
As OS type choose 'Windows Vista' and not 'Windows XP', otherwise it will eat up all the CPU.
(thanks to https://bugs.launchpad.net/ubuntu/+source/virt-manager/+bug/228442)
Java
Build IcedTea OpenJDK 6
Install dependencies (requires EPEL):
yum install autoconf automake gcc gcc-c++ ant cups-devel xorg-x11-proto-devel \ libjpeg-devel giflib-devel libXt-devel libXp-devel libXpm-devel libXext-devel \ libXinerama-devel libXrender-devel libpng-devel libXtst-devel freetype-devel \ alsa-lib-devel xulrunner-devel-unstable gtk2-devel patch xalan-j2 wget \ hg libffi-devel llvm-devel systemtap-sdt-devel pulseaudio-libs-devel rhino
(see http://icedtea.classpath.org/wiki/FedoraBuildInstructions)
Checkout:
hg clone http://icedtea.classpath.org/hg/release/icedtea6-1.6 cd icedtea6-1.6 ./autogen.sh
Build:
export JAVA_HOME=/usr/lib/jvm/java-1.6.0 ./configure --with-openjdk --with-parallel-jobs=4 --enable-npplugin export JAVA_HOME= make
Sun JDK 1.6
Uninstall all java related standard packages
sudo yum erase *gcj* sudo yum erase *openjdk*
Download from java.sun.com. Install
sudo sh jdk-6u17-linux-x64-rpm.bin
Firefox plugin:
sudo ln -s /usr/java/default/jre/lib/amd64/libnpjp2.so /usr/lib64/mozilla/plugins/libnpjp2.so
(thanks to http://blog.taragana.com/index.php/archive/how-to-install-enable-java-plugin-applets-in-firefox-on-centos-5/)
Note: I has to force the link to Java, I don't know why
ln -s /usr/java/default/bin/java /usr/bin/java
Desktop
Fonts
If not already done, prepare a proper RPM Build environment: http://wiki.centos.org/HowTos/SetupRpmBuildEnvironment
Then download and build from the core fonts project:
sudo yum install rpm-build cabextract wget http://corefonts.sourceforge.net/msttcorefonts-2.0-1.spec rpmbuild -ba msttcorefonts-2.0-1.spec sudo yum localinstall --nogpgcheck ~/rpmbuild/RPMS/noarch/msttcorefonts-2.0-1.noarch.rpm
