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

Implementation steps for setting up the React+Ant Design development environment

Basics 1. Use scaffolding to create a project and...

Detailed tutorial on building an ETCD cluster for Docker microservices

Table of contents Features of etcd There are thre...

Detailed explanation of the failure of MySQL to use UNION to connect two queries

Overview UNION The connection data set keyword ca...

Nginx uses the Gzip algorithm to compress messages

What is HTTP Compression Sometimes, relatively la...

Three ways to refresh iframe

Copy code The code is as follows: <iframe src=...

40 fonts recommended for famous website logos

Do you know what fonts are used in the logo desig...

Solve the problem of ugly blue border after adding hyperlink to html image img

HTML img produces an ugly blue border after addin...

Example of implementing login effect with vue ElementUI's from form

Table of contents 1. Build basic styles through E...

Solution to data duplication when using limit+order by in MySql paging

Table of contents summary Problem Description Ana...

Linux Autofs automatic mount service installation and deployment tutorial

Table of contents 1. Introduction to autofs servi...

How to run Linux commands in the background

Normally, when you run a command in the terminal,...

A brief discussion on the maximum number of open files for MySQL system users

What you learn from books is always shallow, and ...

Vue-CLI3.x automatically deploys projects to the server

Table of contents Preface 1. Install scp2 2. Conf...