Linux 筆記 #02# Installing MySQL & Installing the Default JRE/JDK

來源:互聯網
上載者:User

標籤:-o   jre   www   enc   div   get   linu   his   ble   

Environment: debian 8

Installing MySQL

Reference material: https://linode.com/docs/databases/mysql/how-to-install-mysql-on-debian-8/

sudo apt-get install mysql-serversudo mysql_secure_installation # 進行一些初始化設定mysql -u root -p 
 Installing the Default JRE/JDK

Reference material: https://www.digitalocean.com/community/tutorials/how-to-install-java-with-apt-get-on-debian-8

1. Installing the Default JRE/JDK:

sudo apt-get updatesudo apt-get install default-jresudo apt-get install default-jdk

2. Managing Java:

sudo update-alternatives --config java # 同時可以看到 Java 被安裝的位置

3. Setting the JAVA_HOME Environment Variable:

[email protected]:~# sudo update-alternatives --config javaThere is only one alternative in link group java (providing /usr/bin/java): /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java # copy this Path!Nothing to configure.[email protected]:~# sudo vim /etc/environment[email protected]:~# source /etc/environment # reload[email protected]:~# echo $JAVA_HOME/usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java

Contents of  /etc/environment :

JAVA_HOME="/usr/lib/jvm/java-8-oracle" # your own copied path

 

Linux 筆記 #02# Installing MySQL & Installing the Default JRE/JDK

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.