`
文章列表
镜像使用方法(三种办法任意一种都能解决问题,建议使用第三种,将配置写死,下次用的时候配置还在): 1.通过config命令 npm config set registry https://registry.npm.taobao.org npm info underscore (如果上面配置正确这个命令会有字符串response) 2.命令行指定 npm --registry https://registry.npm.taobao.org info underscore 3.编辑 ~/.npmrc 加入下面内容 registry = https://registry.npm.taoba ...
执行命令: mysqld --initialize --user=mysql --console 最后有密码 执行命令: mysqld --install MySQL net start mysql 登录mysql 修改密码 set password for root@localhost = password('123456'); 开启任务计划 set global event_scheduler =1; show variables like '%sche%'; 开启远程登录 GRANT ALL PRIVILEGES ON *.* TO 'root'@'%'IDEN ...
Redis主从配置及通过Keepalived实现Redis自动切换高可用

mysql 主从配置

MySQL高可用方案介绍 MySQL 高可用架构在业务层面的分析研究 keepalived+lvs+读写分离+负载均衡 mysql 主从配置 配置Master主服务器 1、在Master MySQL上创建一个用户‘repl’,并允许其他Slave服务器可以通过远程访问Master,通过该用户读取二进制日志,实现数据同步。 create user repl; //创建新用户 GRANT REPLICATION SLAVE ON *.* TO 'repl'@'192.168.40.%' IDENTIFIED BY '123456'; 2、修改my.Ini文件,在[m ...
/** * 客户端判断工具 * */ public class HttpRequestDeviceUtils { /**Wap网关Via头信息中特有的描述信息*/ private static String mobileGateWayHeaders[] = new String[]{ "ZXWAP",//中兴提供的wap网关的via信息,例如:Via=ZXWAP GateWayZTE Technologies, "chinamobile.com",//中国移动的诺基亚wap网关,例如:Via=W ...

zabbix 安装

http://blog.chinaunix.net/uid-25266990-id-3380929.html

Java 文件锁

FileChannel channel FileLock lock //          获得锁方法一lock,阻塞的方法,当文件锁不可用时,当前进程会被挂起  //          lock = channel.lock(0L, Long.MAX_VALUE, true);//共享锁,有写操作会报异常              lock = channel.lock();//独占锁  //          获得锁方法二trylock,非阻塞的方法,当文件锁不可用时,tryLock()会得到null值  //          do {  //             ...

maven 自定义打包

配置 pom.xml <plugin> <artifactId>maven-assembly-plugin</artifactId> <!-- 官网给出的配置,没有配置 groupId,这里也不配置 --> <version>2.6</version> <executions> <execution> <id>make-assembly</id> <!-- ID 标识,命名随意 --> ...
配置 pom.xml <plugin> <groupId>org.apache.tomcat.maven</groupId> <artifactId>tomcat7-maven-plugin</artifactId> <version>2.2</version> <configuration> <url>http://10.9.16.150:8080/manager/text</url> <se ...
import java.util.concurrent.CountDownLatch; public class CountDownLatchTest { public static void main(String[] args) { final CountDownLatch latch = new CountDownLatch(2); new Thread() { public void run() { try { System.out.println("子线程" + Thread.currentThread().g ...
java.util.concurrent 用户指南

spring 自动代理

spring 自动代理 1、org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator 2、org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator spring 通知配置器 1、org.springframework.aop.support.DefaultPointcutAdvisor 2、org.springframework.aop.support.NameMatchMethodPointcutAdvisor 3、o ...
spring 五种类型通知 1、Before(前)  org.apringframework.aop.MethodBeforeAdvice  2、After-returning(返回后) org.springframework.aop.AfterReturningAdvice  3、After-throwing(抛出后) org.springframework.aop.ThrowsAdvice  4、Arround(周围) org.aopaliance.intercept.MethodInterceptor  5、Introduction(引入) org.springframe ...

linux 内核升级

1、导入public key rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org 2、安装ELRepo到CentOS-6.5中 rpm -ivh http://www.elrepo.org/elrepo-release-6-5.el6.elrepo.noarch.rpm 3、安装kernel-lt(lt=long-term) yum --enablerepo=elrepo-kernel install kernel-lt -y 或者安装kernel-ml(ml=mainline) yum --enablerepo=e ...

Linux 命令

centos7关闭防火墙firewall yum install firewalld systemctl start firewalld.service systemctl stop firewalld.service systemctl enable firewalld.service systemctl disable firewalld.service systemctl status firewalld firewall-cmd --state #查看默认防火墙状态(关闭后显示notrunning,开启后显示running) 列出所 ...
Global site tag (gtag.js) - Google Analytics