Linux_ Software Installation _jdk_tomcat_mysql

Source: Internet
Author: User

Double-click the file you want to install (or right-click Transfer)

1. Installation of JDK
1.1 Preparation: Installation-dependent environment
Yum Install glibc.i686
Yum–y Install libaio.so.1 libgcc_s.so.1 libstdc++.so.6
Yum-y Update libstdc++-4.4.7-4.el6.x86_64
Yum-y Install gcc-c++
Yum-y Install libaio*

..................................


1.2 Check whether the JDK was installed before uninstalling
Rpm-qa | Grep-i JDK parameter-I ignores case

RPM-QA query all installation software of this machine

| grep Pipeline Filtering

RPM-E--nodeps Program Name
1.3 Installing the JDK
1.3.1 To create a JDK installation path
Mkdir/usr/local/java

1.3.2 Uploading a JDK installation package
1.3.3 Extracting TAR-ZXVF installation package –C specified directory

Inexplicably failed, a different way of thinking. Move the compressed package to

Go to the JDK directory to view, no content. Kill him.

Extract to current directory,< get jdk1.7.0_80>

Delete the compressed package, jdk1.7 change the name

Found no vim. Install it


1.3.4 Configuring environment variables
Vim/etc/profile Add the following information at the end

Export java_home=/usr/local/java/jdk1.7.0_80
Export classpath=.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jar
Export path= $JAVA _home/bin: $PATH

shift+ d to end I edit mode

Find the absolute path of the JDK to replace it

Not to be continued

1.3.5 Reload environment variable configuration file
Source/etc/profile
1.3.6 Test is successful java-version

Installation of 2.Tomcat
2.1 Check if Tomcat was installed before uninstalling
Rpm-qa | Grep-i Tomcat
Rpm–e–-nodeps Program Name
2.2 Uploading the Tomcat installation files
2.3 Creating a Tomcat installation path
2.4 Extracting Tomcat
2.5 Setting up a firewall (not recommended to close)
Edit the firewall configuration file
Vim/etc/sysconfig/iptables
Restarting the firewall
Service Iptables Restart
2.6 Starting Tomcat
./startup.sh
Whether the native remote access test started successfully

Installation of 3.Mysql
3.1 Check to see if MySQL is installed before uninstalling
Rpm-qa | Grep-i MySQL

The library file is already installed and should be uninstalled first, or overwrite error will occur. Note The--nodeps option is used when uninstalling, ignoring dependencies:
RPM-E--nodeps Program Name
3.2 Uploading the MySQL installation file
3.3 Creating a MySQL installation path
3.4 Extracting MySQL
3.5 add MySQL group and MySQL user to set the MySQL installation directory file owner and owning group.

[[email protected] mysql]# Groupadd MySQL
[[email protected] mysql]# useradd-r-g MySQL MySQL

3.6 Enter MySQL to unzip the directory and change the group and user to which it belongs.
[[email protected] mysql-5.6.31-linux-glibc2.5-x86_64]# chown-r MySQL.
[[email protected] mysql-5.6.31-linux-glibc2.5-x86_64]# chgrp-r MySQL.
Note: Do not forget the '. ' After MySQL, representing all directories

3.7 Execute the mysql_install_db script, initialize the data directory in MySQL and create some system tables. Note that the MySQL service process mysqld accesses the data directory, so it must be executed by the user who started the mysqld process (the MySQL user we set up earlier), or by root, but with the parameter--user=mysql.
[Email protected] mysql-5.6.31-linux-glibc2.5-x86_64]# scripts/mysql_install_db--user=mysql

3.8 All files in the mysql/directory except the data/directory are changed back to the root user, and the MySQL user only needs to be the owner of all files in the mysql/data/directory.
[Email protected] mysql-5.6.31-linux-glibc2.5-x86_64]# chown-r root.
[[email protected] mysql-5.6.31-linux-glibc2.5-x86_64]# chown-r mysql data
Note: Again, don't forget the '. ' Behind Root

3.9 Copy the configuration file to the ETC directory
[email protected] support-files]# CP my-default.cnf/etc/my.cnf
and view my.cnf configuration, modify Basedir

3.10 Add the Mysqld service to the boot entry.
3.10.1 first needs to copy the Mysql.server service script under the Support-files directory to/etc/init.d/and rename it to Mysqld.
[email protected] support-files]# CP mysql.server/etc/init.d/mysqld
3.10.2 adds the MYSQLD service to the self-starting service item by Chkconfig command.
[Email protected] support-files]# chkconfig--add mysqld
Note The service name Mysqld is the name that we renamed when we copied Mysql.server to/etc/init.d/.
3.10.3 to see if the add succeeded
[Email protected] support-files]# chkconfig--list mysqld
The successful results are as follows:

3.11 starting MySQL
[[Email protected] etc]# service mysqld start

3.12 Run the client program MySQL, test whether you can connect to Mysqld
[Email protected] etc]#/usr/local/mysql/mysql-5.6.31-linux-glibc2.5-x86_64/bin/mysql

3.13 Set MySQL initial password and log in
If you have just installed MySQL, Superuser Root does not have a password, so you can enter it directly into MySQL.

Change Password
Navigate to your MySQL installation directory/bin input below:
Format: Mysqladmin–u user name password new password
For example: Add a password to root victor. Type the following command:
./mysqladmin-uroot Password Victor
Re-Login
[Email protected] etc]#/usr/local/mysql/mysql-5.6.31-linux-glibc2.5-x86_64/bin/mysql-uroot-p


To avoid entering the full path of MySQL every time
/usr/local/mysql/mysql-5.6.31-linux-glibc2.5-x86_64/bin/mysql,
You can add it to the environment variable, and then add two lines of command to the/etc/profile:

Export mysql_home=/usr/local/mysql/mysql-5.6.31-linux-glibc2.5-x86_64
Export path= $PATH: $MYSQL _home/bin

Reload environment variable configuration file
Source/etc/profile
Restart the virtual machine after
This allows you to start the client program by entering the MySQL command directly in the shell.
[[email protected] MySQL] #mysql

Linux_ Software Installation _jdk_tomcat_mysql

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.