• 欢迎访问金笔头博客,这是一个菜鸟(伪)程序员的自留地,欢迎访问我的github:点击进入

SUSE Linux Enterprise 11 SP3 64bit安装JDK1.7

Linux eason 4009次浏览 7个评论 扫描二维码

1.创建文件夹并使用FTP上传jdk-7u79-linux-x64.rpm到当前目录

linux-suse:~ # mkdir compass && cd compass && mkdir jdk && cd jdk

linux-suse:~/compass/jdk # pwd

/root/compass/jdk

linux-suse:~/compass/jdk #

SUSE Linux Enterprise 11 SP3 64bit安装JDK1.7

2.给所有用户添加可执行权限

linux-suse:~/compass/jdk # ll

total 134984

-rw-r–r– 1 root root 138082565 Nov 13 18:56 jdk-7u79-linux-x64.rpm

linux-suse:~/compass/jdk # chmod +x jdk-7u79-linux-x64.rpm

linux-suse:~/compass/jdk # ll

total 134984

-rwxr-xr-x 1 root root 138082565 Nov 13 18:56 jdk-7u79-linux-x64.rpm

SUSE Linux Enterprise 11 SP3 64bit安装JDK1.7

3.安装程序

linux-suse:~/compass/jdk # rpm -ivh jdk-7u79-linux-x64.rpm

SUSE Linux Enterprise 11 SP3 64bit安装JDK1.7

4.安装好之后,jdk默认主目录是在/usr/java/jdk1.7.0_79,我们要将其添加至环境变量中

SUSE Linux Enterprise 11 SP3 64bit安装JDK1.7

编辑/etc/profile文件,在文件最后添加JAVA_HOME,CLASSPATH,JRE_HOME

linux-suse:~/compass/jdk # vi /etc/profile

SUSE Linux Enterprise 11 SP3 64bit安装JDK1.7

5.使用source命令使环境变量生效

linux-suse:~/compass/jdk # source /etc/profile

6.验证是否成功

linux-suse:~/compass/jdk # java -version

java version “1.7.0_79”

Java(TM) SE Runtime Environment (build 1.7.0_79-b15)

Java HotSpot(TM) 64-Bit Server VM (build 24.79-b02, mixed mode)

linux-suse:~/compass/jdk #


金笔头博客, 版权所有丨如未注明 , 均为原创, 转载请注明SUSE Linux Enterprise 11 SP3 64bit安装JDK1.7
喜欢 (0)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
(7)个小伙伴在吐槽
  1. It is really a nice and useful piece of info. I am happy that you shared this helpful info with us. Please stay us up to date like this. Thank you for sharing.
    eebest8 seo2016-02-02 16:47 Reply Windows 7 | Firefox 3.5.3
  2. Thanks again for the blog.Thanks Again. Great.
    mone divine2016-01-02 02:46 Reply Windows XP | Firefox 3.5.3
  3. Hey there! Someone in my Facebook group shared this website with us so I came to check it out. I'm definitely enjoying the information. I'm book-marking and will be tweeting this to my followers! Outstanding blog and excellent design.
    moncler on sale us 122015-12-26 20:14 Reply Windows 7 | 未知浏览器
  4. Hi to every body, it's my first visit of this webpage; this blog consists of remarkable and in fact fine data in favor of readers.
    occhiali da sole ray ban 2015 prezzi2015-12-11 02:06 Reply Windows 7 | 未知浏览器
    • welcome to my blog :razz:
      wangyisheng2015-12-11 21:45 Reply Windows 7 | Chrome 45.0.2454.101
  5. Hi, I do think this is an excellent blog. I stumbledupon it ;) I may come back once again since i have saved as a favorite it. Money and freedom is the greatest way to change, may you be rich and continue to help other people.
    moncler eindhoven university2015-12-08 20:01 Reply Windows 7 | 未知浏览器
    • thank you,i will
      wangyisheng2015-12-08 22:19 Reply Windows 7 | Chrome 45.0.2454.101