Tomcat builds JSP's website store

Source: Internet
Author: User

First step: Download and install the JDK
wget--no-cookies--no-check-certificate--header "COOKIE:GPW_E24=HTTP%3A%2F%2FWWW.ORACLE.COM%2F; Oraclelicense=accept-securebackup-cookie "" http://download.oracle.com/otn-pub/java/jdk/8u162-b12/ 0da788060d494f5095bf8624735fa2f1/jdk-8u162-linux-x64.rpm? Authparam=1522412902_3fa16f7c536f93b53d7a993b2e6421a7 "

RPM-IVH jdk-8u162-linux-x64.rpm
ll/usr/java/
Note: Latest is a soft connection which version it points to is currently in the running version
Java-version
Here is a very important command: This command is dedicated to the Java version of the conversion
Alternatives--config Java
Step two: Download start tomcat
Wet http://mirrors.hust.edu.cn/apache/tomcat/tomcat-8/v8.5.29/bin/apache-tomcat-8.5.29.tar.gz
Note: This software can be extracted after the installation, but we generally want to create a new ordinary user, the identity of ordinary users to extract to/tmp can be
MV Tomcat-8.5.29.tar.gz/tmp
Useradd work
Su-work
Tar xf/tmp/tomcat-8.5.29.tar.gz
Because the name is too long, we can make a soft connection to it.
Ln-s/tmp/tomcat-8.5.29 ~/tomcat
After you have entered Tomcat, locate the startup script and run it.
CD ~/tomcat/
bin/startup.sh
Check if the process exists
Ps-ef | grep java
Check that the Tomcat port is healthy
lsof-i:8080
Step three: Download and install MySQL
wget Https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.21-1.el7.x86_64.rpm-bundle.tar
Tar XF Mysql-5.7.21-1.el7.x86_64.rpm-bundle.tar
RM-RF Mysql-commMinimalMysql-commTest
Yum Install mysql-community-
Prepare a directory a large volume of disk after the end of the directory attached to this disk, because the database is a large amount of data, so we have to put on a separate disk for storage management.
mkdir/data/
Mv/var/lib/mysql/data
Ln-s/data/mysql/var/lib/mysql
Mount-t XFS/DATA/DEV/VG1/LV1 (automatic mounting is recommended)
Start MYSLQ
Systemctl start MySQL
Get MySQL initial password
grep pass/var/log/mysqld.log
Login database to change password
Mysql-u root-p ' initial password '
mysql> Set password for [email protected] ' locahost ' =password (' new password ');
Create a database that stores store data and set the encoding of the data content for this library
Create DATABASE Jspgou default character set UTF8;
Create permissions for authorized users who access the site
Grant all privileges on Jspgou.
to [e-mail protected] '% ' identified by ' authorized user password ';
See what SQL schemas are supported by this database, and remove the two modes if not removed.
SELECT @ @sql_mode;
Set global
Sql_mode= "In addition to no_zero,no_zero_in_date, paste all the others can be";
Exit database

Fourth Step: Configure Jspgou
Modify the Jspgouv6-root/root/web-inf/config/jdbc.properties file
Jdbc.properties file This file is specifically used as the front-end data connection database
#mysql \u914d\u7f6e
Jdbc.driverclassname=com.mysql.jdbc.driver (connected database type)
Jdbc.url=jdbc:mysql://127.0.0.1:3306/jspgou?characterencoding=utf-8
(Jspgou? The name of the front of the question mark is the name of the database IP address is self-determined 0.0.0.0 means that all IP can access)
Jdbc.username=jspgouadmin (authorized user name with permissions to this library in the database)
JDBC.PASSWORD=JSPGOU_PWD2018 (authorized user password)

Import data from the Jspgou mall into the data
Mysql-u jspgouadmin-p jspgou_pwd2018 Jspgou < ~work/jspgouv6-root/db/jspgou.sql

Do the hosts domain name resolution or DNS
Move the root directory of the JSP marketplace to tomcat/webapps/
In order not to be confused with tomcat/webapps/root, we can change the name Jsp_root
Su-work
Mv/tmp/jspgouv6-root/root ~/tomcat/webapps/jsp_root
Add this segment label to the Tomcat/conf/server.xml configuration file to access the JSP Web Store through the domain name
Vim ~/tomcat/conf/server.xml
<context docbase= "Jsp_root" path= ""/>
</Host>

Fifth step: Start Tomcat, log in in the browser to access.
CD ~/tomcat
bin/startup.sh (start) bin/shutdown.sh (stop)

Tomcat builds JSP's website store

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.