首先要编辑/etc/apt/source,添加网络镜像以下载最新的包。
例如:
deb http://ftp.gtlib.gatech.edu/
deb-src http://ftp.gtlib.gatech.edu/
接下来安装JDK6,因为debian使用了里外的java虚拟机,因此需要配置一下系统。
- debian-lenny:/home/fxu/Desktop/Downloads# apt-get install sun-java6-jdk
- Reading package lists... Done
- Building dependency tree
- Reading state information... Done
- The following extra packages will be installed:
- gsfonts-x11 odbcinst1debian1 sun-java6-bin sun-java6-jre unixodbc
- Suggested packages:
- binfmt-support sun-java6-demo sun-java6-doc sun-java6-source sun-java6-plugin ia32-sun-java6-plugin
- sun-java6-fonts libmyodbc odbc-postgresql libct1
- The following NEW packages will be installed:
- gsfonts-x11 odbcinst1debian1 sun-java6-bin sun-java6-jdk sun-java6-jre unixodbc
- 0 upgraded, 6 newly installed, 0 to remove and 827 not upgraded.
- Need to get 51.1MB/51.4MB of archives.
- After this operation, 152MB of additional disk space will be used.
- Do you want to continue [Y/n]? y
- Get:1 http://ftp.gtlib.gatech.edu lenny/non-free sun-java6-jre 6-07-4 [6325kB]
- Get:2 http://ftp.gtlib.gatech.edu lenny/non-free sun-java6-bin 6-07-4 [27.3MB]
- Get:3 http://ftp.gtlib.gatech.edu lenny/non-free sun-java6-jdk 6-07-4 [17.4MB]
- Get:4 http://ftp.gtlib.gatech.edu lenny/main gsfonts-x11 0.21 [10.4kB]
- Fetched 51.1MB in 1min36s (528kB/s)
- Preconfiguring packages ...
- Selecting previously deselected package sun-java6-jre.
- (Reading database ... 100784 files and directories currently installed.)
- Unpacking sun-java6-jre (from .../sun-java6-jre_6-07-4_all.deb) ...
- Selecting previously deselected package odbcinst1debian1.
- Unpacking odbcinst1debian1 (from .../odbcinst1debian1_2.2.11-16_i386.deb) ...
- Selecting previously deselected package unixodbc.
- Unpacking unixodbc (from .../unixodbc_2.2.11-16_i386.deb) ...
- Selecting previously deselected package sun-java6-bin.
- Unpacking sun-java6-bin (from .../sun-java6-bin_6-07-4_i386.deb) ...
- sun-dlj-v1-1 license has already been accepted
- Selecting previously deselected package sun-java6-jdk.
- Unpacking sun-java6-jdk (from .../sun-java6-jdk_6-07-4_i386.deb) ...
- sun-dlj-v1-1 license has already been accepted
- Selecting previously deselected package gsfonts-x11.
- Unpacking gsfonts-x11 (from .../gsfonts-x11_0.21_all.deb) ...
- Setting up odbcinst1debian1 (2.2.11-16) ...
- Setting up unixodbc (2.2.11-16) ...
- Setting up gsfonts-x11 (0.21) ...
- Setting up sun-java6-bin (6-07-4) ...
- Setting up sun-java6-jre (6-07-4) ...
- Setting up sun-java6-jdk (6-07-4) ...
- debian-lenny:/home/fxu# /usr/sbin/update-alternatives --config java
- There are 4 alternatives which provide `java'.
- Selection Alternative
- -----------------------------------------------
- * 1 /usr/bin/gij-4.3
- + 2 /usr/lib/jvm/java-gcj/jre/bin/java
- 3 /usr/bin/gij-4.1
- 4 /usr/lib/jvm/java-6-sun/jre/bin/java
- Press enter to keep the default[*], or type selection number: 4
- Using '/usr/lib/jvm/java-6-sun/jre/bin/java' to provide 'java'.
- debian-lenny:/home/fxu# /usr/sbin/update-alternatives --config javac
- There is only 1 program which provides javac
- (/usr/lib/jvm/java-6-sun/bin/javac). Nothing to configure.
- debian-lenny:/home/fxu# java -version
- java version "1.6.0_07"
- Java(TM) SE Runtime Environment (build 1.6.0_07-b06)
- Java HotSpot(TM) Client VM (build 10.0-b23, mixed mode, sharing)
jdk-6u7-nb-6_1-linux-ml.sh
sjsas-9_1_01-mysql-linux.bin
sailfin-installer-v1-b37i-linux.jar
将jdk-6u7-nb-6_1-linux-ml.sh,sjsas-9_1_01-mysql-linux.bin添加可执行属性,chmod u+x filename。然后运行 ./filename就可以了。
因为我在虚拟机上操作,在安装sailfin的时候出现如下错误:
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
这时候需要用如下命令:
java -Xms32m -Xmx400m -jar sailfin-installer-v1-b37i-linux.jar
期间还需要安装libstdc++5:
apt-get install libstdc++5
至此,一套环境算是构建完毕,可以用Java进行SIP开发了。