Ubuntu配置笔记

来源:互联网 发布:python和r语言 编辑:程序博客网 时间:2024/05/17 01:17

####装中文输入

#vi /etc/apt/sources.list 在打开的编辑器中将所有内容删除, 把下面的内容复制进去
##
deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ edgy main restricted universe multiverse
deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ edgy main restricted universe multiverse
deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ edgy-updates main restricted universe multiverse
deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ edgy-updates main restricted universe multiverse
deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ edgy-backports main restricted universe multiverse
deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ edgy-backports main restricted universe multiverse
deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ edgy-security main restricted universe multiverse
deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ edgy-security main restricted universe multiverse
deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ edgy-proposed main multiverse restricted universe
deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ edgy-proposed main restricted universe multiverse
deb http://ftp.sjtu.edu.cn/ubuntu-cn/ edgy main multiverse restricted universe
###end###
apt-get update
apt-get dist-upgrade

##安装小企鹅输入法
apt-get install fcitx
##让
fcitx在系统启动是自动调用
sh -c " echo 'export XMODIFIERS=@im=
fcitx ; export GTK_IM_MODULE="fcitx" ; fcitx ' > /etc/X11/Xsession.d/95xinput "
chmod 755 /etc/X11/Xsession.d/95xinput
##在英文环境使用fcitx
#cat /etc/X11/Xsession.d/95xinput
export LC_CTYPE=zh_CN.UTF-8
export XMODIFIERS=@im=fcitx;export GTK_IM_MODULE="fcitx";fcitx

#安装LumaQQ
vi /usr/share/applications/LumaQQ.desktop,
#加入下列内容
[Desktop Entry]
Name=LumaQQ
Comment=QQ Client
Exec=/person/program/LumaQQ/lumaqq
Icon=/person/program/LumaQQ/QQ.png
Terminal=false
Type=Application
Categories=Application;Network;
#end#

#安装多媒体相关
apt-get install gstreamer0.10-*
apt-get install libxine-extracodecs totem-xine ffmpeg lame faad sox mjpegtools libxine-main1
apt-get install mplayer mplayer-fonts mozilla-mplayer
   wget -c ftp://211.86.156.210/debian-multimedia/pool/main/w/w32codecs/w32codecs_20061022-0.0_i386.deb
   dpkg -i w32codecs_20061022-0.0_i386.deb
apt-get install xmms xmms-skins #安装xmms
apt-get install xine-ui #安装xine
apt-get install beep-media-player totem-xine w32codecs libxine-extracodecs mplayer banshee #安装播放器
#xmms/bmp 的 ape 和 wma 插件 deb 包 http://www.coolcode.cn/?p=77

