This article mainly introduces the method of installing jdk1.8.0_151 and mysql5.6.38 in centos7.2.1511. It describes the specific steps and related setting skills of installing jdk1.8.0_151 and mysql5.6.38 in centos7.2.1511 in more detail. Friends who need it You can refer to it, I hope it can help everyone.
The example in this article describes how to install jdk1.8.0_151 and mysql5.6.38 on centos7.2.1511. Share it with everyone for your reference, the details are as follows:
1: Environment
2: Download the jdk rpm package locally and upload it to the server (because this I just started using wget to download directly to the server, and the installation kept reporting errors, so I decided to use this stupid method)
Download address: http://download.oracle.com/otn-pub/java/jdk /8u151-b12/e758a0de34e24606bca991d704f6dcbf/jdk-8u151-linux-x64.rpm
##JDK is installed in /usr/java by default 3: Configure environment variablesAfter installing jdk-8u151-linux-x64.rpm on my machine, I can perform the java –version operation normally without configuring environment variables, so I did not configure the JDK environment. Configuration of variables. But for the sake of future discomfort, here is a record of how to configure it. The operation is as follows:vi /etc/profile
JAVA_HOME=/usr/java/jdk1.8.0_151JRE_HOME=/usr/java/jdk1.8.0_151/jrePATH=$PATH:$JAVA_HOME/bin:$ JRE_HOME/binCLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/libexport JAVA_HOME JRE_HOME PATH CLASSPATHMake changes effective
[root@localhost ~]# source /etc/profile //使修改立即生效 [root@localhost ~]#echo $PATH //查看PATH值
[root@localhost ~]# echo $PATH /usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/usr/java/jdk1.8.0_25/bin:/usr/java/jdk1.8.0_25/jre/bin
# wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm # rpm -ivh mysql-community-release-el7-5.noarch.rpm # yum install mysql-community-server
# service mysqld restart
mysql> set password for 'root'@'localhost' =password('password'); Query OK, 0 rows affected (0.00 sec) mysql>
[mysql] default-character-set =utf8
mysql> grant all privileges on *.* to root@'%'identified by 'password';
mysql>create user 'username'@'%' identified by 'password';
Centos7.3 installation mysql5.7.18 rpm tutorial
Linux CentOS MySQL database installation and configuration example sharing
Share graphic tutorials on the installation and configuration method of mysql5.7.18 under centos6.4
The above is the detailed content of Centos7.2.1511 installation jdk1.8.0_151 and mysql5.6.38 tutorial. For more information, please follow other related articles on the PHP Chinese website!