k8s部署rocketmq 双主
由于apache 官网的 docker image 是单点,要实现集群方式部署。
rocketmq 分为 nameserver 和 broker , 对于之间调用频繁的服务,会增加网络压力, 所以 考虑又网络通信 变成 进程间通信, 那么1个pod 中包含两个container。
关于rocketmq 下载编译, https://www.cnblogs.com/fengjian2016/p/10150394.html
拿到 编译后的 apache-rocketmq , 需要修改一些配置, 例如:
. rm -rf 删除 rocketmq/bin/*.cmd
2 .把runserver.sh HEAP_OPTS 变成环境变量, 把runbroker.sh HEAP_OPTS 变成环境变量
3. 指定消息存储路径
[root@rocketmq1 conf]#mkdir -p /data/rocketmq/store
[root@rocketmq1 conf]#mkdir -p /data/rocketmq/store/commitlog
[root@rocketmq1 conf]#mkdir -p /data/rocketmq/logs
4. 指定日志输出路径
/data/rocketmq/conf/ 中的xml文件
sed -i 's#${user.home}#/data/rocketmq/logs#g' *.xml
5. 删除多余配置文件 2m-2s 2master 等等, 启动的时候k8s command 直接指向文件
/data/rocketmq/conf/ 目录下新建 broker-a.conf broker-b.conf 2个文件 6. 配置修改
(1) rocketmqHome 修改
(2) namesrvAddr 修改,强调 通一个pod 必须写localhost 或者 127.0.0.1 要不然调不通
[root@harbor conf]# cat broker-a.conf
rocketmqHome=/data/rocketmq
namesrvAddr=localhost:;rocketmq2:
brokerName=broker-a
brokerClusterName=DefaultCluster
brokerId=
brokerPermission=
#在发送消息时,自动创建服务器不存在的topic,默认创建的队列数
defaultTopicQueueNums=
#是否允许 Broker 自动创建Topic,建议线下开启,线上关闭
autoCreateTopicEnable=true
clusterTopicEnable=true
brokerTopicEnable=true
#是否允许 Broker 自动创建订阅组,建议线下开启,线上关闭
autoCreateSubscriptionGroup=true
sendMessageThreadPoolNums=
pullMessageThreadPoolNums=
queryMessageThreadPoolNums=
adminBrokerThreadPoolNums=
clientManageThreadPoolNums=
consumerManageThreadPoolNums=
heartbeatThreadPoolNums=
endTransactionThreadPoolNums=
flushConsumerOffsetInterval=
flushConsumerOffsetHistoryInterval=
rejectTransactionMessage=false
fetchNamesrvAddrByAddressServer=false
sendThreadPoolQueueCapacity=
pullThreadPoolQueueCapacity=
queryThreadPoolQueueCapacity=
clientManagerThreadPoolQueueCapacity=
consumerManagerThreadPoolQueueCapacity=
heartbeatThreadPoolQueueCapacity=
endTransactionPoolQueueCapacity=
filterServerNums=
longPollingEnable=true
shortPollingTimeMills=
notifyConsumerIdsChangedEnable=true
highSpeedMode=false
commercialEnable=true
commercialTimerCount=
commercialTransCount=
commercialBigCount=
commercialBaseCount=
transferMsgByHeap=true
maxDelayTime=
regionId=DefaultRegion
registerBrokerTimeoutMills=
slaveReadEnable=false
disableConsumeIfConsumerReadSlowly=false
consumerFallbehindThreshold=
brokerFastFailureEnable=true
waitTimeMillsInSendQueue=
waitTimeMillsInPullQueue=
waitTimeMillsInHeartbeatQueue=
waitTimeMillsInTransactionQueue=
startAcceptSendRequestTimeStamp=
traceOn=true
enableCalcFilterBitMap=false
expectConsumerNumUseFilter=
maxErrorRateOfBloomFilter=
filterDataCleanTimeSpan=
filterSupportRetry=false
enablePropertyFilter=false
compressedRegister=false
forceRegister=true
registerNameServerPeriod=
transactionTimeOut=
transactionCheckMax=
transactionCheckInterval=
#Broker 对外服务的监听端口
listenPort=
serverWorkerThreads=
serverCallbackExecutorThreads=
serverSelectorThreads=
serverOnewaySemaphoreValue=
serverAsyncSemaphoreValue=
serverChannelMaxIdleTimeSeconds=
serverSocketSndBufSize=
serverSocketRcvBufSize=
serverPooledByteBufAllocatorEnable=true
useEpollNativeSelector=false
clientWorkerThreads=
clientCallbackExecutorThreads=
clientOnewaySemaphoreValue=
clientAsyncSemaphoreValue=
connectTimeoutMillis=
channelNotActiveInterval=
clientChannelMaxIdleTimeSeconds=
clientSocketSndBufSize=
clientSocketRcvBufSize=
clientPooledByteBufAllocatorEnable=false
clientCloseSocketIfTimeout=false
useTLS=false
storePathRootDir=/data/rocketmq/store
storePathCommitLog=/root/rocketmq/store/commitlog
#commitLog每个文件的大小默认1G
mapedFileSizeCommitLog=
#ConsumeQueue每个文件默认存60W条,根据业务情况调整,
mapedFileSizeConsumeQueue=
enableConsumeQueueExt=false
mappedFileSizeConsumeQueueExt=
bitMapLengthConsumeQueueExt=
flushIntervalCommitLog=
commitIntervalCommitLog=
useReentrantLockWhenPutMessage=false
flushCommitLogTimed=false
flushIntervalConsumeQueue=
cleanResourceInterval=
deleteCommitLogFilesInterval=
deleteConsumeQueueFilesInterval=
destroyMapedFileIntervalForcibly=
redeleteHangedFileInterval=
#删除文件时间点,默认凌晨 2点
deleteWhen=
#检测物理文件磁盘空间
diskMaxUsedSpaceRatio=
#文件保留时间,默认 小时
fileReservedTime=
putMsgIndexHightWater=
#限制的消息大小
maxMessageSize=
checkCRCOnRecover=true
flushCommitLogLeastPages=
commitCommitLogLeastPages=
flushLeastPagesWhenWarmMapedFile=
flushConsumeQueueLeastPages=
flushCommitLogThoroughInterval=
commitCommitLogThoroughInterval=
flushConsumeQueueThoroughInterval=
maxTransferBytesOnMessageInMemory=
maxTransferCountOnMessageInMemory=
maxTransferBytesOnMessageInDisk=
maxTransferCountOnMessageInDisk=
accessMessageInMemoryMaxRatio=
messageIndexEnable=true
maxHashSlotNum=
maxIndexNum=
maxMsgsNumBatch=
messageIndexSafe=false
haListenPort=
haSendHeartbeatInterval=
haHousekeepingInterval=
haTransferBatchSize=
haMasterAddress=
haSlaveFallbehindMax=
brokerRole=ASYNC_MASTER
flushDiskType=ASYNC_FLUSH
syncFlushTimeout=
messageDelayLevel=1s 5s 10s 30s 1m 2m 3m 4m 5m 6m 7m 8m 9m 10m 20m 30m 1h 2h
flushDelayOffsetInterval=
cleanFileForciblyEnable=true
warmMapedFileEnable=false
offsetCheckInSlave=false
debugLockEnable=false
duplicationEnable=false
diskFallRecorded=true
osPageCacheBusyTimeOutMills=
defaultQueryMaxNum=
transientStorePoolEnable=false
transientStorePoolSize=
fastFailIfNoBufferInStorePool=false
[root@harbor conf]# cat broker-b.conf
rocketmqHome=/data/rocketmq
namesrvAddr=rocketmq1:;localhost:
brokerName=broker-b
brokerClusterName=DefaultCluster
brokerId=
brokerPermission=
#在发送消息时,自动创建服务器不存在的topic,默认创建的队列数
defaultTopicQueueNums=
#是否允许 Broker 自动创建Topic,建议线下开启,线上关闭
autoCreateTopicEnable=true
clusterTopicEnable=true
brokerTopicEnable=true
#是否允许 Broker 自动创建订阅组,建议线下开启,线上关闭
autoCreateSubscriptionGroup=true
sendMessageThreadPoolNums=
pullMessageThreadPoolNums=
queryMessageThreadPoolNums=
adminBrokerThreadPoolNums=
clientManageThreadPoolNums=
consumerManageThreadPoolNums=
heartbeatThreadPoolNums=
endTransactionThreadPoolNums=
flushConsumerOffsetInterval=
flushConsumerOffsetHistoryInterval=
rejectTransactionMessage=false
fetchNamesrvAddrByAddressServer=false
sendThreadPoolQueueCapacity=
pullThreadPoolQueueCapacity=
queryThreadPoolQueueCapacity=
clientManagerThreadPoolQueueCapacity=
consumerManagerThreadPoolQueueCapacity=
heartbeatThreadPoolQueueCapacity=
endTransactionPoolQueueCapacity=
filterServerNums=
longPollingEnable=true
shortPollingTimeMills=
notifyConsumerIdsChangedEnable=true
highSpeedMode=false
commercialEnable=true
commercialTimerCount=
commercialTransCount=
commercialBigCount=
commercialBaseCount=
transferMsgByHeap=true
maxDelayTime=
regionId=DefaultRegion
registerBrokerTimeoutMills=
slaveReadEnable=false
disableConsumeIfConsumerReadSlowly=false
consumerFallbehindThreshold=
brokerFastFailureEnable=true
waitTimeMillsInSendQueue=
waitTimeMillsInPullQueue=
waitTimeMillsInHeartbeatQueue=
waitTimeMillsInTransactionQueue=
startAcceptSendRequestTimeStamp=
traceOn=true
enableCalcFilterBitMap=false
expectConsumerNumUseFilter=
maxErrorRateOfBloomFilter=
filterDataCleanTimeSpan=
filterSupportRetry=false
enablePropertyFilter=false
compressedRegister=false
forceRegister=true
registerNameServerPeriod=
transactionTimeOut=
transactionCheckMax=
transactionCheckInterval=
#Broker 对外服务的监听端口
listenPort=
serverWorkerThreads=
serverCallbackExecutorThreads=
serverSelectorThreads=
serverOnewaySemaphoreValue=
serverAsyncSemaphoreValue=
serverChannelMaxIdleTimeSeconds=
serverSocketSndBufSize=
serverSocketRcvBufSize=
serverPooledByteBufAllocatorEnable=true
useEpollNativeSelector=false
clientWorkerThreads=
clientCallbackExecutorThreads=
clientOnewaySemaphoreValue=
clientAsyncSemaphoreValue=
connectTimeoutMillis=
channelNotActiveInterval=
clientChannelMaxIdleTimeSeconds=
clientSocketSndBufSize=
clientSocketRcvBufSize=
clientPooledByteBufAllocatorEnable=false
clientCloseSocketIfTimeout=false
useTLS=false
storePathRootDir=/data/rocketmq/store
storePathCommitLog=/root/rocketmq/store/commitlog
#commitLog每个文件的大小默认1G
mapedFileSizeCommitLog=
#ConsumeQueue每个文件默认存60W条,根据业务情况调整,
mapedFileSizeConsumeQueue=
enableConsumeQueueExt=false
mappedFileSizeConsumeQueueExt=
bitMapLengthConsumeQueueExt=
flushIntervalCommitLog=
commitIntervalCommitLog=
useReentrantLockWhenPutMessage=false
flushCommitLogTimed=false
flushIntervalConsumeQueue=
cleanResourceInterval=
deleteCommitLogFilesInterval=
deleteConsumeQueueFilesInterval=
destroyMapedFileIntervalForcibly=
redeleteHangedFileInterval=
#删除文件时间点,默认凌晨 2点
deleteWhen=
#检测物理文件磁盘空间
diskMaxUsedSpaceRatio=
#文件保留时间,默认 小时
fileReservedTime=
putMsgIndexHightWater=
#限制的消息大小
maxMessageSize=
checkCRCOnRecover=true
flushCommitLogLeastPages=
commitCommitLogLeastPages=
flushLeastPagesWhenWarmMapedFile=
flushConsumeQueueLeastPages=
flushCommitLogThoroughInterval=
commitCommitLogThoroughInterval=
flushConsumeQueueThoroughInterval=
maxTransferBytesOnMessageInMemory=
maxTransferCountOnMessageInMemory=
maxTransferBytesOnMessageInDisk=
maxTransferCountOnMessageInDisk=
accessMessageInMemoryMaxRatio=
messageIndexEnable=true
maxHashSlotNum=
maxIndexNum=
maxMsgsNumBatch=
messageIndexSafe=false
haListenPort=
haSendHeartbeatInterval=
haHousekeepingInterval=
haTransferBatchSize=
haMasterAddress=
haSlaveFallbehindMax=
brokerRole=ASYNC_MASTER
flushDiskType=ASYNC_FLUSH
syncFlushTimeout=
messageDelayLevel=1s 5s 10s 30s 1m 2m 3m 4m 5m 6m 7m 8m 9m 10m 20m 30m 1h 2h
flushDelayOffsetInterval=
cleanFileForciblyEnable=true
warmMapedFileEnable=false
offsetCheckInSlave=false
debugLockEnable=false
duplicationEnable=false
diskFallRecorded=true
osPageCacheBusyTimeOutMills=
defaultQueryMaxNum=
transientStorePoolEnable=false
transientStorePoolSize=
fastFailIfNoBufferInStorePool=false
broker Dockerfile
[root@harbor rocketmq-broker]# cat Dockerfile
FROM centos MAINTAINER fengjian <fengjian@senyint.com> ENV TZ "Asia/Shanghai"
ENV TERM xterm
ENV MALLOC_ARENA_MAX=
ENV JAVA_HOME /data/jdk
ENV CLASSPATH $JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
ENV CATALINA_HOME /data/tomcat
ENV CATALINA_BASE /data/tomcat
ENV PATH $PATH:$JAVA_HOME/bin:$CATALINA_HOME/lib:$CATALINA_HOME/bin
ENV ROCKETMQ_HOME /data/rocketmq RUN rm /etc/yum.repos.d/* -rf
ADD Centos-7.repo /etc/yum.repos.d/
ADD epel.repo /etc/yum.repos.d/
RUN yum clean all
RUN yum -y install net-tools bind-utils sysstat ADD localtime /etc/
ADD jdk.tar.gz /data
ADD profile /etc
ADD sysctl.conf /etc
ADD 20-nproc.conf /etc/security/limits.d/
ADD limits.conf /etc/security/ ADD rocketmq.tar.gz /data/
WORKDIR ${ROCKETMQ_HOME}/bin EXPOSE 10909 10911
nameserver Dockerfile
FROM centos MAINTAINER fengjian <fengjian@senyint.com> ENV TZ "Asia/Shanghai"
ENV TERM xterm
ENV MALLOC_ARENA_MAX=
ENV JAVA_HOME /data/jdk
ENV CLASSPATH $JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
ENV CATALINA_HOME /data/tomcat
ENV CATALINA_BASE /data/tomcat
ENV PATH $PATH:$JAVA_HOME/bin:$CATALINA_HOME/lib:$CATALINA_HOME/bin
ENV ROCKETMQ_HOME /data/rocketmq RUN rm /etc/yum.repos.d/* -rf
ADD Centos-7.repo /etc/yum.repos.d/
ADD epel.repo /etc/yum.repos.d/
RUN yum clean all
RUN yum -y install net-tools bind-utils sysstat ADD localtime /etc/
ADD jdk.tar.gz /data
ADD profile /etc
ADD sysctl.conf /etc
ADD 20-nproc.conf /etc/security/limits.d/
ADD limits.conf /etc/security/ ADD rocketmq.tar.gz /data/
WORKDIR ${ROCKETMQ_HOME}/bin EXPOSE 9876 ENTRYPOINT ["sh","mqnamesrv"]
cat ceph-rocketmq1-pvc.yaml
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: rocketmq1-brokerstore-pvc
annotations:
volume.beta.kubernetes.io/storage-class: ceph-rbd-rocketmq
spec:
accessModes:
- ReadWriteOnce #必须写ReadWriteOnce,否则报错。
resources:
requests:
storage: 20Gi
---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: rocketmq1-brokerlog-pvc
annotations:
volume.beta.kubernetes.io/storage-class: ceph-rbd-rocketmq
spec:
accessModes:
- ReadWriteOnce #必须写ReadWriteOnce,否则报错。
resources:
requests:
storage: 20Gi
---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: rocketmq1-namesrvlog-pvc
annotations:
volume.beta.kubernetes.io/storage-class: ceph-rbd-rocketmq
spec:
accessModes:
- ReadWriteOnce #必须写ReadWriteOnce,否则报错。
resources:
requests:
storage: 20Gi
rocketmq1 yaml文件
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: rocketmq1
spec:
replicas:
template:
metadata:
labels:
app: rocketmq1
spec:
containers:
- name: namesrv
image: 192.168.200.10/fengjian/rocketmq-nameserver:4.3
imagePullPolicy: Always
ports:
- containerPort:
env:
- name: ROCKETMQ_HEAP_OPTS
value : "-Xms1g -Xmx1g -Xmn512m"
volumeMounts:
- name: rocketmq1namesrvlog
mountPath: /data/rocketmq/logs
- name: broker
image: 192.168.200.10/fengjian/rocketmq-broker:4.3
imagePullPolicy: Always
ports:
- name: brockerserver
containerPort:
- name: brockerslave
containerPort:
command: ["/data/rocketmq/bin/mqbroker"]
args: ["-c", "/data/rocketmq/conf/broker-a.conf"]
env:
- name: ROCKETMQ_HEAP_OPTS
value : "-Xms2g -Xmx2g -Xmn1g"
volumeMounts:
- name: brokerlogs
mountPath: /data/rocketmq/logs
- name: brokerstore
mountPath: /data/rocketmq/store
volumes:
- name: rocketmq1namesrvlog
persistentVolumeClaim:
claimName: rocketmq1-namesrvlog-pvc
- name: brokerlogs
persistentVolumeClaim:
claimName: rocketmq1-brokerlog-pvc
- name: brokerstore
persistentVolumeClaim:
claimName: rocketmq1-brokerstore-pvc ---
apiVersion: v1
kind: Service
metadata:
name: rocketmq1
spec:
ports:
- name: brokerslave
port:
protocol: TCP
targetPort:
- name: brokerserver
port:
protocol: TCP
targetPort:
- name: namesrvport
port:
protocol: TCP
targetPort:
selector:
app: rocketmq1
还要提前定义pvc 卷
vim rocketmq2.yaml
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: rocketmq1
spec:
replicas:
template:
metadata:
labels:
app: rocketmq1
spec:
containers:
- name: namesrv
image: 192.168.200.10/fengjian/rocketmq-nameserver:4.3
imagePullPolicy: Always
ports:
- containerPort:
env:
- name: ROCKETMQ_HEAP_OPTS
value : "-Xms1g -Xmx1g -Xmn512m"
volumeMounts:
- name: rocketmq1namesrvlog
mountPath: /data/rocketmq/logs
- name: broker
image: 192.168.200.10/fengjian/rocketmq-broker:4.3
imagePullPolicy: Always
ports:
- name: brockerserver
containerPort:
- name: brockerslave
containerPort:
command: ["/data/rocketmq/bin/mqbroker"]
args: ["-c", "/data/rocketmq/conf/broker-b.conf"]
env:
- name: ROCKETMQ_HEAP_OPTS
value : "-Xms2g -Xmx2g -Xmn1g"
volumeMounts:
- name: brokerlogs
mountPath: /data/rocketmq/logs
- name: brokerstore
mountPath: /data/rocketmq/store
volumes:
- name: rocketmq1namesrvlog
persistentVolumeClaim:
claimName: rocketmq1-namesrvlog-pvc
- name: brokerlogs
persistentVolumeClaim:
claimName: rocketmq1-brokerlog-pvc
- name: brokerstore
persistentVolumeClaim:
claimName: rocketmq1-brokerstore-pvc ---
apiVersion: v1
kind: Service
metadata:
name: rocketmq1
spec:
ports:
- name: brokerslave
port:
protocol: TCP
targetPort:
- name: brokerserver
port:
protocol: TCP
targetPort:
- name: namesrvport
port:
protocol: TCP
targetPort:
selector:
app: rocketmq1
k8s部署rocketmq 双主的更多相关文章
- Docker 部署 RocketMQ 双主双从模式( 版本v4.7.0)
文章转载自:http://www.mydlq.club/article/96/ 系统环境: 系统版本:CentOS 7.8 RocketMQ 版本:4.7.0 Docker 版本:19.03.13 一 ...
- Centos6.9下RocketMQ3.4.6高可用集群部署记录(双主双从+Nameserver+Console)
之前的文章已对RocketMQ做了详细介绍,这里就不再赘述了,下面是本人在测试和生产环境下RocketMQ3.4.6高可用集群的部署手册,在此分享下: 1) 基础环境 ip地址 主机名 角色 192. ...
- 49.RocketMQ 双主搭建(本文非EamonSec原创)
声明:本文非EamonSec原创,copy自网上下载的某个个文件 1.RocketMQ介绍 1.1. 简介 RocketMQ 是一款分布式.队列模型的消息中间件,具有以下特点: 能够保证严格的消息顺序 ...
- rocketmq双主模式
1.官网 https://rocketmq.apache.org/ 官方安装文档 https://rocketmq.apache.org/docs/quick-start/ 2.rocketmq多主配 ...
- rocketmq双主发送消息 SLAVE_NOT_AVAILABLE 状态
RocketMQ最佳实践之Producer 投递状态 发送消息时,将得到包含SendStatus的SendResult.首先,我们假设消息的isWaitStoreMsgOK = true(默认是tru ...
- 双主MySQL+keepalived高可用配置
部署双节点双主数据库服务器mysql 分别在二台服务器上安装mysql,要求同版本或主服务器比从服务器版本高. 主机mysql配置: Vi /etc/my.cnf [mysqld] Log-bin=m ...
- RocketMQ学习笔记(16)----RocketMQ搭建双主双从(异步复制)集群
1. 修改RocketMQ默认启动端口 由于只有两台机器,部署双主双从需要四个节点,所以只能修改rocketmq的默认启动端口,从官网下载rocketmq的source文件,解压后使用idea打开,全 ...
- MySQL双主+keeplived安装部署说明
MySQL双主+keeplived安装部署说明 一.环境介绍 1.1.规划 序号 类别 版本 主机名 IP 端口 备注 1 OS CentOS release 6.9 (Final) (minimal ...
- 003.MMM双主-双从读写分离部署
一 前期规划 1.1 主机规划 1.2 虚拟IP规划 1.3 用户列表 提示:以上角色需要在所有节点添加. 1.4 整体架构 1.4 hosts修改 1 [root@localhost ~]# vi ...
随机推荐
- MVC和WebForm区别
WebForm的理解 1. WebForm概念 ASP.NETWebform提供了一个类似于Winform的事件响应GUI模型(event-drivenGUI),隐藏了HTTP.HTML.JavaSc ...
- 10.C++-构造函数初始化列表、类const成员、对象构造顺序、析构函数
首先回忆下,以前学的const 单独使用const修饰变量时,是定义的常量,比如:const int i=1; 使用volatile const修饰变量时,定义的是只读变量 使用const & ...
- 以杨辉三角为例,从内存角度简单分析C语言中的动态二维数组
学C语言,一定绕不过指针这一大难关,而指针最让人头疼的就是各种指向关系,一阶的指针还比较容易掌握,但一旦阶数一高,就很容易理不清楚其中的指向关系,现在我将通过杨辉三角为例,我会用四种方法从内存的角度简 ...
- Mongodb的基本语法
前段时间工作上面由于没有多少事所以玩了玩mongodb,学习了它的基本语法,然后现在在这里做一个简单的总结. 1.我是在win平台上面,启动的话比较麻烦,所以我就简单的把启动过程做了个批处理文件 启动 ...
- 【Java并发编程】6、volatile关键字解析&内存模型&并发编程中三概念
volatile这个关键字可能很多朋友都听说过,或许也都用过.在Java 5之前,它是一个备受争议的关键字,因为在程序中使用它往往会导致出人意料的结果.在Java 5之后,volatile关键字才得以 ...
- Swagger2限定接口范围
前面在使用Swagger2时遇到的坑中简单介绍了Swagger的使用. 不过默认情况下,Swagger2会把项目中的所有接口都展示在列表里,特别是你用了Springboot/SpringCloud之后 ...
- 详解scss的继承、占位符和混合宏
1.继承和占位符 两者都是通过@extend来引用. 1.1 继承 一个已经存在的css样式类,可以被其他样式类继承. 例如,实现以下css样式: .btn, .btn--primary, .btn- ...
- Java执行sh等
1.通过java代码,调用bat.shell等脚本或者命令 1)使用Runtime的exec()方法,会返回一个用于管理操作系统进程的Process对象 Process process =null; ...
- (网页)理解Angular中的$apply()以及$digest()
转自CSDN: 工作有问题上CSDN上转转. $apply()和$digest()在AngularJS中是两个核心概念,但是有时候它们又让人困惑.而为了了解AngularJS的工作方式,首先需要了解$ ...
- [20170914]tnsnames.ora的管理.txt
[20170914]tnsnames.ora的管理.txt --//昨天朋友讲tnsnams.ora的内容太长了,而且许多不需要的.管理不方便.我记得以前写[20150409]tnsnames.ora ...