Linux installs Java JDK, MySQL, tomcat

Source: Internet
Author: User


Installing JAVAJDK 1.8

Check if RPM-QA is installed | grep JDK

RPM mode installation Download java1.8 JDK http://download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/ jdk-8u131-linux-x64.rpm

Upload to Usr/java

Add executable permissions

Cd/usr/java

chmod +x jdk-8u131-linux-x64.rpm

Perform the rpm command to install

RPM-IVH jdk-8u131-linux-x64.rpm (I is the installation meaning, VH is the display installation process)

Check if the installation is successful

Java--version

RPM installation does not require configuration of environment variables

Install MySQL 5.7.17 (RMP mode installation)

Download RPM Package Http://mirrors.sohu.com/mysql/MySQL-5.7/mysql-5.7.17-1.el6.x86_64.rpm-bundle.tar

1. Check if RPM-QA is installed | grep mysql

If installed can remove rpm-e--nodeps mysql name

2. Create MySQL group and MySQL user

Groupadd MySQL

Useradd-r-G MySQL MySQL

After completion can be ID MySQL view

3. Upload MySQL to/usr/local/

4. Run the command to extract to/usr/local/

Cd/usr/local

  TAR-XVF Mysql-5.7.17-1.el6.x86_64.rpm-bundle.tar

5. Uninstalling the system's own mariadb-lib

Rpm-qa | grep mariadb

  RPM-E mariadb-libs-5.5.56-2.el7.x86_64--nodeps

6. Installing the simplest Mysql-server service requires only the following 4 installation packages, which are installed in sequence

  RPM-IVH mysql-community-common-5.7.17-1.el6.x86_64.rpm

RPM-IVH mysql-community-libs-5.7.17-1.el6.x86_64.rpm

RPM-IVH mysql-community-client-5.7.17-1.el6.x86_64.rpm

  RPM-IVH mysql-community-server-5.7.17-1.el6.x86_64.rpm

7. Start MySQL

Service mysqld Start

Get temporary password:grep ' temporary password '/var/log/mysqld.log

8. Login to reset Password

  Mysql-uroot-p

Enter password

  Set Password = password (' 1234 '); --You can modify this policy by saying that it is not compliant with security policy

Set global validate_password_policy=0;
  set global validate_password_length=4; --and then you can change it.

9. Restart Service login with new password

  Exit

Service mysqld Restart

Mysql-uroot-p

1234

10. Configure Boot Boot

Create a configuration file to start MySQL:touch/usr/lib/systemd/system/mysqld.service

Edit this file:vim/usr/lib/systemd/system/mysqld.service

  

[Unit]description=MySQL serverdocumentation=man:mysqld (8) documentation=http ://dev.mysql.com/doc/refman/en/using-systemd.htmlafter=network.targetafter=  Syslog.target[install]wantedby=multi-user.target[service]user=Mysqlgroup=  Mysqlexecstart=/usr/sbin/mysqld--defaults-file=/etc/

Execstart fill in the actual path

  Which mysqld

Output = /usr/sbin/mysqld

Start mysql5.7 by Systemctl mode

  Systemctl Start mysqld

Set boot up

  Systemctl Enable Mysqld  

Cancel Boot Boot

  Systemctl Disable Mysqld

View service Current status systemctl list-unit-files | grep mysqld

Installing Tomcat 9.0

Download Tomcat http://tomcat.apache.org/download-90.cgi Download tar.gz

Linux installs Java JDK, MySQL, tomcat

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.