官网下载JDK:Oracle.com/technetwork/Java/javase/downloads/index.html
sudo sh jdk-6u24-linux-i586.bin
2.设置环境变量
sudo vi /etc/environment
增加:
export JAVA_HOME=/home/lispking/Java/jdk1.6.0_24
export JRE_Home=$JAVA_HOME/jre
export CLASSPATH=$CLASSPATH:$JAVA_HOME/lib:$JAVA_HOME/jre/lib
sudo vi /etc/profile
在umask 022前增加:
export JAVA_HOME=/home/lispking/Java/jdk1.6.0_24
export JRE_HOME=$JAVA_HOME/jre
export CLASSPATH=$CLASSPATH:$JAVA_HOME/lib:$JAVA_HOME/jre/lib
export PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH:$HOME/bin
注销重登陆或者在shell下export上述的变量,然后可以用java -version查看是否如下信息
java version "1.6.0_24"
Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
Java HotSpot(TM) Server VM (build 19.1-b02, mixed mode)
3.下载辅助包:
sudo apt-get install build-essential libncurses5-dev m4 libssl-dev unixodbc unixodbc-dev libc6 freeglut3-dev libwxgtk2.8-dev sun-java6-jre xsltproc fop
4. 在下载otp_src_R14B02.tar.gz并解压,然后进入otp_src_R14B02目录,运行以下命令
./configure & make
sudo make install
5.测试Erlang安装结果
输入erl回车后是否显示以下信息
Erlang R14B02 (erts-5.8.3) [source] [smp:4:4] [rq:4] [async-threads:0] [hipe] [kernel-poll:false]
Eshell V5.8.3 (abort with ^G)
1>
完毕.