Linux 笔记 #02# Installing MySQL & Installing the Default JRE/JDK
2018-01-12 21:17
260 查看
Environment: debian 8
1. Installing the Default JRE/JDK:
2. Managing Java:
3. Setting the JAVA_HOME Environment Variable:
Contents of /etc/environment :
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-81. 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
相关文章推荐
- Procedure for installing and setting Sun JDK Java on Default Amazon Linux AMI
- Procedure for installing and setting Sun JDK Java on Default Amazon Linux AMI
- Overriding the default Linux kernel 20-second TCP socket connect timeout
- Make sure you have Java JDK or JRE installed and the required ports are free
- Linux下tomcat启动Neither the JAVA_HOME nor the JRE_HOME environment variable is defined At least one of
- Fail to load the JNI share library"..\jdk1.7.0\\bin\..\jre\bin\client\jvm.dll"解决方法
- MySQL学习笔记2-System administration(Installing MySQL on Linux Using RPM Packages)
- 重读<Understanding The Linux Virtual Memory Manager>笔记
- linux下JDK安装笔记
- [Linux笔记001]:jdk及eclipse安装
- Please make sure the -vm option in eclipse.ini is pointing to a JDK and verify that Installed JRE’s
- Unable to launch the Java Virtual Machine Located at path: ..\..\jdk\jre\bin\client\jvm.dll
- Installing the JDK with JAVA
- 通哥运维笔记之Linux下安装JDK
- Linux 下安装jdk, MyEclipse和WebLogic笔记
- Linux+Tomcat建站笔记(JDK,Mysql,Vsftpd,Iptables等配置)
- Eclipse启动时报错:A Java RunTime Environment (JRE) or Java Development Kit (JDK) must be available in order to run Eclipse. No java virtual machine was found after searching the following locations:…
- Hadoop学习笔记(二)---linux中JDK的安装
- Failed to load the JNI shared library "D:\Program Files\Java\jdk1.5.0_08\bin\..\jre\bin\client\jvm.d
- windows 与linux出现 Neither the JAVA_HOME nor the JRE_HOME environment variable is defined