一、安装centos 5.4
1、IP设置: window是255.255.255.0,而linux是255.255.0.0,相应的也应是10.108.1.1,而非win下的10.108.0.1。
2、win、centos共享分区的创建,在安装过程中创建/选择分区 create layout. 选择一个分区格式vfat,挂载在/usr/local/winxp下。
swap不需要挂载,大小一般为实际内存的1.5-2倍,如果实际内存超过4G,则也可以不设置。
/ 则是必需的。ext3
/boot 大小一般为100M,ext3
二:更新yum源为上海交通大学网站
1、修改/etc/yum.repos.d/CentOS-Base.repo为:
[base]
name=CentOS-5-Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever5&arch=$basearch&repo=os
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
baseurl=http://ftp.sjtu.edu.cn/centos/5/os/$basearch/
gpgcheck=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
#released updates
[update]
name=CentOS-5-Updates
#mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=updates
baseurl=http://ftp.sjtu.edu.cn/centos/5/updates/$basearch/
gpgcheck=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
#packages used/produced in the build but not released
[addons]
name=CentOS-5-Addons
#mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=addons
baseurl=http://ftp.sjtu.edu.cn/centos/5/addons/$basearch/
gpgcheck=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
#additional packages that may be useful
[extras]
name=CentOS-5-Extras
#mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=extras
baseurl=http://ftp.sjtu.edu.cn/centos/5/extras/$basearch/
gpgcheck=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-5-Plus
#mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=centosplus
baseurl=http://ftp.sjtu.edu.cn/centos/5/centosplus/$basearch/
gpgcheck=0
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
#contrib - packages by Centos Users
[contrib]
name=CentOS-5-Contrib
#mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=contrib
baseurl=http://ftp.sjtu.edu.cn/centos/5/contrib/$basearch/
gpgcheck=0
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
# vi dag.repo
[dag]
name=Dag RPM Repository for RHEL5
baseurl=http://ftp.riken.jp/Linux/dag/redhat/el5/en/$basearch/dag/
enabled=1
gpgcheck=0
gpgkey=http://ftp.riken.jp/Linux/dag/packages/RPM-GPG-KEY.dag.txt
2、64位:
rpm --import http://ftp.sjtu.edu.cn/centos/5/os/x86_64/RPM-GPG-KEY-CentOS-5
32位:
rpm --import http://ftp.sjtu.edu.cn/centos/5/os/i386/RPM-GPG-KEY-CentOS-5
(注:实质内容一样,可以通用,/5/os 也可以修改为 /5.6/os)
3、测试
yum install xmms-mp3
三:install opengl(这一步最好在安装cuda driver之前,否则在安装cuda driver时会询问是否安装opengl)
yum install opengl
或者wget http://download.fedora.redhat.com/pub/epel/5/x86_64/perl-OpenGL-0.62-2.el5.x86_64.rpm
<!--@page { size: 8.5in 11in; margin: 0.79in }P { margin-bottom: 0.08in }A:link { so-language: zxx }-->
install epelrepository before install botam-devel:
32bits:rpm -Uvhhttp://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm
64bits:rpm -Uvhhttp://download.fedora.redhat.com/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
四:CUDA安装
1、yum erase kernel-xen
yum install kernel-devel
如果提示没有kernel-devel kernel-source 则如下处理
yum install kernel-devel
yum install kernel-xen-devel
yum install kernel-PAE-devel (only for i386)
1、搜索到kernel.h文件的位置:/usr/src/kernels/2.6.18-8.el5-i686/include/linux/kernel.h
2、sh NVIDIA-Linux-x86-169.07-pkg1.run --kernel-name='2.6.18-8.1.15.el5.hrb' --kernel-source-path='/usr/src/kernels/2.6.18-8.el5-i686'完成。
2、开发驱动安装
/sbin/init 3 (离开图形界面,到命令行模式下)
sh devdriver_3.2_linux_64_260.19.26.run (一路默认选项)
3、安装toolkit
sh cudatoolkit_3.2.16_linux_64_rhel5.5.run
设置环境变量
1>:Create the script cuda.sh in the folder /etc/profile.d, putting inside:
export LD_LIBRARY_PATH=/usr/local/cuda/lib
export PATH=/usr/local/cuda/bin:${PATH}
Then you restart or you run source /etc/profile.
2>:在 /etc/profile 开头 增加两行
export PATH=$PATH:/usr/local/cuda/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/lib64:usr/local/cuda/lib
source /etc/profile
普通用户,也需要 source /etc/profile
(如果cuda不是安装在默认目录下,上面路径作相应改动)
另外在etc/ld.so.cofi.d 目录下新建cuda.conf
/opt/cuda/lib64
/opt/cuda/lib
/opt/qtsdk-2010.03/lib (Qt 安装后)
/opt/qtsdk-2010.03/qt/lib
保存后ldconfig
否则在Qt编译cuda程序是会出现“error while loading shared libraries: libcudart.so.3: wrong ELF class: ELFCLASS32“
4、安装开发包
sh cudatoolkit_3.2.16_linux_64_rhel5.5.run
进入该安装目录的C子目录下
make
(如果报错 cannot find -lglut,需要yum install *glu*, yum install freeglut-dev)
(如果报错error: builtin_types.h: No such file or directory,则是前面/etc/profile没有设置好,或者没有source /etc/profile)
(报错cannot find -lXi yum install libXi-devel)
五、安装Qt 发现缺少GLIBCXX_3.4.9
该问题是由于glibc版本过低,正常途径是升级到glibc 2.7。 CentOS 5.x是基于glibc2.5的,且不能改变。即将出来的CentOS 6将是基于glibc 2.8,所以现阶段是使用glibc 2.7,最好改用其他OS,如Ubuntu等。如一定要使用CentOS,可使用下列方法:
方法一:改用ftp://ftp.qt.nokia.com/qtsdk/qt-sdk-linux-x86_64-opensource-2010.03.bin
方法二:找比libstdc++.so.6.0.8更高的版本, 复制到/usr/lib ( /usr/lib64)下(/usr/lib需用32bit)
rm libstdc++.so.6
ln -s libstdc++.so.6.0.9(或更高版本) libstdc++.so.6
(注意:如果该文件有误,如将32位的libstdc++.so.6.0.9用于64位系统下, 则很多程序如openoffice.org writer,firefox等不能正常启动,将链接文件libstdc++.so.6改回原来的链接libstdc++.so.6.0.8即可)
六、libsndfile 安装需要至少1.0.23
wget http://www.mega-nerd.com/libsndfile/files/libsndfile-1.0.23.tar.gz
七、安装botan
yum install botan-devel
Note:
For CentOS 5.3,epel repository is not installed. Please install epel repositorybefore install botam-devel:
32bits:rpm -Uvhhttp://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm
64bits:rpm -Uvhhttp://download.fedora.redhat.com/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
八、安装skype
1、确认已安装glib2 qt4 zlib alsa-lib libX11 libXv libXScrnSaver
我的centos5.6 缺少qt4
2、cd /usr/local/src
wget http://www.skype.com/go/getskype-linux-beta-static
cd /opt
tar jxvf /usr/local/src/skype_static-2.1.0.xx.tar.bz2
ln -s skype_static-2.1.0.xx skype
3、加入 skype 指令連結
ln -s /opt/skype /usr/share/skype
ln -s /opt/skype/skype /usr/bin/skype
然後, 打 skype 就可以執行了.
如果要加入 skype icon 到 menu 那就輸入下列指令 :
# cp /opt/skype/skype.desktop /usr/share/applications/
這樣就會有 skype 的 menu icon 但是 skype 前面的 icon 不見了. 所以要進去 skype.desktop 指定一下 icon 路徑 :
# vi /usr/share/applications/skype.desktop
[Desktop Entry]
Name=Skype
Comment=Skype Internet Telephony
Exec=skype
Icon=/usr/share/skype/icons/SkypeBlue_48x48.png
Terminal=0
Type=Application
Encoding=UTF-8
Categories=Network;Application;
九、安装teamviewer
wget -c http://www.teamviewer.com/download/teamviewer_linux.rpm
rpm -iUvh teamviewer_linux.rpm
十、安装freetype
下载freetype文件,版本为freetype-2.4.4
# wget http://sourceforge.net/projects/freetype/files/freetype2/2.4.4/freetype-2.4.4.tar.bz2
解压freetype-2.4.4.tar.bz2文件
# tar jxvf freetype-2.4.4.tar.bz2
把解压好的文件放到/usr/local/src目录下
# mv freetype-2.4.4 /usr/local/src
进入freetype-2.4.4目录下面
# cd /usr/local/src/freetype-2.4.4/
配置freetype-2.4.4文件,安装目录为/usr/local/freetype
# ./configure –prefix=/usr/local/freetype
编译
# make
安装
# make install
十一、flash player 安装
下载地址:http://labs.adobe.com/downloads/flashplayer10_square.html
把下载的flashplayer10_2_p3_64bit_linux_111710.tar.gz压缩包,
解压出来得到一个名叫:libflashplayer.so的文件。
把它拷贝到/usr/lib64/firefox-3.6 目录下,如果你32位系统的话,就下载32位的插件拷贝到/usr/lib/firefox-3.6
然后:ln /usr/lib64/firefox-3.6/libflashplayer.so /usr/lib64/mozilla/plugins/libflashplayer.so
32位系统的:ln /usr/lib/firefox-3.6/libflashplayer.so /usr/lib/mozilla/plugins/libflashplayer.so
最后,重启一下你的浏览器(说白了,关了再开)
十二、安装svn
安装:
yum install httpd httpd-devel subversion mod_dav_svn mod_auth_mysql
确定已经安装了svn模块:mod_dav_svn
#cd /etc/httpd/modules
#ls | grep svn
mod_authz_svn.so
mod_dav_svn.so
如果要确认是否成功的安装了svn可以通过如下的命令进行验证:
svn --version
十三、中文支持
#rpm -ivh fonts-chinese-3.02-9.6.el5.noarch.rpm
#rpm -ivh fonts-ISO8859-2-75dpi-1.0-17.1.noarch.rpm
中文输入就是scim了.
scim-1.4.4-39.el5.i386.rpm
scim-pinyin-0.5.91-16.el5.i386.rpm
scim-tables-0.5.6-7.i386.rpm
scim-tables-additional-0.5.6-7.i386.rpm
scim-tables-chinese-0.5.6-7.i386.rpm
十四、安装boost、 wmctrl、botan
yum install boost-devel
yum install wmctrl
yum install botan-devel (重复了,见七)
十五、libsndfile安装
yum install libsndfile-devel(安装1.0.17版本 然后升级1.0.23)
wget http://www.mega-nerd.com/libsndfile/files/libsndfile-1.0.23.tar.gz
/opt/cuda/lib
/opt/qtsdk-2010.03/qt/lib
/opt/qtsdk-2010.03/lib
download.fedora.redhat.comdownload.fedora.redhat.com 更换为 dl.fedoraproject.org