#使用XP的字体进行美化
mkdir -p /usr/share/fonts/zh_CN/TrueType/
#拷贝三个文件(simsun.ttc SURSONG.TTF tahoma.ttf)到这个目录
chmod 644 /usr/share/fonts/zh_CN/TrueType/*
cd /usr/share/fonts/zh_CN/TrueType/
mkfontscale
mkfontdir
fc-cache /usr/share/fonts/zh_CN/TrueType/ #更新linux字体列表
另外还有个字体美化方案:http://forum.ubuntu.org.cn/viewtopic.php?t=15039

#安装vmware-server
wget http://download3.vmware.com/software/vmserver/VMware-server-1.0.1-29996.tar.gz
tar xzvf VMware-server-1.0.1-29996.tar.gz
apt-get install linux-headers-`uname -r` build-essential xinetd
cd vmware-server-distrib
./vmware-install.pl
vmware-config.pl
sudo vmware #启动vmware-server,不要直接用root启动
序列号: 98R01-YU2F0-2F7EJ-4C6CM
启动时出现错误提示:
/usr/lib/vmware/bin/vmware: /usr/lib/vmware/lib/libpng12.so.0/libpng12.so.0: no version information available (required by /usr/lib/libcairo.so.2)
解决办法:
cd /usr/lib/vmware/lib/libpng12.so.0/
mv libpng12.so.0 libpng12.so.0.disabled
ln -sf /usr/lib/libpng12.so.0 libpng12.so.0

#vnc相关设置
apt-get install tightvncserver tightvnc-java
tightvncserver
vi ~/.vnc/xstartup
#大概内容如下
#!/bin/sh
unset SESSION_MANAGER
xrdb $HOME/.Xresources
xsetroot -solid grey
x-terminal-emulator -geometry 80×24+10+10 -ls -title "$VNCDESKTOP Desktop" &
gnome-session &

#安装宽带 ADSL/PPPoE 拨接程序 (RP-PPPoE)
wget -c http://www.roaringpenguin.com/files/download/rp-pppoe-3.8.tar.gz
tar zxvf rp-pppoe-3.8.tar.gz -C /opt/
chown -R root:root /opt/rp-pppoe-3.8/
gedit /usr/share/applications/RP-PPPoE.desktop
    [Desktop Entry]
    Name=RP-PPPoE
    Comment=RP-PPPoE
    Exec=gksudo /person/program/rp-pppoe-3.8/go-gui
    Icon=
    Terminal=false
    Type=Application
    Categories=Application;Network;

#安装pptpclient
apt-get install pptp-linux
#add the following lines to the sources list file, /etc/apt/sources.list :
deb http://quozl.netrek.org/pptp/pptpconfig ./
然后运行 apt-get update && apt-get install pptpconfig

####ADSL####
sudo pppoeconf #配置ADSL连接
pon dsl-provider #启动ADSL连接
poff dsl-provider #关闭ADSL连接

##其它常用软件###
apt-get install language-support-zh #安装中文语言支持
apt-get install stardict stardict-common #安装StarDict
apt-get install nautilus-open-terminal #在右键菜单中加入打开终端
apt-get install bum #系统服务管理软件
apt-get install sysv-rc-conf   #一款基于perl的开机进程调整工具,sysv-rc-conf执行命令即可
apt-get install rar unrar #安装rar支持
apt-get install rpm            #安装rpm支持
apt-get install xpdf xpdf-chinese-simplified #安装pdf查看软件
apt-get install xchm xpdf-chinese* #安装chm查看软件
apt-get install gqview #一个图片浏览器
apt-get install gnomebaker     #安装刻录软件
apt-get install ksnapshot      #一个抓屏程序
apt-get install vncserver     #vncserver,vncview默认已经安装了
apt-get install tightvncserver tightvnc-java   #另一个vnc
apt-get install vim-full #vim无法高亮显示,然后编辑 /etc/vim/vimrc,取消syntax on前面的"注释符号
apt-get install firestarter        #图形接口的防火墙设定程序
apt-get install smbfs              #smbfs挂载支持
apt-get install flashplugin-nonfree    #安装浏览器Flash插件
apt-get install gftp                         #安装ftp客户端
apt-get install sun-java5-jdk          #安装Java环境
apt-get install sun-java5-plugin      #安装Java环境
apt-get install build-essential # 安装编译环境
apt-get install mysql-client mysql-server #安装mysql服务
apt-get apache2 mysql-server php4 php4-gd php4-mysql #安装LAMP
apt-get install d4x azureus amule ktorrent # ktorrent对内网支持还好.
apt-get install sysstat #安装sar, iostat and mpstat
apt-get install kshisen ksokoban #ksokoban:游戏,搬运工,shisen:游戏,连连看
apt-get install nmap   #网络端口扫描工具
apt-get install nfs-common #nfs
apt-get install samba nfs-kernel-server #samba
apt-get install openssh-server #sshd
apt-get install ntfs-3g
apt-get install audacious # 如果audacious不支持中文标题的显示,可是进入“属性设置-播放列表”,在“标题格式”中选择“自定义(Custom)”,在“自定义格式”中输 入“none”。这样,audacious就会显示中文文件名。

一些其它小游戏 http://forum.ubuntu.org.cn/post-253240.html

####NFSSERVER####

apt-get install nfs-common
pt-get install nfs-kernel-server
vi /etc/exports
app/nfs    192.168.1.6(ro)
/etc/init.d/nfs-kernel-server start
####快速重装ubuntu####
dpkg --get-selections | grep -v deinstall > ubuntu.files #得到已安装软件列表文件
下次重装ubuntu 的时候,执行
dpkg --set-selections < ubuntu.files 

apt-get install nfs-common
pt-get install nfs-kernel-server
vi /etc/exports
app/nfs    192.168.1.6(ro)
/etc/init.d/nfs-kernel-server start
####快速重装ubuntu####
dpkg --get-selections | grep -v deinstall > ubuntu.files #得到已安装软件列表文件
下次重装ubuntu 的时候,执行
dpkg --set-selections < ubuntu.files 

apt-get install nfs-common
pt-get install nfs-kernel-server
vi /etc/exports
app/nfs    192.168.1.6(ro)
/etc/init.d/nfs-kernel-server start
####其它资料####

checking for C compiler default output file name… configure: error: C compiler cannot create executables
解决办法: apt-get install libc6-dev

configure: error: C++ preprocessor "/lib/cpp" fails sanity check
解决办法: apt-get install build-essential

有些命令直接用root无法启动,
解决办法是$sudo command

#挂本地硬盘后,中文目录和中文文件名称不显示
解决办法:挂载时加参数 -o utf8就可以了

#在位置菜单中隐藏最近的文档
chmod 400 ~/.recently-used #如要重新启用该功能,可以运行如下命令:
chmod 600 ~/.recently-used

#在 GNOME 中显示 计算机,用户主文件夹 和 回收站 等桌面图标。
1. 运行程序 gconf-editor 打开配置编辑器
2. 选择 apps → nautilus → 桌面
3. 勾选 computer_icon_visible、home_icon_visible 和 trash_icon_ visible 边上的复选框。这些更改会立即生效。

#置LC_ALL和其它属性, 如果需要使用英文界面,修改如下:
#vi /etc/environment
###start
LANGUAGE=”en_US:en”
LC_CTYPE=zh_CN.UTF-8
LANG=en_GB.UTF-8
GST_ID3_TAG_ENCODING=GBK

###end###

#apt搜索软件包名称
apt-cache search 软件名称

#fstab/uuid
ubuntu6.10的fstab用了uuid
可以用
ls -cl /dev/disk/by uuid
来显示分区的uuid号
也可以直接用/dev/hda1,效果一样

##安装mysql出错
checking for termcap functions library… configure: error: No curses/termcap library found
解决办法: apt-get install libncurses5-dev

##安装php出错
checking lex output file root… ./configure: 1: lex: not found
configure: error: cannot find output from lex; giving up
解决办法: apt-get install flex

##英文界面时用gedit打开中文文档时显示乱码故障
解决方法:用Configuratio Editor (命令:gconf-editor),修改app->gedit-2->preferences->encoding中的auto_detected, 把GB18030放在前面即可。

##最后修改日期, Saturday, April 21st, 2007 1:23 pm## 
原创粉丝点击