springboot polymerization Ali cloud deployment package project

Disclaimer: This article is a blogger original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
This link: https://blog.csdn.net/weixin_43893397/article/details/99314370

1. Purchase a student Ali cloud server

1.1 Baidu search Ali cloud

Here Insert Picture Description

1.2 Select student computers

Has been pulled down, select the student computers
Here Insert Picture Description

1.3 Select Configuration

Here Insert Picture Description

1.4 set their own password, will be used later

1.5 Open the console, view the public IP

Here Insert Picture Description

1.6 download server connection prerequisites

1. download the necessary software
Baidu cloud connection: https: //pan.baidu.com/s/1Kf5mx-I7H8_AJBa9DzP0jg

First open CRT6 1.7 software, connect to the server

Here Insert Picture Description
1. The first visit, to authorize what
Here Insert Picture Description
2. Enter your initial set of user name and password
Here Insert Picture Description
Here Insert Picture Description
3. When the page appears, explained that it had succeeded!
Here Insert Picture Description
4. Enter a command to try

cd ..


Successful came to the root directory, let's go look at JDK1.8 installation Sahua, Sahua ~ ~

2. Install JDK1.8

2.1 Quguan network download

Download linux64 bit,
Here Insert Picture Description
if the download speed is too slow, then you take it from my cloud disk
Baidu cloud disk download

2.2 Open the file upload software, and log in.

Here Insert Picture Description
Here Insert Picture Description
Here Insert Picture Description
Here Insert Picture Description

2.3 Extracting installation JDK

1. Open CRT6 software, turn the console input (carriage return line, note the space):

cd ~
cd ..
cd usr/local
ll

A set of operating fierce as a tiger, you will enter into this page
Here Insert Picture Description
2. Enter, an error will be reported

tar –xvfjdk-linux-x64 (1).tar.gz

Here Insert Picture Description
The reason is the file name with parentheses
software to modify the file name to upload files 3.
Here Insert Picture Description
Here Insert Picture Description
4. Enter the command again

ll
tar –xvf  jdk.tar.gz

If a bunch of fluid page appears
even unpacked a success

JDK 2.4 configuration environment variable

In the console input

vi /etc/profile

Move the cursor to the bottom, press i key to edit
Here Insert Picture Description
the following code into compliance

#set java environment
JAVA_HOME=/usr/local/jdk1.8.0_131
CLASSPATH=.:$JAVA_HOME/lib.tools.jar
PATH=$JAVA_HOME/bin:$PATH
export JAVA_HOME CLASSPATH PATH

Press the ESC key to exit the editing
again input (second statement is to update the resource effective immediately)

:wq
source /etc/profile

Check to see if the configuration is successful

java -version

Here Insert Picture Description
The version number appears the configuration was successful, so, even if our jdk configuration successful!

3. Installation MySQL5.6 (yum cloud configuration)

3.1 First, check the database comes with CentOS

rpm -qa | grep mariadb 

Here Insert Picture Description
This will uninstall

rpm -e --nodeps mariadb-libs-5.5.52-1.el7.x86_64

Enter the previous command again, to see if there is a file name? If the reported error error, please see the command you want to uninstall and name of the database is consistent

3.2yum installation MySQL5.6

Note that if there enter the following command: Is the this OK [Y / D / N]:
Here Insert Picture Description
direct input to the back yes!
1. Download the installation package mysql Source:

wget http://dev.mysql.com/get/mysql57-community-release-el7-8.noarch.rpm

2. Install mysql Source: meal yes wait

yum localinstall mysql57-community-release-el7-8.noarch.rpm

If complete !, appear at the end of the installation instructions MySQL source
3. then enter a command, detects whether the installation is complete:

yum repolist enabled | grep "mysql.*-community.*"

The emergence of this page is to be installed
Here Insert Picture Description
4. Install mysql:

yum install mysql-community-server

Such is the installation is complete!
Here Insert Picture Description

3.3 mysql

1. Set open start mysql service:

systemctl enable mysqld

2. Check the mysql version installed:

