QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 2115|回复: 2

ubuntu6.06设置指南5.0(千锤百炼)

[复制链接]
发表于 2006-11-2 14:38:03 | 显示全部楼层 |阅读模式
我的公司要求办公用机、开发用机和服务器全用Linux。现在基本实现。本指南即为在安装设置办公开发用机中的经验总结。本着”取之于自由软件社区,用之于自由软件社区“的精神,现在放到本人的博客上。

过段时间将本指南写成一个脚本文件。

其中附件speedup文件是从网上下载的,经过我的修改以适应本公司的需要。

适合于ubuntu 6.06

[email protected]


一、关于终端的方便设置:
应用程序-附件-终端,右键点击终端给终端添加快捷方式,
编辑-快捷键,改复制粘贴键为习惯用法   (Ctrl+C复制,Ctrl+V粘贴),
编辑-配置文件,改终端字体为bitstream vera sans mono颜色为浅黄背景黑字。
设置位置栏,让文件管理器总是显示路径信息
去掉截屏键。

二、改root密码

三、
改分辨率 sudo gedit /etc/X11/xorg.conf
在[Monitor]段三四行加入
HorizSync 30-70
VertRefresh 50-160

四、设置网络
设置ip
设置路由


五、得到sources.list文件,将此文件放到/etc/apt/下替换原文件

六、
sudo apt-get install language-pack-zh openoffice.org-l10n-common openoffice.org-help-zh-cn openoffice.org-l10n-zh-cn thunderbird-locale-zh-cn -y --force-yes

删除scim:sudo apt-get remove .*scim.* -y --force-yes
sudo apt-get install fcitx -y --force-yes

fcitx设置     删除不需要的输入法

sudo apt-get install xfonts-wqy

sudo gedit /etc/fonts/conf.d/50-xfonts-wqy.conf

    * 在文件中加入如下配置后,保存退出。(你也可以使用其他你喜爱的编辑器进行编辑。)

<selectfont>
  <acceptfont>
    <pattern>
      <patelt name="family"><string>WenQuanYi Bitmap Song</string></patelt>
    </pattern>
  </acceptfont>
</selectfont>
   
系统-首选项-字体  选系统字体为wqy(不行的话就sudo fc-cache -fv)


七、安装多媒体播放驱动   sudo apt-get install beep-media-player  w32codecs mplayer-686 mplayer-fonts mplayer-skins mozilla-mplayer -y --force-yes

设置beep media player
右击播放器,选择首选项,插件-MPEG音频插件-首选项,ID3编码设置为gbk,ID3格式为%f 输出为alsa97
得到mediawrap插作,安装。

八、安装英汉辞典
   sudo apt-get install stardict stardict-common stardict-cdict-gb stardict-cedict-gb stardict-hanzim stardict-langdao-ce-gb stardict-langdao-ec-gb stardict-oxford-gb stardict-xdict-ce-gb stardict-xdict-ec-gb -y --force-yes
安装完成后的快捷方式在(应用程序-附件-星际译王)

九、安装浏览器的Flash支持(仅x86)    sudo apt-get install flashplugin-nonfree -y --force-yes




十、sudo apt-get install gftp -y --force-yes
然后 sudo locale-gen zh_CN;   
sudo locale-gen zh_CN.GBK
sudo gedit /usr/bin/gftp  
在第三行加入export LANG=zh_CN
FTP-选项-常规,设置不显示隐藏文件

十一、gaim设置      应用程序-Internet-Gaim互联网通讯程序,主要设置保存聊天记录

十二、firefox字体   编辑-首选项-内容-字体和颜色-高级,
        最小字体设为十二
                默认编码utf8
               标签浏览
            更新设置
关掉java支持
缓存设为30


十三、sudo apt-get install dnsmasq
sudo gedit /etc/dnsmasq.conf
改listen-address=127.0.0.1
sudo gedit /etc/resolv.conf
第一行加上
nameserver 127.0.0.1

十四、安装java环境
sudo apt-get install sun-java5-jdk sun-java5-fonts sun-java5-plugin -y --force-yes

十六、Evolution设置字体 编辑-首选项-邮件首选项  信件字体改为文泉驿WenQuanYi BitMap Song

