修改ip配置

This commit is contained in:
lsy
2017-12-18 21:05:18 +08:00
parent 71e21beba1
commit 6e381307e7
27 changed files with 48 additions and 55 deletions
@@ -31,7 +31,7 @@ jdbc:
master:
username: root
password: hfAhyoTu3UKAfmy27/RNKQ==
url: jdbc:mysql://172.17.0.1:3317/micro?useUncoide=true&chracterEncoding=utf-8&useSSL=true
url: jdbc:mysql://127.0.0.1:3317/micro?useUncoide=true&chracterEncoding=utf-8&useSSL=true
driverClass: com.mysql.jdbc.Driver
mybatis:
typeAliasesPackage: com.lishouyu.pojo
+9 -9
View File
@@ -1,10 +1,10 @@
#!/usr/bin/env bash
echo "172.17.0.1 www.config.server.com" >> /etc/hosts
echo "172.17.0.1 www.eureka.server.com" >> /etc/hosts
echo "172.17.0.1 www.eureka.server2.com" >> /etc/hosts
echo "172.17.0.1 www.upms.com" >> /etc/hosts
echo "172.17.0.1 www.cms.com" >> /etc/hosts
echo "172.17.0.1 www.ucenter.com" >> /etc/hosts
echo "172.17.0.1 www.gateway.com" >> /etc/hosts
echo "172.17.0.1 www.mall.com" >> /etc/hosts
echo "172.17.0.1 www.pay.com" >> /etc/hosts
echo "127.0.0.1 www.config.server.com" >> /etc/hosts
echo "127.0.0.1 www.eureka.server.com" >> /etc/hosts
echo "127.0.0.1 www.eureka.server2.com" >> /etc/hosts
echo "127.0.0.1 www.upms.com" >> /etc/hosts
echo "127.0.0.1 www.cms.com" >> /etc/hosts
echo "127.0.0.1 www.ucenter.com" >> /etc/hosts
echo "127.0.0.1 www.gateway.com" >> /etc/hosts
echo "127.0.0.1 www.mall.com" >> /etc/hosts
echo "127.0.0.1 www.pay.com" >> /etc/hosts
+1 -1
View File
@@ -1,5 +1,5 @@
/*
Source Server : 172.17.0.1
Source Server : 127.0.0.1
Source Host : localhost:3317
Source Database : micro
+1 -1
View File
@@ -1,5 +1,5 @@
/*
Source Server : 172.17.0.1
Source Server : 127.0.0.1
Source Host : localhost:3317
Source Database : micro
+1 -1
View File
@@ -1,5 +1,5 @@
/*
Source Server : 172.17.0.1
Source Server : 127.0.0.1
Source Host : localhost:3317
Source Database : micro
@@ -1,7 +1,7 @@
#mybatisGeneratorExtend 所需要的必要的配置文件
#mybatisGeneratorExtend \u6240\u9700\u8981\u7684\u5FC5\u8981\u7684\u914D\u7F6E\u6587\u4EF6
db.driverLocation=/root/mysql-connector-java-5.1.40-bin.jar
db.driverClassName=com.mysql.jdbc.Driver
db.url=jdbc:mysql://172.17.0.1:3317/micro?useUncoide=true&chracterEncoding=utf-8&useSSL=false
db.url=jdbc:mysql://127.0.0.1:3317/micro?useUncoide=true&chracterEncoding=utf-8&useSSL=false
db.username=root
db.password=studyj2e
mybatisGenerator.pojoPackage=pojoPackage
@@ -2,12 +2,12 @@ spring:
session:
store-type: none # 暂时不开启session存储
datasource:
url: jdbc:mysql://172.17.0.1:3317/micro?useUncoide=true&chracterEncoding=utf-8&useSSL=false
url: jdbc:mysql://127.0.0.1:3317/micro?useUncoide=true&chracterEncoding=utf-8&useSSL=false
username: root
password: studyj2e
driver-class-name: com.mysql.jdbc.Driver
redis:
host: 172.17.0.1
host: 127.0.0.1
port: 6379
#security:
# basic:
@@ -80,14 +80,14 @@ public class DataSourceMasterConfig {
//设置能否重置
initParams.put("resetEnable", "false");
//deny优先于allow
initParams.put("allow", "172.17.0.1,127.0.0.1");
initParams.put("allow", "127.0.0.1,172.17.0.1");
//initParams.put("deny","213.122.232.233");
if (logger.isInfoEnabled()) {
logger.info("micro-fast common druidServletParam使用默认的配置");
logger.info("micro-fast common 添加druidServletParam loginUsername:micro");
logger.info("micro-fast common 添加druidServletParam loginPassword:fast");
logger.info("micro-fast common 添加druidServletParam resetEnable:false");
logger.info("micro-fast common 添加druidServletParam allow:172.17.0.1");
logger.info("micro-fast common 添加druidServletParam allow:127.0.0.1");
}
}
servletRegistrationBean.setInitParameters(initParams);
-1
View File
@@ -5,5 +5,4 @@ ENV JAVA_JRE ${JAVA_HOME}/jre
ENV PATH ${JAVA_HOME}/bin:$PATH
EXPOSE 10012
EXPOSE 10013
CMD ["java","-jar -Dregister.server.ip=172.17.0.1","/workhome/app.jar"]
+3 -3
View File
@@ -1,7 +1,7 @@
#自定义参数,用于命令行替换,默认值是172.17.0.1
#自定义参数,用于命令行替换,默认值是127.0.0.1
register:
server:
ip: 172.17.0.1
ip: 127.0.0.1
# 从配置中心加载文件
spring:
cloud:
@@ -20,4 +20,4 @@ eureka:
defaultZone: http://micro:fast@${register.server.ip}:10002/eureka/,http://micro:fast@${register.server.ip}:10004/eureka/ #配置所有的注册中心
instance:
prefer-ip-address: true
ip-address: 172.17.0.1
ip-address: 127.0.0.1
@@ -1,5 +1,5 @@
db.driverLocation=/root/mysql-connector-java-5.1.40-bin.jar
db.driverClassName=com.mysql.jdbc.Driver
db.url=jdbc:mysql://172.17.0.1:3317/micro?useUncoide=true&chracterEncoding=utf-8&useSSL=false
db.url=jdbc:mysql://127.0.0.1:3317/micro?useUncoide=true&chracterEncoding=utf-8&useSSL=false
db.username=root
db.password=studyj2e
-1
View File
@@ -5,4 +5,3 @@ ENV JAVA_JRE ${JAVA_HOME}/jre
ENV PATH ${JAVA_HOME}/bin:$PATH
EXPOSE 10000
EXPOSE 10001
CMD ["java","-jar -Dregister.server.ip=172.17.0.1","/workhome/app.jar"]
@@ -1,7 +1,7 @@
#自定义参数,用于命令行替换,默认值是172.17.0.1
#自定义参数,用于命令行替换,默认值是127.0.0.1
register:
server:
ip: 172.17.0.1
ip: 127.0.0.1
# 程序实例的配置,git仓库的配置
spring:
application:
@@ -19,5 +19,5 @@ eureka:
defaultZone: http://micro:fast@${register.server.ip}:10002/eureka/,http://micro:fast@${register.server.ip}:10004/eureka/ #配置所有的注册中心
instance:
prefer-ip-address: true
ip-address: 172.17.0.1
ip-address: 127.0.0.1
-1
View File
@@ -5,4 +5,3 @@ ENV JAVA_JRE ${JAVA_HOME}/jre
ENV PATH ${JAVA_HOME}/bin:$PATH
EXPOSE 10006
EXPOSE 10007
CMD ["java","-jar -Dregister.server.ip=172.17.0.1","/workhome/app.jar"]
+3 -3
View File
@@ -1,7 +1,7 @@
#自定义参数,用于命令行替换,默认值是172.17.0.1
#自定义参数,用于命令行替换,默认值是127.0.0.1
register:
server:
ip: 172.17.0.1
ip: 127.0.0.1
# 从配置中心加载文件
spring:
cloud:
@@ -20,4 +20,4 @@ eureka:
defaultZone: http://micro:fast@${register.server.ip}:10002/eureka/,http://micro:fast@${register.server.ip}:10004/eureka/ #配置所有的注册中心
instance:
prefer-ip-address: true
ip-address: 172.17.0.1
ip-address: 127.0.0.1
-1
View File
@@ -5,4 +5,3 @@ ENV JAVA_JRE ${JAVA_HOME}/jre
ENV PATH ${JAVA_HOME}/bin:$PATH
EXPOSE 10002
EXPOSE 10003
CMD ["java","-jar -Dregister.server.ip=172.17.0.1 -Dconfig.server.ip=172.17.0.1"," /workhome/app.jar"]
@@ -1,10 +1,10 @@
#自定义参数,用于命令行替换,默认值是172.17.0.1
#自定义参数,用于命令行替换,默认值是127.0.0.1
register:
server:
ip: 172.17.0.1
ip: 127.0.0.1
config:
server:
ip: 172.17.0.1
ip: 127.0.0.1
#从配置中心加载配置文件,启动eureka-server服务
spring:
cloud:
@@ -19,4 +19,4 @@ eureka:
defaultZone: http://micro:fast@${register.server.ip}:10004/eureka #和其他注册中心连接
instance:
prefer-ip-address: true
ip-address: 172.17.0.1
ip-address: 127.0.0.1
-1
View File
@@ -5,4 +5,3 @@ ENV JAVA_JRE ${JAVA_HOME}/jre
ENV PATH ${JAVA_HOME}/bin:$PATH
EXPOSE 10004
EXPOSE 10005
CMD ["java","-jar -Dregister.server.ip=172.17.0.1 -Dconfig.server.ip=172.17.0.1","/workhome/app.jar"]
@@ -1,10 +1,10 @@
#自定义参数,用于命令行替换,默认值是172.17.0.1
#自定义参数,用于命令行替换,默认值是127.0.0.1
register:
server:
ip: 172.17.0.1
ip: 127.0.0.1
config:
server:
ip: 172.17.0.1
ip: 127.0.0.1
spring:
cloud:
config:
@@ -18,4 +18,4 @@ eureka:
defaultZone: http://micro:fast@${register.server.ip}:10002/eureka #和其他注册中心连接
instance:
prefer-ip-address: true
ip-address: 172.17.0.1
ip-address: 127.0.0.1
-1
View File
@@ -5,4 +5,3 @@ ENV JAVA_JRE ${JAVA_HOME}/jre
ENV PATH ${JAVA_HOME}/bin:$PATH
EXPOSE 10010
EXPOSE 10011
CMD ["java","-jar -Dregister.server.ip=172.17.0.1","/workhome/app.jar"]
+3 -3
View File
@@ -1,7 +1,7 @@
#自定义参数,用于命令行替换,默认值是172.17.0.1
#自定义参数,用于命令行替换,默认值是127.0.0.1
register:
server:
ip: 172.17.0.1
ip: 127.0.0.1
# 从配置中心加载文件
spring:
cloud:
@@ -20,4 +20,4 @@ eureka:
defaultZone: http://micro:fast@${register.server.ip}:10002/eureka/,http://micro:fast@${register.server.ip}:10004/eureka/ #配置所有的注册中心
instance:
prefer-ip-address: true
ip-address: 172.17.0.1
ip-address: 127.0.0.1
@@ -1,5 +1,5 @@
db.driverLocation=/root/mysql-connector-java-5.1.40-bin.jar
db.driverClassName=com.mysql.jdbc.Driver
db.url=jdbc:mysql://172.17.0.1:3317/micro?useUncoide=true&chracterEncoding=utf-8&useSSL=false
db.url=jdbc:mysql://127.0.0.1:3317/micro?useUncoide=true&chracterEncoding=utf-8&useSSL=false
db.username=root
db.password=studyj2e
-1
View File
@@ -5,4 +5,3 @@ ENV JAVA_JRE ${JAVA_HOME}/jre
ENV PATH ${JAVA_HOME}/bin:$PATH
EXPOSE 10008
EXPOSE 10009
CMD ["java","-jar -Dregister.server.ip=172.17.0.1","/workhome/app.jar"]
+3 -3
View File
@@ -1,7 +1,7 @@
#自定义参数,用于命令行替换,默认值是172.17.0.1
#自定义参数,用于命令行替换,默认值是127.0.0.1
register:
server:
ip: 172.17.0.1
ip: 127.0.0.1
# 从配置中心加载文件
spring:
cloud:
@@ -20,4 +20,4 @@ eureka:
defaultZone: http://micro:fast@${register.server.ip}:10002/eureka/,http://micro:fast@${register.server.ip}:10004/eureka/ #配置所有的注册中心
instance:
prefer-ip-address: true
ip-address: 172.17.0.1
ip-address: 127.0.0.1
@@ -25,7 +25,7 @@
<!--jdbc的数据库连接 -->
<jdbcConnection
driverClass="com.mysql.jdbc.Driver"
connectionURL="jdbc:mysql://172.17.0.1:3317/micro?useUncoide=true&amp;chracterEncoding=utf-8&amp;useSSL=false"
connectionURL="jdbc:mysql://127.0.0.1:3317/micro?useUncoide=true&amp;chracterEncoding=utf-8&amp;useSSL=false"
userId="root"
password="studyj2e">
</jdbcConnection>
@@ -1,5 +1,5 @@
db.driverLocation=/root/mysql-connector-java-5.1.40-bin.jar
db.driverClassName=com.mysql.jdbc.Driver
db.url=jdbc:mysql://172.17.0.1:3317/micro?useUncoide=true&amp;chracterEncoding=utf-8&amp;useSSL=false
db.url=jdbc:mysql://127.0.0.1:3317/micro?useUncoide=true&amp;chracterEncoding=utf-8&amp;useSSL=false
db.username=root
db.password=studyj2e
@@ -1,7 +1,7 @@
#mybatisGeneratorExtend配置文件
#mybatisGeneratorExtend\u914D\u7F6E\u6587\u4EF6
db.driverLocation=/root/mysql-connector-java-5.1.40-bin.jar
db.driverClassName=com.mysql.jdbc.Driver
db.url=jdbc:mysql://172.17.0.1:3317/micro?useUncoide=true&chracterEncoding=utf-8&useSSL=false
db.url=jdbc:mysql://127.0.0.1:3317/micro?useUncoide=true&chracterEncoding=utf-8&useSSL=false
db.username=root
db.password=studyj2e
mybatisGenerator.pojoPackage=com.micro.fast.upms.pojo