Ubuntu下的开发环境配置

Java Env

  1. /etc/profile.d/mybash.sh

     1  export JAVA_HOME="/home/dreameryzy/java/jdk1.8.0_05"
     2  export PATH=$JAVA_HOME/bin:$PATH
     3  export CLASSPATH=$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:.
     4  export M2_HOME=/home/dreameryzy/java/apache-maven-3.3.1
     5  export PATH=$M2_HOME/bin:$PATH
     6
     7  export LANG="en_US.UTF-8"
     8  export LANGUAGE="en_US.UTF-8"
     9  export LC_CTYPE="zh_CN.UTF-8"
    10  export LC_NUMERIC="zh_CN.UTF-8"
    11  export LC_TIME="zh_CN.UTF-8"
    12  export LC_COLLATE="zh_CN.UTF-8"
    13  export LC_MONETARY="zh_CN.UTF-8"
    14  export LC_MESSAGES="zh_CN.UTF-8"
    15  export LC_PAPER="zh_CN.UTF-8"
    16  export LC_NAME="zh_CN.UTF-8"
    17  export LC_ADDRESS="zh_CN.UTF-8"
    18  export LC_TELEPHONE="zh_CN.UTF-8"
    19  export LC_MEASUREMENT="zh_CN.UTF-8"
    20  export LC_IDENTIFICATION="zh_CN.UTF-8"
    21  export LC_ALL="zh_CN.UTF-8"
    
  2. ~/.bash_aliases

     1  alias g='git'
     2  alias gl='git pull --prune'
     3  alias glog="git log --graph --pretty=format:'%Cred%h%Creset %an: %s - %Creset %C(yellow)%d%Creset %Cgreen(%cr)%Creset' --abbrev-commit --date=relative"
     4  alias ga='git add'
     5  alias gadd='git add'
     6  alias gpull='git pull'
     7  alias grm='git rm'
     8  alias gf='git fetch'
     9  alias gp='git push'
    10  alias gd='git diff'
    11  alias gc='git commit'
    12  alias gpl='git pull'
    13  alias gcm='git commit -m'
    14  alias gca='git commit -a'
    15  alias gco='git checkout'
    16  alias gb='git branch'
    17  alias gs='git status -sb'
    18  alias grm="git status | grep deleted | awk '{print \$3}' | xargs git rm"
    19  alias gpp='git pull && git push'
    20  alias glol='log --graph --decorate --pretty=oneline --abbrev-commit'
    21  alias gppl='git log --pretty=format:%aN | sort | uniq -c | sort -rn'
    22  alias gu='git reset --hard HEAD^'
    23  alias guncommit='git reset --hard HEAD^'
    24  alias vim="emacs"
    

Install Git and Emacs

  1. Emacs

    1  sudo add-apt-repository ppa:cassou/emacs
    2  sudo apt-get update
    3  sudo apt-get install emacs24
    
    • 安装完Emacs后还要配置好相应的中文输入法问题,经过折腾,总结如下:(ubuntu14.04,fxcti-table-wubi fxcti-table-wubi-large)
      1. 下载*Unity Tweat Tool*这个配置工具
      2. 下载*Yahei Consolas Hybrid*这个字体,并进行安装
      3. 利用1)的工具,Fonts这个tab的配置将所有字体都设置为2)的字体并应用
      4. 还要注意的是设置下locale环境。这个locale设置已经放在Install Java那里了,可以参考一下看看。^_^
  2. Git

    1  sudo add-apt-repository ppa:git-core/ppa
    2  sudo apt-get update
    3  sudo apt-get install git
    

Install Maven

  1. .bashrc

    1  export M2_HOME=/home/dreameryzy/java/apache-maven-3.3.1
    2  export PATH=$M2_HOME/bin:$PATH
    

Install Google Chrome

Install Eclipse

  1. 创建Ubuntu的Unity启动Icon

     1  emacs  ~/.local/share/applications/opt_eclipse.desktop
     2
     3  [Desktop Entry]
     4  Type=Application
     5  Name=Eclipse
     6  Comment=Eclipse Integrated Development Environment
     7  Icon=** something like /opt/eclipse/icon.xpm **
     8  Exec= ** something like /opt/eclipse/eclipse **
     9  Terminal=false
    10  Categories=Development;IDE;Java;
    11  StartupWMClass=Eclipse
    12
    13  nautilus ~/.local/share/applications
    14
    15  finally drop to unity launcher, that's all.
    

Install ia32-libs On Ubuntu 14.04

1  sudo -i
2  cd /etc/apt/sources.list.d
3  echo "deb http://archive.ubuntu.com/ubuntu/ precise main restricted universe multiverse" >ia32-libs-raring.list
4  apt-get update
5  apt-get install ia32-libs
6  rm /etc/apt/sources.list.d/ia32-libs-raring.list
7  apt-get update
8  exit