rpm -aq | grep -i mysql

Here Insert Picture Description
3. Start MySQL service:

systemctl restart mysqld

4. Review the MySQL initial password:

grep 'A temporary password' /var/log/mysqld.log

Here Insert Picture Description
5. Change Password

mysqladmin -u root -p'旧密码' password '新密码'

Change the password problem here, change failed because the password is too simple reason. There are then two solutions:
one: the password more complex (which is the most direct method)
Method two: Turn off mysql password strength verification (validate_password) increase completed by ESC, :wqsave and exit
press i edit the configuration file: vim /etc/my.cnfincrease such a line validate_password=off
after editing restart mysql service:

systemctl restart mysqld

Then re-modify the password, ditto!
Console may appear Chinese garbled, please modify completed, and then copied to the command line in Notepad and other places
to set mysql remote access:
1. Log in, using the password you just set into MySQL:

mysql -uroot -p密码

Add a user gives access to:

grant all privileges on *.* to '用户名'@'ip地址' identified by '密码' with grant option; 

ip address can be changed %%, expressed Open All
Here Insert Picture Description

3.4 Configuration Ali cloud security group

1. Open the console
Here Insert Picture Description
2. Point Security
Here Insert Picture Description
Here Insert Picture Description
3. Point configuration rules
Here Insert Picture Description
5. Add the security group configuration
Here Insert Picture Description
6. fill in the configuration
Here Insert Picture Description
7. Using database management software, measuring about
Here Insert Picture Description
ok!

4. Installation tomcat8.5

Tomcat 4.1 download

Can from the official website, also available from Huawei cloud images can also be downloaded from my connected Baidu cloud
1. official website
2. Huawei cloud mirror
3. Baidu Cloud Link

4.2 uploaded to the server

1. Pull into
Here Insert Picture Description
2. Extract

tar - xvf apache-tomcat-9.0.22.tar.gz

3. Go to the bin directory

ll
cd apache-tomcat-9.0.22
cd bin

4. Turn on the server

./startup.sh

Here Insert Picture Description
5. Return to the previous level, into the log directory, dynamic view the log

cd ..
cd logs
ll
tail -f catalina.out

6. Wait for the following screen
Here Insert Picture Description
appears milliseconds, it means all success, but you will find that this time we turn took 40W milliseconds, which is 6 minutes
first test, the following solution to this problem
7. Configure Ali cloud security groups, add port 80 as well as 8080 and 8005 port, and database configuration method as
Here Insert Picture Description
8. test, a browser enter the public ip plus 8080
Here Insert Picture Description

4.3 solve the tomcat turned slowly

Enter the following command in turn, we enter to the installation directory of jdk

cd ~
cd ..
cd usr/local/jdk1.8.0_131
cd jre
cd lib
cd security
ll
vi java.security

Move the cursor to row 70, locate the following line

securerandom.source=file:/dev/urandom

change into:

securerandom.source=file:/dev/./urandom

Press ESC, enter: wq to save and exit

4.4 closed tomcat, restart the server !!! (be sure to restart the server !!!)

1. Go to the bin directory tomcat, tomcat closed

./shutdown.sh

Here Insert Picture Description
2. Ali cloud server console to restart
Here Insert Picture Description

Here Insert Picture Description

Tomcat 4.5 open again

Look at the log file, you will find that, now open only two seconds
Here Insert Picture Description

5. Deploy the project, and on-line access

5.1 First, look in the startup configuration tomcat class entry

1. Inheritance SpringBootServletInitializer class
2. configure override the parent class
Here Insert Picture Description
3. parent package clean at
Here Insert Picture Description
4. packaged in package the parent package
Here Insert Picture Description
5. Open the web directory, the directory to find the target
Here Insert Picture Description
6. The war package packaged into the tomcat wabapps directory
Here Insert Picture Description

5.2 Restart tomcat, enter the public IP address and port number to access the project name +

Here Insert Picture Description

Guess you like

Origin blog.csdn.net/weixin_43893397/article/details/99314370