码迷,mamicode.com
首页 > 数据库 > 详细

Linux 笔记 #02# Installing MySQL & Installing the Default JRE/JDK

时间:2018-01-12 22:37:32      阅读:174      评论:0      收藏:0      [点我收藏+]

标签:-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-server
sudo 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 update
sudo apt-get install default-jre
sudo apt-get install default-jdk

2. Managing Java:

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

3. Setting the JAVA_HOME Environment Variable:

root@i:~# sudo update-alternatives --config java
There 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.
root@i:~# sudo vim /etc/environment
root@i:~# source /etc/environment # reload
root@i:~# 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

标签:-o   jre   www   enc   div   get   linu   his   ble   

原文地址:https://www.cnblogs.com/xkxf/p/8277582.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!