CENTOS7 network configuration, install Jdk,tomcat and MySQL entire process

Source: Internet
Author: User

CENTOS7 network configuration, install Jdk,tomcat and MySQL entire process

1 , CentOS7 Network Configuration

Install CentOS7 to be on a VMware virtual machine, set a password and log in, you can see the following icons in the lower right corner, right click on the network icon, settings

Next look at the IP address of the current Linux system, command: IP addr

See ENS33 (different machine names may not be the same, but there will be ens+ numbers), currently there is no IP address.

To modify the Ifcfg-ens33 file:

Command: VI ifcfg-ens33

Open Ifcfg-ens33, press A to edit, and change the last line onboot to Yes. (Of course, it's better to set the IP address manually)

Restart the network, and then look at the IP configuration, you will find that has been assigned to help you the IP address:

Open WINSCP for transferring files between Windows and Linux and uploading the installation package to a Linux machine:

After landing, for example, the direct point is.

Login Successful Interface:

Open the SECURECRT software for remote operation of the Linux server (if the Linux system is not required on your local computer), but this software can have the copy and paste function, than the VMware easy to use, in the SECURECRT operation is equivalent to directly to the Linux server operation.

New one session

Fill in IP, port default 22, Server username, press Next step. Go to the main interface and enter the password.

Handling garbled issues:

2 , installation jdk1.8

Download the Linux version of the JDK to the Windows system on the Oracle website with an installation package with a suffix called. rpm. Then pass the WINSCP to the/usr/local directory of the Linux system:

Then check to see if there is a openjdk installed before Linux, and then uninstall it. I tried, the system comes with the OpenJDK no Javac command.

Command: Java–version

And: Rpm–e–nodeps to uninstall the name

Install the jdk1.8 you just uploaded.

To the local directory, command: RPM–IVH the RPM package name to install

After successful installation, input java-version will be prompted as follows:

The system silently installs the JDK into the/usr/java directory.

Next, configure the path.

Command: VI +/etc/profile

The profile file is loaded when a user logs on. Modify as follows, add java_home and so on.

View the path to the system paths.

Delete the JDK RPM installation package and create a new H.java file in a directory, as follows:

To modify the name, use the MV to modify the H.java file. If MV a B changes A to B file name.

Call Javac compile just write H.java file, Java command run, visible print out H, visible jdk installed successfully.

3 , installation Tomcat8 .

Similarly, uploading the installation package via WINSCP to Linux,tomcat is a compressed package with a suffix of tar.gz.

Command: TAR–ZXF to extract the file name can be extracted tar.gz compressed package:

Create a Tomcat directory under the current (local) directory, install the TOMCAT8 into the Tomcat directory, and create a personal favorite.

To the tomcat8/conf directory, there is a server.xml that modifies its port number to 80:

To the Tomcat8/bin directory, locate startup.sh to start Tomcat.

Command:./startup.sh

To the browser to access:

Cannot access the cause of the firewall

CentOS 7:
Systemctl Stop Firewalld.service #停止防火墙服务
Systemctl Disable Firewalld.service #禁用防火墙服务

Turn off the firewall and access it again:

Set Tomcat to login self-boot (it can appear that the rc.local file is set to boot), start the JDK first, join the penultimate line, and restart the Linux server:

After entering the password, Tomcat has run:

4 , installation mysql5.6

Installation

A dependency package is installed during

Restart MySQL

First use to set the password for MySQL, I set to root.

To view the database encoding:

Also set the latin1 to: Utf-8

Restart the MySQL service.

Command: Systemctl Restart Mysql.service

To see the status again, the code has been modified:

By the way, install the MySQL driver:

Command: Firewall-cmd--add-port=3306/tcp #开放3306

Command: firewall-cmd--query-port=3306/tcp# to see if the port is open

To view the database:

5 , deploy Web Application

Upload the SQL file and import the data into the MySQL database of the Linux server:

Before importing, you must first create a new database.

such as command: Create SSH, creating a database named SSH.

Then use SSH, select.

Then use the following command to import:

Package the database corresponding Web application into a war file and upload it to the Tomcat8/webapps directory of the server:

You can then access the Web App in a browser:

Once successful, an application (OA7) folder will be added:

Click Login, login successfully, explain the network settings, the JDK,TOMCAT,MYSQL database is installed successfully, and can work together:

Finish!

CENTOS7 network configuration, install Jdk,tomcat and MySQL entire process

Related Article

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.