十七、安装realplayer、unrar、chmsee、d4x、xpdf、gs
sudo apt-get install realplayer unrar chmsee d4x xpdf xpdf-chinese-simplified gs-gpl gv kmess -y --force-yes
javaws http://www.crossftp.com/crossftp.jnlp


十八、安装numlockx
sudo apt-get install numlockx
sudo gedit /etc/X11/gdm/Init/Default

在exit 0的上一行加入以下内容:
if [ -x /usr/bin/numlockx ]; then
    /usr/bin/numlockx on
fi

十九、安装skype

设置skype,包括设为中文。设为显示文字。去掉自动检查更新。

二十、网上邻居的中文目录的显示乱码,
sudo gedit /etc/samba/smb.conf 中的 [global] 段加上:
display charset = UTF-8
unix charset = UTF-8
dos charset = cp936
sudo cp /etc/gtk/gtkrc.zh_CN /etc/gtk/gtkrc.zh_CN.utf-8

二十一、sudo apt-get install build-essential -y --force-yes
二十二、sudo apt-get install wine -y --force-yes
    得到Easywine并安装之和初始化,安装ie
    sudo gedit /usr/share/X11/locale/zh_CN.UTF-8/XLC_LOCALE
       将fs3那一段删除

ie的快捷方式:   wine "C:\Program Files\Internet Explorer\IEXPLORE.EXE"
图标 /home/henter/.kde/share/applnk/Wine/Internet Explorer.xpm

     
     
设置屏保时锁定屏幕


二十三、得到flashgot文件,右击选择使用Firefox打开,然后安装

二十四、sudo apt-get install gnomebaker

二十五、升级你的内核,让系统更快. 如果你的电脑是Intel芯片,则用如下命令:

sudo apt-get install linux-686 linux-image-686 linux-restricted-modules-686 -y --force-yes
sudo apt-get remove .*386.* -y --force-yes


二十六、系统-系统管理-设置更新管理器,更新

二十七、得到speedup文件 (见附件)

sudo ./speedup

添加Fax打印机  
lpadmin -p efax -E -v socket://localhost:9900




speedup文件:


#!/bin/sh

######################################################################################
# faster-dapper.sh - Tweak default settings to speed up Ubuntu 6.06 Dapper Drake     #
# Usage: ./faster-dapper.sh as a user in the admin group with full sudo access       #
#                                                                                    #
# Version 0.4 written July 8, 2006 by Jeff Schroeder ([email protected])         #
# License: GNU GPL 2 ONLY. See http://www.fsf.org/licensing/licenses/info/GPLv2.html #
######################################################################################

INSTALLED_DRIVE="`fdisk -l | grep Linux | head -1 | cut -d" " -f1 | cut -d"/" -f3 | sed 's/[1-9]//'`"

# Disable sudo asking for your password for the remainder of the script
sudo sed -ie '/^%admin/s/ALL$/NOPASSWD: ALL/' /etc/sudoers

# Are we running on Dapper?
if ( ! grep "Ubuntu 6.06" /etc/issue >/dev/null 2>&1); then
    echo "This script is only intended for Ubuntu 6.06 Dapper Drake"
    exit 1
fi

logger " -===== Installation log started on $(date) for faster-dapper.sh =====- " #Logs installation information to /var/log/messages
echo " -===== Installation started on $(date) for faster-dapper.sh =====- "

# Update the system
#sudo apt-get update && sudo apt-get --yes upgrade

# Enable the Completely Fair Queuing Linux process scheduler to handle high CPU usage situations better
if (! grep "elevator=cfq" /boot/grub/menu.lst > /dev/null 2>&1); then
    logger "      Kernel process scheduler changed to CFQ"
    sudo sed -ie '/# defoptions/s/splash/splash elevator=cfq/' /boot/grub/menu.lst
    sudo update-grub
else
    echo "Kernel process scheduler is already CFQ"
fi

# Preload is an adaptive readahead daemon. Read /usr/share/doc/preload/proposal.txt.gz after installing preload for more info
if [ ! -f /etc/preload.conf ]; then
    logger "      Installed preload"
    sudo apt-get --yes install preload
else
    echo "reload already installed"
fi

