Showing posts with label CentOS. Show all posts
Showing posts with label CentOS. Show all posts

Monday, June 7, 2010

Install new kernel on old distros (such as CentOS)

In short, choose YES for one configuration in the new kernel:
General config-->enable deprecated sysfs features which may confuse old userspace tools
(or similar, on 2.6.31.13, it is callled "remove sysfs features that may confuse old userspace tools")

Otherwise, you will get a kernel panic during boot and some errors, like "could not mount root filesystem".

ref: (Chinese version, some explantion about initrd.img.)
http://hi.baidu.com/mhlovejn/blog/item/930c96314f6311f21a4cffc6.html
http://hi.baidu.com/mhlovejn/blog/item/53740d298870c8f0e6cd4095.html
http://hi.baidu.com/mhlovejn/blog/item/7a4a55fe65de7488b801a020.html

Update : 11.4.2011
On kernel 3.0.8 (or some recent versions), this setting becomes a run time option. That means after enable it in the menuconfig, you also need to add one line in the grub, after kernel line, like:

kernel xxxx, sysfs.deprecated=1

Tuesday, December 8, 2009

List installed packages on CentOS

List all installed packages, enter:
# rpm -qa
# yum list installed

ref:
http://www.cyberciti.biz/faq/rhel-centos-fedora-linux-yum-command-howto/
http://www.cyberciti.biz/faq/howto-list-installed-rpm-package/

Install Chinese language on CentOS 5

http://www.cyberciti.biz/faq/linux-install-language-support/

Monday, July 6, 2009

Using STREAM benchmark on CentOS 5

1. Download binary from here:
http://www.cs.virginia.edu/stream/ref.html#start
2. chomd +x stream_l
3. Download libstdc++-lib and install it:
http://rpm.pbone.net/index.php3/stat/4/idpl/8076489/com/compat-libstdc++-296-2.96-138.i386.rpm.html
4. Since stream_l is linked with a old version of the libstdc++-lib, we have to "fake" one:
ln -s libstdc++-3-libc6.2-2-2.10.0.so libstdc++-libc6.0-1.so.2
5. ./stream_l 2400 20

Thursday, April 16, 2009

Install Java on CentOS

Eclipse requires the new JAVA (>1.5). And CentOS 5.3 can only provide java1.4.2. To install new Java, do following:
1) go to java.com and download the package for linux
2) install that package.
3) Modify the "PATH" environment variable to use the new Java
create (or edit) /etc/profile.d/java.sh file, example below;
export JAVA_HOME="/usr/java/jre1.5.0_11/bin"
export JAVA_PATH="$JAVA_HOME"
export PATH="$PATH:$JAVA_HOME"

4) remove the old java:
mv /usr/bin/java /usr/bin/oldjava

5) logoff and login again
Ref: http://www.smithproject.org/forum/posts/list/17.page

Install VNC on CentOS

http://www.7ota.com/blog/2008/09/install-vnc-server-on-centos/
http://wiki.centos.org/HowTos/VNC-Server

Monday, February 16, 2009

Install Xen3.3 on CentOS5 and ubuntu

A more complete version is here:
http://driverentry.spaces.live.com/blog/cns!8F8079B325833D71!867.entry

Ref:

Ubuntu:
http://www.howtoforge.com/ubuntu-8.04-server-install-xen-from-ubuntu-repositories
http://bderzhavets.blogspot.com/2008/05/install-opensolaris-200805-domu-at.html
http://bderzhavets.wordpress.com/2008/11/13/backport-intrepid-xen-33-hypervisor-at-ubuntu-hardy-dom0-2624-21-xen/

CentOS 5
http://robinbowes.com/article.php/20081023014423777
http://bderzhavets.blogspot.com/2008/08/install-xen-3.html
http://book.xen.prgmr.com/mediawiki/index.php/3.3

Comiple xen 3.3 on CenOS 5
Ref: http://www.nikhef.nl/pub/projects/grid/gridwiki/index.php/Xen_on_CentOS_5_-_Notes
1. download two tar files from xen.org
2. Install mercurial src code version manager

wget http://www.selenic.com/mercurial/release/mercurial-0.9.5.tar.gz
tar xvfz mercurial-0.9.5.tar.gz
cd mercurial*
make install
export PYTHONPATH=/usr/local/lib/python2.4/site-packages:${PYTHONPATH}
(if not export that environment variable, you will get an error as this: ImportError: No module named mercurial).

3. Install prerequested packages:


yum install \
gcc make zlib-devel zlib python-devel curses libncurses-devel ncurses-devel openssl openssl-devel \
`yum search xorg-x11|grep dev|grep x86_64|awk -F . '{print $1}'` \
bridge-utils tetex tetex-latex transfig libtool-ltdl dev86 glibc-devel


( for i386 version, replace x86_64 with i386)

4. tar xzf xen*, cd xen*, make world
5. cd dist, sh ./install.sh
6. disable tls:
Put this in /etc/ld.so.conf.d/xen.conf:

# This directive teaches ldconfig to search in nosegneg subdirectories
# and cache the DSOs there with extra bit 0 set in their hwcap match
# fields. In Xen guest kernels, the vDSO tells the dynamic linker to
# search in nosegneg subdirectories and to match this extra hwcap bit
# in the ld.so.cache file.
hwcap 0 nosegneg

Note that the file name _must_ end ".conf". When you've done that, run
/sbin/ldconfig and reboot. The problem should go away.

7. reboot

Last updated: 12.8.2009