ubuntu sunjavajdk(zhuan)

1.Ubuntu下更换JDK

        由于Ubuntu11.04默认安装的是open-JDK,但有的东西只支持sun-jdk.所以这里需要更换.大概如下命令:          

Java代码  收藏代码
  1. //  更换数据源  
  2. sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"  
  3.   
  4. // 更新数据源  
  5. sudo apt-get update  
  6.   
  7. // 安装sun-jdk  
  8. sudo apt-get install sun-java6-jdk sun-java6-plugin  
  9.   
  10. // 更改系统默认的JDK  
  11. sudo update-java-alternatives -s java-6-sun  
  12.   
  13. // 测试  
  14. 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实际上是将旧的移到新的目录里面:

Html代码  收藏代码
  1. (process:6515): Gtk-WARNING **: Locale not supported by C library.  
  2.     Using the fallback 'C' locale.  
  3. Moving DESKTOP directory from 桌面 to Desktop  
  4. Moving DOWNLOAD directory from 下载 to Downloads  
  5. Moving TEMPLATES directory from 模板 to Templates  
  6. Moving PUBLICSHARE directory from 公共的 to Public  
  7. Moving DOCUMENTS directory from 文档 to Documents  
  8. Moving MUSIC directory from 音乐 to Music  
  9. Moving PICTURES directory from 图片 to Pictures  
  10. 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 

   可以看到如下提示:

Txt代码  收藏代码
  1. Adding system startup for /etc/init.d/mysql ...  
  2.    /etc/rc0.d/K20mysql -> ../init.d/mysql  
  3.    /etc/rc1.d/K20mysql -> ../init.d/mysql  
  4.    /etc/rc6.d/K20mysql -> ../init.d/mysql  
  5.    /etc/rc2.d/S20mysql -> ../init.d/mysql  
  6.    /etc/rc3.d/S20mysql -> ../init.d/mysql  
  7.    /etc/rc4.d/S20mysql -> ../init.d/mysql  
  8.    /etc/rc5.d/S20mysql -> ../init.d/mysql  

  #取消随机启动,如mysql:

   sudo update-rc.d -f mysql remove

   可以看到如下提示:

Txt代码  收藏代码
  1. Removing any system startup links for /etc/init.d/mysql ...  
  2.    /etc/rc0.d/K20mysql  
  3.    /etc/rc1.d/K20mysql  
  4.    /etc/rc2.d/S20mysql  
  5.    /etc/rc3.d/S20mysql  
  6.    /etc/rc4.d/S20mysql  
  7.    /etc/rc5.d/S20mysql  
  8.    /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

      也有Empathy但不太稳定
一个不会敲代码的程序员
原文地址:https://www.cnblogs.com/hitwtx/p/2350886.html