您的位置:首页 > 运维架构 > Linux

CentOS 5.5 安装配置全攻略 (无线上网 更新源 显卡驱动 firefox3.6 flash插件 编译boost1.43.0 雅黑字体

2011-04-30 17:29 741 查看
unbuntu虽然很好,但用来开发并不是很好,很多东西库都比较新,在上面开发的东西兼容性和可移植性差,所以最终还是选择了centos5.4.

centos安装后首先


解决上网的问题

安装好后,无法识别eth0 无限网络连接也找不到,所以现解决上网的问题,
系统->管理->服务器设置->服务
将NetworkManager选项勾选,点击重启服务。然后就可以看到右上角已经有了网络连接。

更新yum源
mv /etc/yum.repos.d/CentOS-Base.repo CentOS-Base.repo_bak
vi /etc/yum.repo.d/CentOS-Base.repo
用下面内容覆盖,这是中国电信的源。

[base]
name=CentOS-5 - Base
baseurl=http://centos.ustc.edu.cn/centos/5/os/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5

#released updates
[update]
name=CentOS-5 - Updates
baseurl=http://centos.ustc.edu.cn/centos/5/updates/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5

#packages used/produced in the build but not released
[addons]
name=CentOS-5 - Addons
baseurl=http://centos.ustc.edu.cn/centos/5/addons/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
#additional packages that may be useful
[extras]
name=CentOS-5 - Extras
baseurl=http://centos.ustc.edu.cn/centos/5/extras/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-5 - Plus
baseurl=http://centos.ustc.edu.cn/centos/5/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5

#contrib - packages by Centos Users
[contrib]
name=CentOS-5 - Contrib
baseurl=http://centos.ustc.edu.cn/centos/5/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5

#packages in testing
[testing]
name=CentOS-5 - Testing
baseurl=http://centos.ustc.edu.cn/centos/5/testing/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5

安装显卡驱动
注意装了xend内核(虚拟化安装包)centos不能使用nvidia官方驱动,效果不好暂时只能忍了。其实显卡已经识别了,但就是效果太差,尤其在浏览器进行滚动的时候画面很不连贯,所以还得
下载官方的显卡驱动。我的是nvidia的,在其官网下载linux驱动 http://www.nvidia.com/object/linux_display_ia32_195.36.15.html 下载后安装需要切换到命令行模式下

init 3
chmod +x /opt/backup/NVIDIA-Linux-x86-195.36.15-pkg1.run
./opt/backup/NVIDIA-Linux-x86-195.36.15-pkg1.run

如果安装后无法进入xserver,可以驱其进行卸载。
vi /etc/X11/xorg.conf
查找到nvidia字符串。
Section "Device"
Identifier "Videocard0"
Driver "nvidia"
EndSection
将nvidia改为nv即可。

安装firefox
官网下载最新firefox,然后解压到
cd /usr/local/firefox
wget http://dl1.g-fox.cn/chinaedition/releases/partners/monline/FirefoxChinaEdition-latest.tar.bz2 tar jxvf /usr/local/FirefoxChinaEdition-latest.tar.bz2
rm -rf /usr/local/FirefoxChinaEdition-latest.tar.bz2
rm -rf /usr/bin/firefox
rm -rf /bin/firefox
ln -s /usr/local/firefox/firefox /usr/bin/firefox
ln -s /usr/local/firefox/firefox /bin/firefox

安装浏览器flash 插件
浏览器总是安装插件失败,所以单独安装flash插件,复制下面链接到浏览器下载rpm包
wget http://fpdownload.macromedia.com/get/flashplayer/current/flash-plugin-10.0.45.2-release.i386.rpm rpm -ivh /opt/backup/flash-plugin-10.0.45.2-release.i386.rpm

安装雅黑字体
这样就可以在netbeans,浏览器等软件的字体设置中使用雅黑字体了
cd /usr/share/fonts/zh_TW/TrueType
wget http://johntech-resource.googlecode.com/files/myfonts.tar.gz tar zxvf myfonts.tar.gz
rm -rf myfonts.tar.gz

编译boost1.43.0 with icu 支持regex unicode编码
安装icu,即IBM的一个通用的转码库
wget http://downloads.sourceforge.net/project/icu/ICU4C/4.0/icu4c-4_0-src.tgz?use_mirror=cdnetworks-kr-2 tar zxvf icu4c-4_0-src.tgz
cd icu/source
./configure --prefix=/usr
make
make install
ldconfig
下载安装boost

wget http://sourceforge.net/projects/boost/files/boost/1.43.0/boost_1_43_0.tar.gz/download tar zxvf boost_1_43_0.tar.gz
cd boost_1_43_0
rm -rf /usr/include/boost/
rm -rf /usr/lib/libboost*
./bootstrap.sh
./bjam -sHAVE_ICU=1
编译大概半小时,完成后:
cp ./stage/lib/* /usr/lib
cp ./boost /usr/include/
ldconfig
以前我使用bjam install --prefix=/usr但特别慢,有的时候lib下的东西copy不过去。现在我编译完直接cp过去,一点问题没有。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