Ubuntu 5.10 (Breezy Badger) 指南

Ubuntu 5.10 (Breezy Badger) 指南

  • 安装
  • 挂载 和 卸载 媒体设备
  • 创建 和 播放 ISO设备
  • 创建和检查 MD5 校验码
  • 为CUCS配置SSH 和 为办公电脑设置远程桌面
  • 相关链接

安装

  1. 安装Ubuntu
  2. 设定Home目录
  3. 更新和升级Ubuntu
  4. 安装nVidia驱动程序
  5. 启用5键鼠标
  6. 启用DMA
  7. 修复声音设备
  8. 定制个性化配置和字体
  9. 添加额外的软件库
  10. 安装:
    • 分区工具 - GPartEd
    • 邮件客户端 - Thunderbird
    • 版本控制 - cvs
    • LaTeX
    • 字体
    • Java - Sun Java
    • 编辑器 - JEdit, gvim
    • PDF查看软件 - Adobe Acrobat Reader
    • Flash播放器
    • 多媒体文件解码器
    • 媒体播放器 - Totem-xine, gxine, MPlayer, VLC
    • MIDI播放器 - Timidity
    • CD刻录软件 - Gnome Baker
    • CD提取工具 - Sound Juicer
    • 游戏 - ScummVM
    • 开发工具

设定Home目录

  1. sudo mkdir /mnt/newdrive
    sudo mount -t ext3 /dev/hdb1 /mnt/newdrive/
    sudo mkdir /mnt/newdrive/home.new
    sudo cp -R -p /home/[user] /mnt/newdrive/home.new/
    sudo chown [user]:[user] /mnt/newdrive/home.new/[user]
    sudo umount /mnt/newdrive/
    
  2. 同时按下 [CTRL] + [ALT] + [F1]键, 然后登录.
    sudo pico /etc/fstab
    
    在主分区和交换分区条目后面加上以下行:
    /dev/hdb1 /home ext3 defaults,errors=remount-ro 0 1
    
    按 [CTRL] + [o] 键保存文件. 按 [CTRL] + [x] 退出 Pico程序.
    sudo mv /home /home.old
    sudo mkdir /home
    sudo mount -a
    

更新和升级Ubuntu

  1. sudo apt-get update
    sudo apt-get upgrade
    

安装 nVidia 驱动程序

  1. sudo apt-get install nvidia-glx nvidia-settings
    sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.nvidia-driver.backup
    sudo nvidia-glx-config enable
    
  2. sudo gedit /usr/share/applications/NVIDIA-Settings.desktop
    
    在文件中添加以下行:
    [Desktop Entry]
    Name=NVIDIA Settings
    Comment=NVIDIA Settings
    Exec=nvidia-settings
    Icon=
    Terminal=false
    Type=Application
    Categories=Application;System;
    
  3. 下面的设置用来禁止nVidia的启动窗口.
    sudo gedit /etc/X11/xorg.conf
    
    编辑xorg.conf文件并找到以下项:
    ...
    Section "Device"
     Identifier "NVIDIA Corporation NV11 [GeForce2 MX/MX 400]"
     Driver  "nvidia"
     BusID  "PCI:1:0:0"
    ...
    
    在下面添加以下这一行:
     Option  "NoLogo"
    
  4. 按下 [CTRL] + [ALT] + [BACKSPACE] 键重启GNOME窗口管理系统.

启用5键鼠标

  1. sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.5-button-mouse.backup
    
  2. sudo gedit /etc/X11/xorg.conf
    
    替换下面项目:
    Section "InputDevice"
    Identifier "mouse.usb"
    Driver "mouse"
    Option "CorePointer"
    Option "Device" "/dev/input/mice"
    Option "Protocol" "IMPS/2"
    Option "Emulate3Buttons" "YES"
    Option "ZAxisMapping" "4 5"
    EndSection
    
    为:
    Section "InputDevice"
    Identifier "mouse.usb"
    Driver "mouse"
    Option "CorePointer"
    Option "Device" "/dev/input/mice"
    Option "Protocol" "ExplorerPS/2"
    Option "Buttons" "7"
    Option "ZAxisMapping" "4 5"
    EndSection
    

