Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Analysis of the tutorial of installing jdk1.8.0_151 based on centos7.2.1511 system

2025-04-14 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces the centos7.2.1511 system installation jdk1.8.0_151 tutorial parsing, the content of the article is the author carefully selected and edited, based on the centos7.2.1511 system installation jdk1.8.0_151 tutorial parsing has a certain pertinence, for everyone's reference significance or greater, the following with the author to understand the next topic content.

One: environment

Second: download the rpm package of jdk locally and upload it to the CVM (because I just started to use wget to download directly to the CVM, and the installation keeps 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

Three: configure environment variables

My machine can perform java-version operations normally without configuring environment variables after installing jdk-8u151-linux-x64.rpm, so I did not configure JDK environment variables. However, for future discomfort, here is a record of how to configure it, as follows:

Modify the system environment variable file

Vi / etc/profile

Append the following to the file:

JAVA_HOME=/usr/java/jdk1.8.0_151

JRE_HOME=/usr/java/jdk1.8.0_151/jre

PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin

CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/libexport JAVA_HOME JRE_HOME PATH CLASSPATH

Make the changes effective

[root@localhost ~] # source / etc/profile / / make the changes effective immediately

[root@localhost ~] # echo $PATH / / View path value

View the status of the system environment

[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

4: install mysql (download and install mysql-server on the official website)

# 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

Restart the mysql service after successful installation.

# service mysqld restart

The initial installation of the mysql,root account does not have a password.

Set password

Mysql > set password for 'root'@'localhost' = password (' password')

Query OK, 0 rows affected (0.00 sec)

Mysql >

Five: configure mysql

1. Coding

The mysql configuration file is / etc/my.cnf

Finally, add the coding configuration.

[mysql]

Default-character-set = utf8

The character encoding here must be the same as in / usr/share/mysql/charsets/Index.xml.

2. Remote connection settings

Assign all permissions on all tables in all databases to root users at all IP addresses.

Mysql > grant all privileges on *. * to root@'%'identified by 'password'

If it is a new user instead of root, create a new user first

Mysql > create user 'username'@'%' identified by' password'

At this point, you can connect remotely.

After reading the above centos7.2.1511 system installation jdk1.8.0_151 tutorial analysis, many readers must have some understanding, if you need to get more industry knowledge and information, you can continue to follow our industry information column.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report