Skip to content

deploy doc

lengleng edited this page May 9, 2020 · 2 revisions

Special Note

Environmental description

Middleware Version Remarks
JDK 1.8 Mandatory requirements, please add Java EE related jar packages for versions above 1.8
MySQL 5.7.8 + Mandatory requirements, at least 5.7! Of course 8.0 is no problem
Redis 3.2 + Windows version can only use Redis3.2, Unix-like systems use the latest 5.0 does not matter
node 10.0 + LTS version, do not use 12.X
npm 6.0 +
maven 3.5+

1. Project Download

git clone https://github.com/pigxcloud/pig.git

Second, configure local hosts

win configuration method | mac configuration method

switchhost is recommended, Open source group download, friends who are confident in their network environment can also download directly Official website

# Local test environment
127.0.0.1 pig-mysql
127.0.0.1 pig-redis
127.0.0.1 pig-gateway
127.0.0.1 pig-register

3. Initialize the database

  • Parameter Description
Version: mysql5.7.8 +
Default character set: utf8mb4
Default collation: utf8mb4_general_ci
  • Script description
pig/db/pig.sql
pig/db/pig_codegen.sql
pig/db/pig_config.sql

4. Pig configuration modification

Special note: Do not change the host configuration to IP

  • Modify the source information of nacos database pig / pig-register / src / main / resources / application.yml
db:
  num: 1
  user: $ {MYSQL-USER: root} #Modify: username
  password: $ {MYSQL-PWD: root} #Modify: password
  url:
    0: jdbc: mysql: // $ {MYSQL-HOST: pig-mysql}: $ {MYSQL-PORT: 3306} / $ {MYSQL-DB: pig_config}? CharacterEncoding = utf8 & zeroDateTimeBehavior = convertToNull & useSSL = false & useJDBCCompliantTimezoneShift = true & useLegacyDatetimeCode = false & % 2B8 & nullCatalogMeansCurrent = true & allowPublicKeyRetrieval = true
  • redis, MySQL configuration

Visit: http://pig-register:8848/nacos (default account password nacos / nacos)

application-dev.yml

# redis related, no password is blank, do not change to IP, modify hosts
spring:
  redis:
    password:
  • Database password configuration, modify the following files
pig-auth-dev.yml
pig-upms-dev.yml
pig-codegen-dev.yml
# Data source, only need to change the password, do not change to IP, modify hosts
spring:
  datasource:
    username: root
    password: lengleng

Fifth, startup sequence

1. PigNacosApplication
2. PigGatewayApplication
3. PigAuthApplication
4. PigAdminApplication
  • Start the following items when using code generation and monitoring
6. PigCodeGenApplication
7. PigMonitorApplication

Sixth, start the front end

  • Project download
git clone https://github.com/pigxcloud/pig-ui.git
  • Installation dependencies
npm install
  • start up
npm run dev