[HUAWEI CLOUD cloud server evaluation] HUAWEI Yun Yaoyun server Java, node environment configuration

Series Article Directory

Chapter 1 [Linux Actual Combat] Java and node environment configuration of HUAWEI Yunyaoyun server L instance



foreword

Today we will learn how to use commands to configure Java and node environments in Yunyao Cloud Server L instance (Yunyao Cloud Server itself has installed pagoda services, and can visually install MySQL, JDK, Apache, nginx and other services).


1. Task dismantling

1. Change password;
2. Configure security rules;
3. Remote login and update apt;
4. Install and configure JDK environment; 5.
Install and configure git;
6. Install and configure Maven;
7. Install and configure node;

2. Change the password

  • Open https://www.huaweicloud.com/ interface
  • Click on "Console"
  • In the "Console", select the "Resource Management" tab, select "Cloud Server"
  • Select "More", click "Reset Password"
  • Set a new password and restart the cloud server (when setting the password, you can check "Auto Restart")
    insert image description here
    insert image description here
    insert image description here
    insert image description here

3. Configure security rules

  • Go to the "Security Group" tab, click "Configure Rules" (default sg-default-smb)
    insert image description here
  • Configure rules, generally we will choose "inbound rules" (others access ports on our server)
  • We can click "One-click Settings" to open common ports: 80, 3306, 443, 8080, etc.
  • You can also add rules to add the ports you want to open (see the cloud service provider's own network security configuration for details)
    insert image description here

Fourth, log in remotely and update apt

  • This machine is a Mac computer, open the terminal, and enter the command: ssh root@cloud host’s elastic external network IP (Windows computers need to download and install xshell, putty and other software for remote login)
    insert image description here
  • After logging in successfully, enter the command: sudo apt update (the screenshot is the updated status)
    insert image description here

5. Install and configure the JDK environment

5.1. Install openjdk and choose version 8

安装命令

sudo apt install openjdk-8-jdk

![在这里插入图片描述](https://img-blog.csdnimg.cn/9c2bb67f26d746b2a5b63aff3f14186a.png)

insert image description here

5.2. Check jdk configuration

check command

java -version
insert image description here

If openjdk version 1.8.0_382 appears in the figure, it means that the JDK configuration is successful;
at this time, the JDK version 1.8 is generally called jdk8, jdk1.8, jdk18

6. Install and configure git

6.1, install git

install command

sudo apt install git
insert image description here

6.2. Check git configuration

Check git version command

git --version

insert image description here
As shown in the figure, git version 2.34.1, git installation configuration is successful

7. Install and configure Maven

The Maven version corresponding to JDK8 we need: between 3.3 and 3.8 (the maven version installed on Huawei Yunyaoyun server apt is 3.6, which meets the conditions; if not, you need to go to the Maven official website to download the specified version to install and configure)

7.1. Install Maven

install command

sudo apt install maven

Encountered the option y/n during installation, just select y

insert image description here
insert image description here

7.2. Check maven configuration

Check maven version command (version of this server: 3.6.3)

mvn -v
insert image description here

8. Install and configure node

8.1. Install node and npm

Ubuntu installs node and npm command line commands

sudo apt install nodejs-legacy
sudo apt install npm

Encountered the option y/n during installation, just select y
insert image description here
insert image description here

8.2. Check node and npm configuration

Check node version command (version of this server: 12.22.9)

mvn -v
insert image description here

Check npm version command (version of this server: 8.5.1)

npm -v
insert image description here


Summarize

The above is what I want to talk about today. This article only briefly introduces the installation and configuration of JDK, git, and Maven required for the back end, and the installation and configuration of Node and Npm required for the front end. Then continue to write and deploy the Springboot project on the Linux server , Run the vue3 project on the linux server.

Guess you like

Origin blog.csdn.net/s445320/article/details/132595417