1.Ubuntu下更换JDK
由于Ubuntu11.04默认安装的是open-JDK,但有的东西只支持sun-jdk.所以这里需要更换.大概如下命令:
- // 更换数据源
- sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
- // 更新数据源
- sudo apt-get update
- // 安装sun-jdk
- sudo apt-get install sun-java6-jdk sun-java6-plugin
- // 更改系统默认的JDK
- sudo update-java-alternatives -s java-6-sun
- // 测试
- java -version
2. Ubuntu下安装ANT
sudo apt-get install ant
3.Ubuntu下安装SVN
sudo apt-get install subversion
3.1 Ubuntux下Eclipse SVN设置
对所有项目设置svn:ignore:Windows->Team->Ignored Resources->Add Pattern
对某个项目设置svn:ignore:右击项目->Team->Set Property->选择svn:ignore->在输入文本属性中输入
要对项目中某一个目录/文件设置svn:ignore,选中该文件->右击选择Team->选择添加进svn:ignore
4.Ubuntu下安装Eclipse
sudo apt-get install eclipse
Eclipse在Ubuntu下碰到无法输入的问题,原因是输入法兼容性问题,解决方案:http://carltao.blog.51cto.com/856514/541226
5.Ubuntu下压缩和解压RAR文件
sudo apt-get install rar unrar
6. Ubuntu下安装和启动mysql
sudo apt-get install mysql-server # 安装
sudo netstat -tap | grep mysql # 是否启动
sudo /etc/init.d/mysql restart # 重新启动
6.1.Ubuntu下安装mysql Ubuntu图形化客户端
sudo apt-get install mysql-admin
7.Ubuntu下安装Git
sudo apt-get install git-core
8.Ubuntu下安装google拼音
http://www.kukaka.org/home/showonews/306
8.1 Ubuntu下重启google拼音/scim
有时使用google拼音会发现无法输入中文的情况,如此的话就需要重启了,具体是先用pkill scim,干掉scim.然后输入scim -d重启即可.
9.Ubuntu下安装ssh
sudo apt-get install openssh-server
10.Ubuntu下windows通过VirtualBox安装的Ubuntu实现文件共享:
http://yulei568.blog.163.com/blog/static/1358867201122913117665/
http://judywang.iteye.com/blog/1037729
11.Ubuntu下主目录中文文件名变回英文
安装Ubuntu后发现你的主目录/home/youranme/下的文件变成来中文,比如我的是/home/guoyun,下面Downloads变成 来下载,但输入个cd /home/guoyun/下载 也进入不了这个目录,同时输入/home/guoyun/Downloads也没用.所以决定还是将中文文件名改回英文.也很简单,几行命令即可:
export LANG=en_US
xdg-user-dirs-gtk-update #会弹出个会话框,然后你勾选你要变回英文的文件即可
export LANG=zh_CN
最后发现Ubuntu实际上是将旧的移到新的目录里面:
- (process:6515): Gtk-WARNING **: Locale not supported by C library.
- Using the fallback 'C' locale.
- Moving DESKTOP directory from 桌面 to Desktop
- Moving DOWNLOAD directory from 下载 to Downloads
- Moving TEMPLATES directory from 模板 to Templates
- Moving PUBLICSHARE directory from 公共的 to Public
- Moving DOCUMENTS directory from 文档 to Documents
- Moving MUSIC directory from 音乐 to Music
- Moving PICTURES directory from 图片 to Pictures
- Moving VIDEOS directory from 视频 to Videos
12.Ubuntu下安装和启动tomcat6
# 安装
sudo apt-get instal tomcat6
# 根据自己情况看是否安装admin,docs,examples
sudo apt-get install tomcat6-admin tomcat6-docs tomcat6-examples
#启动
/etc/init.d/tomcat6 start
#停止
/etc/init.d/tomcat6 stop
#重启
/etc/init.d/tomcat6 restart
tomcat6所在目录:/var/lib/tomcat6,比如你要部署web,则是/var/lib/tomcat6/webapps
或者可以:
sudo service tomcat6 start
sudo service tomcat6 stop
sudo service tomcat6 restart
13.Ubuntu下tomcat,mysql等程序随机启动和取消随机启动
#添加随机启动,如mysql:
sudo update-rc.d -f mysql defaults
可以看到如下提示:
- Adding system startup for /etc/init.d/mysql ...
- /etc/rc0.d/K20mysql -> ../init.d/mysql
- /etc/rc1.d/K20mysql -> ../init.d/mysql
- /etc/rc6.d/K20mysql -> ../init.d/mysql
- /etc/rc2.d/S20mysql -> ../init.d/mysql
- /etc/rc3.d/S20mysql -> ../init.d/mysql
- /etc/rc4.d/S20mysql -> ../init.d/mysql
- /etc/rc5.d/S20mysql -> ../init.d/mysql
#取消随机启动,如mysql:
sudo update-rc.d -f mysql remove
可以看到如下提示:
- Removing any system startup links for /etc/init.d/mysql ...
- /etc/rc0.d/K20mysql
- /etc/rc1.d/K20mysql
- /etc/rc2.d/S20mysql
- /etc/rc3.d/S20mysql
- /etc/rc4.d/S20mysql
- /etc/rc5.d/S20mysql
- /etc/rc6.d/K20mysql
14. Ubuntu下类似Visio的工具dia
sudo apt-get install dia
15.Ubuntu下安装Google Reader
sudo add-apt-repository ppa:atareao/atareao
sudo apt-get update
sudo apt-get install google-reader-indicator
16.Ubuntu下安装如Outlook,Foxmail的邮件客户端:
sudo aptitude install pidgin