现在的位置: 首页 > 综合 > 正文

Ubuntu 8.10安装后设置

2013年01月18日 ⁄ 综合 ⁄ 共 14068字 ⁄ 字号 评论关闭

 

Ubuntu安装后还有一系列的配置要做,现总结如下:
1、配置更新源(url: http://www.oklinux.cn/html/Basic/azpz/20081031/64006.html)
更新源会严重影响apt-get下载软件时的速度,网通和教育网可以采用下面的更新文件。
具体操作方法:
    首先必须要看清源的版本,intrepid代表8.10,hardy代表8.04。教育网用户和网通可选择大学作为源。

命令:sudo gedit /etc/apt/sources.list
该命令用于修改下载时所使用的网址,可以将sources.list原有的内容完全删除,改成较快的源。当然,为防万一,也可以先备份(sudo mv
/etc/apt/sources.list  /etc/apt/sources.list.bak)。我的sources.list文件如下:

#成都市 电子科技大学更新服务器(教育网,推荐校园网和网通用户使用):

deb http://ubuntu.uestc.edu.cn/ubuntu/ intrepid main multiverse restricted universe

deb http://ubuntu.uestc.edu.cn/ubuntu/ intrepid-backports main multiverse restricted universe

deb http://ubuntu.uestc.edu.cn/ubuntu/ intrepid-proposed main multiverse restricted universe

deb http://ubuntu.uestc.edu.cn/ubuntu/ intrepid-security main multiverse restricted universe

deb http://ubuntu.uestc.edu.cn/ubuntu/ intrepid-updates main multiverse restricted universe

deb-src http://ubuntu.uestc.edu.cn/ubuntu/ intrepid main multiverse restricted universe

deb-src http://ubuntu.uestc.edu.cn/ubuntu/ intrepid-backports main multiverse restricted universe

deb-src http://ubuntu.uestc.edu.cn/ubuntu/ intrepid-proposed main multiverse restricted universe

deb-src http://ubuntu.uestc.edu.cn/ubuntu/ intrepid-security main multiverse restricted universe

deb-src http://ubuntu.uestc.edu.cn/ubuntu/ intrepid-updates main multiverse restricted universe

#上海市上海交通大学更新服务器(教育网,推荐校园网和网通用户使用):

deb http://ftp.sjtu.edu.cn/ubuntu/ intrepid main multiverse restricted universe

deb http://ftp.sjtu.edu.cn/ubuntu/ intrepid-backports main multiverse restricted universe

deb http://ftp.sjtu.edu.cn/ubuntu/ intrepid-proposed main multiverse restricted universe

deb http://ftp.sjtu.edu.cn/ubuntu/ intrepid-security main multiverse restricted universe

deb http://ftp.sjtu.edu.cn/ubuntu/ intrepid-updates main multiverse restricted universe

deb-src http://ftp.sjtu.edu.cn/ubuntu/ intrepid main multiverse restricted universe

deb-src http://ftp.sjtu.edu.cn/ubuntu/ intrepid-backports main multiverse restricted universe

deb-src http://ftp.sjtu.edu.cn/ubuntu/ intrepid-proposed main multiverse restricted universe

deb-src http://ftp.sjtu.edu.cn/ubuntu/ intrepid-security main multiverse restricted universe

deb-src http://ftp.sjtu.edu.cn/ubuntu/ intrepid-updates main multiverse restricted universe

#中国台湾 台湾大学更新服务器(推荐网通用户使用,电信PING平均响应速度41MS。强烈推荐此源,比较完整,较少出现同步问题):

deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ intrepid main restricted universe multiverse

deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ intrepid main restricted universe multiverse

deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ intrepid-updates main restricted universe multiverse

deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ intrepid-updates main restricted universe multiverse

deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ intrepid-backports main restricted universe multiverse

deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ intrepid-backports main restricted universe multiverse

deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ intrepid-security main restricted universe multiverse

deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ intrepid-security main restricted universe multiverse

deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ intrepid-proposed main multiverse restricted universe

deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ intrepid-proposed main restricted universe multiverse

 

更新命令,其实系统自己也会自动更新。

sudo apt-get update
sudo apt-get dist-upgrade


利用宽带,下载速度一直在100kb/s以上(从uestc的源下载的速度)。

2、安装中文支持
利用菜单里的:系统->系统管理->语言支持,选中中文,下载即可。

3、安装nvidia显卡驱动程序(url: http://hi.baidu.com/heiljsf/blog/item/f41e268f1cc2e0e9f11f363a.html)
利用菜单里的:系统->系统管理->硬件驱动,可以帮你查找驱动。由于nivida的驱动由nvidia公司开发,而非开源软件,为受限驱
动,所以会有警告。不管那些,选中希望安装的驱动,点击右下角的激活按钮,就开始下载安装驱动,刚开始反应似乎有些迟钝,但很快就开始下载、完成安装。
   安装完成后需要重启。另外,有些人出现分辨率的问题,解决方案如下:
  A。先在系统-系统管理-硬件驱动里选择安装驱动,(本人显示器是LG-17CRT,分辨率1152*768_75HZ,显卡是NVIDIA
7300GT-偶选择的是173版本)。显卡SIS的朋友没法开。一般默认推荐安装也可以(装好UBUNTU系统更新+装汉语包后,点桌面右键-更改桌面
背景-视觉效果-正常,系统就会自动推荐驱动,叫你下载安装。)安好驱动后开起(更改桌面背景-视觉效果-正常)就算开起了特效,重启成就出现显示器分辨
率和刷新率问题过低。
为了方便大家能尽快解决分辨率问题,早日享受3D的震撼效果,我将自己实践经验与大家一起分享。

B。在终端里输入以下命令对文件进行编辑:

sudo gedit /etc/X11/xorg.conf

C.打开系统-系统管理-Nvidia X Server settings(ATI没用过),打开X Server Display
Configuration后看右边的Display(就是显示器相关设置),分辨率Resolution很低:随便选如:
640*320或800*600, 刷新率Configuration:60HZ 然后点下面Save to X Configuration
File 按钮。从出现的对话框中,选择Show Preview,会显示出改动的效果(xorg.conf文件)

   
把里面的从# xorg.conf (X.Org X Window System server configuration
file)一项开始到文件末尾全部复制。清空前面打开的旧的xorg.conf文件,然后把剪贴板中复制的新的xorg.conf的内容粘贴到清空后的
xorg.conf文件。找到下面的这一项Option "metamodes" "800x600_60 +0+0"把它改成Option
"metamodes" "1152x864_75
+0+0"(根据自己的显示器分辨率和刷新率来改)保存后退出重启,看看成功没有。如果不行找到这两项改下为
HorizSync 28.0 - 85.0
VertRefresh 43.0 - 76.0

我更新后的xorg.conf文件如下:

# xorg.conf (X.Org X Window System server configuration file)
#
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
#
# Edit this file with caution, and see the xorg.conf manual page.
# (Type "man xorg.conf" at the shell prompt.)
#
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
#
# Note that some configuration settings that could be done previously
# in this file, now are automatically configured by the server and settings
# here are ignored.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following command:
#   sudo dpkg-reconfigure -phigh xserver-xorg

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0" 0 0
EndSection

Section "Module"
    Load           "glx"
EndSection

Section "ServerFlags"
    Option         "Xinerama" "0"
EndSection

Section "Monitor"
    Identifier     "Configured Monitor"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "LPL"
    HorizSync       30.0 - 75.0
    VertRefresh     60.0
EndSection

Section "Device"
    Identifier     "Configured Video Device"
    Driver         "nvidia"
    Option         "NoLogo" "True"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce 8400M GS"
    Option         "NoLogo" "True"
EndSection

Section "Screen"
    Identifier     "Default Screen"
    Device         "Configured Video Device"
    Monitor        "Configured Monitor"
    DefaultDepth    24
EndSection

Section "Screen"

# Removed Option "metamodes" "1280x800 +0+0"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "TwinView" "0"
    Option         "metamodes" "1280x800_60 +0+0"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

4、字体显示模糊的解决方案。

  
安装驱动后,可以桌面空白处,点鼠标右键->更改桌面背景->选择视觉效果选项卡->选择一种特效(我选择的是“正常
”),Ubuntu系统就开启了视觉特效(比如说,当你在桌面空白处滚动鼠标轮时,可以看到屏幕切换),这证明显卡驱动安装好了。
  
但是,很明显的问题是菜单项中的中文显示模糊,当然,网上有人提到换回Ubuntu8.04后,nvidia驱动默认就得到安装了,而且字体效果,好的
多。但8.10是一个跟稳定的版本,所以不打算换回8.04。google后解决方法如下
(url:http://forum.ubuntu.org.cn/viewtopic.php?f=8&t=162858&st=0&
amp;sk=t&sd=a&sid=7cbe3abead7a93deb01f44dc3eed02b7)
   3楼FangQ的方法可以解决问题。
原文:
需要开启正黑的内嵌点阵:

代码:
sudo nano /etc/fonts/conf.d/44-wqy-zenhei.conf

找到

代码:
<edit name="embeddedbitmap"><bool>false</bool></edit>

把false换成true。

或者,如果在/etc/fonts/conf.avail中如果能够找到66-wqy-zenhei-sharp.conf的话,把它link到conf.d中也可以解决这个问题。

代码:
sudo ln -s /etc/fonts/conf.avail/66-wqy-zenhei-sharp.conf  /etc/fonts/conf.d

   到这里,firefox正文以及菜单中的字体恢复正常了,但是fiefox中的黑体字(如google后给出的带下划线的网址)显示仍不正常,解决方法如下:
   ubuntu粗体模糊解决(url: http://blog.chinaunix.net/u2/82750/showart_1775978.html)
   今天在ubuntu下更新了中文,结果原来的字体突然变得很模糊,找了很多解决方法,发现下面这个能达到效果

sudo ln -s /etc/fonts/conf.avail/66-wqy-zenhei-sharp.conf /etc/fonts/conf.d
sudo gedit 66-wqy-zenhei-sharp.conf
删除原先的内容,把以下内容复制进去:
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<!-- WenQuanYi Zen Hei Configure File -->
<fontconfig>
   <match target="font">
        <test qual="any" name="family">
                <string>WenQuanYi Zen Hei</string>
                <string>文泉驿正黑</string>
                <string>文泉驛正黑</string>
        </test>
        <test compare="more_eq" name="pixelsize"><double>12</double></test>
        <test compare="less_eq" name="pixelsize"><double>16</double></test>
        <edit name="antialias" mode="assign"><bool>false</bool></edit>
        <edit name="embeddedbitmap" mode="assign"><bool>true</bool></edit>
        <edit name="hinting" mode="assign"><bool>false</bool></edit>
  </match>
  <match target="font">
        <test qual="any" name="family">
                <string>WenQuanYi Zen Hei</string>
                <string>文泉驿正黑</string>
                <string>文泉驛正黑</string>
        </test>
        <test compare="more_eq" name="pixelsize"><double>13.5</double></test>
        <test compare="less" name="pixelsize"><double>14.5</double></test>
        <edit name="pixelsize"><double>13</double></edit>
  </match>
</fontconfig>
保存,退出,即可解决问题。
5、安装新的字体(url: http://zhidao.baidu.com/question/76272431.html?si=2)
    不考虑版权的问题,可以用windows下fonts目录的字体做一下实验。
    打开文件管理器(要用root的权限,可以用命令行: sudo nautilus)
把希望添加的字体文件(.ttf等)复制到/usr/share/fonts下,至于哪个子目录,似乎并不太重要,我都是新建一个目录放的。

    之后有些网站说要把文件权限设为可读写,(sudo chmod 777 /usr/share/fonts/*)有些又不用。我两种都试过,都没有出问题。

    最后执行字体缓存刷新。
   sudo fc-cache (有人用 sudo fc-cache -f -v)
    还有人提到,也可以不加sudo。然后在系统中就可以看见新安装的字体的信息了。
6、安装MPlayer (url: http://www.voos.org.cn/html/37/n-60337.html)
   首先安装Mplayer:
sudo apt-get install mplayer mplayer-fonts mplayer-skin mozilla-mplayer
然后进入官方网站:http://www.mplayerhq.hu/design7/dload.html
将解码器(Binary Codec Packages)下载下来,释放到/usr/lib/codecs下,具体命令:
sudo mkdir /usr/lib/codecs
tar jxvf essential-20071007.tar.bz2
sudo cp essential-20071007/* /usr/lib/codecs
然后将mplayer打开(通过命令gplayer或者Applications->Sound &
Video下Mplayer打开),打开Preferences找到Codecs & demuxer 将 Video codec
family选为RealVideo decoder,将Audio codec family 选为FFmpeg/libavcodec audio
decoders。
如果想播放rmvb文件需要安装 libstdc++5,利用命令:
sudo apt-get install libstdc++5

播放文件出现闪屏的解决方法:
打开Preferences找到Video,将Available drivers的xv选成x11,就好了。

播放文件不能真正全屏播放的解决方案:
进入/root/.mplayer/目录,在文件config添加zoom=yes就可以了。

解决中文字幕乱码(全是横线)的方法:
第一步,右键>Preferences>Subtitles&OSD,勾选“Unicode subtitles”,并选择Encoding编码为Simplified Chinese charset (CP936)。
第二步,切换到Font选项卡,选择字体为“雅黑”(别的中文字体也可), 并选择Encoding编码为Unicode。
这下中文字幕就可以正常显示了。
7、配置JAVA开发环境(url: http://www.linuxidc.com/Linux/2008-11/17211.htm)
   sudo apt-get install sun-java6-jdk
   然后就会自动确定依赖关系,完成下载
   特别要注意的地方是在安装过程中会弹出授权协议窗口,这是要记住按下Tab,才能选中协议文本中的
<确定>按钮,再按键盘上的Enter确认就行了。
   (url: http://www.phpchina.com/bbs/viewthread.php?tid=99950&sid=a8jBwA)
    在命令行输入 sudo update-alternatives --config javac 来更改当前默认jdk
    sun-java5-doc和sun-java6-doc是jdk的文档的安装程序,但是不包括jdk文档。
   
在安装jdk文档前,必须到sun的网站下载jdk文档。你下载的文档可以是任意语言,包括中文例如你安装jdk5的文档,应该在安装前把下载的文档存放
到/tmp/jdk-1_5_0-doc.zip;再例如你安装jdk6的文档,应该在安装前将下载的文档存放到
/tmp/jdk-6-doc.zip。当然你也可以不在安装前做这件事情,因为安装的过程会提示你这么做,请注意看终端窗口的提示。
    写入环境变量 gedit /etc/environment
    在编辑器中加入 JAVA_HOME=/usr/lib/jvm/java-6-sun
    classpath不必配置,错误的classpath会导致许多问题。jvm会知道自带的classpath。对于自定义的classpath,可以在运行、编译时加上-classpath参数来指定。至于环境变量,当你写的程序需要时再指定也不迟
    要使配置生效必须在命令行输入 . /etc/environment
    如果需要还要修改系统虚拟机的优先级顺序调整: sudo gedit /etc/jvm
    jdk安装完毕,在终端输入 java -version 查看是否安装成功(或直接输入java)
8、安装MultiGet
    直接用apt-get multiget似乎不行,去其官网下载.deb文件即可。(url:

http://multiget.sourceforge.net/download.html),下载

multiget_1.1.2-0getdeb1_i386.deb,然后双击下载的.deb文件,就会自动检查依赖关系,完成安装。
9、安装QQ for Linux
   去http://im.qq.com/qq/linux/download.shtml下载DEB包,双击下载的linuxqq_v1.0.2-beta1_i386.deb就可以完成安装。
10、安装Matlab
    以MatlabR2008b进行实验完成。
   下载MatlabR2008b的iso文件后,放在Ubuntu下,例如,我放在/home/guangguang/目录下,命名为matlabunix2008.iso.
   然后挂在iso文件,例如把他放在/mnt/matlab目录下:
   sudo mount -o loop /home/guangguang/matlabunix2008.iso /mnt/matlab
   即将安装镜像挂载到了/mnt/matlab下(打开/mnt/matlab可以看到其内容)
   sudo /mnt/matlab/install即开始安装
   其中要求输入序列号,参见crack文件的liscense.txt.后面要求确定matlab安装目录。先用mkdir新建一个目录,输入安装程序即可。
   我的做法:
   mkdir /home/matlabr2008b
   然后把/home/matlabr2008b输入要求的方框内即可。
   安装完成后,有一个激活的过程,将crack文件夹下对应的.dat文件的目录输入提示框即可(或者用该文件覆盖matlab安装目录下的/etc/liscense.dat)
   一切完成后,即可以通过安装目录下的/bin/matlab在终端启动matlab程序.
  最后卸载镜像文件: sudo umount /home/guangguang/matlabunix2008.iso /mnt/matlab.

    安装Matlab并运行,可能会提示:

   Warning: MATLAB Toolbox Path Cache is out of date and is not being used.

   Type 'help toolbox_path_cache' for more info.

  
我的解决方法是:选择Matlab的File菜单,然后点击Preferences,在弹出的Preferences对话框中,选中General,然后
点击右边的"Update Toolbox Path Cache"按钮。再次启动时,这条warning就不会出现了。

   
另外,如果将matlab安装在 / 分区下的文件夹下(比如/usr/local),由于文件权限问题,运行Matlab后可能会提示The
desktop configuration was not saved
successfully。这可以通过修改/home/usr/.matlab/R2008a的操作权限解决,代码如下:

sudo chmod a+w -R /home/usr/.matlab/R2008

其中usr是你登录的帐号名称。[url: http://ubuntuforums.org/showthread.php?p=4845115 (blindwindow网友提供的解决方法)]

11、关于apt-get的安装目录
   在/分区确定的文件系统,所以分区时/分区时可以大一些,有人建议分给/分区7GB就够用了。另外,执行apt-get clean可以删除apt-get下载后存放在/var/cache/apt目录下的.deb文件,从而增大空间。

12、开机挂载所有格式的分区(url: http://www.linuxidc.com/Linux/2008-06/13661.htm)

   Ubuntu开机不会自动挂载Windows的分区,可按下述方法操作,达到此目的。

   (1)关于Ubuntu下NTFS分区的挂载和访问问题
sudo apt-get install ntfs-config ntfs-3g //Ubuntu 8.04已经自动安装了ntfs-3g
然后在“应用程序”->“系统工具”->“NTFS写入支持配置程序”然后选中“启用内部设备写支持”和“启用外部设备写支持”两项,重启后
就可以自动挂载NTFS分区[其实不用重启,如果你开机没有挂载ntfs分区(或者通过在各个已经挂载的ntfs分区上用鼠标右键->卸载文件
卷),执行第(1)步的操作后,就可以看到各个ntfs分区在操作完成后成功挂载];

   (2)fat/fat32分区的挂载

     sudo gedit /etc/fstab可以看到分区挂载的情况。做完第(1)步后,我机器上这个文件如下

# /etc/fstab: static file system information.
#
#  -- This file has been automaticly generated by ntfs-config --
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>

proc /proc proc defaults 0 0
# Entry for /dev/sda9 :
UUID=dd064047-c27b-4bb9-a03a-629e931a2c5f / ext3 relatime,errors=remount-ro 0 1
# Entry for /dev/sda10 :
UUID=45a5e404-5dae-481c-b323-42686323ede9 /home ext3 relatime 0 2
# Entry for /dev/sda8 :
UUID=37007e65-1be2-4ad5-8b23-e2bef3f5e301 none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0
/dev/sda7 /media/Storage ntfs-3g defaults,locale=zh_CN.UTF-8 0 0
/dev/sda5 /media/Program ntfs-3g defaults,locale=zh_CN.UTF-8 0 0
/dev/sda1 /media/WinXP ntfs-3g defaults,locale=zh_CN.UTF-8 0 0

     其中WinXP是我Windows上C盘的文件名(不知道说“文件名”是否合适,不过我就是通过重命名修改的),Program为Windows上D盘的文件名,Storage是F盘文件名,E盘为fat32分区,没有挂载。

      挂载fat分区的方法如下:
首先获得各分区的uuid
ls -all /dev/disk/by-uuid     

该操作显示分区的信息可以查看到各分区的uuid,我的机器上结果如下:

总用量 0
drwxr-xr-x 2 root root 180 2009-02-07 21:17 .
drwxr-xr-x 6 root root 120 2009-02-07 21:17 ..
lrwxrwxrwx 1 root root  10 2009-02-07 21:17 37007e65-1be2-4ad5-8b23-e2bef3f5e301 -> ../../sda8
lrwxrwxrwx 1 root root  10 2009-02-07 21:17 44F8626AF86259E6 -> ../../sda7
lrwxrwxrwx 1 root root  11 2009-02-07 21:17 45a5e404-5dae-481c-b323-42686323ede9 -> ../../sda10
lrwxrwxrwx 1 root root  10 2009-02-07 21:17 4988-C12D -> ../../sda6
lrwxrwxrwx 1 root root  10 2009-02-07 21:17 BC0CD68F0CD643D4 -> ../../sda5
lrwxrwxrwx 1 root root  10 2009-02-07 21:17 dd064047-c27b-4bb9-a03a-629e931a2c5f -> ../../sda9
lrwxrwxrwx 1 root root  10 2009-02-07 21:17 F078D33878D2FBF2 -> ../../sda1
其中的sda6就是未挂载的fat分区。

     之后,为fat分区新建一个挂载目录

     mkdir /media/Develop

     再在已打开的/etc/fstab文件末尾加上
# Entry for /dev/sda6
UUID=4988-C12D /media/Develop vfat user,auto,umask=002,gid=1000,utf8 0 0

    就可以将fat分区挂载在/media/Develop目录下。我注销之后再次进入Ubuntu系统,各个分区就自动挂载了。

抱歉!评论已关闭.