首页 > 其他
搭建iscsi共享存储
拓扑:实验步骤:--------------------------------------------------------------配置iscsiserver:方案1:(命令行配置,立即有效,重启无效)1、在target上添加两块磁盘设备,sdb,sdc2、安装程序包、启动服务#yuminstall-yscsi-target-utils#servicetgtdstart3、创建target..
分类:其他   时间:2016-01-06 06:54:38    收藏:0  评论:0  赞:0  阅读:273
分区表fstab的用法说明
分区表fstab的作用:系统开机时会主动读取/etc/fstab这个文件中的内容,根据文件里面的配置挂载磁盘。这样我们只需要将磁盘的挂载信息写入这个文件中我们就不需要每次开机启动之后手动进行挂载了。系统挂载的要求:1、根目录是必须挂载的,而且一定要先于其它挂载点被挂载。因..
分类:其他   时间:2016-01-06 06:54:18    收藏:0  评论:0  赞:0  阅读:176
awk:报告生成器
一、awk简介1.awk简介:报告生成器,文本格式化输出;遍历文件命名:Aho,Weinberger,Kernighan采用三个作者的名称首字母简写版本:awk、Nawk(NewAWK,NAWK)、gawk((GNU版本的awk)注意:Linux上使用的awk实际上是gawk,awk为gawk的一个链接文件[root@localhost~]#ls-l/usr/bin/aw..
分类:其他   时间:2016-01-06 06:54:08    收藏:0  评论:0  赞:0  阅读:189
heartbeat 实现双机热备
HA即(highavailable)高可用,又被叫做双机热备,用于关键性业务。简单理解就是,有两台机器A和B,正常是A提供服务,B待命闲置,当A宕机或服务宕掉,会切换至B机器继续提供服务。常用实现高可用的开源软件有heartbeat和keepalived,其中keepalived有负载均衡的功能。下面我们..
分类:其他   时间:2016-01-06 06:53:48    收藏:0  评论:0  赞:0  阅读:174
A机器登录B机器免密码
ssh无密码登录要使用公钥与私钥。linux下可以用用ssh-keygen生成公钥/私钥对,下面我以CentOS为例。有机器A(192.168.0.188),B(192.168.0.189)。现想A通过ssh免密码登录到B。1.在A机下生成公钥/私钥对。-P表示密码,-P‘‘就表示空密码,也可以不用-P参数,这样就要三车回车,用-..
分类:其他   时间:2016-01-06 06:53:38    收藏:0  评论:0  赞:0  阅读:380
LVM管理
LVM扩容、缩减和删除常用命令:lvextend:LV扩容vgextend:VG扩容lvreduce:LV缩减vgreduce:VG缩减lvremove:LV删除vgremove:VG删除pvmove:PV数据移动到所属逻辑卷的其它物理卷pvremove:PV删除vgchange:VG状态改变一、LVM扩容1、LV扩容之前,先查看LV和所属VG可用容量(VF..
分类:其他   时间:2016-01-06 06:51:28    收藏:0  评论:0  赞:0  阅读:465
saltstack安装指导(一)
saltstack安装实验环境:master: CentOSrelease6.7(Final) 192.168.0.38 minion: CentOSrelease6.7(Final) 192.168.0.391安装第三方软件源:rpm软件包网站:http://rpm.pbone.net/[root@mastersaltstack]#wgetftp://ftp.pbone.net/mirror/ftp.centos.org/6.7/extras/i386/Packa..
分类:其他   时间:2016-01-06 06:51:18    收藏:0  评论:0  赞:0  阅读:295
简单文件/目录操作脚本
此脚本是对文件/目录进行简单的复制、删除、备份的操作。功能还不够尽完善,对一些输入为空或空格还没进行判断,但是这个脚本是我真正意义上写完整的第一个脚本。脚本使用while循环和if..elif..else条件判断。部分功能展示:shcp-del-backup-v2.sh********文件/目录操作*******..
分类:其他   时间:2016-01-06 06:51:08    收藏:0  评论:0  赞:0  阅读:217
*Closest Binary Search Tree Value
Given a non-empty binary search tree and a target value, find the value in the BST that is closest to the target.public class Solution { public int...
分类:其他   时间:2016-01-06 06:48:18    收藏:0  评论:0  赞:0  阅读:211
stl queue
定义queue对象的示例代码如下:queue q1;queue q2;queue的基本操作有:入队,如例:q.push(x); 将x接到队列的末端。出队,如例:q.pop(); 弹出队列的第一个元素,注意,并不会返回被弹出元素的值。访问队首元素,如例:q.front(),即最早被压入队列的元素。访问...
分类:其他   时间:2016-01-06 06:48:08    收藏:0  评论:0  赞:0  阅读:168
Lintcode: Wood Cut
Given n pieces of wood with length L[i] (integer array). Cut them into small pieces to guarantee you could have equal or more than k pieces with the s...
分类:其他   时间:2016-01-06 06:47:58    收藏:0  评论:0  赞:0  阅读:201
[?]*Closest Binary Search Tree Value II
Given a non-empty binary search tree and a target value, findkvalues in the BST that are closest to the target.Note:Given target value is a floating p...
分类:其他   时间:2016-01-06 06:47:48    收藏:0  评论:0  赞:0  阅读:234
Lintcode: Update Bits
Given two 32-bit numbers, N and M, and two bit positions, i and j. Write a method to set all bits between i and j in N equal to M (e g , M becomes a s...
分类:其他   时间:2016-01-06 06:47:18    收藏:0  评论:0  赞:0  阅读:93
Lintcode: Route Between Two Nodes in Graph
Given a directed graph, design an algorithm to find out whether there is a route between two nodes.Have you met this question in a real interview? Yes...
分类:其他   时间:2016-01-06 06:46:48    收藏:0  评论:0  赞:0  阅读:167
[lintcode medium]Implement Queue by Two Stacks
Implement Queue by Two StacksAs the title described, you should only use two stacks to implement a queue's actions.The queue should support push(eleme...
分类:其他   时间:2016-01-06 06:46:38    收藏:0  评论:0  赞:0  阅读:184
Lintcode: Flip Bits
Determine the number of bits required to flip if you want to convert integer n to integer m.Have you met this question in a real interview? YesExample...
分类:其他   时间:2016-01-06 06:45:58    收藏:0  评论:0  赞:0  阅读:80
类型信息(1)
Java中有两种方式让我们在运行时识别对象的类的信息:传统的RTTI(Run-Time Type Identification)和反射。Class对象Class对象包含了与类有关的信息,用来创建类的所有“常规”对象的特殊对象。每一个类都有一个Class对象。创建Class对象的引用可以用两种方式来创...
分类:其他   时间:2016-01-06 06:45:38    收藏:0  评论:0  赞:0  阅读:140
利用AS3的ByteArray解析SWF的尺寸
AS3的ByteArray可以用来操作二进制。使用它,我们就获取加载进来的SWF的尺寸。首先要了解下SWF的文件结构,可以下载官方的PDF看下。用UltraEdit32打开一个SWF,会看到第一个字节是43或46,这是16进制,对应的字符就是C或F,其中C表示压缩过的,F表示未压缩的。第二个字节和第...
分类:其他   时间:2016-01-06 06:45:18    收藏:0  评论:0  赞:0  阅读:153
将代码托管到github服务器之SSH验证
上一篇文章已经介绍了如何在github上创建一个代码仓库,也介绍了使用HTTPS方式验证身份,实现与github远程代码仓库的代码共享。本篇文章主要介绍github上的另一中身份验证方式-SSH。通过SSH方式验证身份SSH的操作步骤比HTTPS复杂一些,需要用到公钥和私钥。具体操作步骤如下:1.同...
分类:其他   时间:2016-01-06 06:45:05    收藏:0  评论:0  赞:0  阅读:154
*Inorder Successor in BST
Given a binary search tree and a node in it, find the in-order successor of that node in the BST.Note: If the given node has no in-order successor in ...
分类:其他   时间:2016-01-06 06:44:48    收藏:0  评论:0  赞:0  阅读:152
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!