启用 DMA

(参照 http://ubuntuguide.org/#speedupcddvdrom.)

  1. sudo hdparm -d1 /dev/cdrom
    sudo cp /etc/hdparm.conf /etc/hdparm.conf_backup
    sudo gedit /etc/hdparm.conf
    
  2. 添加下面行 /etc/hdparm.conf
    /dev/cdrom {
           dma = on
    }
    
  3. 重复以上步骤设置 /dev/cdrom1

修复声音系统

(参照 http://ubuntuguide.org/#configuresoundproperly.)

定制个性化配置和字体

  1. gnome-theme-manager
    
    点击 "Theme Details", 设置 "Set Controls = Glider, Window Border = Mist, Icons = GNOME".
  2. gnome-font-properties
    
    设置 "App = Sans 8, Desktop = Sans 8, Window title = Sans 8, Terminal = FreeMono 10".

始终在Nautilus使用浏览器

  1. gconf-editor
    
    选择 "apps / nautilus / preferences" 并选中 "always use browser".

添加额外的软件库

  1. sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup
    
  2. sudo gedit /etc/apt/sources.list
    
    添加以下行(注:由于国内的设置不一样,该项请参照ubuntu.com.cn网站上公布的配置):
    # deb cdrom:[Ubuntu 5.10 _Breezy Badger_ - Release i386 (20051012)]/ breezy main restricted
    
    # Example sources.list for Ubuntu 5.10 "The Breezy Badger" release
    
    ## All officially supported packages, including security- and other updates
    
    deb http://us.archive.ubuntu.com/ubuntu breezy main restricted
    deb-src http://us.archive.ubuntu.com/ubuntu breezy main restricted
    
    deb http://security.ubuntu.com/ubuntu breezy-security main restricted
    deb-src http://security.ubuntu.com/ubuntu breezy-security main restricted
    
    deb http://us.archive.ubuntu.com/ubuntu breezy-updates main restricted
    deb-src http://us.archive.ubuntu.com/ubuntu breezy-updates main restricted
    
    
    ## All community supported packages, including security- and other updates
    
    deb http://us.archive.ubuntu.com/ubuntu breezy universe multiverse
    deb-src http://us.archive.ubuntu.com/ubuntu breezy universe multiverse
    
    deb http://security.ubuntu.com/ubuntu breezy-security universe multiverse
    deb-src http://security.ubuntu.com/ubuntu breezy-security universe multiverse
    
    deb http://us.archive.ubuntu.com/ubuntu breezy-updates universe multiverse
    deb-src http://us.archive.ubuntu.com/ubuntu breezy-updates universe multiverse
    
    ## libdvdcss2, w32codecs
    # deb ftp://ftp.nerim.net/debian-marillat/ etch main
    
    # deb http://ubuntu-backports.mirrormax.net/ breezy-extras-staging main restricted universe multiverse
    
    ## jedit
    # deb http://dl.sourceforge.net/sourceforge/jedit ./
    # deb-src http://dl.sourceforge.net/sourceforge/jedit ./
    
    ## hoary-extras - the most widely used source for packages not includded in Ubuntu
    ## no guarantees on working - not enabled by default
    # deb http://public.planetmirror.com/pub/ubuntu-backports/ hoary-extras main universe multiverse restricted
    
  3. sudo apt-get update
    

安装字体 (微软字体)

  1. sudo apt-get install msttcorefonts
    

安装多媒体文件解码器

(参考 http://ubuntuguide.org/#codecs.)

  1. 添加额外的软件库.
  2. sudo gedit /etc/apt/sources.list
    
    在最后添加以下行:
    deb ftp://ftp.nerim.net/debian-marillat/ etch main
    
    保存文件.
    sudo apt-get update
    sudo apt-get install w32codecs
    sudo apt-get install libdvdcss2
    
    sudo gedit /etc/apt/sources.list
    
    取消下面行前面的注释符号:
    deb ftp://ftp.nerim.net/debian-marillat/ etch main
    
    保存文件.
    sudo apt-get update
    
  3. 如果以上的步骤不工作, 那么需要手工安装 w32codecs 和 DeCSS2 包: 从网上下载 w32codecs_20050412-0.0_i386.deb 到Home目录.
    cd ~/
    sudo dpkg -i w32codecs_*.deb
    sudo /usr/share/doc/libdvdread3/examples/install-css.sh
    
  4. sudo apt-get install libmad0 libdvdread3
    
  5. sudo apt-get install lame sox ffmpeg mjpegtools vorbis-tools
    
  6. sudo apt-get install gstreamer0.8-misc gstreamer0.8-plugins gstreamer0.8-plugins-multiverse gstreamer0.8-ffmpeg 
    gst-register-0.8
    

安装媒体播放器 (Totem-xine, gxine, MPlayer, VLC)

  1. Totem-xine (参见instructions for post-installation setup):
    sudo apt-get install totem-xine 
    gedit ~/.xine/config
    
    修改下面行:
    video.driver:xv
    
  2. gxine (参见 instructions for post-installation setup):
    sudo apt-get install gxine
    gedit ~/.gxine/config
    
    修改下面行:
    video.driver:xv
    
  3. MPlayer:
    sudo apt-get install mplayer-386 mozilla-mplayer
    sudo cp /etc/mplayer/mplayer.conf /etc/mplayer/mplayer.conf_backup
    sudo gedit /etc/mplayer/mplayer.conf
    
    查找:
    vo=x11,
    
    替换为:
    vo=xv,
    
  4. VLC:
    sudo apt-get install vlc
    

设置 Xine/gxine

  1. xine-check
    
  2. 进行下面步骤以修复 WMV 播放问题 (如果由这个问题的话):
    cp ~/.xine/catalog.cache ~/.xine/catalog.cache.backup
    gedit ~/.xine/catalog.cache
    
    查找下面段:
    [/usr/lib/xine/plugins/1.0.0/xineplug_decode_w32dll.so]
    size=173768
    mtime=1112804124
    type=131
    api=15
    id=win32a
    version=10000
    supported_types=50593792 52428800 52822016 ... (long line truncated)
    decoder_priority=1
    
    替换为其中一行:
    decoder_priority=1
    为:
    decoder_priority=7
  3. 指定 gxine 为默认媒体播放器 (不推荐,因为Totem-xine更好) :
    sudo cp /usr/share/applications/defaults.list /usr/share/applications/defaults.list_backup
    sudo sed -e 's/totem.desktop/gxine.desktop/g' /usr/share/applications/defaults.list_backup > /tmp/defaults.list
    sudo mv /tmp/defaults.list /usr/share/applications/defaults.list
    killall gnome-panel
    killall nautilus
    
  4. 指定 gxine 为默认DVD播放器 (不推荐,因为Totem-xine更好) :
    gconftool-2 --type string --set /desktop/gnome/volume_manager/autoplay_dvd_command "gxine dvd://"
    
  5. 为FireFox安装gxine插件 (不推荐,因为Totem-xine更好) :
    sudo ln -fs /usr/lib/gxine/gxineplugin.a /usr/lib/mozilla-firefox/plugins/
    sudo ln -fs /usr/lib/gxine/gxineplugin.la /usr/lib/mozilla-firefox/plugins/
    sudo ln -fs /usr/lib/gxine/gxineplugin.so /usr/lib/mozilla-firefox/plugins/
    

安装MIDI 播放器 (Timidity)

  1. sudo apt-get install timidity timidity-interfaces-extra freepats
    

播放 MIDI

  1. 以GTK界面启动:
    timidity -ig [file]
    

安装分区工具(GPartEd)

  1. sudo apt-get install gparted
    

安装E-mail客户端 (Mozilla Thunderbird)

  1. sudo apt-get install mozilla-thunderbird
    

安装菜单编辑程序 (SMeg)

  1. sudo apt-get install smeg
    

安装 CD 刻录软件 (GnomeBaker)

  1. sudo apt-get install gnomebaker
    

安装 PDF 查看软件 (Acroread)

  1. sudo apt-get install acroread mozilla-acroread
    
  2. sudo gedit /usr/share/applications/defaults.list
    
    将:
    application/pdf=evince.desktop
    替换为:
    application/pdf=AdobeReader.desktop

安装 Flash 播放器

  1. sudo apt-get install flashplayer-mozilla
    

挂载

  1. EXT3 格式分区:
    sudo mount /dev/hdb1 [mount_point_dir] -t ext3 
    
  2. NTFS 格式分区:
    sudo mount /dev/hda1 [mount_point_dir] -t ntfs -o nls=utf8,umask=0222
    
  3. FAT32 格式分区:
    sudo mount /dev/hda1 [mount_point_dir] -t vfat -o iocharset=utf8,umask=000
    
  4. CD/DVD:
    sudo mount /media/cdrom0/ -o unhide
    
  5. ISO:
    sudo modprobe loop
    sudo mount file.iso /media/iso/ -t iso9660 -o loop -r
    

卸载

  1. sudo umount [mount_point_dir]
    
  2. 强制卸载 (如果第一步不成功):
    sudo umount [mount_point_dir] -l
    

创建 ISO 镜像文件

  1. 从 CD/DVD 创建(替换下面行中的 [device] 为 dvd, cdrom, 或 cdrom1):
    dd if=/dev/[device] of=file.iso bs=1024
    
  2. 从指定目录创建:
    mkisofs -o file.iso [dir]
    

播放 ISO

  1. 安装,配置和运行 gxine.
  2. 选择"File / Preferences... / Media (tab) / DVD (tab)".
  3. 更改 DVD 位置为"/.../file.iso".

MD5 校验

  1. 创建MD5校验码:
    md5sum file.iso > file.iso.md5
    
  2. 验证MD5校验码:
    md5sum -c file.iso.md5
    

安装 LaTeX

  1. sudo apt-get install tetex-base tetex-bin tetex-extra
    

安装开发工具

  1. 基本编译器和工具:
    sudo apt-get install build-essential
    sudo apt-get install manpages-dev autoconf automake libtool
    sudo apt-get install flex bison gcc-doc g++
    
  2. OpenGL 和 SDL 开发:
    sudo apt-get install libxxf86vm-dev nvidia-glx-dev 
    sudo apt-get install libsdl1.2-dev libsdl-ttf2.0-dev libsdl-image1.2-dev libsdl-mixer1.2-dev
    sudo apt-get install libsdl-sound1.2-dev libsdl-net1.2-dev
    
  3. 编译 MPlayer的环境:
    sudo apt-get install x-window-system-dev libgtk1.2-dev libpng-dev libxxf86vm-dev 
    

安装 CVS版本控制软件

  1. sudo apt-get install cvs
    

安装 gvim

  1. sudo apt-get install vim-gnome
    
  2. gedit ~/.vimrc
    添加下面行:
    set ruler
    set showcmd
    
    set incsearch
    
    set history=500
    
    set expandtab
    set tabstop=4
    set autoindent
    set shiftwidth=4
    
    colorscheme desert
    
    if has("vms")
      set nobackup
    else
      set backup
    endif
    
    if &t_Co > 2 || has("gui_running")
      syntax on
      set hlsearch
    endif
    
  3. sudo gedit /usr/share/applications/gvim.desktop
    添加下面行:
    [Desktop Entry]
    Encoding=UTF-8
    Name=gvim
    Comment=Edit text files
    Exec=gvim --remote-silent %U
    TryExec=gvim
    Terminal=false
    Type=Application
    StartupNotify=false
    MimeType=text/plain;
    Icon=text-editor
    Categories=GNOME;Application;Utility;TextEditor;
    
    保存文件.
  4. 指定gvim为默认文件编辑器 (可选).
    sudo gedit /usr/share/applications/defaults.list
    替换该行:
    text/plain=gedit.desktop
    为:
    text/plain=gvim.desktop

安装 Java 环境(Sun Java)

(参照 https://wiki.ubuntu.com/JavaPackageBuildNewVersions.)

  1. sudo apt-get install java-package java-common
    sudo apt-get install build-essential
    
  2. http://java.sun.com/下载 JRE Linux 自解压文件(jre-1_5_0_06-linux-i586.bin, 非 RPM文件).
    sudo apt-get install fakeroot
    fakeroot make-jpkg jre-1_5_0_06-linux-i586.bin
    sudo dpkg -i sun-j2re1.5_1.5.0+update06_i386.deb
    
  3. sudo update-alternatives --config java
    
    选择 sun java 选项.

安装编辑器 (JEdit)

  1. Install Java.
  2. sudo gedit /etc/apt/sources.list
    
    添加以下行:
    deb http://dl.sourceforge.net/sourceforge/jedit ./
    deb-src http://dl.sourceforge.net/sourceforge/jedit ./
    
    保存文件.
  3. sudo apt-get update
    sudo apt-get install jedit
    
  4. sudo gedit /usr/bin/jedit
    
    替换:
    ... ${JEDIT} -jar "/usr/share/jedit/jedit.jar" $@
    
    为:
    ... ${JEDIT} -jar "/usr/share/jedit/jedit.jar" -reuseview $@
    

安装游戏 (ScummVM)

  1. sudo apt-get install scummvm
    sudo apt-get install beneath-a-steel-sky flight-of-the-amazon-queen
    

为 Cornell CS配置SSH

(参见 http://www.cs.cornell.edu/support/.)

  1. pico ~/.ssh/config
    
    添加下面行:
    host herakles
    hostname herakles.cs.cornell.edu
    user djm
    ForwardAgent yes
    LocalForward 2001 lion.cs.cornell.edu:22
    IdentityFile ~/.ssh/herakles/id_dsa
    
    host lion
    hostname localhost
    user djm
    ForwardX11 yes
    port 2001
    LocalForward 2002 smtp.cs.cornell.edu:25
    LocalForward 2003 popsrv.cs.cornell.edu:110
    LocalForward 2004 blather.cs.cornell.edu:515
    LocalForward 2005 falcon.cs.cornell.edu:139
    LocalForward 2006 cucsfs1.cs.cornell.edu:139
    LocalForward 2007 [office_computer_name].u.cs.cornell.edu:3389
    IdentityFile ~/.ssh/id_dsa
    

为办公电脑配置远程桌面

  1. 为CCS配置SSH ,然后确认 localhost:2007 跳转到 [office_computer_name].u.cs.cornell.edu:3389.
  2. ssh -N -f herakles
    ssh -N -f lion
    
  3. rdesktop -r disk:sync=/home/[local_dir] localhost:2007
    
    注意 disk:sync 要设置为绝对路径.

访问 CUCSFS1

(参见http://www.cs.cornell.edu/support/Linux/smbmount.htm.)

  1. 为CCS配置SSH.
  2. ssh -N -f herakles
    ssh -N -f -L2006:cucsfs1.cs.cornell.edu:139 lion
    
  3. smbclient //cucsfs1.cs.cornell.edu/a -U [user_name] -W CUCS -I localhost -p 2006
    
    或者
    smbmount //localhost/a [local_dir] -o port=2006,username=[user_name],workgroup=CUCS
    smbumount [local_dir]
    

递归删除文件

  1. 例如要删除[dir]目录下的全部 *.afm文件:
    cd [dir]
    find . -name "*.afm" -exec rm {} \;
    

添加/修改 缺省应用程序

  1. sudo cp /usr/share/applications/defaults.list /usr/share/applications/defaults.list.backup
    
  2. sudo gedit /usr/share/applications/defaults.list
    
    添加/修改 类似的项:
    [mime-type]=[new-app].desktop
    查找安装了的软件:
    ls /usr/share/applications/*.desktop
    查找安装了的MIME类型:
    ls /usr/share/applications/mime/[text|image|...]
      
  3. killall gnome-panel
    killall nautilus
    

参考链接

本文中大部分的信息来自:

你可能感兴趣的:(linux,Debian,ssh,Security,ubuntu)