您的位置:首页 > 编程语言 > Java开发

Liux下bin文件jdk的安装和环境变量的配置

2013-03-13 13:43 459 查看
[Mike@localhost ~]$ mkdir /usr/java

mkdir: 无法创建目录"/usr/java": 权限不够

[Mike@localhost ~]$ su

密码:

[root@localhost Mike]# mkdir /usr/java

[root@localhost Mike]# cd usr

bash: cd: usr: 没有那个文件或目录

[root@localhost Mike]# cd ..

[root@localhost home]# cd ..

[root@localhost /]# cd usr

[root@localhost usr]# ls

bin games java lib64 local share tmp

etc include lib libexec sbin src

[root@localhost usr]# ls -l

总用量 180

dr-xr-xr-x. 2 root root 45056 3月 13 11:57 bin

drwxr-xr-x. 2 root root 4096 9月 23 2011 etc

drwxr-xr-x. 2 root root 4096 9月 23 2011 games

drwxr-xr-x. 3 root root 4096 3月 13 07:47 include

drwxr-xr-x. 2 root root 4096 3月 13 12:07 java

dr-xr-xr-x. 42 root root 16384 3月 13 11:57 lib

dr-xr-xr-x. 106 root root 61440 3月 13 11:59 lib64

drwxr-xr-x. 25 root root 12288 3月 13 11:57 libexec

drwxr-xr-x. 12 root root 4096 3月 13 07:42 local

dr-xr-xr-x. 2 root root 12288 3月 13 11:57 sbin

drwxr-xr-x. 221 root root 4096 3月 13 11:57 share

drwxr-xr-x. 4 root root 4096 3月 13 07:42 src

lrwxrwxrwx. 1 root root 10 3月 13 07:42 tmp -> ../var/tmp

[root@localhost usr]# chmod 777 java

[root@localhost usr]# cd java

[root@localhost java]# ls -l

总用量 67228

-rwxr-xr-x. 1 Mike Mike 68834886 3月 12 13:50 jdk-6u43-linux-x64-rpm.bin

[root@localhost java]# chmod jdk-6u43-linux-x64-rpm.bin

chmod: "jdk-6u43-linux-x64-rpm.bin" 后缺少操作数

请尝试执行"chmod --help"来获取更多信息。

[root@localhost java]# chmod 777 jdk-6u43-linux-x64-rpm.bin

[root@localhost java]# ls -l

总用量 67228

-rwxrwxrwx. 1 Mike Mike 68834886 3月 12 13:50 jdk-6u43-linux-x64-rpm.bin

[root@localhost java]# ./jdk-6u43-linux-x64-rpm.bin

Unpacking...

Checksumming...

Extracting...

UnZipSFX 5.50 of 17 February 2002, by Info-ZIP (Zip-Bugs@lists.wku.edu).

inflating: jdk-6u43-linux-amd64.rpm

inflating: sun-javadb-common-10.6.2-1.1.i386.rpm

inflating: sun-javadb-core-10.6.2-1.1.i386.rpm

inflating: sun-javadb-client-10.6.2-1.1.i386.rpm

inflating: sun-javadb-demo-10.6.2-1.1.i386.rpm

inflating: sun-javadb-docs-10.6.2-1.1.i386.rpm

inflating: sun-javadb-javadoc-10.6.2-1.1.i386.rpm

Preparing... ########################################### [100%]

1:jdk ########################################### [100%]

Unpacking JAR files...

rt.jar...

jsse.jar...

charsets.jar...

tools.jar...

localedata.jar...

plugin.jar...

javaws.jar...

deploy.jar...

Installing JavaDB

Preparing... ########################################### [100%]

1:sun-javadb-common ########################################### [ 17%]

2:sun-javadb-core ########################################### [ 33%]

3:sun-javadb-client ########################################### [ 50%]

4:sun-javadb-demo ########################################### [ 67%]

5:sun-javadb-docs ########################################### [ 83%]

6:sun-javadb-javadoc ########################################### [100%]

Java(TM) SE Development Kit 6 successfully installed.

Product Registration is FREE and includes many benefits:

* Notification of new versions, patches, and updates

* Special offers on Oracle products, services and training

* Access to early releases and documentation

Product and system data will be collected. If your configuration

supports a browser, the JDK Product Registration form will

be presented. If you do not register, none of this information

will be saved. You may also register your JDK later by

opening the register.html file (located in the JDK installation

directory) in a browser.

For more information on what data Registration collects and

how it is managed and used, see:
http://java.sun.com/javase/registration/JDKRegistrationPrivacy.html
Press Enter to continue.....
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: