首先下載jar包或者從git等版本工具下載代碼
sql文件導入修改相關(guān)配置
修改配置
#eureka:
server:
port: 5060 //端口
servlet:
context-path: /eureka
spring:
application:
name: eureka-server
eureka:
client:
fetch-registry: false
register-with-eureka: true
service-url:
defaultZone: http://localhost:5060/eureka/eureka
instance:
hostname: localhost
server:
enable-self-preservation: false
eviction-interval-timer-in-ms: 10000
//其他模塊例如user
rabbitmq: //消息隊列rabbitmq
host: 0.0.0.0 //服務器地址
port: 5672 //端口
username: yh
password: mima!
datasource:
name: dataSource
type: com.zaxxer.hikari.HikariDataSource
url: jdbc:mysql://1.2.3.4:3306/user_center?useUnicode=true&characterEncoding=utf-8&serverTimezone=GMT%2B8&useSSL=false&zeroDateTimeBehavior=CONVERT_TO_NULL&allowPublicKeyRetrieval=true
//修改成自己服務器外網(wǎng)地址
username: siwei //用戶
password: 123456!//密碼
#redis緩存
redis:
database: 0
host: 1.2.3.4 //redis安裝的服務器
port: 16379
timeout: 10000
//eureka配置
eureka:
client:
service-url:
defaultZone: http://localhost:5060/eureka/eureka
文件服務器配置 second-common
#修改 fdfs_client.conf,F(xiàn)dfsClient兩個文件里面的服務器地址和端口
具體文件服務器配置部署詳見
http://www.reibang.com/p/044286fe1295
//解壓
tar 包名
//克隆git代碼
git clone git@12.34.56.78:/home/gitrepo/xxx.git
cd 進入代碼目錄
#下載安裝服務包
mvn install -DskipTests
啟動 首先cd進入springbootdemo-eureka 啟動eureka服務
#啟動命令
nohup mvn spring-boot:run &
#查看日志命令
tail -f nohup.out
#然后依次給用戶 訂單 商品 支付模塊啟動
#注意:啟動前需要給second-web-utils second-common 工具模塊下載打包
安裝nginx并且綁定自己的域名
注:小程序必須是備案域名碑宴,并且在小程序上配置