首页 > 其他
1.2-HA集群配置-2
配置文件首先复制样例到指定目录cd/usr/share/doc/heartbeat-3.0.4/cpha.cfauthkeysharesources/etc/ha.d/cd/etc/ha.d/1.首先编辑authkeys#用来主从验证通讯,对方是否存活。而且是加密通讯。vimauthkeys其中123代表加密程度,1最简单,2md5复杂,3sha最复杂#auth1#1crc#2sha1H..
分类:其他   时间:2015-10-17 07:07:45    收藏:0  评论:0  赞:0  阅读:200
KVM ---------快照
1、VMware的快照还原快照:快照管理a.创建快照1、[root@localhostcaimz]#virshsnapshot-createcaimz1Domainsnapshot1444908044created若是:virshsnapshot-createcentos6.6会报错:unsupportedconfiguration:internalsnapshotfordiskvdaunsupportedforstoragetyperaw这是因为ra..
分类:其他   时间:2015-10-17 07:07:35    收藏:0  评论:0  赞:1  阅读:793
1.3-HA集群配置-3
首先启动软件来测试。yum安装的nginx不需要人工手动启动,虚拟IP也不需要手动配置。启动heartbeat有个顺序,先启动主,在启动从。serviceheartbeatstart或者/etc/init.d/heartbeatstart然后查看主上nginx进程是否起来psaux|grepnginx在查看主上虚拟IP是否起来ifcong或者ipadd注..
分类:其他   时间:2015-10-17 07:07:25    收藏:0  评论:0  赞:0  阅读:286
vsftpd server 搭建
vsftpd安全稳定快速,基于tcp/ip的应用层服务两个端口:命令控制21,数据传输20分为主动模式和被动模式,相对于ftpserver而言!服务器端的数据传输端口不一定是20!vsftpd三种帐号:匿名帐号(anonymous)ftp系统帐号(localuser)===》系统帐号(都映射成系统帐号)系统帐号自身..
分类:其他   时间:2015-10-17 07:07:15    收藏:0  评论:0  赞:0  阅读:228
Keepalived实现LVS-DR模型的高可用_2015101601
Keepalived实现LVS-DR模型的高可用>>>拓扑结构简介本次实验所使用的系统发行版本为:centos6.6(nod1)路由器,为一台linux主机模拟,共有两个接口eth0内网172.16.0.0/16网段,并且该接口为内网RS的网关;eth1为外网192.168.1.0/24网段,为外网客户端的网关(nod55)为M..
分类:其他   时间:2015-10-17 07:06:36    收藏:0  评论:0  赞:0  阅读:294
配置RAID
有时候我们需要容量较大或读写性能比较好的磁盘,特别是在服务器中,但这样的磁盘价格自然比较昂高,比如说SSD。此时如果你手头有几块普通磁盘,RAID就可以派上用场了。一、RAID是什么?RAID(RedundantArraysofIndependentDisks)意思是廉价磁盘冗余阵列,它可将至少两个便宜..
分类:其他   时间:2015-10-17 07:05:45    收藏:0  评论:0  赞:0  阅读:247
为呼吸负责,空气净化器的变革之道
近年来,随着城市环境资源的过度利用,越来越多的环境恶化现象已经指出环境改善的必要性,一些有远见的厂商在这种趋势下,也开始对环境呵护设备领域进行了新的探索。在中国目前的市场上,空气净化器是首当其冲的环境呵护设备,除了一些打着互联网思维旗号的本土产品之外,一些..
分类:其他   时间:2015-10-17 07:05:15    收藏:0  评论:0  赞:0  阅读:257
Heartbeat V2简单应用
一、Heartbeat的简介:Heartbeat项目是Linux-HA工程的一个组成部分,也是目前开源HA项目中最成功的一个例子,Linux-HA的全称是High-AvailabilityLinux,这个开源项目的目标是:通过社区开发者的共同努力,提供一个增强linux可靠性(reliability)、可用性(availability)和可..
分类:其他   时间:2015-10-17 07:04:45    收藏:0  评论:0  赞:0  阅读:178
LeetCode (73): Set Matrix Zeroes
链接:https://leetcode.com/problems/set-matrix-zeroes/【描述】Given amxnmatrix, if an element is 0, set its entire row and column to 0. Do it in place.【中文描述】...
分类:其他   时间:2015-10-17 07:02:35    收藏:0  评论:0  赞:0  阅读:301
Modern Operating System --- Power Management (CPU)
The CPU can also be managed to save energy. A notebook CPU can be put to sleep in software, reducingpower usage to almost zero. The only thing it can ...
分类:其他   时间:2015-10-17 07:02:24    收藏:0  评论:0  赞:0  阅读:262
LeetCode Median of Two Sorted Arrays
原题链接在这里:https://leetcode.com/problems/median-of-two-sorted-arrays/首先我们先明确什么是median,即中位数。引用Wikipedia对中位数的定义:计算有限个数的数据的中位数的方法是:把所有的同类数据按照大小的顺序排列。如果数据的个数...
分类:其他   时间:2015-10-17 07:01:54    收藏:0  评论:0  赞:0  阅读:224
mybatis
jdbc编程步骤:1、加载数据库驱动2、创建并获取数据库链接3、创建jdbcstatement对象4、设置sql语句5、设置sql语句中的参数(使用preparedStatement)6、通过statement执行sql并获取结果7、对sql执行结果进行解析处理8、释放资源(resultSet、pr...
分类:其他   时间:2015-10-17 07:01:34    收藏:0  评论:0  赞:0  阅读:230
NGINX + LUA实现复杂的控制
安装lua_nginx_module 模块lua_nginx_module 可以一步步的安装,也可以直接用淘宝的OpenRestyCentos和debian的安装就简单了。。这里说下freebsd的安装:fetch http://www.lua.org/ftp/lua-5.1.4.tar.gztar...
分类:其他   时间:2015-10-17 07:00:55    收藏:0  评论:0  赞:0  阅读:525
Modern Operating System --- Power Management (Hard Disk)
Another major villain is the hard disk. It takes substantial energy to keep it spinning at highspeed, even if there are no accesses. Many conputers, e...
分类:其他   时间:2015-10-17 07:00:24    收藏:0  评论:0  赞:0  阅读:224
LintCode Kth Largest Element
原题链接在这里:http://www.lintcode.com/en/problem/kth-largest-element/#采用的quickSelect方法,取出pivot, 比pivot 小的都放在左边,比pivot大的都放在右边,若是pivot左边包括pivot的个数恰巧等于k, 就返回pi...
分类:其他   时间:2015-10-17 07:00:04    收藏:0  评论:0  赞:0  阅读:424
J2EE自定义标签:实现“标签作用域”
好吧我们总是喜欢自定义一些名词,这里“标签作用域”是指变量的作用域只在与标签内部,在标签外就获取不到值标签要求实现的效果大致如下:jsp页面:...栏目名称:${cate.name}栏目文章列表:${item.name}...编译后打印出来的html页面:...栏目名称:新闻栏目栏目文章列表:新闻一...
分类:其他   时间:2015-10-17 06:59:44    收藏:0  评论:0  赞:0  阅读:273
Modern Operating System --- Power Management (OS Issues)
The operating system plays a key role in energy management. It controls all the devices, so itmust decide what to shutdown and when to shut it down. I...
分类:其他   时间:2015-10-17 06:59:34    收藏:0  评论:0  赞:0  阅读:335
Leetcode 3Sum
Given an arraySofnintegers, are there elementsa,b,cinSsuch thata+b+c= 0? Find all unique triplets in the array which gives the sum of zero.Note:Elemen...
分类:其他   时间:2015-10-17 06:59:24    收藏:0  评论:0  赞:0  阅读:244
二分查找的两种写法
其实还是经常写二分的,也知道二分查找有好多写法,然而一直没有总结一下。现单独开一篇备忘。我通常的二分写法是:int binarysearch(int *a, int n, int d) { int left = 0, right = n - 1; while (left d) { ...
分类:其他   时间:2015-10-17 06:58:24    收藏:0  评论:0  赞:0  阅读:202
Leetcode Two Sum II - Input array is sorted
Given an array of integers that is alreadysorted in ascending order, find two numbers such that they add up to a specific target number.The function t...
分类:其他   时间:2015-10-17 06:57:54    收藏:0  评论:0  赞:0  阅读:222
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!