Ubuntu Server 使用 PPA 安裝 Java (JDK) 8

來源:互聯網
上載者:User

標籤:部署   軟體源   ubunt   html   安裝   server   伺服器   epo   版本號碼   

前言

在 Ubuntu Server 中使用 PPA 安裝 JDK 相比去 Oracle 官網下載包配置環境變數的好處是,安裝方便快捷,還可以 apt-get 更新。

步驟

添加 Java 8 的 PPA 源,可能會提示 add-apt-repository 未安裝,所以需安裝 python-software-properties 和 software-properties-common,添加 PPA 源需要按斷行符號確認。

sudo apt-get install python-software-properties -ysudo apt-get install software-properties-common -ysudo add-apt-repository ppa:webupd8team/java

添加完成後更新系統軟體源並安裝。

sudo apt-get updatesudo apt-get install oracle-java8-installer -y

等待下載安裝完成,查看 Java 版本號碼,沒啥問題的話就可以了。

java -version
後話

安裝這個有什麼用呢?除了常用的部署 Tomcat 或者運行 Java 程式,當然是搭建自己的 Minecraft 伺服器啦。_(:3」∠)_

Ubuntu Server 使用 PPA 安裝 Java (JDK) 8

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.