Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to build a server environment for JDK

2025-03-09 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

In this article, the editor introduces in detail "how to build a server environment in JDK". The content is detailed, the steps are clear, and the details are handled properly. I hope this article "how to build a server environment in JDK" can help you solve your doubts. Let's follow the editor's ideas to learn new knowledge.

JDK installation

Download the JDK installation package and upload it to the server

Run the following command to create a new directory.

Mkdir / usr/java

Run the following command to add executable permissions to jdk-8u241-linux-x64.tar.gz and extract to / usr/java.

Chmod + x jdk-8u241-linux-x64.tar.gz tar xzf jdk-8u241-linux-x64.tar.gz-C / usr/java

Set the environment variable.

(1) run the command vi / etc/profile to open the / etc/profile file.

(2) press the I key to add the following.

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

(3) press the ESC key, enter: wq and enter to save and close the file.

Run the following command to load the environment variables.

Source / etc/profile

Run the following command to display JDK version information.

Java-version

The returned result is shown in the figure, indicating that JDK has been installed successfully.

Install nginx

Run the following command to install Nginx.

Yum-y install nginx

Run the following command to view the Nginx version.

Nginx-v

The returned result is shown below, indicating that Nginx is installed successfully.

Nginx version: nginx/1.16.1

The nginx start and stop commands are as follows:

Systemctl reload nginx systemctl start nginx systemctl stop nginx install redis

First download the redis redis download address

Https://redis.io/download

download

Wget http://download.redis.io/releases/redis-5.0.4.tar.gz

Decompress, extract to the current directory

Tar-xzvf redis-5.0.4.tar.gz

Go to the Redis directory and compile with the make command

Make

Make install

Modify the configuration file

Modify bind 127.0.0.1 to 0.0.0.0

Change daemonize no to yes

Vim redis.conf

Start redis

Redis start and stop command

Redis-server. / redis.conf

Redis-cli shutdown

After reading this, the article "how to build a server environment for JDK" has been introduced. If you want to master the knowledge points of this article, you still need to practice and use it yourself. If you want to know more about related articles, welcome to follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report