naxsu@ubuntu:/usr/local$ sudo ./jdk-6u31-linux-i586.bin
./jdk-6u31-linux-i586.bin: 1: ./jdk-6u31-linux-i586.bin: cannot open html: No such file
./jdk-6u31-linux-i586.bin: 2: ./jdk-6u31-linux-i586.bin: cannot open head: No such file
./jdk-6u31-linux-i586.bin: 3: ./jdk-6u31-linux-i586.bin: cannot open title: No such file
./jdk-6u31-linux-i586.bin: 3: ./jdk-6u31-linux-i586.bin: Request: not found
./jdk-6u31-linux-i586.bin: 4: ./jdk-6u31-linux-i586.bin: cannot open META: No such file
./jdk-6u31-linux-i586.bin: 5: ./jdk-6u31-linux-i586.bin: cannot open link: No such file
./jdk-6u31-linux-i586.bin: 6: ./jdk-6u31-linux-i586.bin: cannot open link: No such file
: not foundlinux-i586.bin: 7: ./jdk-6u31-linux-i586.bin:
./jdk-6u31-linux-i586.bin: 8: ./jdk-6u31-linux-i586.bin: cannot open body: No such file
./jdk-6u31-linux-i586.bin: 9: ./jdk-6u31-linux-i586.bin: cannot open div: No such file
./jdk-6u31-linux-i586.bin: 10: ./jdk-6u31-linux-i586.bin: cannot open table: No such file
./jdk-6u31-linux-i586.bin: 11: ./jdk-6u31-linux-i586.bin: cannot open tr: No such file
./jdk-6u31-linux-i586.bin: 12: ./jdk-6u31-linux-i586.bin: Syntax error: redirection unexpected
naxsu@ubuntu:/mnt$ sudo fdisk -l
[sudo] password for naxsu:
Disk /dev/sda: 21.5 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders, total 41943040 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00063e01
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 40894463 20446208 83 Linux
/dev/sda2 40896510 41940991 522241 5 Extended
/dev/sda5 40896512 41940991 522240 82 Linux swap / Solaris
Disk /dev/sdb: 4011 MB, 4011851776 bytes
255 heads, 63 sectors/track, 487 cylinders, total 7835648 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00328b06
Device Boot Start End Blocks Id System
/dev/sdb1 * 63 7835647 3917792+ c W95 FAT32 (LBA)
naxsu@ubuntu:~$ sudo mount /dev/sdb1 /mnt/myusb
naxsu@ubuntu:~$ ls
naxsu@ubuntu:~$ cd /mnt/myusb/
naxsu@ubuntu:/mnt/myusb$ sudo cp jdk-6u24-linux-i586.bin /usr/local/
naxsu@ubuntu:/usr/local$ sudo chmod u+x jdk-6u24-linux-i586.bin
naxsu@ubuntu:/usr/local$ sudo ./jdk-6u24-linux-i586.bin
………
Press Enter to continue.....
Done.
配置环境变量
用vim编辑,没有就安装
naxsu@ubuntu:/usr/local/jdk1.6.0_24$ vim /etc/profile
The program 'vim' can be found in the following packages:
* vim
* vim-gnome
* vim-tiny
* vim-athena
* vim-gtk
* vim-nox
Try: sudo apt-get install
naxsu@ubuntu:/usr/local/jdk1.6.0_24$ sudo apt-get install vim