Installing JDK, Tomcat, and MySQL (CentOS 7.4)

Source: Internet
Author: User
Tags yum repolist

  • Uploading packages
  • rz上传jdk-8u181-linux-x64.tar.gz和apache-tomcat-8.5.32.tar.gz或者FileZilla Client进行sftp链接上传

      • Unzip the JDK to the/usr/local/directory
    tar xzvf jdk-8u181-linux-x64.tar.gz -C /usr/local/
      • See if Java is installed successfully
    cd /usr/local/jdk1.8.0_181/bin[[email protected] bin]# ./java -version java version "1.8.0_181"Java(TM) SE Runtime Environment (build 1.8.0_181-b13)Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mix-ed mode)
    • Configuring Environment variables
      [[email protected] bin]# vim /etc/profileexport JAVA_HOME=/usr/local/jdk1.8.0_181export CLASSPATH=.:JAVA_HOME/libexport PATH=$PATH:$JAVA_HOME/bin
      [[email protected] ~]# source /etc/profile[[email protected] ~]# java -version      openjdk version "1.8.0_131"OpenJDK Runtime Environment (build 1.8.0_131-b12)OpenJDK 64-Bit Server VM (build 25.131-b12, mixed mode)
    • Installing Tomcat
      [[email protected] software]# tar xzvf apache-tomcat-8.5.32.tar.gz[[email protected] software]# CD Apache-tomcat-8.5.32/[[email protected] apache-tomcat-8.5.32]# ll total dosage 92drwxr-x---. 2 root root 4096 August 14:56 bindrwx------. 2 root root 238 June 03:53 confdrwxr-x---. 2 root root 4096 August 14:56 lib-rw-r-----. 1 root root 57092 June 03:53 licensedrwxr-x---. 2 root root 6 June 03:50 logs-rw-r-----. 1 root root 1723 June 03:53 notice-rw-r-----. 1 root root 7138 June 03:53 release-notes-rw-r-----. 1 root root 16246 June 03:53 running.txtdrwxr-x---. 2 root root 30 August 14:56 tempdrwxr-x---. 7 root root 81 June 03:51 webappsdrwxr-x---. 2 root root 6 June 03:50 work[[email protected] apache-tomcat-8.5.32]# cd bin/[[email protected] bin]# pwd /root/software/apache-tomcat-8.5.32/bin[[email protected] bin]#./startup.sh Using CATALINA_BASE:/root/ Software/apache-tomcat-8.5.32using Catalina_home:/ROOT/SOFTWARE/APACHE-TOMCAt-8.5.32using catalina_tmpdir:/root/software/apache-tomcat-8.5.32/tempusing jre_home:/usr/local/jdk1.8.0_181Usi Ng CLASSPATH:/root/software/apache-tomcat-8.5.32/bin/bootstrap.jar:/root/software/apache-tomcat-8.5.32/bin/ Tomcat-juli.jartomcat started.
    • Release default port 8080, turn off SELinux
      [[email protected] bin]# firewall-cmd --permanent --add-port=8080/tcpsuccess[[email protected] bin]# firewall-cmd --reload success[[email protected] bin]# getenforceEnforcing[[email protected] bin]# setenforce 0[[email protected] bin]# getenforce  Permissive

    • Install MySQL
      [[email protected] bin]# yum repolist | grep mysql[[email protected] bin]# rpm -ivh https://dev.mysql.com/get/mysql80-community-release-el7-1.noarch.rpm获取https://dev.mysql.com/get/mysql80-community-release-el7-1.noarch.rpm警告:/var/tmp/rpm-tmp.m7U7PD: 头V3 DSA/SHA1 Signature, 密钥 ID 5072e1f5: NOKEY准备中...                          ################################# [100%]正在升级/安装...1:mysql80-community-release-el7-1  ################################# [100%]
    [[email protected] bin]# yum repolist | grep mysqlmysql-connectors-community/x86_64        MySQL Connectors Community           63mysql-tools-community/x86_64             MySQL Tools Community                69mysql80-community/x86_64                 MySQL 8.0 Community Server           33
      • Get two MySQL yum repo sources
      [[[email protected] yum.repos.d]# pwd/etc/yum.repos.d[[email protected] yum.repos.d]# ll total dosage 40- Rw-r--r--. 1 root root 1503 August 3 05:03 centos-base.repo-rw-r--r--. 1 root root 1664 August 3 05:01 centos-base.repo.bak-rw-r--r--. 1 root root 1309 August centos-cr.repo-rw-r--r--. 1 root root 649 August centos-debuginfo.repo-rw-r--r--. 1 root root 314 August centos-fasttrack.repo-rw-r--r--. 1 root root 630 August centos-media.repo-rw-r--r--. 1 root root 1331 August centos-sources.repo-rw-r--r--. 1 root root 3830 August centos-vault.repo-rw-r--r--. 1 root root 1864 February 16:49 mysql-community.repo-rw-r--r--. 1 root root 1885 February 16:49 Mysql-community-source.repo  
    [[email protected] software]# yum install mysql-community-server[[email protected] software]# yum Install Mysql-server[[email protected] ~]# Rpm-qa | grep mysqlmysql-community-server-8.0.12-1.el7.x86_ 64mysql80-community-release-el7-1.noarchmysql-community-libs-8.0.12-1.el7.x86_ 64mysql-community-common-8.0.12-1.el7.x86_64mysql-community-libs-compat-8.0.12-1.el7.x86_ 64mysql-community-client-8.0.12-1.el7.x86_64[[email protected] lib]# systemctl start mysqld[[email  Protected] lib]# Systemctl enable mysqld[[email protected] lib]# cat/var/log/mysqld.log |grep password #查看初始密码2018 -08-20t11:54:48.607318z 5 [Note] [MY-010454] [Server] A temporary password is generated for [email protected]: +goyz3 q8w?!  Z[[email protected] lib]# mysql-u root-penter password:welcome to the MySQL monitor. Commands End With; or \g.your MySQL connection ID is 8Server version:8.0.12copyright (c), 2018, Oracle and/or its affiliates. All rights reserved. Oracle is a REgistered trademark of Oracle Corporation and/or itsaffiliates. Other names trademarks of their respectiveowners. Type ' help ', ' or ' \h ' for help. Type ' \c ' to clear the current input statement.mysql> show databases;  ERROR 1820 (HY000): Must reset your password using ALTER USER statement before executing this statement.  #提示需要先修改密码mysql > Alter User [email protected] ' localhost ' identified by ' [email protected] '; #修改密码为 [Email protected]query OK, 0 rows affected (0.10 sec) mysql> show databases;+--------------------+| Database |+--------------------+| Information_schema | | MySQL | | Performance_schema | |  SYS |+--------------------+4 rows in Set (0.02 sec) mysql>

    Installing JDK, Tomcat, and MySQL (CentOS 7.4)

    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.