The speechless journey of building the war package

I have never blogged before, I always feel too troublesome. But due to my personal blog, I can only write.

Choose a cloud server, such as the Aliyun server I am trying here

Regarding the full environment installation of the cloud server, because I want to configure the war package:

  1. Myql official website download mysql8.0 environment centos exclusive link     Since I use the centos system, the installation is relatively cumbersome.
  • Install the software source: sudo rpm -Uvh mysql80-community-release-el6-n.noarch.rpm
  • Install the MySQL server: yum install -y mysql-community-server
  • Start MySQL:  service mysqld start
  • Check the running status of MySQL:  service mysqld status
  • Only after starting mysql once can you view the temporary password. Command:  grep 'temporary password' /var/log/mysqld.log
  • Modify password:  ALTER USER 'root'@'localhost' IDENTIFIED BY ' root123 ';

The modification may fail, which is due to the protection mechanism of mysql8.0.

First modify the complex password to enter the database and set the parameters

set global validate_password_policy=0;

set global validate_password_length=1;

Then change the simple password  ALTER USER 'root'@'localhost' IDENTIFIED BY ' 123456 ';

2. Install jdk environment   java

Use xftp to upload to the server (you won't figure it out yourself), tar -xzvf decompresses the package name.

Set environment variables:

export JAVA_HOME=/usr/local/java/jdk1.8.0_171   
export PATH=$JAVA_HOME/bin:$PATH
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar 

Note on the JAVA_HOME path: This is obviously the default installation path, or the author manually created the java folder in usr, remember to replace this path with the path of your own jdk, such as me: /root/java/jdk-17.0.2   

3. Tomcat is also directly uploaded and decompressed, and there is nothing to say.

About server.xml configuration

<Context path="/" docBase="D:/learnSoft/otherPackage/apache-tomcat-9.0.62/webapps/SSMBlogCopying/" reloadable="true" crossContext="true" />Add here in front of
    </Host> Is the windwos environment

Change the docBase path in the linux environment

The cloud server recommends changing the port port to 80 instead of 8080. Remember that the security group allows all traffic and release ports

my blog  

  At present, I am completely incapable of creating my own blog. The source of the code is github. If there is any misunderstanding, please resolve it in time. Still learning the javaWeb framework. . .

Please ignore resource introduction:

 

 

 

 

Guess you like

Origin blog.csdn.net/m0_57242470/article/details/124777974