How to set up a deployment project under Linux system

How to set up a deployment project under Linux system

1. Modify the firewall settings and open the corresponding ports

To modify the Linux system firewall configuration, you need to modify the /etc/sysconfig/iptables file. If you want to open a port, add a line in it.

-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 8080 -j ACCEPT, where 8080 is the port number to be opened, and then restart the Linux firewall service

2. Install JDK

1. Check the jdk version in the system

[root@localhost software]# java -version

2. Detect the jdk installation package

[root@localhost software]# rpm -qa | grep java

show:

.0-openjdk-1.7.0.111-2.6.7.8.el7.x86_64 python-javapackages-3.4.1-11.el7.noarch tzdata-java-2016g-2.el7.noarch javapackages-tools-3.4.1-11.el7.noarch java-1.8.0-openjdk-1.8.0.102-4.b14.el7.x86_64 java-1.8.0-openjdk-headless-1.8.0.102-4.b14.el7.x86_64 java-1.7.0-openjdk-headless-1.7.0.111-2.6.7.8.el7.x86_64

3. Uninstall openjdk

[root@localhost software]# rpm -e --nodeps tzdata-java-2016g-2.el7.noarch
[root@localhost software]# rpm -e --nodeps java-1.7.0-openjdk-1.7.0.111-2.6.7.8.el7.x86_64
[root@localhost software]# rpm -e --nodeps java-1.7.0-openjdk-headless-1.7.0.111-2.6.7.8.el7.x86_64
[root@localhost software]# rpm -e --nodeps java-1.8.0-openjdk-1.8.0.102-4.b14.el7.x86_64
[root@localhost software]# rpm -e --nodeps java-1.8.0-openjdk-headless-1.8.0.102-4.b14.el7.x86_64

Or use

[root@localhost jvm]# yum remove *openjdk*

Then enter rpm -qa | grep java again to view the uninstall status:

[root@localhost software]# rpm -qa | grep java python-javapackages-3.4.1-11.el7.noarch javapackages-tools-3.4.1-11.el7.noarch

4. Install a new JDK

First, go to the JDK official website to download the JDK version you want. After the download is complete, put the JDK installation package to be installed in the folder specified by the Linux system, and enter the folder with the command

Unzip the jdk-8u131-linux-x64.tar.gz installation package

[root@localhost software]# mkdir -p /usr/lib/jvm
[root@localhost software]# tar -zxvf jdk-8u131-linux-x64.tar.gz -C /usr/lib/jvm

5. Set environment variables

[root@localhost software]# vim /etc/profile

Add at the very beginning:

export JAVA_HOME=/usr/lib/jvm/jdk1.8.0_131 
export JRE_HOME=${JAVA_HOME}/jre 
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib 
export PATH=${JAVA_HOME}/bin:$PATH

6. Execute the profile file

[root@localhost software]# source /etc/profile

This allows the configuration to take effect immediately without restarting.

7. Check the newly installed JDK

3. Install tomcat

4. Install MySQL

1. If it has been installed before, uninstall it first

2. Enter the yum list | grep mysql command to view the downloadable version of the MySQL database provided by yum

3.yum install -y mysql-server mysql mysql-devel

Yum will help us select the software needed to install the MySQL database and some other attached software

4. Start mysql, service mysqld start

Log in to mysql and set the password as follows:

mysql> use mysql;
mysql> update user set password=password('123') where user='root' and host='localhost';
mysql> flush privileges;

5. Set mysql to allow remote connection

GRANT ALL PRIVILEGES ON *.* TO root@'%' IDENTIFIED BY 'password' WITH GRANT OPTION;

6. Open ports

7. Start the mysql service, mysql -u username -p password

5. Package the project into tomcat, configure other required environments, and start tomcat

Summarize

The above is the setting method of deploying projects under Linux system introduced by the editor. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website!

You may also be interested in:
  • ActiveMQ Simple Introduction (Newbie Must Read)
  • PHP using ActiveMQ instance
  • Detailed explanation of Spring Boot integration with JMS (ActiveMQ implementation)
  • A brief discussion on Java message queues (ActiveMQ, RabbitMQ, ZeroMQ, Kafka)
  • Installation and deployment of Redis under Linux
  • How to deploy Kafka cluster under Linux contos6.8
  • Detailed explanation of software configuration using docker-compose in linux
  • Detailed explanation of ActiveMQ deployment method in Linux environment

<<:  Detailed explanation of MySQL limit usage and performance analysis of paging query statements

>>:  Sample code for implementing music player with native JS

Recommend

How to assign default values ​​to fields when querying MySQL

need When querying a field, you need to give the ...

Two ways to use react in React html

Basic Use <!DOCTYPE html> <html lang=&qu...

How to make full use of multi-core CPU in node.js

Table of contents Overview How to make full use o...

CSS to achieve the sticky effect of two balls intersecting sample code

This is an effect created purely using CSS. To pu...

JavaScript Array Methods - Systematic Summary and Detailed Explanation

Table of contents Common array methods Adding and...

Solve the Linux Tensorflow2.0 installation problem

conda update conda pip install tf-nightly-gpu-2.0...

CSS: visited pseudo-class selector secret memories

Yesterday I wanted to use a:visited to change the...

Vue uses mockjs to generate simulated data case details

Table of contents Install mockjs in your project ...

Uncommon but useful tags in Xhtml

Xhtml has many tags that are not commonly used but...

Docker Data Storage Volumes Detailed Explanation

By default, the reading and writing of container ...

Detailed explanation of Mencached cache configuration based on Nginx

Introduction Memcached is a distributed caching s...

View the port number occupied by the process in Linux

For Linux system administrators, it is crucial to...

nginx proxy_cache batch cache clearing script introduction

Preface: I used the official nginx proxy_cache as...

How to install Element UI and use vector graphics in vue3.0

Here we only focus on the installation and use of...

How to reference external CSS files and iconfont in WeChat applet wxss

cause The way to import external files into a min...