# Enable prelink which causes big applications like firefox and OO.o to load faster
if (! grep "^PRELINKING=yes" /etc/default/prelink > /dev/null 2>&1); then
    logger "      Installed prelink"
    sudo apt-get --yes install prelink && sudo sed -ie 's/unknown/yes/' /etc/default/prelink

    # Uncomment this if you don't keep your computer on all night and want to have prelink run on newly installed software
    # NOTE: This makes apt-get upgrade or apt-get dist-upgrade take a loooooong time.
    #echo 'DPkgst-Invoke {"echo Running prelink, please wait...;/etc/cron.daily/prelink";}' >> /etc/apt/apt.conf

    echo -n "Running prelink for the first time so this might take awhile..."
    sudo /etc/cron.daily/prelink && echo "done"
else
    echo "relinking already enabled"
fi

# Disable ipv6 to improve network responsiveness and speed dhcp lease negotiation at boot time
if [ -d /etc/modprobe.d ]; then
    if ( ! grep "net-pf-10 off" /etc/modprobe.d/aliases > /dev/null 2>&1 ); then
        logger "      Disabled ipv6"
        sudo -u root echo "alias net-pf-10 off" >> /etc/modprobe.d/aliases
    fi
    if ( ! grep "ipv6 off" /etc/modprobe.d/aliases > /dev/null 2>&1 ); then
        logger "      Disabled ipv6 alias"
        sudo -u root echo "alias ipv6 off" >> /etc/modprobe.d/aliases
    fi   
fi

# Speed up gnome a bit
logger "      Improved gnome speed"
gconftool-2 --set --type boolean /desktop/gnome/interface/enable_animations false
gconftool-2 --set --type boolean /apps/panel/global/enable_animations false
gconftool-2 --set --type string /apps/nautilus/preferences/preview_sound never
#gconftool-2 --set --type string /apps/nautilus/preferences/show_p_w_picpath_thumbnails never
#gconftool-2 --set --type string /apps/nautilus/preferences/show_icon_text never

# Performance tweak to speed up your hard drive
#logger "      Enabled IDE hard disk tweaks"
#sudo /sbin/hdparm -u1 -m16 -c1 -A1 -a64 -d1 -K1 $INSTALLED_DRIVE > /dev/null

# Performance tweak to speed up ext3 partitions with lots of files
#for volume in $(mount 2> /dev/null| grep ext3 | awk '{print $1}'); do
#    logger "     Enabled dir_index ext3 option for $volume"
#    sudo tune2fs -O dir_index "$volume"
#done

# Enable dash as /bin/sh to run shell scripts instead of bloated bash
# See
#if ( ! dpkg -l dash >/dev/null 2>&1 ); then
#    sudo apt-get install dash && sudo update-alternatives --install /bin/sh sh /bin/dash 1
#else
#    sudo update-alternatives --install /bin/sh sh /bin/dash 1
#fi

# Disable unnecessary services.
# Remove any of these if you use them: hplip: hp printers, bluez-utils: bluetooth, pppd-dns: dialup users.
for service in hplip ppp festival bluez-utils mdadm apmd brltty lvm evms pppd-dns waitnfs.sh; do
    logger "     Disabled service $service"
    sudo /etc/init.d/$service stop
    sudo update-rc.d -f $service remove
done

# Disable more unnecessary services if the computer is not a laptop
# Comment out this section if you are using a laptop
for service in laptop-mode pcmcia pcmciautils; do
    logger "     Disabled service $service"
    sudo /etc/init.d/$service remove
    sudo update-rc.d -f $service remove
done


# Re-enable password prompts for users in the admin group running sudo
#sudo sed -ie '/NOPASSWD/s/NOPASSWD: //' /etc/sudoers

logger " -===== Installation log finished on $(date) for faster-dapper.sh =====- "
echo " -===== Installation finished on $(date) for faster-dapper.sh =====- "

echo " "
echo "Your installation of Ubuntu 6.06 Dapper Drake should run faster now..."
echo "lease reboot your computer for some changes to take affect."
发表于 2006-11-2 15:00:00 | 显示全部楼层
搞得不错。
回复

使用道具 举报

发表于 2006-11-2 17:50:03 | 显示全部楼层
支持一下
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-5-19 03:13 , Processed in 0.091347 second(s), 16 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表