In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
How to install JDK Tomcat MySQL in Linux system? Many novices are not very clear about this. In order to help you solve this problem, the following editor will explain it in detail. People with this need can come and learn. I hope you can gain something.
What is Linux system Linux is a free-to-use and free-spread UNIX-like operating system, is a POSIX-based multi-user, multi-task, multi-threaded and multi-CPU operating system, using Linux can run major Unix tools, applications and network protocols.
One environment
CentOS 7.4 64-bit (based on RedHat)
Native: macOS High Sierra
Two compressed package
Three file transfer
Enter the SFTP command connection-> enter the login password for the instance
Sftp root@ public network IP
Upload
Put local file server path
download
Get server file local path
Four remote access
Enter the SSH command connection-> enter the login password for the instance
Ssh root@ public network IP
5. Turn off the firewall
Turn off the firewall
Systemctl stop firewalld.service
Turn off the firewall boot self-startup feature
Systemctl disable firewalld.service
View firewall status
Firewall-cmd-state
6. Install JDK
Check whether java is installed on the current Linux system
Rpm-qa | grep java
Uninstall installed java
Rpm-e-the software to be uninstalled by nodeps
Create a new directory
Cd / usr/local
Mkdir jdk
Decompression
Directory where the cd jdk package is located
Tar-xvf jdk-8u171-linux-x64.tar.gz-C / usr/local/jdk
Configure the jdk environment variable to copy the following configuration
Vim / etc/profile
# java environmentJAVA_HOME=/usr/local/jdk/jdk1.8.0_171CLASSPATH=.:$JAVA_HOME/lib.tools.jarPATH=$JAVA_HOME/bin:$PATHexport JAVA_HOME CLASSPATH PATH
Reload / etc/profile configuration file
Source / etc/profile
7. Install Tomcat
Create a new directory
Cd / usr/local
Mkdir tomcat
Decompression
Directory where the cd tomcat package is located
Tar-xvf apache-tomcat-8.5.31.tar.gz-C / usr/local/tomcat
Enter the bin directory
Cd / usr/local/tomcat/apache-tomcat-8.5.31/bin
Start up
. / startup.sh
Close
. / shutdown.sh
8. Install MySQL
Check whether mysql is installed on the current Linux system
Rpm-qa | grep mysql
Uninstall installed mysql
Rpm-e-the software to be uninstalled by nodeps
Check whether mariadb is installed on the current Linux system
Rpm-qa | grep mariadb
Uninstall installed mariadb
Rpm-e-the software to be uninstalled by nodeps
Mysql dependence
Yum install libaio
Create a new directory
Cd / usr/local
Mkdir mysql
Decompression
Directory where the cd mysql package is located
Tar-xvf mysql-8.0.11-1.el7.x86_64.rpm-bundle.tar-C / usr/local/mysql
Installation
Cd / usr/local/mysql rpm-ivh mysql-community-common-8.0.11-1.el7.x86_64.rpm rpm-ivh mysql-community-libs-8.0.11-1.el7.x86_64.rpm rpm-ivh mysql-community-client-8.0.11-1.el7.x86_64.rpm rpm-ivh mysql-community-server-8.0.11-1.el7.x86_64.rpm
Initialize the mysql database
Mysqld-initialize
View mysql password
More/var/log/mysqld.log
Modify the users and groups of the mysql database directory
Chown mysql:mysql / var/lib/mysql-R
Start the mysql database
Systemctl start mysqld.service
View mysql database status
Systemctl status mysqld.service
Enter the Security Settings Wizard (the new version of mysql must first change the password of the root user, otherwise you cannot execute any commands after logging in)
Mysql_secure_installation
Guide one
The existing password for the user account root has expired. Please set a new password.
Guide two
The authentication password plug-in can be used to test passwords and improve security. It checks the strength of passwords and allows users to set only those passwords that are secure enough. Would you like to install the authentication password plug-in?
Guide three
Use an existing root password
Guide four
By default, MySQL has anonymous users that allow anyone to log in to the user accounts created for them by MySQL without need, just to test and make the installation smoother. You should delete them before entering the production environment.
Guide five
Usually the root should only be allowed to connect to "localhost", which ensures that someone cannot guess the root password from the network (I don't know whether to choose yes or no remote access requires additional settings, which will be discussed below)
Guide six
By default, MySQL provides a database called "test" that anyone can access for testing and should be removed before entering production.
Guide 7
Reloading the privilege table will ensure that all changes made so far will take effect immediately
Mysql boot by default
Solve the problem
Java.sql.SQLException: null, message from server: "Host '113.57.183.25' is not allowed to connect to this MySQL server"
Reason: MySQL does not allow remote access
Solution-> Server input:
Mysql-uroot-p
Enter the MySQL login password
Use mysql; update user set host ='% 'where user =' root'; select host, user from user; flush privileges;java.sql.SQLNonTransientConnectionException: Public Key Retrieval is not allowed
Reason: retrieval of public key is not allowed
Solution-> Code modification:
MySQL url add a parameter allowPublicKeyRetrieval=true
Jdbc:mysql://120.79.191.83:3306/web?characterEncoding=utf8&useSSL=false&allowPublicKeyRetrieval=true
Navicat Premium'caching_sha2_password' cannot be loaded: dlopen (.. / Frameworks/caching_sha2_password.so, 2): image not found
Reason: MySQL8.0 changed the authentication plug-in
Solution-> Server input:
Mysql-uroot-p
Enter the MySQL login password
ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY' replace this with your own password.
Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.