According to the project construction and related environment configuration

According to the project construction and related environment configuration

Recently, the software engineering class is coming to an end, and the big homework is to do a document management system, so I picked up Ruoyi again, and I was going to do it briefly. It turned out that there was a problem with the previous node environment, so I simply reinstalled and configured one.

Node, js download and environment configuration

  1. First download and install the
    official website: link: link
    The current version is more than 18, but I do not recommend using the new version, there will be many bugs, I have encountered it during installation, the modification method provided does not work, simply delete it , version 16 installed.
  2. The installation path of my node.js is **E:\Program Files\nodejs
    First create two folders under the installation directory, named node_cache, and node_global.
    insert image description here
    Open the command line window in nodejs, and enter the command:
// npm config set prefix "E:\Program Files\nodejs\node_global"
//npm config set cache "E:\Program Files\nodejs\node_cache"

Open the environment variable window to set
what is an environment variable and why should it be configured? Here's another blog post:
Add link description

  1. User variable setting
    Edit the path of the user variable, and change the default APPData/Roaming\npm under the C drive to E:\Program Files\nodejs\node_global
    insert image description here
  2. System variable setting
    Create a new variable name in the system variable: NODE_PATH, variable value: E:\Program Files\nodejs\node_global\node_modules
    insert image description here
    and save it.
    Enter node -v and npm -v respectively to view the version number
    insert image description here

download redis

If you need to use Redis in the separate version, I used version 3.2 because I had it before.
Official website link: link
After downloading and decompressing: run the .exe file
insert image description here
insert image description here

download zoe

  1. Ruoyi official website: link: link
    I downloaded the front-end and back-end separation version
    insert image description here
    After decompression:
    insert image description here
    I use IDEA for the compiler, drag the RuoYi-Vue-master folder to IDEA to open it.
  2. After opening with IDEA, you need to configure the database. I use MySQL, open the application-druid.yml configuration file, and
    insert image description here
    modify the database name and password:
    insert image description here
  3. Start the backend: Run RuoYiApplication
    insert image description here
    to start successfully:
    insert image description here
  4. Start the front end:
    You can also directly enter the npm run dev command in the ruoyi-ui folder.

insert image description here
The startup is successful:
if there is a 500 error, there is a problem with the database connection. I have encountered:

  1. MySQL service is not started
  2. There is an error in the application-druid.yml configuration file

insert image description here
insert image description here
If you come here, it will start successfully.

Guess you like

Origin blog.csdn.net/wujian0428/article/details/127911164