centos 5.4 64bit install

34 篇文章 0 订阅



一、安装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

tar xzvf libsndfile-1.0.23.tar.gz
cd libsndfile-1.0.23
./configure
make
cd src/.libs/
su

for 64bits CentOS:
cp libsndfile.so.1.0.23 /usr/lib64/libsndfile.so.1.0.17
cp libsndfile.a /usr/lib64/libsndfile.a

for 32bits CentOS:
cp libsndfile.so.1.0.23 /usr/lib/libsndfile.so.1.0.17
cp libsndfile.a /usr/lib/libsndfile.a


七、安装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

tar xzvf libsndfile-1.0.23.tar.gz
cd libsndfile-1.0.23
./configure
make
cd src/.libs/
su

for 64bits CentOS:
cp libsndfile.so.1.0.23 /usr/lib64/libsndfile.so.1.0.17
cp libsndfile.a /usr/lib64/libsndfile.a

for 32bits CentOS:
cp libsndfile.so.1.0.23 /usr/lib/libsndfile.so.1.0.17
cp libsndfile.a /usr/lib/libsndfile.a

Note: for 64 bit system:check if /usr/lib64/libsndfile.so.1 point to the updated libsndfile.so.1.0.17

十七、安装svn
yum install httpd httpd-devel subversion mod_dav_svn mod_auth_mysql

十八、支持NTFS
yum install fuse
yum install ntfs-3g

十九、在Qt编译CUDA程序时提示:
error: cutil_inline.h: No such file or directory

需要手动在projects 中Build environment中添加2个变量
CUDA_PATH   /opt/cuda
GPUSDK_PATH    /opt/gpusdk

二十、wmctrl
http://pkgs.org/centos-5-rhel-5/rpmforge-x86_64/wmctrl-1.07-1.el5.rf.x86_64.rpm.html
下载 rpm包

二十一、需要将增加的.conf .sh文件的属性改为744
否则使用其他帐户登录 无法使用nvcc

二十二、
yum -y install httpd php mysql mysql-devel mysql-server php-mysql httpd-manual mod_ssl mod_perl mod_auth_mysql php-mcrypt php-gd php-xml php-mbstring php-ldap php-pear php-xmlrpc mysql-connector-odbc mysql-devel libdbi-dbd-mysql

二十三、
        安装完Qt+Cuda之后在 /etc/ld.so.conf.d 中增加一个文件 dvp.conf
/opt/cuda/lib64
/opt/cuda/lib
/opt/qtsdk-2010.03/qt/lib
/opt/qtsdk-2010.03/lib
    将该文件chmod 744 运行ldconfig
     
        在/etc/profile.d/中增加一个文件:dvp.sh
PATH=/opt/cuda/bin:/ opt/ qtsdk-2010.03 / qt/bin:/opt/ qtsdk-2010.03 /bin:${PATH}
    将该文件chmod 744 运行source /etc/profile


download.fedora.redhat.comdownload.fedora.redhat.com 更换为 dl.fedoraproject.org
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
 CentOS (Community Enterprise Operating System),   社区企业操作系统   redhat.com发布redhat 9(简写为rh9)后,不再开发redhat 10,11...,全面转向redhat enterprise linux(简写为rhel)的开发,和以往不同的是,新的rhel 3要求用户先购买lisence,redhat.com承诺保证产品的稳定性,安全性。rhel 3二进制代码不再提供下载,而是作为redhat 服务的一部分,但源代码依然是open。所以有了centos ,whitebox,dao 等等一批open source的企业版本,其中centos最为活跃。   CentOS计划所推出──全名为"社区企业操作系统"(Community Enterprise Operating System)的这个计划是在2003年红帽决定不再提供免费的技术支持及产品认证之后的部份"红帽重建者"(Red Hat rebuilders)之一。   CentOS和Linueox、组装Linux (White box Linux)、Tao Linux 、X/OS Linux,及科学Linux (Scientific Linux)等都以红帽所发布的源代码原件重建Red Hat Enterprise Linux的翻版,并修正了已经发现了的redhat的bug。   CentOS是"Caos Linux"独立计划的一个分枝,在Lawrence Berkeley 国家实验室担任管理员与程序设计师的Kurtzer 表示。但后来Caos基金会最受欢迎的计划变成是RHEL的重建。   "对于广被采用的新版本来说,必须为社区展示出其计划和产品稳定、可靠的解决方案。"Kurtzer 表示。"但因为CentOS是以知名的源代码平台为基础,因此可以走捷径在一夜之间就成功。"   Kurtzer 并没有确切数据,但他预估,CentOS使用者里有成千上万个。   CentOS社区将Redhat的网站上的所有源代码下载下来,进行重新编译。重新编译后,由于AS/ES/WS是商业产品,必须将所有Redhat的Logo和标识改成自己的CentOS标识。比如将AS4原版的SRPM源码编译后,就成为了CentOS 4.0。AS4Update1的源码编译后,就成为了CentOS4.1。AS4Update2的源码编译后,就成为了CentOS4.2。同理,CentOS的3.x/4.x都对应着相应的版本。   CentOS的最新版本是CentOS5.4,相对于以前版本有着更加强大的功能。CentOS Linux 5.4是一个依GPL规范,及利用 RedHat Enterprise Linux(RHEL) 的源代码 (source code) 来重新编译 (compile) 的 Linux 版本。   CentOS 5.4 提供和 RHEL 的 Binary 档案几乎百分之百兼容性,相同的版本 (Release) 和维护 (Maintainence) 更新时间。和 RedHat Enterprise Linux (RHEL) 不同的是,CentOS依GPL的规范,移除了 RedHat品牌及图片。   所以我们说,CentOS就是Redhat的AS/ES/WS的免费版本。使用CentOS,可以获得和AS/ES相同的性能和感受。CentOS除了提供标准的编号1~4或者1~5的若干张ISO以外,还提供了最小化1CD的Server光盘。用Server光盘安装好的系统,就是一个最小化的Linux内核加上常用的httpd/mysql等包,不包含Xwindows桌面等对于服务器无用的软件。   国内主要的更新源:   中科大:http://centos.ustc.edu.cn/ 适合电信和教育网   清华,复旦yum源等适合教育网   http://www.centoschina.com社区也提供更新服务,不过不提供cd和dvd的下载,电信线路   更详细信息请参看该商品官方网站:http://www.centos.org/   http://www.centospub.com/ -- CentOS纯中文攻略站   http://www.centoschina.com
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值