1 Star 0 Fork 310

Ethan.W/laravel5_backend

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
mrblog.sql 472.84 KB
一键复制 编辑 原始数据 按行查看 历史
风一样的世界 提交于 2015-07-07 12:25 . 常规
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069
/*
Navicat MySQL Data Transfer
Source Server : 127.0.0.1
Source Server Version : 50620
Source Host : localhost:3306
Source Database : mrblog
Target Server Type : MYSQL
Target Server Version : 50620
File Encoding : 65001
Date: 2015-07-07 12:24:44
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for `bk_access`
-- ----------------------------
DROP TABLE IF EXISTS `bk_access`;
CREATE TABLE `bk_access` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`role_id` int(11) NOT NULL COMMENT '角色的ID',
`permission_id` int(11) NOT NULL COMMENT '节点的ID',
`type` tinyint(1) NOT NULL DEFAULT '1' COMMENT '标识是用户组还是用户1为用户组2为用户,默认为用户组',
PRIMARY KEY (`id`),
KEY `role_id` (`role_id`) USING BTREE,
KEY `node_id` (`permission_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=368 DEFAULT CHARSET=utf8 COMMENT='权限表_by_jiang';
-- ----------------------------
-- Records of bk_access
-- ----------------------------
INSERT INTO `bk_access` VALUES ('96', '2', '1', '1');
INSERT INTO `bk_access` VALUES ('97', '2', '67', '1');
INSERT INTO `bk_access` VALUES ('98', '2', '4', '1');
INSERT INTO `bk_access` VALUES ('99', '2', '29', '1');
INSERT INTO `bk_access` VALUES ('311', '3', '55', '2');
INSERT INTO `bk_access` VALUES ('312', '3', '73', '2');
INSERT INTO `bk_access` VALUES ('313', '3', '56', '2');
INSERT INTO `bk_access` VALUES ('314', '3', '57', '2');
INSERT INTO `bk_access` VALUES ('315', '3', '58', '2');
INSERT INTO `bk_access` VALUES ('324', '3', '1', '2');
INSERT INTO `bk_access` VALUES ('325', '3', '67', '2');
INSERT INTO `bk_access` VALUES ('326', '3', '4', '2');
INSERT INTO `bk_access` VALUES ('327', '3', '29', '2');
INSERT INTO `bk_access` VALUES ('364', '3', '1', '1');
INSERT INTO `bk_access` VALUES ('365', '3', '55', '1');
INSERT INTO `bk_access` VALUES ('366', '3', '73', '1');
INSERT INTO `bk_access` VALUES ('367', '3', '56', '1');
-- ----------------------------
-- Table structure for `bk_action_log`
-- ----------------------------
DROP TABLE IF EXISTS `bk_action_log`;
CREATE TABLE `bk_action_log` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(50) NOT NULL COMMENT '登录的用户名',
`user_id` int(11) NOT NULL COMMENT '登录的用户ID',
`ip` varchar(20) NOT NULL COMMENT 'ip地址',
`ip_adress` varchar(255) NOT NULL COMMENT 'ip所属的地区',
`add_time` int(11) NOT NULL,
`realname` varchar(30) NOT NULL COMMENT '真实姓名',
`content` text NOT NULL COMMENT '记录的内容',
PRIMARY KEY (`id`),
KEY `user_id` (`user_id`) USING BTREE,
KEY `username` (`username`) USING BTREE,
KEY `addtime` (`add_time`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=287 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of bk_action_log
-- ----------------------------
INSERT INTO `bk_action_log` VALUES ('1', 'admin', '1', '127.0.0.1', '', '1433318628', '管理员', '');
INSERT INTO `bk_action_log` VALUES ('2', 'admin', '1', '127.0.0.1', '', '1433319059', '管理员', '登录系统成功');
INSERT INTO `bk_action_log` VALUES ('3', 'admin', '1', '127.0.0.1', '', '1433319146', '管理员', '登录系统成功');
INSERT INTO `bk_action_log` VALUES ('4', 'test', '2', '127.0.0.1', '', '1433323585', 'test', '登录系统成功');
INSERT INTO `bk_action_log` VALUES ('5', 'admin', '1', '127.0.0.1', '', '1433323596', '管理员', '登录系统成功');
INSERT INTO `bk_action_log` VALUES ('6', 'test', '2', '127.0.0.1', '', '1433387021', 'test', '登录系统成功');
INSERT INTO `bk_action_log` VALUES ('7', 'admin', '1', '127.0.0.1', '', '1433387092', '管理员', '登录系统成功');
INSERT INTO `bk_action_log` VALUES ('8', 'admin', '1', '127.0.0.1', '', '1433387394', '管理员', '登录系统成功');
INSERT INTO `bk_action_log` VALUES ('9', 'admin', '1', '127.0.0.1', '', '1433387489', '管理员', '增加了新的系统用户:test1231231123');
INSERT INTO `bk_action_log` VALUES ('10', 'admin', '1', '127.0.0.1', '', '1433388058', '管理员', '编辑了系统用户:test1231231123');
INSERT INTO `bk_action_log` VALUES ('11', 'admin', '1', '127.0.0.1', '', '1433389439', '管理员', '增加了新的系统用户:123123aab');
INSERT INTO `bk_action_log` VALUES ('12', 'admin', '1', '127.0.0.1', '', '1433389488', '管理员', '增加了新的系统用户:12313123123');
INSERT INTO `bk_action_log` VALUES ('13', 'admin', '1', '127.0.0.1', '', '1433389702', '管理员', '增加了新的系统用户:123123ffffffff');
INSERT INTO `bk_action_log` VALUES ('14', 'admin', '1', '127.0.0.1', '', '1433389728', '管理员', '增加了新的系统用户:123123gg');
INSERT INTO `bk_action_log` VALUES ('15', 'admin', '1', '127.0.0.1', '', '1433390103', '管理员', '删除了系统用户:12313123123');
INSERT INTO `bk_action_log` VALUES ('16', 'admin', '1', '127.0.0.1', '', '1433390300', '管理员', '删除了系统用户:123123aab');
INSERT INTO `bk_action_log` VALUES ('17', 'admin', '1', '127.0.0.1', '', '1433390407', '管理员', '登录系统成功');
INSERT INTO `bk_action_log` VALUES ('18', 'test', '2', '127.0.0.1', '', '1433390430', 'test', '登录系统成功');
INSERT INTO `bk_action_log` VALUES ('19', 'admin', '1', '127.0.0.1', '', '1433397520', '管理员', '增加了新的用户组:sdfasf');
INSERT INTO `bk_action_log` VALUES ('20', 'admin', '1', '127.0.0.1', '', '1433398047', '管理员', '编辑了用户组:sdfasf');
INSERT INTO `bk_action_log` VALUES ('21', 'admin', '1', '127.0.0.1', '', '1433398364', '管理员', '删除了系统用户:sdfasf');
INSERT INTO `bk_action_log` VALUES ('22', 'admin', '1', '127.0.0.1', '', '1433398384', '管理员', '删除了用户组:test123');
INSERT INTO `bk_action_log` VALUES ('23', 'admin', '1', '127.0.0.1', '', '1433398933', '管理员', '增加了新的用户组::groupname');
INSERT INTO `bk_action_log` VALUES ('24', 'admin', '1', '127.0.0.1', '', '1433398963', '管理员', '改变了用户组的权限:测试用户组');
INSERT INTO `bk_action_log` VALUES ('25', 'admin', '1', '127.0.0.1', '', '1433399098', '管理员', '改变了用户的权限:test');
INSERT INTO `bk_action_log` VALUES ('26', 'admin', '1', '127.0.0.1', '', '1433400975', '管理员', '登录系统成功');
INSERT INTO `bk_action_log` VALUES ('27', 'admin', '1', '127.0.0.1', '', '1433408366', '管理员', '增加了新的系统用户:test123');
INSERT INTO `bk_action_log` VALUES ('28', 'admin', '1', '127.0.0.1', '', '1433408371', '管理员', '删除了系统用户:test123');
INSERT INTO `bk_action_log` VALUES ('29', 'admin', '1', '127.0.0.1', '', '1433408376', '管理员', '改变了用户的权限:test');
INSERT INTO `bk_action_log` VALUES ('30', 'admin', '1', '127.0.0.1', '', '1433904485', '管理员', '登录系统成功');
INSERT INTO `bk_action_log` VALUES ('31', 'admin', '1', '127.0.0.1', '', '1433904731', '管理员', '增加了新的用户组:1123');
INSERT INTO `bk_action_log` VALUES ('32', 'admin', '1', '127.0.0.1', '', '1433904744', '管理员', '删除了用户组:1123');
INSERT INTO `bk_action_log` VALUES ('33', 'test', '2', '127.0.0.1', '', '1433905009', 'test', '登录系统成功');
INSERT INTO `bk_action_log` VALUES ('34', 'admin', '1', '127.0.0.1', '', '1433907007', '管理员', '登录系统成功');
INSERT INTO `bk_action_log` VALUES ('35', 'admin', '1', '127.0.0.1', '', '1433909004', '管理员', '增加了新的用户组:1123');
INSERT INTO `bk_action_log` VALUES ('36', 'admin', '1', '127.0.0.1', '', '1433985688', '管理员', '登录系统成功');
INSERT INTO `bk_action_log` VALUES ('37', 'admin', '1', '127.0.0.1', '', '1434093122', '管理员', '登录系统成功');
INSERT INTO `bk_action_log` VALUES ('38', 'admin', '1', '127.0.0.1', '', '1434094731', '管理员', '登录系统成功');
INSERT INTO `bk_action_log` VALUES ('39', 'admin', '1', '127.0.0.1', '', '1434333022', '管理员', '登录系统成功');
INSERT INTO `bk_action_log` VALUES ('40', 'admin', '1', '127.0.0.1', '', '1434333284', '管理员', '登录系统成功');
INSERT INTO `bk_action_log` VALUES ('41', 'admin', '1', '127.0.0.1', '', '1434334022', '管理员', '增加了新的用户组:123123ssss');
INSERT INTO `bk_action_log` VALUES ('42', 'admin', '1', '127.0.0.1', '', '1434334039', '管理员', '编辑了用户组:123123ssssa');
INSERT INTO `bk_action_log` VALUES ('43', 'admin', '1', '127.0.0.1', '', '1434334965', '管理员', '删除了用户组:123123ssssa');
INSERT INTO `bk_action_log` VALUES ('44', 'admin', '1', '127.0.0.1', '', '1434334970', '管理员', '删除了用户组:1123');
INSERT INTO `bk_action_log` VALUES ('45', 'admin', '1', '127.0.0.1', '', '1434335101', '管理员', '增加了新的工作流:工作流2');
INSERT INTO `bk_action_log` VALUES ('46', 'admin', '1', '127.0.0.1', '', '1434335308', '管理员', '增加了新的工作流:工作流3');
INSERT INTO `bk_action_log` VALUES ('47', 'admin', '1', '127.0.0.1', '', '1434336740', '管理员', '登录系统成功');
INSERT INTO `bk_action_log` VALUES ('48', 'admin', '1', '127.0.0.1', '', '1434337228', '管理员', '编辑了工作流:工作流11');
INSERT INTO `bk_action_log` VALUES ('49', 'admin', '1', '127.0.0.1', '', '1434337255', '管理员', '增加了新的工作流:123123');
INSERT INTO `bk_action_log` VALUES ('50', 'admin', '1', '127.0.0.1', '', '1434338302', '管理员', '登录系统成功');
INSERT INTO `bk_action_log` VALUES ('51', 'admin', '1', '127.0.0.1', '', '1434338514', '管理员', '删除了工作流:工作流2');
INSERT INTO `bk_action_log` VALUES ('52', 'admin', '1', '127.0.0.1', '', '1434339359', '管理员', '增加了新的用户组:123');
INSERT INTO `bk_action_log` VALUES ('53', 'admin', '1', '127.0.0.1', '', '1434339370', '管理员', '改变了用户组的权限:123');
INSERT INTO `bk_action_log` VALUES ('54', 'admin', '1', '127.0.0.1', '', '1434339391', '管理员', '改变了用户组的权限:123');
INSERT INTO `bk_action_log` VALUES ('55', 'admin', '1', '127.0.0.1', '', '1434339412', '管理员', '改变了用户组的权限:123');
INSERT INTO `bk_action_log` VALUES ('56', 'admin', '1', '127.0.0.1', '', '1434339442', '管理员', '删除了用户组:123');
INSERT INTO `bk_action_log` VALUES ('57', 'admin', '1', '127.0.0.1', '', '1434339604', '管理员', '增加了新的系统用户:123123ffffffff');
INSERT INTO `bk_action_log` VALUES ('58', 'admin', '1', '127.0.0.1', '', '1434339625', '管理员', '改变了用户的权限:123123ffffffff');
INSERT INTO `bk_action_log` VALUES ('59', 'admin', '1', '127.0.0.1', '', '1434339648', '管理员', '删除了系统用户:123123ffffffff');
INSERT INTO `bk_action_log` VALUES ('60', 'admin', '1', '127.0.0.1', '', '1434339672', '管理员', '改变了用户组的权限:测试用户组');
INSERT INTO `bk_action_log` VALUES ('61', 'admin', '1', '127.0.0.1', '', '1434339687', '管理员', '增加了新的系统用户:123123gg');
INSERT INTO `bk_action_log` VALUES ('62', 'admin', '1', '127.0.0.1', '', '1434339703', '管理员', '改变了用户的权限:123123gg');
INSERT INTO `bk_action_log` VALUES ('63', 'admin', '1', '127.0.0.1', '', '1434339721', '管理员', '删除了系统用户:123123gg');
INSERT INTO `bk_action_log` VALUES ('64', 'admin', '1', '127.0.0.1', '', '1434339734', '管理员', '改变了用户的权限:test');
INSERT INTO `bk_action_log` VALUES ('65', 'admin', '1', '127.0.0.1', '', '1434339747', '管理员', '删除了用户组:测试用户组');
INSERT INTO `bk_action_log` VALUES ('66', 'admin', '1', '127.0.0.1', '', '1434341772', '管理员', '编辑了工作流:工作流1');
INSERT INTO `bk_action_log` VALUES ('67', 'admin', '1', '127.0.0.1', '', '1434345134', '管理员', '登录系统成功');
INSERT INTO `bk_action_log` VALUES ('68', 'admin', '1', '127.0.0.1', '', '1434347265', '管理员', '登录系统成功');
INSERT INTO `bk_action_log` VALUES ('69', 'admin', '1', '127.0.0.1', '', '1434349496', '管理员', '登录系统成功');
INSERT INTO `bk_action_log` VALUES ('70', 'admin', '1', '127.0.0.1', '', '1434352541', '管理员', '增加了新的工作流步骤:财务总监审核');
INSERT INTO `bk_action_log` VALUES ('71', 'admin', '1', '127.0.0.1', '', '1434352641', '管理员', '增加了新的工作流步骤:公司复责人审核');
INSERT INTO `bk_action_log` VALUES ('72', 'admin', '1', '127.0.0.1', '', '1434353123', '管理员', '登录系统成功');
INSERT INTO `bk_action_log` VALUES ('73', 'admin', '1', '127.0.0.1', '', '1434354662', '管理员', '编辑了工作流步骤:公司负责人审核');
INSERT INTO `bk_action_log` VALUES ('74', 'admin', '1', '127.0.0.1', '', '1434354730', '管理员', '编辑了工作流步骤:公司负责人审核');
INSERT INTO `bk_action_log` VALUES ('75', 'admin', '1', '127.0.0.1', '', '1434354742', '管理员', '编辑了工作流步骤:公司负责人审核');
INSERT INTO `bk_action_log` VALUES ('76', 'admin', '1', '127.0.0.1', '', '1434354752', '管理员', '编辑了工作流步骤:公司负责人审核');
INSERT INTO `bk_action_log` VALUES ('77', 'admin', '1', '127.0.0.1', '', '1434354837', '管理员', '增加了新的工作流步骤:xx');
INSERT INTO `bk_action_log` VALUES ('78', 'admin', '1', '127.0.0.1', '', '1434354941', '管理员', '登录系统成功');
INSERT INTO `bk_action_log` VALUES ('79', 'admin', '1', '127.0.0.1', '', '1434355261', '管理员', '删除了工作流步骤:xx');
INSERT INTO `bk_action_log` VALUES ('80', 'admin', '1', '127.0.0.1', '', '1434422513', '管理员', '登录系统成功');
INSERT INTO `bk_action_log` VALUES ('81', 'admin', '1', '127.0.0.1', '', '1434441684', '管理员', '关联了用户test到工作流工作流1中的审核步骤财务审核');
INSERT INTO `bk_action_log` VALUES ('82', 'admin', '1', '127.0.0.1', '', '1434441764', '管理员', '关联了用户:test到工作流:工作流1中的审核步骤:财务审核');
INSERT INTO `bk_action_log` VALUES ('83', 'admin', '1', '127.0.0.1', '', '1434441764', '管理员', '关联了用户:管理员到工作流:工作流1中的审核步骤:财务审核');
INSERT INTO `bk_action_log` VALUES ('84', 'admin', '1', '127.0.0.1', '', '1434441789', '管理员', '关联了用户:test 到工作流:工作流1 中的审核步骤:财务审核');
INSERT INTO `bk_action_log` VALUES ('85', 'admin', '1', '127.0.0.1', '', '1434441789', '管理员', '关联了用户:管理员 到工作流:工作流1 中的审核步骤:财务审核');
INSERT INTO `bk_action_log` VALUES ('86', 'admin', '1', '127.0.0.1', '', '1434441843', '管理员', '关联了用户:test 到工作流:工作流1 中的审核步骤:财务审核');
INSERT INTO `bk_action_log` VALUES ('87', 'admin', '1', '127.0.0.1', '', '1434443074', '管理员', '增加了新的工作流:测试仪');
INSERT INTO `bk_action_log` VALUES ('88', 'admin', '1', '127.0.0.1', '', '1434443280', '管理员', '编辑了工作流:测试仪');
INSERT INTO `bk_action_log` VALUES ('89', 'admin', '1', '127.0.0.1', '', '1434443296', '管理员', '增加了新的工作流步骤:123');
INSERT INTO `bk_action_log` VALUES ('90', 'admin', '1', '127.0.0.1', '', '1434443311', '管理员', '增加了新的工作流步骤:ads');
INSERT INTO `bk_action_log` VALUES ('91', 'admin', '1', '127.0.0.1', '', '1434443332', '管理员', '关联了用户:test 到工作流:测试仪 中的审核步骤:123');
INSERT INTO `bk_action_log` VALUES ('92', 'admin', '1', '127.0.0.1', '', '1434443347', '管理员', '关联了用户:管理员 到工作流:测试仪 中的审核步骤:ads');
INSERT INTO `bk_action_log` VALUES ('93', 'admin', '1', '127.0.0.1', '', '1434443452', '管理员', '增加了新的工作流步骤:1231');
INSERT INTO `bk_action_log` VALUES ('94', 'admin', '1', '127.0.0.1', '', '1434443543', '管理员', '增加了新的工作流步骤:123123123');
INSERT INTO `bk_action_log` VALUES ('95', 'admin', '1', '127.0.0.1', '', '1434443554', '管理员', '删除了工作流步骤:123123123');
INSERT INTO `bk_action_log` VALUES ('96', 'admin', '1', '127.0.0.1', '', '1434443580', '管理员', '删除了工作流:测试仪');
INSERT INTO `bk_action_log` VALUES ('97', 'admin', '1', '127.0.0.1', '', '1434443792', '管理员', '改变了用户的权限:test');
INSERT INTO `bk_action_log` VALUES ('98', 'admin', '1', '127.0.0.1', '', '1434443823', '管理员', '登录系统成功');
INSERT INTO `bk_action_log` VALUES ('99', 'test', '2', '127.0.0.1', '', '1434443878', 'test', '登录系统成功');
INSERT INTO `bk_action_log` VALUES ('100', 'test', '2', '127.0.0.1', '', '1434444960', 'test', '登录系统成功');
INSERT INTO `bk_action_log` VALUES ('101', 'test', '2', '127.0.0.1', '', '1434444985', 'test', '增加了新的工作流:123');
INSERT INTO `bk_action_log` VALUES ('102', 'test', '2', '127.0.0.1', '', '1434444994', 'test', '编辑了工作流:123');
INSERT INTO `bk_action_log` VALUES ('103', 'test', '2', '127.0.0.1', '', '1434445001', 'test', '删除了工作流:123');
INSERT INTO `bk_action_log` VALUES ('104', 'admin', '1', '127.0.0.1', '', '1434445027', '管理员', '改变了用户的权限:test');
INSERT INTO `bk_action_log` VALUES ('105', 'admin', '1', '127.0.0.1', '', '1434445038', '管理员', '登录系统成功');
INSERT INTO `bk_action_log` VALUES ('106', 'admin', '1', '127.0.0.1', '', '1434507752', '管理员', '关联了用户:test 到工作流:工作流1 中的审核步骤:财务总监审核');
INSERT INTO `bk_action_log` VALUES ('107', 'admin', '1', '127.0.0.1', '', '1434507752', '管理员', '关联了用户:管理员 到工作流:工作流1 中的审核步骤:财务总监审核');
INSERT INTO `bk_action_log` VALUES ('108', 'admin', '1', '127.0.0.1', '', '1434507770', '管理员', '关联了用户:管理员 到工作流:工作流1 中的审核步骤:公司负责人审核');
INSERT INTO `bk_action_log` VALUES ('109', 'admin', '1', '127.0.0.1', '', '1434508916', '管理员', '增加了新的工作流:测试工作流');
INSERT INTO `bk_action_log` VALUES ('110', 'admin', '1', '127.0.0.1', '', '1434508942', '管理员', '编辑了工作流:测试工作流');
INSERT INTO `bk_action_log` VALUES ('111', 'admin', '1', '127.0.0.1', '', '1434509294', '管理员', '编辑了工作流:工作流1');
INSERT INTO `bk_action_log` VALUES ('112', 'admin', '1', '127.0.0.1', '', '1434509313', '管理员', '编辑了工作流:测试工作流');
INSERT INTO `bk_action_log` VALUES ('113', 'admin', '1', '127.0.0.1', '', '1434509520', '管理员', '编辑了工作流:测试工作流');
INSERT INTO `bk_action_log` VALUES ('114', 'admin', '1', '127.0.0.1', '', '1434516742', '管理员', '增加了新的工作流步骤:测试1');
INSERT INTO `bk_action_log` VALUES ('115', 'admin', '1', '127.0.0.1', '', '1434516769', '管理员', '增加了新的工作流步骤:测试2');
INSERT INTO `bk_action_log` VALUES ('116', 'admin', '1', '127.0.0.1', '', '1434516774', '管理员', '关联了用户:管理员 到工作流:测试工作流 中的审核步骤:测试1');
INSERT INTO `bk_action_log` VALUES ('117', 'admin', '1', '127.0.0.1', '', '1434516845', '管理员', '关联了用户:test 到工作流:测试工作流 中的审核步骤:测试1');
INSERT INTO `bk_action_log` VALUES ('118', 'admin', '1', '127.0.0.1', '', '1434516853', '管理员', '关联了用户:test 到工作流:测试工作流 中的审核步骤:测试1');
INSERT INTO `bk_action_log` VALUES ('119', 'admin', '1', '127.0.0.1', '', '1434516853', '管理员', '关联了用户:管理员 到工作流:测试工作流 中的审核步骤:测试1');
INSERT INTO `bk_action_log` VALUES ('120', 'admin', '1', '127.0.0.1', '', '1434517331', '管理员', '登录系统成功');
INSERT INTO `bk_action_log` VALUES ('121', 'admin', '1', '127.0.0.1', '', '1434520918', '管理员', '登录系统成功');
INSERT INTO `bk_action_log` VALUES ('122', 'admin', '1', '127.0.0.1', '', '1434523410', '管理员', '关联了用户:test 到工作流:测试工作流 中的审核步骤:测试2');
INSERT INTO `bk_action_log` VALUES ('123', 'admin', '1', '127.0.0.1', '', '1434523426', '管理员', '编辑了工作流步骤:测试1');
INSERT INTO `bk_action_log` VALUES ('124', 'admin', '1', '127.0.0.1', '', '1434523612', '管理员', '关联了用户:test 到工作流:测试工作流 中的审核步骤:测试1');
INSERT INTO `bk_action_log` VALUES ('125', 'admin', '1', '127.0.0.1', '', '1434523635', '管理员', '关联了用户:管理员 到工作流:测试工作流 中的审核步骤:测试2');
INSERT INTO `bk_action_log` VALUES ('126', 'test', '2', '127.0.0.1', '', '1434523662', 'test', '登录系统成功');
INSERT INTO `bk_action_log` VALUES ('127', 'test', '2', '127.0.0.1', '', '1434524881', 'test', '增加了新的工作流:xx');
INSERT INTO `bk_action_log` VALUES ('128', 'test', '2', '127.0.0.1', '', '1434524889', 'test', '删除了工作流:xx');
INSERT INTO `bk_action_log` VALUES ('129', 'test', '2', '127.0.0.1', '', '1434524895', 'test', '删除了工作流:工作流11');
INSERT INTO `bk_action_log` VALUES ('130', 'admin', '1', '127.0.0.1', '', '1435044773', '管理员', '登录系统成功');
INSERT INTO `bk_action_log` VALUES ('131', 'admin', '1', '127.0.0.1', '', '1435114399', '管理员', '登录系统成功');
INSERT INTO `bk_action_log` VALUES ('132', 'admin', '1', '127.0.0.1', '', '1435117746', '管理员', '登录系统成功');
INSERT INTO `bk_action_log` VALUES ('133', 'admin', '1', '127.0.0.1', '', '1435117778', '管理员', '登录系统成功');
INSERT INTO `bk_action_log` VALUES ('134', 'admin', '1', '127.0.0.1', '', '1435118579', '管理员', '登录系统成功');
INSERT INTO `bk_action_log` VALUES ('135', 'admin', '1', '127.0.0.1', '', '1435118762', '管理员', '登录系统成功');
INSERT INTO `bk_action_log` VALUES ('136', 'admin', '1', '127.0.0.1', '', '1435126625', '管理员', '登录系统成功');
INSERT INTO `bk_action_log` VALUES ('137', 'admin', '1', '127.0.0.1', '', '1435127311', '管理员', '登录系统成功');
INSERT INTO `bk_action_log` VALUES ('138', 'admin', '1', '127.0.0.1', '', '1435127360', '管理员', '登录系统成功');
INSERT INTO `bk_action_log` VALUES ('139', 'admin', '1', '127.0.0.1', '', '1435129351', '管理员', '登录系统成功');
INSERT INTO `bk_action_log` VALUES ('140', 'admin', '1', '127.0.0.1', '', '1435288666', '管理员', '登录系统成功');
INSERT INTO `bk_action_log` VALUES ('141', 'admin', '1', '127.0.0.1', '', '1435304943', '管理员', '编辑了用户组:超级用户组');
INSERT INTO `bk_action_log` VALUES ('142', 'admin', '1', '127.0.0.1', '', '1435304988', '管理员', '增加了新的用户组:123');
INSERT INTO `bk_action_log` VALUES ('143', 'admin', '1', '127.0.0.1', '', '1435305005', '管理员', '增加了新的用户组:123');
INSERT INTO `bk_action_log` VALUES ('144', 'admin', '1', '127.0.0.1', '', '1435305072', '管理员', '编辑了工作流:测试工作流');
INSERT INTO `bk_action_log` VALUES ('145', 'admin', '1', '127.0.0.1', '', '1435305087', '管理员', '改变了用户组的权限:123');
INSERT INTO `bk_action_log` VALUES ('146', 'admin', '1', '127.0.0.1', '', '1435305090', '管理员', '改变了用户组的权限:123');
INSERT INTO `bk_action_log` VALUES ('147', 'admin', '1', '127.0.0.1', '', '1435305093', '管理员', '改变了用户组的权限:123');
INSERT INTO `bk_action_log` VALUES ('148', 'admin', '1', '127.0.0.1', '', '1435305096', '管理员', '改变了用户组的权限:123');
INSERT INTO `bk_action_log` VALUES ('149', 'admin', '1', '127.0.0.1', '', '1435305098', '管理员', '改变了用户组的权限:123');
INSERT INTO `bk_action_log` VALUES ('150', 'admin', '1', '127.0.0.1', '', '1435305101', '管理员', '改变了用户组的权限:123');
INSERT INTO `bk_action_log` VALUES ('151', 'admin', '1', '127.0.0.1', '', '1435305104', '管理员', '改变了用户组的权限:123');
INSERT INTO `bk_action_log` VALUES ('152', 'admin', '1', '127.0.0.1', '', '1435305106', '管理员', '改变了用户组的权限:123');
INSERT INTO `bk_action_log` VALUES ('153', 'admin', '1', '127.0.0.1', '', '1435305109', '管理员', '改变了用户组的权限:123');
INSERT INTO `bk_action_log` VALUES ('154', 'admin', '1', '127.0.0.1', '', '1435305112', '管理员', '改变了用户组的权限:123');
INSERT INTO `bk_action_log` VALUES ('155', 'admin', '1', '127.0.0.1', '', '1435305114', '管理员', '改变了用户组的权限:123');
INSERT INTO `bk_action_log` VALUES ('156', 'admin', '1', '127.0.0.1', '', '1435305144', '管理员', '删除了用户组:123');
INSERT INTO `bk_action_log` VALUES ('157', 'admin', '1', '127.0.0.1', '', '1435305194', '管理员', '改变了用户组的权限:123');
INSERT INTO `bk_action_log` VALUES ('158', 'admin', '1', '127.0.0.1', '', '1435543884', '管理员', '登录系统成功');
INSERT INTO `bk_action_log` VALUES ('159', 'admin', '1', '127.0.0.1', '', '1435543919', '管理员', '改变了用户组的权限:123');
INSERT INTO `bk_action_log` VALUES ('160', 'admin', '1', '127.0.0.1', '', '1435543924', '管理员', '改变了用户组的权限:123');
INSERT INTO `bk_action_log` VALUES ('161', 'admin', '1', '127.0.0.1', '', '1435544846', '管理员', '改变了用户组的权限:123');
INSERT INTO `bk_action_log` VALUES ('162', 'admin', '1', '127.0.0.1', '', '1435544858', '管理员', '改变了用户组的权限:123');
INSERT INTO `bk_action_log` VALUES ('163', 'admin', '1', '127.0.0.1', '', '1435544905', '管理员', '改变了用户组的权限:123');
INSERT INTO `bk_action_log` VALUES ('164', 'admin', '1', '127.0.0.1', '', '1435544909', '管理员', '改变了用户组的权限:123');
INSERT INTO `bk_action_log` VALUES ('165', 'admin', '1', '127.0.0.1', '', '1435545169', '管理员', '删除了用户组:123');
INSERT INTO `bk_action_log` VALUES ('166', 'admin', '1', '127.0.0.1', '', '1435545229', '管理员', '删除了系统用户:test');
INSERT INTO `bk_action_log` VALUES ('167', 'admin', '1', '127.0.0.1', '', '1435545383', '管理员', '登录系统成功');
INSERT INTO `bk_action_log` VALUES ('168', 'admin', '1', '127.0.0.1', '', '1435545965', '管理员', '改变了用户的权限:admin');
INSERT INTO `bk_action_log` VALUES ('169', 'admin', '1', '127.0.0.1', '', '1435546040', '管理员', '改变了用户的权限:admin');
INSERT INTO `bk_action_log` VALUES ('170', 'admin', '1', '127.0.0.1', '', '1435546116', '管理员', '改变了用户的权限:admin');
INSERT INTO `bk_action_log` VALUES ('171', 'admin', '1', '127.0.0.1', '', '1435546127', '管理员', '改变了用户的权限:admin');
INSERT INTO `bk_action_log` VALUES ('172', 'admin', '1', '127.0.0.1', '', '1435546171', '管理员', '改变了用户的权限:admin');
INSERT INTO `bk_action_log` VALUES ('173', 'admin', '1', '127.0.0.1', '', '1435546175', '管理员', '改变了用户的权限:admin');
INSERT INTO `bk_action_log` VALUES ('174', 'admin', '1', '127.0.0.1', '', '1435548904', '管理员', '改变了用户组的权限:超级用户组');
INSERT INTO `bk_action_log` VALUES ('175', 'admin', '1', '127.0.0.1', '', '1435551384', '管理员', '关联了用户:管理员 到工作流:测试工作流 中的审核步骤:测试1');
INSERT INTO `bk_action_log` VALUES ('176', 'admin', '1', '127.0.0.1', '', '1435551469', '管理员', '登录系统成功');
INSERT INTO `bk_action_log` VALUES ('177', 'admin', '1', '127.0.0.1', '', '1435551480', '管理员', '改变了用户的权限:admin');
INSERT INTO `bk_action_log` VALUES ('178', 'admin', '1', '127.0.0.1', '', '1435551487', '管理员', '改变了用户的权限:admin');
INSERT INTO `bk_action_log` VALUES ('179', 'admin', '1', '127.0.0.1', '', '1435551491', '管理员', '改变了用户的权限:admin');
INSERT INTO `bk_action_log` VALUES ('180', 'admin', '1', '127.0.0.1', '', '1435551494', '管理员', '改变了用户的权限:admin');
INSERT INTO `bk_action_log` VALUES ('181', 'admin', '1', '127.0.0.1', '', '1435551504', '管理员', '编辑了用户组:超级用户组');
INSERT INTO `bk_action_log` VALUES ('182', 'admin', '1', '127.0.0.1', '', '1435563248', '管理员', '编辑了用户组:超级用户组');
INSERT INTO `bk_action_log` VALUES ('183', 'admin', '1', '127.0.0.1', '', '1435563266', '管理员', '编辑了用户组:超级用户组');
INSERT INTO `bk_action_log` VALUES ('184', 'admin', '1', '127.0.0.1', '', '1435563284', '管理员', '编辑了用户组:超级用户组');
INSERT INTO `bk_action_log` VALUES ('185', 'admin', '1', '127.0.0.1', '', '1435563326', '管理员', '编辑了用户组:超级用户组');
INSERT INTO `bk_action_log` VALUES ('186', 'admin', '1', '127.0.0.1', '', '1435563375', '管理员', '编辑了系统用户:admin');
INSERT INTO `bk_action_log` VALUES ('187', 'admin', '1', '127.0.0.1', '', '1435563479', '管理员', '编辑了用户组:超级用户组');
INSERT INTO `bk_action_log` VALUES ('188', 'admin', '1', '127.0.0.1', '', '1435563853', '管理员', '登录系统成功');
INSERT INTO `bk_action_log` VALUES ('189', 'admin', '1', '127.0.0.1', '', '1435563866', '管理员', '改变了用户组的权限:超级用户组');
INSERT INTO `bk_action_log` VALUES ('190', 'admin', '1', '127.0.0.1', '', '1435568665', '管理员', '改变了用户组的权限:超级用户组');
INSERT INTO `bk_action_log` VALUES ('191', 'admin', '1', '127.0.0.1', '', '1435630315', '管理员', '登录系统成功');
INSERT INTO `bk_action_log` VALUES ('192', 'admin', '1', '127.0.0.1', '', '1435631134', '管理员', '改变了用户的权限:admin');
INSERT INTO `bk_action_log` VALUES ('193', 'admin', '1', '127.0.0.1', '', '1435631327', '管理员', '登录系统成功');
INSERT INTO `bk_action_log` VALUES ('194', 'admin', '1', '127.0.0.1', '', '1435632843', '管理员', '编辑了系统用户:admin');
INSERT INTO `bk_action_log` VALUES ('195', 'admin', '1', '127.0.0.1', '', '1435637075', '管理员', '编辑了用户组:超级用户组');
INSERT INTO `bk_action_log` VALUES ('196', 'admin', '1', '127.0.0.1', '', '1435638964', '管理员', '编辑了工作流步骤:测试1');
INSERT INTO `bk_action_log` VALUES ('197', 'admin', '1', '127.0.0.1', '', '1435649867', '管理员', '改变了用户组的权限:超级用户组');
INSERT INTO `bk_action_log` VALUES ('198', 'admin', '1', '127.0.0.1', '', '1435737120', '管理员', '登录系统成功');
INSERT INTO `bk_action_log` VALUES ('199', 'admin', '1', '127.0.0.1', '', '1435738202', '管理员', '登录系统成功');
INSERT INTO `bk_action_log` VALUES ('200', 'admin', '1', '127.0.0.1', '', '1436147586', '管理员', '登录系统成功');
INSERT INTO `bk_action_log` VALUES ('201', 'admin', '1', '127.0.0.1', '', '1436147922', '管理员', '登录系统成功');
INSERT INTO `bk_action_log` VALUES ('202', 'admin', '1', '127.0.0.1', '', '1436150023', '管理员', '登录系统成功');
INSERT INTO `bk_action_log` VALUES ('203', 'admin', '1', '127.0.0.1', '', '1436150360', '管理员', '登录系统成功');
INSERT INTO `bk_action_log` VALUES ('204', 'admin', '1', '127.0.0.1', '', '1436150536', '管理员', '登录系统成功');
INSERT INTO `bk_action_log` VALUES ('205', 'admin', '1', '127.0.0.1', '', '1436152462', '管理员', '登录系统成功');
INSERT INTO `bk_action_log` VALUES ('206', 'admin', '1', '127.0.0.1', '', '1436153673', '管理员', '登录系统成功');
INSERT INTO `bk_action_log` VALUES ('207', 'admin', '1', '127.0.0.1', '', '1436153740', '管理员', '登录系统成功');
INSERT INTO `bk_action_log` VALUES ('208', 'admin', '1', '127.0.0.1', '', '1436156479', '管理员', '登录系统成功');
INSERT INTO `bk_action_log` VALUES ('209', 'admin', '1', '127.0.0.1', '', '1436169648', '管理员', '增加了新的系统用户:test');
INSERT INTO `bk_action_log` VALUES ('210', 'admin', '1', '127.0.0.1', '', '1436169666', '管理员', '增加了新的用户组:test');
INSERT INTO `bk_action_log` VALUES ('211', 'admin', '1', '127.0.0.1', '', '1436169678', '管理员', '编辑了系统用户:test');
INSERT INTO `bk_action_log` VALUES ('212', 'admin', '1', '127.0.0.1', '', '1436169830', '管理员', '改变了用户组的权限:test');
INSERT INTO `bk_action_log` VALUES ('213', 'admin', '1', '127.0.0.1', '', '1436169901', '管理员', '改变了用户组的权限:test');
INSERT INTO `bk_action_log` VALUES ('214', 'admin', '1', '127.0.0.1', '', '1436169909', '管理员', '改变了用户组的权限:test');
INSERT INTO `bk_action_log` VALUES ('215', 'test', '2', '127.0.0.1', '', '1436169949', 'test', '登录系统成功');
INSERT INTO `bk_action_log` VALUES ('216', 'admin', '1', '127.0.0.1', '', '1436170007', '管理员', '改变了用户组的权限:test');
INSERT INTO `bk_action_log` VALUES ('217', 'test', '2', '127.0.0.1', '', '1436170015', 'test', '登录系统成功');
INSERT INTO `bk_action_log` VALUES ('218', 'admin', '1', '127.0.0.1', '', '1436170400', '管理员', '改变了用户组的权限:test');
INSERT INTO `bk_action_log` VALUES ('219', 'test', '2', '127.0.0.1', '', '1436170410', 'test', '登录系统成功');
INSERT INTO `bk_action_log` VALUES ('220', 'admin', '1', '127.0.0.1', '', '1436170781', '管理员', '改变了用户组的权限:test');
INSERT INTO `bk_action_log` VALUES ('221', 'test', '2', '127.0.0.1', '', '1436170792', 'test', '登录系统成功');
INSERT INTO `bk_action_log` VALUES ('222', 'test', '2', '127.0.0.1', '', '1436170892', 'test', '增加了新的用户组:test2');
INSERT INTO `bk_action_log` VALUES ('223', 'test', '2', '127.0.0.1', '', '1436170910', 'test', '增加了新的系统用户:test2');
INSERT INTO `bk_action_log` VALUES ('224', 'test', '2', '127.0.0.1', '', '1436171238', 'test', '登录系统成功');
INSERT INTO `bk_action_log` VALUES ('225', 'test', '2', '127.0.0.1', '', '1436171403', 'test', '登录系统成功');
INSERT INTO `bk_action_log` VALUES ('226', 'admin', '1', '127.0.0.1', '', '1436232722', '管理员', '登录系统成功');
INSERT INTO `bk_action_log` VALUES ('227', 'admin', '1', '127.0.0.1', '', '1436237053', '管理员', '登录系统成功');
INSERT INTO `bk_action_log` VALUES ('228', 'admin', '1', '127.0.0.1', '', '1436237105', '管理员', '登录系统成功');
INSERT INTO `bk_action_log` VALUES ('229', 'test', '2', '127.0.0.1', '', '1436237162', 'test', '登录系统成功');
INSERT INTO `bk_action_log` VALUES ('230', 'admin', '1', '127.0.0.1', '', '1436237329', '管理员', '改变了用户的权限:test2');
INSERT INTO `bk_action_log` VALUES ('231', 'admin', '1', '127.0.0.1', '', '1436237524', '管理员', '改变了用户的权限:test2');
INSERT INTO `bk_action_log` VALUES ('232', 'admin', '1', '127.0.0.1', '', '1436237637', '管理员', '登录系统成功');
INSERT INTO `bk_action_log` VALUES ('233', 'admin', '1', '127.0.0.1', '', '1436237837', '管理员', '改变了用户组的权限:test');
INSERT INTO `bk_action_log` VALUES ('234', 'test', '2', '127.0.0.1', '', '1436237855', 'test', '登录系统成功');
INSERT INTO `bk_action_log` VALUES ('235', 'admin', '1', '127.0.0.1', '', '1436237898', '管理员', '改变了用户的权限:test2');
INSERT INTO `bk_action_log` VALUES ('236', 'admin', '1', '127.0.0.1', '', '1436237901', '管理员', '改变了用户的权限:test2');
INSERT INTO `bk_action_log` VALUES ('237', 'admin', '1', '127.0.0.1', '', '1436237909', '管理员', '改变了用户的权限:test2');
INSERT INTO `bk_action_log` VALUES ('238', 'admin', '1', '127.0.0.1', '', '1436238450', '管理员', '改变了用户的权限:test2');
INSERT INTO `bk_action_log` VALUES ('239', 'admin', '1', '127.0.0.1', '', '1436238456', '管理员', '改变了用户的权限:test2');
INSERT INTO `bk_action_log` VALUES ('240', 'admin', '1', '127.0.0.1', '', '1436238502', '管理员', '改变了用户的权限:test2');
INSERT INTO `bk_action_log` VALUES ('241', 'admin', '1', '127.0.0.1', '', '1436238870', '管理员', '改变了用户的权限:test2');
INSERT INTO `bk_action_log` VALUES ('242', 'admin', '1', '127.0.0.1', '', '1436238871', '管理员', '改变了用户的权限:test2');
INSERT INTO `bk_action_log` VALUES ('243', 'admin', '1', '127.0.0.1', '', '1436239312', '管理员', '改变了用户的权限:test2');
INSERT INTO `bk_action_log` VALUES ('244', 'admin', '1', '127.0.0.1', '', '1436239313', '管理员', '改变了用户的权限:test2');
INSERT INTO `bk_action_log` VALUES ('245', 'admin', '1', '127.0.0.1', '', '1436239654', '管理员', '改变了用户的权限:test2');
INSERT INTO `bk_action_log` VALUES ('246', 'admin', '1', '127.0.0.1', '', '1436239658', '管理员', '改变了用户的权限:test2');
INSERT INTO `bk_action_log` VALUES ('247', 'admin', '1', '127.0.0.1', '', '1436239716', '管理员', '改变了用户的权限:test2');
INSERT INTO `bk_action_log` VALUES ('248', 'admin', '1', '127.0.0.1', '', '1436239767', '管理员', '改变了用户的权限:test2');
INSERT INTO `bk_action_log` VALUES ('249', 'admin', '1', '127.0.0.1', '', '1436239771', '管理员', '改变了用户的权限:test2');
INSERT INTO `bk_action_log` VALUES ('250', 'admin', '1', '127.0.0.1', '', '1436240071', '管理员', '改变了用户的权限:test2');
INSERT INTO `bk_action_log` VALUES ('251', 'admin', '1', '127.0.0.1', '', '1436240359', '管理员', '改变了用户的权限:test2');
INSERT INTO `bk_action_log` VALUES ('252', 'admin', '1', '127.0.0.1', '', '1436240365', '管理员', '改变了用户的权限:test2');
INSERT INTO `bk_action_log` VALUES ('253', 'admin', '1', '127.0.0.1', '', '1436240399', '管理员', '改变了用户的权限:test2');
INSERT INTO `bk_action_log` VALUES ('254', 'admin', '1', '127.0.0.1', '', '1436240488', '管理员', '改变了用户的权限:test2');
INSERT INTO `bk_action_log` VALUES ('255', 'admin', '1', '127.0.0.1', '', '1436240505', '管理员', '改变了用户的权限:test2');
INSERT INTO `bk_action_log` VALUES ('256', 'admin', '1', '127.0.0.1', '', '1436240705', '管理员', '改变了用户的权限:test2');
INSERT INTO `bk_action_log` VALUES ('257', 'admin', '1', '127.0.0.1', '', '1436240712', '管理员', '改变了用户的权限:test2');
INSERT INTO `bk_action_log` VALUES ('258', 'admin', '1', '127.0.0.1', '', '1436240856', '管理员', '改变了用户的权限:test2');
INSERT INTO `bk_action_log` VALUES ('259', 'admin', '1', '127.0.0.1', '', '1436241021', '管理员', '改变了用户的权限:test2');
INSERT INTO `bk_action_log` VALUES ('260', 'admin', '1', '127.0.0.1', '', '1436241046', '管理员', '改变了用户的权限:test2');
INSERT INTO `bk_action_log` VALUES ('261', 'admin', '1', '127.0.0.1', '', '1436241056', '管理员', '改变了用户的权限:test2');
INSERT INTO `bk_action_log` VALUES ('262', 'admin', '1', '127.0.0.1', '', '1436241060', '管理员', '改变了用户的权限:test2');
INSERT INTO `bk_action_log` VALUES ('263', 'admin', '1', '127.0.0.1', '', '1436241060', '管理员', '改变了用户的权限:test2');
INSERT INTO `bk_action_log` VALUES ('264', 'admin', '1', '127.0.0.1', '', '1436241253', '管理员', '改变了用户的权限:test2');
INSERT INTO `bk_action_log` VALUES ('265', 'admin', '1', '127.0.0.1', '', '1436241261', '管理员', '改变了用户的权限:test2');
INSERT INTO `bk_action_log` VALUES ('266', 'admin', '1', '127.0.0.1', '', '1436241264', '管理员', '改变了用户的权限:test2');
INSERT INTO `bk_action_log` VALUES ('267', 'admin', '1', '127.0.0.1', '', '1436241311', '管理员', '改变了用户的权限:test2');
INSERT INTO `bk_action_log` VALUES ('268', 'admin', '1', '127.0.0.1', '', '1436241317', '管理员', '改变了用户的权限:test2');
INSERT INTO `bk_action_log` VALUES ('269', 'admin', '1', '127.0.0.1', '', '1436241322', '管理员', '改变了用户的权限:test2');
INSERT INTO `bk_action_log` VALUES ('270', 'admin', '1', '127.0.0.1', '', '1436241338', '管理员', '改变了用户的权限:test2');
INSERT INTO `bk_action_log` VALUES ('271', 'admin', '1', '127.0.0.1', '', '1436241435', '管理员', '编辑了用户组:test2');
INSERT INTO `bk_action_log` VALUES ('272', 'admin', '1', '127.0.0.1', '', '1436241449', '管理员', '改变了用户组的权限:test2');
INSERT INTO `bk_action_log` VALUES ('273', 'admin', '1', '127.0.0.1', '', '1436241533', '管理员', '登录系统成功');
INSERT INTO `bk_action_log` VALUES ('274', 'test', '2', '127.0.0.1', '', '1436241545', 'test', '登录系统成功');
INSERT INTO `bk_action_log` VALUES ('275', 'test', '2', '127.0.0.1', '', '1436241556', 'test', '改变了用户的权限:test2');
INSERT INTO `bk_action_log` VALUES ('276', 'test', '2', '127.0.0.1', '', '1436241995', 'test', '改变了用户的权限:test2');
INSERT INTO `bk_action_log` VALUES ('277', 'admin', '1', '127.0.0.1', '', '1436242006', '管理员', '改变了用户组的权限:test2');
INSERT INTO `bk_action_log` VALUES ('278', 'admin', '1', '127.0.0.1', '', '1436242054', '管理员', '改变了用户组的权限:test2');
INSERT INTO `bk_action_log` VALUES ('279', 'admin', '1', '127.0.0.1', '', '1436242083', '管理员', '改变了用户组的权限:test2');
INSERT INTO `bk_action_log` VALUES ('280', 'admin', '1', '127.0.0.1', '', '1436242180', '管理员', '改变了用户组的权限:test2');
INSERT INTO `bk_action_log` VALUES ('281', 'admin', '1', '127.0.0.1', '', '1436242954', '管理员', '改变了用户组的权限:test2');
INSERT INTO `bk_action_log` VALUES ('282', 'admin', '1', '127.0.0.1', '', '1436242957', '管理员', '改变了用户组的权限:test2');
INSERT INTO `bk_action_log` VALUES ('283', 'admin', '1', '127.0.0.1', '', '1436242960', '管理员', '改变了用户组的权限:test2');
INSERT INTO `bk_action_log` VALUES ('284', 'admin', '1', '127.0.0.1', '', '1436242963', '管理员', '改变了用户组的权限:test2');
INSERT INTO `bk_action_log` VALUES ('285', 'admin', '1', '127.0.0.1', '', '1436242986', '管理员', '改变了用户组的权限:test2');
INSERT INTO `bk_action_log` VALUES ('286', 'admin', '1', '127.0.0.1', '', '1436242989', '管理员', '改变了用户组的权限:test2');
-- ----------------------------
-- Table structure for `bk_article_classify`
-- ----------------------------
DROP TABLE IF EXISTS `bk_article_classify`;
CREATE TABLE `bk_article_classify` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`name` char(32) NOT NULL COMMENT '分类名称',
`sort` int(11) NOT NULL COMMENT '排序码',
`is_active` tinyint(1) NOT NULL COMMENT '是否激活(0-未激活、1-激活)',
`is_delete` tinyint(1) NOT NULL COMMENT '是否删除(做软删除)(0-删除、1-未删除)',
`time` int(11) NOT NULL COMMENT '操作时间',
PRIMARY KEY (`id`),
KEY `is_active` (`is_active`) USING BTREE,
KEY `is_delete` (`is_delete`) USING BTREE,
KEY `sort` (`sort`) USING BTREE,
KEY `name` (`name`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=utf8 COMMENT='文章分类配置表';
-- ----------------------------
-- Records of bk_article_classify
-- ----------------------------
INSERT INTO `bk_article_classify` VALUES ('1', '金融', '0', '1', '0', '0');
INSERT INTO `bk_article_classify` VALUES ('2', '汽车', '0', '1', '0', '0');
INSERT INTO `bk_article_classify` VALUES ('3', 'js', '0', '1', '1', '0');
INSERT INTO `bk_article_classify` VALUES ('4', 'centos', '0', '1', '1', '0');
INSERT INTO `bk_article_classify` VALUES ('5', 'php', '0', '1', '1', '1421918154');
INSERT INTO `bk_article_classify` VALUES ('6', '测试分类1', '0', '1', '0', '1421898630');
INSERT INTO `bk_article_classify` VALUES ('7', '123131a', '0', '0', '0', '1421900997');
INSERT INTO `bk_article_classify` VALUES ('8', '12311a', '0', '1', '0', '1421917477');
INSERT INTO `bk_article_classify` VALUES ('9', '测试分类', '0', '0', '0', '0');
INSERT INTO `bk_article_classify` VALUES ('10', '123123aa', '0', '1', '0', '0');
INSERT INTO `bk_article_classify` VALUES ('11', '测试分类', '0', '1', '0', '0');
INSERT INTO `bk_article_classify` VALUES ('12', '测试分类账1', '0', '1', '0', '0');
INSERT INTO `bk_article_classify` VALUES ('24', '测试测试', '0', '1', '0', '0');
INSERT INTO `bk_article_classify` VALUES ('25', 'd1', '0', '0', '0', '0');
-- ----------------------------
-- Table structure for `bk_article_classify_relation`
-- ----------------------------
DROP TABLE IF EXISTS `bk_article_classify_relation`;
CREATE TABLE `bk_article_classify_relation` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`article_id` int(11) NOT NULL COMMENT '文章ID',
`classify_id` int(11) NOT NULL COMMENT '分类ID',
`time` int(11) NOT NULL COMMENT '操作时间',
PRIMARY KEY (`id`),
KEY `classify_id` (`classify_id`) USING BTREE,
KEY `article_id` (`article_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=253 DEFAULT CHARSET=utf8 COMMENT='文章所属分类表';
-- ----------------------------
-- Records of bk_article_classify_relation
-- ----------------------------
INSERT INTO `bk_article_classify_relation` VALUES ('1', '1', '1', '0');
INSERT INTO `bk_article_classify_relation` VALUES ('2', '2', '1', '0');
INSERT INTO `bk_article_classify_relation` VALUES ('3', '11', '1', '0');
INSERT INTO `bk_article_classify_relation` VALUES ('24', '7', '4', '1421745548');
INSERT INTO `bk_article_classify_relation` VALUES ('25', '6', '2', '1421745590');
INSERT INTO `bk_article_classify_relation` VALUES ('35', '13', '3', '1421916884');
INSERT INTO `bk_article_classify_relation` VALUES ('36', '15', '5', '1421981555');
INSERT INTO `bk_article_classify_relation` VALUES ('37', '9', '3', '1421983993');
INSERT INTO `bk_article_classify_relation` VALUES ('42', '8', '2', '1421984146');
INSERT INTO `bk_article_classify_relation` VALUES ('43', '10', '3', '1421984187');
INSERT INTO `bk_article_classify_relation` VALUES ('44', '10', '4', '1421984187');
INSERT INTO `bk_article_classify_relation` VALUES ('45', '12', '1', '1421984213');
INSERT INTO `bk_article_classify_relation` VALUES ('46', '12', '2', '1421984213');
INSERT INTO `bk_article_classify_relation` VALUES ('47', '17', '1', '1421995588');
INSERT INTO `bk_article_classify_relation` VALUES ('50', '19', '1', '1422261564');
INSERT INTO `bk_article_classify_relation` VALUES ('51', '19', '5', '1422261564');
INSERT INTO `bk_article_classify_relation` VALUES ('52', '18', '5', '1422264857');
INSERT INTO `bk_article_classify_relation` VALUES ('53', '21', '1', '1422269285');
INSERT INTO `bk_article_classify_relation` VALUES ('54', '22', '5', '1422330735');
INSERT INTO `bk_article_classify_relation` VALUES ('55', '23', '5', '1422352131');
INSERT INTO `bk_article_classify_relation` VALUES ('56', '24', '1', '1422356202');
INSERT INTO `bk_article_classify_relation` VALUES ('57', '26', '5', '1422413723');
INSERT INTO `bk_article_classify_relation` VALUES ('58', '16', '1', '1422418172');
INSERT INTO `bk_article_classify_relation` VALUES ('59', '16', '2', '1422418172');
INSERT INTO `bk_article_classify_relation` VALUES ('60', '49', '4', '1426756312');
INSERT INTO `bk_article_classify_relation` VALUES ('61', '49', '3', '1426756312');
INSERT INTO `bk_article_classify_relation` VALUES ('62', '50', '4', '1426756397');
INSERT INTO `bk_article_classify_relation` VALUES ('63', '50', '3', '1426756397');
INSERT INTO `bk_article_classify_relation` VALUES ('69', '51', '4', '1426819574');
INSERT INTO `bk_article_classify_relation` VALUES ('70', '51', '3', '1426819574');
INSERT INTO `bk_article_classify_relation` VALUES ('71', '51', '2', '1426819574');
INSERT INTO `bk_article_classify_relation` VALUES ('83', '52', '5', '1426823650');
INSERT INTO `bk_article_classify_relation` VALUES ('84', '52', '4', '1426823650');
INSERT INTO `bk_article_classify_relation` VALUES ('85', '52', '3', '1426823650');
INSERT INTO `bk_article_classify_relation` VALUES ('86', '52', '2', '1426823650');
INSERT INTO `bk_article_classify_relation` VALUES ('142', '53', '5', '1427198477');
INSERT INTO `bk_article_classify_relation` VALUES ('143', '54', '5', '1427198491');
INSERT INTO `bk_article_classify_relation` VALUES ('144', '55', '5', '1427198506');
INSERT INTO `bk_article_classify_relation` VALUES ('146', '57', '5', '1427198529');
INSERT INTO `bk_article_classify_relation` VALUES ('147', '63', '5', '1427198544');
INSERT INTO `bk_article_classify_relation` VALUES ('148', '63', '4', '1427198544');
INSERT INTO `bk_article_classify_relation` VALUES ('149', '62', '5', '1427198558');
INSERT INTO `bk_article_classify_relation` VALUES ('150', '62', '4', '1427198558');
INSERT INTO `bk_article_classify_relation` VALUES ('151', '61', '4', '1427198568');
INSERT INTO `bk_article_classify_relation` VALUES ('152', '60', '4', '1427198576');
INSERT INTO `bk_article_classify_relation` VALUES ('153', '59', '5', '1427198592');
INSERT INTO `bk_article_classify_relation` VALUES ('154', '59', '4', '1427198592');
INSERT INTO `bk_article_classify_relation` VALUES ('155', '58', '5', '1427198609');
INSERT INTO `bk_article_classify_relation` VALUES ('156', '58', '4', '1427198609');
INSERT INTO `bk_article_classify_relation` VALUES ('157', '64', '5', '1427206381');
INSERT INTO `bk_article_classify_relation` VALUES ('159', '65', '5', '1427206660');
INSERT INTO `bk_article_classify_relation` VALUES ('160', '66', '4', '1427206838');
INSERT INTO `bk_article_classify_relation` VALUES ('162', '68', '3', '1427207602');
INSERT INTO `bk_article_classify_relation` VALUES ('163', '69', '4', '1427207907');
INSERT INTO `bk_article_classify_relation` VALUES ('164', '67', '4', '1427208041');
INSERT INTO `bk_article_classify_relation` VALUES ('165', '70', '4', '1427208192');
INSERT INTO `bk_article_classify_relation` VALUES ('170', '71', '5', '1427285900');
INSERT INTO `bk_article_classify_relation` VALUES ('172', '72', '4', '1427383229');
INSERT INTO `bk_article_classify_relation` VALUES ('179', '56', '5', '1427437181');
INSERT INTO `bk_article_classify_relation` VALUES ('194', '74', '5', '1427451002');
INSERT INTO `bk_article_classify_relation` VALUES ('195', '74', '4', '1427451002');
INSERT INTO `bk_article_classify_relation` VALUES ('196', '75', '5', '1427451365');
INSERT INTO `bk_article_classify_relation` VALUES ('197', '73', '5', '1427468057');
INSERT INTO `bk_article_classify_relation` VALUES ('198', '73', '4', '1427468057');
INSERT INTO `bk_article_classify_relation` VALUES ('219', '77', '4', '1427894136');
INSERT INTO `bk_article_classify_relation` VALUES ('222', '78', '4', '1427939462');
INSERT INTO `bk_article_classify_relation` VALUES ('230', '79', '4', '1427944600');
INSERT INTO `bk_article_classify_relation` VALUES ('231', '80', '4', '1427960404');
INSERT INTO `bk_article_classify_relation` VALUES ('233', '81', '4', '1427961629');
INSERT INTO `bk_article_classify_relation` VALUES ('240', '76', '4', '1427968979');
INSERT INTO `bk_article_classify_relation` VALUES ('250', '82', '4', '1427981466');
INSERT INTO `bk_article_classify_relation` VALUES ('252', '83', '4', '1433904944');
-- ----------------------------
-- Table structure for `bk_article_detail`
-- ----------------------------
DROP TABLE IF EXISTS `bk_article_detail`;
CREATE TABLE `bk_article_detail` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL COMMENT '用户ID',
`article_id` int(11) NOT NULL COMMENT '文章ID',
`content` longtext NOT NULL COMMENT '文章内容',
`time` int(11) NOT NULL COMMENT '操作时间',
PRIMARY KEY (`id`),
KEY `article_id` (`article_id`) USING BTREE,
KEY `user_id` (`user_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=71 DEFAULT CHARSET=utf8 COMMENT='文章副表';
-- ----------------------------
-- Records of bk_article_detail
-- ----------------------------
INSERT INTO `bk_article_detail` VALUES ('40', '1', '53', '<h1>入门指导</h1><p style=\"box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(51, 51, 51); font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif; font-size: 16px; line-height: 25px; white-space: normal;\">Zephir还有这本手册,是为了PHP开发者想开发C扩展并降低复杂度面打算的。</p><p style=\"box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(51, 51, 51); font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif; font-size: 16px; line-height: 25px; white-space: normal;\">我们假设你有编程语言的基础。我们会在介绍的时候尽可能的向PHP,C,Javascript等语言的特点来陈述。 如果你懂得这些语言中的某一种的话,我们会指出它们来Zephir的相似点。当然其它的一些Zephir的新特性还有 不同点我们也会一一介绍。</p><p><span id=\"OSC_h2_2\"></span></p><h2><a name=\"user-content-检测安装情况\" href=\"https://github.com/pfdtk/zephir-docs/blob/master/zh_cn/tutorial.rst#%E6%A3%80%E6%B5%8B%E5%AE%89%E8%A3%85%E6%83%85%E5%86%B5\" rel=\"nofollow\"></a>检测安装情况</h2><p style=\"box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(51, 51, 51); font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif; font-size: 16px; line-height: 25px; white-space: normal;\">如果你成功的安装了Zephir,你可以在命令行中执行下面的命令:</p><pre>$&nbsp;zephir&nbsp;help</pre><p><br/></p><p style=\"box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(51, 51, 51); font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif; font-size: 16px; line-height: 25px; white-space: normal;\">如果安装正确的话,你会看到下面的提示:</p><pre>&nbsp;_____&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;__&nbsp;&nbsp;&nbsp;&nbsp;_\r\n/__&nbsp;&nbsp;/&nbsp;&nbsp;___&nbsp;&nbsp;____&nbsp;&nbsp;/&nbsp;/_&nbsp;&nbsp;(_)____\r\n&nbsp;&nbsp;/&nbsp;/&nbsp;&nbsp;/&nbsp;_&nbsp;\\/&nbsp;__&nbsp;\\/&nbsp;__&nbsp;\\/&nbsp;/&nbsp;___/\r\n&nbsp;/&nbsp;/__/&nbsp;&nbsp;__/&nbsp;/_/&nbsp;/&nbsp;/&nbsp;/&nbsp;/&nbsp;/&nbsp;/\r\n/____/\\___/&nbsp;.___/_/&nbsp;/_/_/_/\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/_/\r\n\r\nZephir&nbsp;version&nbsp;0.4.5a\r\n\r\nUsage:&nbsp;&nbsp;&nbsp;&nbsp;command&nbsp;[options]Available&nbsp;commands:\r\n&nbsp;&nbsp;&nbsp;&nbsp;build&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Generate/Compile/Install&nbsp;a&nbsp;Zephir&nbsp;extension\r\n&nbsp;&nbsp;&nbsp;&nbsp;clean&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Cleans&nbsp;the&nbsp;generated&nbsp;object&nbsp;files&nbsp;in&nbsp;compilation\r\n&nbsp;&nbsp;&nbsp;&nbsp;compile&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Compile&nbsp;a&nbsp;Zephir&nbsp;extension\r\n&nbsp;&nbsp;&nbsp;&nbsp;full-clean&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Cleans&nbsp;the&nbsp;generated&nbsp;object&nbsp;files&nbsp;in&nbsp;compilation\r\n&nbsp;&nbsp;&nbsp;&nbsp;generate&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Generates&nbsp;C&nbsp;code&nbsp;from&nbsp;the&nbsp;Zephir&nbsp;code&nbsp;&nbsp;&nbsp;&nbsp;help&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Displays&nbsp;this&nbsp;help&nbsp;&nbsp;&nbsp;&nbsp;init&nbsp;[namespace]&nbsp;&nbsp;&nbsp;&nbsp;Initializes&nbsp;a&nbsp;Zephir&nbsp;extension\r\n&nbsp;&nbsp;&nbsp;&nbsp;install&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Installs&nbsp;the&nbsp;extension&nbsp;(requires&nbsp;root&nbsp;password)\r\n&nbsp;&nbsp;&nbsp;&nbsp;version&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Shows&nbsp;Zephir&nbsp;version</pre><p><span id=\"OSC_h2_3\"></span></p><h2><a name=\"user-content-目录结构\" href=\"https://github.com/pfdtk/zephir-docs/blob/master/zh_cn/tutorial.rst#%E7%9B%AE%E5%BD%95%E7%BB%93%E6%9E%84\" rel=\"nofollow\"></a>目录结构</h2><p style=\"box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(51, 51, 51); font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif; font-size: 16px; line-height: 25px; white-space: normal;\">首先我们要做的是建立一个基础的项目结构,它为我们开发扩展提供了基本的结构。这里,我们建立了一个扩展叫做&quot;utils&quot;:</p><pre>$&nbsp;zephir&nbsp;init&nbsp;utils</pre><p><br/></p><p style=\"box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(51, 51, 51); font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif; font-size: 16px; line-height: 25px; white-space: normal;\">执行上面的命令后,一个名为&quot;utils&quot;的目录被建立在当前的目录下:</p><pre>utils/\r\n&nbsp;&nbsp;&nbsp;ext/\r\n&nbsp;&nbsp;&nbsp;utils/</pre><p><br/></p><p style=\"box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(51, 51, 51); font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif; font-size: 16px; line-height: 25px; white-space: normal;\">目录 &quot;ext/&quot; (inside utils) 包含了编译器将会用到来编译扩展的代码. 另一个目录是&quot;utils&quot;,这个目录的名字必须要和我们的扩展名字保持一至。我们写的Zephir代码将会被放到这里。</p><p style=\"box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(51, 51, 51); font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif; font-size: 16px; line-height: 25px; white-space: normal;\">We need to change the working directory to &quot;utils&quot; to start compiling our code:</p><pre>$&nbsp;cd&nbsp;utils\r\n$&nbsp;ls\r\next/&nbsp;utils/&nbsp;config.json</pre><p><br/></p><p style=\"box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(51, 51, 51); font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif; font-size: 16px; line-height: 25px; white-space: normal;\">列出的目录中,还有一个文件叫做&quot;config.json&quot;,这个文件包括了一些配置,它可以用来改变Zephir和扩展的行为。</p><p><span id=\"OSC_h2_4\"></span></p><h2><a name=\"user-content-增加我们的第一个类\" href=\"https://github.com/pfdtk/zephir-docs/blob/master/zh_cn/tutorial.rst#%E5%A2%9E%E5%8A%A0%E6%88%91%E4%BB%AC%E7%9A%84%E7%AC%AC%E4%B8%80%E4%B8%AA%E7%B1%BB\" rel=\"nofollow\"></a>增加我们的第一个类</h2><p style=\"box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(51, 51, 51); font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif; font-size: 16px; line-height: 25px; white-space: normal;\">Zephir是被设计成开发面向对象扩展的。为了开发出我们的第一个功能,我们增加一个类到扩展中。</p><p style=\"box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(51, 51, 51); font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif; font-size: 16px; line-height: 25px; white-space: normal;\">就像很多工具和语言一样,第一件事就是去写&quot;hello world&quot;。同时也检测Zephir是不是可以正常运作。 所以我们的第一个类就叫作&quot;Utils\\Greeting&quot;,它包含了一个函数,这个函数会打印出&quot;hello world!&quot;。</p><p style=\"box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(51, 51, 51); font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif; font-size: 16px; line-height: 25px; white-space: normal;\">The code for this class must be placed in &quot;utils/utils/greeting.zep&quot;:</p><pre>namespace&nbsp;Utils;\r\nclass&nbsp;Greeting{\r\n\r\n&nbsp;&nbsp;&nbsp;&nbsp;public&nbsp;static&nbsp;function&nbsp;say()\r\n&nbsp;&nbsp;&nbsp;&nbsp;{\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;&quot;hello&nbsp;world!&quot;;\r\n&nbsp;&nbsp;&nbsp;&nbsp;}\r\n}</pre><p><br/></p><p style=\"box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(51, 51, 51); font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif; font-size: 16px; line-height: 25px; white-space: normal;\">下面开始编译并生成扩展:</p><pre>$&nbsp;zephir&nbsp;build</pre><p><br/></p><p style=\"box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(51, 51, 51); font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif; font-size: 16px; line-height: 25px; white-space: normal;\">首先,只会在第一次执行的时候,大量的内部命令被执行,并产生了一些必要的代码和配置文件,最终把这个类生成PHP的扩展。 如果一切顺利的话,你将会看到:</p><pre>...Extension&nbsp;installed!\r\nAdd&nbsp;extension=utils.so\r\nto&nbsp;your&nbsp;php.iniDon&#39;t&nbsp;forget&nbsp;to&nbsp;restart&nbsp;your&nbsp;web&nbsp;server</pre><p><br/></p><p style=\"box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(51, 51, 51); font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif; font-size: 16px; line-height: 25px; white-space: normal;\">在上面的步骤中,你可能需要提供你的root帐号和密码去安装这个扩展。 最后,这个扩展必须增加到php.ini文件中,以便PHP可以加载它: extension=utils.so</p><p><span id=\"OSC_h2_5\"></span></p><h2><a name=\"user-content-初始化测试\" href=\"https://github.com/pfdtk/zephir-docs/blob/master/zh_cn/tutorial.rst#%E5%88%9D%E5%A7%8B%E5%8C%96%E6%B5%8B%E8%AF%95\" rel=\"nofollow\"></a>初始化测试</h2><p style=\"box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(51, 51, 51); font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif; font-size: 16px; line-height: 25px; white-space: normal;\">现在这个扩展已经增加到php.ini文件中了,执行下面的命令来确认扩展是否已经正确的加载进来了:</p><pre>$&nbsp;php&nbsp;-m\r\n[PHP&nbsp;Modules]\r\nCore\r\ndate\r\nlibxml\r\npcre\r\nReflection\r\nsession\r\nSPL\r\nstandard\r\ntokenizer\r\nutils\r\nxdebug\r\nxml</pre><p><br/></p><p style=\"box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(51, 51, 51); font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif; font-size: 16px; line-height: 25px; white-space: normal;\">扩展utils必须要出现在上面的列表中。那么现在,我们尝试在PHP中运行这个hello world扩展。 为了完成这个测试,我们写了一个简单的PHP代码来执行扩展中的静态函数:</p><pre>&lt;?php\r\necho&nbsp;Utils\\Greeting::say(),&nbsp;&quot;\\n&quot;;</pre><p><br/></p><p style=\"box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(51, 51, 51); font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif; font-size: 16px; line-height: 25px; white-space: normal;\">恭喜!,你已经完成你的第一个PHP扩展了。</p><p><span id=\"OSC_h2_6\"></span></p><h2><a name=\"user-content-一些有用的类\" href=\"https://github.com/pfdtk/zephir-docs/blob/master/zh_cn/tutorial.rst#%E4%B8%80%E4%BA%9B%E6%9C%89%E7%94%A8%E7%9A%84%E7%B1%BB\" rel=\"nofollow\"></a>一些有用的类</h2><p style=\"box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(51, 51, 51); font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif; font-size: 16px; line-height: 25px; white-space: normal;\">&quot;hello world&quot;这个类的扩展是用来检测我们的不幸是否正确的。现在,让我们建立一些其它更有用处的类。</p><p style=\"box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(51, 51, 51); font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif; font-size: 16px; line-height: 25px; white-space: normal;\">第一个有用的类我们将要增加到PHP扩展中将会提供一个过滤工具给用户。 这个类就叫做&quot;Utils\\Filter&quot;,这个类的代码必须要放在&quot;utils/utils/filter.zep&quot;中:</p><p style=\"box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(51, 51, 51); font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif; font-size: 16px; line-height: 25px; white-space: normal;\">这个类的基本的框架如下:</p><pre>namespace&nbsp;Utils;\r\nclass&nbsp;Filter{}</pre><p><br/></p><p style=\"box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(51, 51, 51); font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif; font-size: 16px; line-height: 25px; white-space: normal;\">这个类包含了一个函数,这个函数的作用是帮助用户去过滤一些不合法的字符。 第一个函数叫做&quot;alpha&quot;,它的目标就是去过滤非ascii码的字符。 开始,我们只是简单的打印出字符串的每一个字节:</p><pre>namespace&nbsp;Utils;class&nbsp;Filter{\r\n\r\n&nbsp;&nbsp;&nbsp;&nbsp;public&nbsp;function&nbsp;alpha(string&nbsp;str)\r\n&nbsp;&nbsp;&nbsp;&nbsp;{\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;char&nbsp;ch;\r\n\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for&nbsp;ch&nbsp;in&nbsp;str&nbsp;{\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;ch,&nbsp;&quot;\\n&quot;;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}\r\n\r\n&nbsp;&nbsp;&nbsp;&nbsp;}\r\n}</pre><p><br/></p><p style=\"box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(51, 51, 51); font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif; font-size: 16px; line-height: 25px; white-space: normal;\">当调用这个函数的时候:</p><pre>&lt;?php$f&nbsp;=&nbsp;new&nbsp;Utils\\Filter();$f-&gt;alpha(&quot;hello&quot;);</pre><p><br/></p><p style=\"box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(51, 51, 51); font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif; font-size: 16px; line-height: 25px; white-space: normal;\">You will see:</p><pre>hello</pre><p><br/></p><p style=\"box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(51, 51, 51); font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif; font-size: 16px; line-height: 25px; white-space: normal;\">检查字符串中的每一个字符是一个直接了当的方法,现在我们建立另一个正确过滤字符的函数:</p><pre>class&nbsp;Filter{\r\n\r\n&nbsp;&nbsp;&nbsp;&nbsp;public&nbsp;function&nbsp;alpha(string&nbsp;str)&nbsp;-&gt;&nbsp;string\r\n&nbsp;&nbsp;&nbsp;&nbsp;{\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;char&nbsp;ch;&nbsp;string&nbsp;filtered&nbsp;=&nbsp;&quot;&quot;;\r\n\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for&nbsp;ch&nbsp;in&nbsp;str&nbsp;{\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(ch&nbsp;&gt;=&nbsp;&#39;a&#39;&nbsp;&amp;&amp;&nbsp;ch&nbsp;&lt;=&nbsp;&#39;z&#39;)&nbsp;||&nbsp;(ch&nbsp;&gt;=&nbsp;&#39;A&#39;&nbsp;&amp;&amp;&nbsp;ch&nbsp;&lt;=&nbsp;&#39;Z&#39;)&nbsp;{\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;let&nbsp;filtered&nbsp;.=&nbsp;ch;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}\r\n\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;filtered;\r\n&nbsp;&nbsp;&nbsp;&nbsp;}\r\n}</pre><p><br/></p><p style=\"box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(51, 51, 51); font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif; font-size: 16px; line-height: 25px; white-space: normal;\">这个写好的函数可以像刚才一样测试:</p><pre>&lt;?php\r\n$f&nbsp;=&nbsp;new&nbsp;Utils\\Filter();\r\necho&nbsp;$f-&gt;alpha(&quot;hello&quot;);&nbsp;//&nbsp;prints&nbsp;&quot;hello&quot;</pre><p><br/></p><p style=\"box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(51, 51, 51); font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif; font-size: 16px; line-height: 25px; white-space: normal;\">下面的视频演示了上面的这些过程:</p><p><span id=\"OSC_h2_7\"></span></p><h2><a name=\"user-content-结论\" href=\"https://github.com/pfdtk/zephir-docs/blob/master/zh_cn/tutorial.rst#%E7%BB%93%E8%AE%BA\" rel=\"nofollow\"></a>结论</h2><p style=\"box-sizing: border-box; margin-top: 0px; color: rgb(51, 51, 51); font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif; font-size: 16px; line-height: 25px; white-space: normal; margin-bottom: 0px !important;\">这是一个简单的指导教程,但是正如你所见到的,使用Zephir你可以很容易的建立一个PHP扩展。 我们建议你继续阅读这个手册,以便你可以了解更多Zephir的特性。</p><p><br/></p>', '1426954976');
INSERT INTO `bk_article_detail` VALUES ('41', '1', '54', '<h1>安装Zephir</h1><p style=\"box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(51, 51, 51); font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif; font-size: 16px; line-height: 25px; white-space: normal;\">为了安装Zephir,请根据下面的步骤来做:</p><p><span id=\"OSC_h2_2\"></span></p><h2><a name=\"user-content-预备知识\" href=\"https://github.com/pfdtk/zephir-docs/blob/master/zh_cn/install.rst#%E9%A2%84%E5%A4%87%E7%9F%A5%E8%AF%86\" rel=\"nofollow\"></a>预备知识</h2><p style=\"box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(51, 51, 51); font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif; font-size: 16px; line-height: 25px; white-space: normal;\">使用Zephir来编译PHP扩展,下面的一些软件是必须的:</p><ul class=\" list-paddingleft-2\"><li><p>gcc &gt;= 4.x/clang &gt;= 3.x</p></li><li><p>re2c 0.13 or later</p></li><li><p>gnu make 3.81 or later</p></li><li><p>autoconf 2.31 or later</p></li><li><p>automake 1.14 or later</p></li><li><p>libpcre3</p></li><li><p>php development headers and tools</p></li></ul><p style=\"box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(51, 51, 51); font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif; font-size: 16px; line-height: 25px; white-space: normal;\">如果你在使用Ubuntu,你可以使用依赖包来安装:</p><pre>$&nbsp;sudo&nbsp;apt-get&nbsp;update\r\n$&nbsp;sudo&nbsp;apt-get&nbsp;install&nbsp;git&nbsp;gcc&nbsp;make&nbsp;re2c&nbsp;php5&nbsp;php5-json&nbsp;php5-dev&nbsp;libpcre3-dev</pre><p><br/></p><p style=\"box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(51, 51, 51); font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif; font-size: 16px; line-height: 25px; white-space: normal;\">因为Zephir是基于PHP来编写的,你必须安装最新的PHP版本,并确保你能在终端中执行php,php-config,phize等命令(一般编译默认是不会加到$PATH中的,加个软连吧):</p><pre>$&nbsp;php&nbsp;-v\r\nPHP&nbsp;5.5.7&nbsp;(cli)&nbsp;(built:&nbsp;Dec&nbsp;14&nbsp;2013&nbsp;00:44:43)Copyright&nbsp;(c)&nbsp;1997-2013&nbsp;The&nbsp;PHP&nbsp;Group\r\nZend&nbsp;Engine&nbsp;v2.5.0,&nbsp;Copyright&nbsp;(c)&nbsp;1998-2013&nbsp;Zend&nbsp;Technologies</pre><p><br/></p><p style=\"box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(51, 51, 51); font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif; font-size: 16px; line-height: 25px; white-space: normal;\">还有,请确保PHP的开发库已经被安装:</p><pre>$&nbsp;phpize&nbsp;-v\r\nConfiguring&nbsp;for:\r\nPHP&nbsp;Api&nbsp;Version:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;20121113\r\nZend&nbsp;Module&nbsp;Api&nbsp;No:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;20121212\r\nZend&nbsp;Extension&nbsp;Api&nbsp;No:&nbsp;&nbsp;&nbsp;220121212</pre><p><br/></p><p style=\"box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(51, 51, 51); font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif; font-size: 16px; line-height: 25px; white-space: normal;\">执行上面的命令的输出可能会有所不同,但是这几条命令是非常重要的,所以请事先安装好它们。</p><p><span id=\"OSC_h2_3\"></span></p><h2><a name=\"user-content-安装-zephir\" href=\"https://github.com/pfdtk/zephir-docs/blob/master/zh_cn/install.rst#%E5%AE%89%E8%A3%85-zephir\" rel=\"nofollow\"></a>安装 Zephir</h2><p style=\"box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(51, 51, 51); font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif; font-size: 16px; line-height: 25px; white-space: normal;\">Json-C 是用来解析Zephir语法的,请先安装它:</p><pre>$&nbsp;git&nbsp;submodule&nbsp;update&nbsp;--init\r\n$&nbsp;cd&nbsp;json-c$&nbsp;sh&nbsp;autogen.sh\r\n$&nbsp;./configure\r\n$&nbsp;make&nbsp;&amp;&amp;&nbsp;sudo&nbsp;make&nbsp;install</pre><p><br/></p><p style=\"box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(51, 51, 51); font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif; font-size: 16px; line-height: 25px; white-space: normal;\">在github中克隆Zephir:</p><pre>$&nbsp;git&nbsp;clone&nbsp;https://github.com/phalcon/zephir</pre><p><br/></p><p style=\"box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(51, 51, 51); font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif; font-size: 16px; line-height: 25px; white-space: normal;\">执行安装: .. code-block:: bash</p><blockquote>$ cd zephir</blockquote><blockquote>$ ./install -c</blockquote><p><span id=\"OSC_h2_4\"></span></p><h2><a name=\"user-content-测试是否安装成功\" href=\"https://github.com/pfdtk/zephir-docs/blob/master/zh_cn/install.rst#%E6%B5%8B%E8%AF%95%E6%98%AF%E5%90%A6%E5%AE%89%E8%A3%85%E6%88%90%E5%8A%9F\" rel=\"nofollow\"></a>测试是否安装成功</h2><p style=\"box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(51, 51, 51); font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif; font-size: 16px; line-height: 25px; white-space: normal;\">执行下面的命令来测试是否已经安装成功:</p><pre>$&nbsp;zephir&nbsp;help</pre><p><br/></p>', '1426955799');
INSERT INTO `bk_article_detail` VALUES ('42', '1', '55', '<h1>介绍 Zephir</h1><p style=\"box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(51, 51, 51); font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif; font-size: 16px; line-height: 25px; white-space: normal;\">Zephir是一种可以让PHP开发者尝试编写和编译可以被PHP执行代码的一种语言。它是动态/静态类型,它的一些特性对于PHP 开发者来说是非常的相似的。</p><p style=\"box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(51, 51, 51); font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif; font-size: 16px; line-height: 25px; white-space: normal;\">Zephir的名字是取自Zend Engine/PHP/Intermediate的缩写。建议发音为zephyr相同。<a href=\"https://github.com/pfdtk/zephir-docs/blob/master/zh_cn/intro.rst#id2\" rel=\"nofollow\">事实上Zephir的创造者发音为zaefire_</a>.</p><h2><a name=\"user-content-hello-world\" href=\"https://github.com/pfdtk/zephir-docs/blob/master/zh_cn/intro.rst#hello-world\" rel=\"nofollow\"></a>Hello World!</h2><p style=\"box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(51, 51, 51); font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif; font-size: 16px; line-height: 25px; white-space: normal;\">每一种语言都会有它们的&quot;Hello World!&quot;例子,对于Zehpir来说也不例外,下面的这个引导例子列举了许多它重要的特性。</p><p style=\"box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(51, 51, 51); font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif; font-size: 16px; line-height: 25px; white-space: normal;\">Zephir的代码必须放置在类中。Zephir是基于面向对象类/框架打造的。所以代码放置在类的外面是不允许的。另外,一个命名空间 也是必须的:</p><pre>namespace&nbsp;Test;\r\n/**\r\n&nbsp;*&nbsp;This&nbsp;is&nbsp;a&nbsp;sample&nbsp;class\r\n&nbsp;*/\r\nclass&nbsp;Hello{\r\n&nbsp;&nbsp;&nbsp;&nbsp;/**\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;This&nbsp;is&nbsp;a&nbsp;sample&nbsp;method\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/\r\n&nbsp;&nbsp;&nbsp;&nbsp;public&nbsp;function&nbsp;say()\r\n&nbsp;&nbsp;&nbsp;&nbsp;{\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;&quot;Hello&nbsp;World!&quot;;\r\n&nbsp;&nbsp;&nbsp;&nbsp;}\r\n}</pre><p><br/></p><p style=\"box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(51, 51, 51); font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif; font-size: 16px; line-height: 25px; white-space: normal;\">一但这个类被编译完成,它会产生下面的一段C代码(gcc/clang/vc++编译):</p><pre>#ifdef&nbsp;HAVE_CONFIG_H\r\n#include&nbsp;&quot;config.h&quot;\r\n#endif#include&nbsp;&quot;php.h&quot;\r\n#include&nbsp;&quot;php_test.h&quot;\r\n#include&nbsp;&quot;test.h&quot;\r\n#include&nbsp;&quot;kernel/main.h&quot;\r\n/**\r\n&nbsp;*&nbsp;This&nbsp;is&nbsp;a&nbsp;sample&nbsp;class\r\n&nbsp;*/\r\nZEPHIR_INIT_CLASS(Test_Hello)&nbsp;{\r\n&nbsp;&nbsp;&nbsp;&nbsp;ZEPHIR_REGISTER_CLASS(Test,&nbsp;Hello,&nbsp;hello,&nbsp;test_hello_method_entry,&nbsp;0);\r\n&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;SUCCESS;\r\n}\r\n/**\r\n&nbsp;*&nbsp;This&nbsp;is&nbsp;a&nbsp;sample&nbsp;method\r\n&nbsp;*/\r\nPHP_METHOD(Test_Hello,&nbsp;say)&nbsp;{\r\n&nbsp;&nbsp;&nbsp;&nbsp;php_printf(&quot;%s&quot;,&nbsp;&quot;Hello&nbsp;World!&quot;);\r\n}</pre><p><br/></p><p style=\"box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(51, 51, 51); font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif; font-size: 16px; line-height: 25px; white-space: normal;\">事实上,使用Zephir的开发者无需懂得C语言,如果你有使用编译器,或者php内部的构造,或者C语言本身的经验, 在使用Zephir的时候你将会感到更加的清晰。</p><h2><a name=\"user-content-zephir初试\" href=\"https://github.com/pfdtk/zephir-docs/blob/master/zh_cn/intro.rst#zephir%E5%88%9D%E8%AF%95\" rel=\"nofollow\"></a>Zephir初试</h2><p style=\"box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(51, 51, 51); font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif; font-size: 16px; line-height: 25px; white-space: normal;\">在接下来的例子中,我们将会尽详细的描述,以便你知道是怎么回事。 我们的目标是让你感觉一下到底Zephir是怎么样的一个东西。 随便我们将会详细的探索Zephir的新特性。</p><p style=\"box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(51, 51, 51); font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif; font-size: 16px; line-height: 25px; white-space: normal;\">下面的例子很简单,它提供一个类和一个函数,检测一个数组的类型</p><p style=\"box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(51, 51, 51); font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif; font-size: 16px; line-height: 25px; white-space: normal;\">让我们认真的检查下面的代码,开始认真的的学习Zephir. 这几行代码包括了很多详细的东西,我们将会慢慢的解释:</p><pre>namespace&nbsp;Test;\r\n/**\r\n&nbsp;*&nbsp;MyTest&nbsp;(test/mytest.zep)\r\n&nbsp;*/\r\nclass&nbsp;MyTest{\r\n&nbsp;&nbsp;&nbsp;&nbsp;public&nbsp;function&nbsp;someMethod()\r\n&nbsp;&nbsp;&nbsp;&nbsp;{\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/*&nbsp;Variables&nbsp;must&nbsp;be&nbsp;declared&nbsp;*/\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;myArray;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int&nbsp;i&nbsp;=&nbsp;0,&nbsp;length;\r\n\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/*&nbsp;Create&nbsp;an&nbsp;array&nbsp;*/\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;let&nbsp;myArray&nbsp;=&nbsp;[&quot;hello&quot;,&nbsp;0,&nbsp;100.25,&nbsp;false,&nbsp;null];\r\n\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/*&nbsp;Count&nbsp;the&nbsp;array&nbsp;into&nbsp;a&nbsp;&#39;int&#39;&nbsp;variable&nbsp;*/\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;let&nbsp;length&nbsp;=&nbsp;count(myArray);\r\n\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/*&nbsp;Print&nbsp;value&nbsp;types&nbsp;*/\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;while&nbsp;i&nbsp;&lt;&nbsp;length&nbsp;{\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;typeof&nbsp;myArray[i],&nbsp;&quot;\\n&quot;;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;let&nbsp;i++;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}\r\n\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;myArray;\r\n&nbsp;&nbsp;&nbsp;&nbsp;}\r\n}</pre><p><br/></p><p style=\"box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(51, 51, 51); font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif; font-size: 16px; line-height: 25px; white-space: normal;\">在函数中,第一行使用了&#39;var&#39; 和 &#39;int&#39; 关键词来声明一个函数内的私有变量。 在函数中的每一个变量必须事先声明它们自己的类型。这些声明并不是随意的,它帮助编译器来报告给你关于 错误的变量,或者变量的使用是否超出的它的范围,通常它会在最后抛出错误。</p><p style=\"box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(51, 51, 51); font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif; font-size: 16px; line-height: 25px; white-space: normal;\">动态的变量必须以关键词&#39;var&#39;来声明。这些变量可以被指定或再指定成不同的变量类型。 另一方面,&#39;i&#39; and &#39;length&#39;使用了整数的静态变量,在执行程序的过程中,它只能改变值,而不能改变变量的类型。</p><p style=\"box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(51, 51, 51); font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif; font-size: 16px; line-height: 25px; white-space: normal;\">与PHP不同的是,你不用在变量的前面加上($)符号。</p><p style=\"box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(51, 51, 51); font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif; font-size: 16px; line-height: 25px; white-space: normal;\">Zephir的注释和Java, C#, C++等等一些语言的一样。例如:</p><p style=\"box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(51, 51, 51); font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif; font-size: 16px; line-height: 25px; white-space: normal;\">&nbsp;A //comment goes to the end of a line, while a /* comment */ can cross line boundaries.</p><p style=\"box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(51, 51, 51); font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif; font-size: 16px; line-height: 25px; white-space: normal;\">默认的,变量是不变的,意思是说Zephir期望大部分的变量保持不变。 变量保持它们原始的值不变可以优化成静态常量。 如果需要改变变量的值,请使用关键词&#39;let&#39;:</p><pre>/*&nbsp;建立一个数组&nbsp;*/\r\nlet&nbsp;myArray&nbsp;=&nbsp;[&quot;hello&quot;,&nbsp;0,&nbsp;100.25,&nbsp;false,&nbsp;null];</pre><p><br/></p><p style=\"box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(51, 51, 51); font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif; font-size: 16px; line-height: 25px; white-space: normal;\">默认的,数组是一种象PHP一样的动态变量,它包含了许多不同类型的值。 令人吃惊的是,PHP内部的函数可以在Zephir中使用,在下面的例子中,&#39;count&#39; 函数被使用了, 编辑器可以以最佳的状态来执行,因为它已经知道了数组的长度了。</p><pre>/*&nbsp;计算出数组的大小&nbsp;*/\r\nlet&nbsp;length&nbsp;=&nbsp;count(myArray);</pre><p><br/></p><p style=\"box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(51, 51, 51); font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif; font-size: 16px; line-height: 25px; white-space: normal;\">同样的,我们可以使用花括号来控制程序的流程.</p><pre>while&nbsp;i&nbsp;&lt;&nbsp;length&nbsp;{\r\n&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;typeof&nbsp;myArray[i],&nbsp;&quot;\\n&quot;;\r\n&nbsp;&nbsp;&nbsp;&nbsp;let&nbsp;i++;\r\n}</pre><p><br/></p><p style=\"box-sizing: border-box; margin-top: 0px; color: rgb(51, 51, 51); font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif; font-size: 16px; line-height: 25px; white-space: normal; margin-bottom: 0px !important;\">PHP的变量总是动态的,函数总是返回的是可变的动态变量,这就意味着如果一个静态变量在Zphir中被返回了,在PHP的调用中 你得到的却是一个动态变量。请注意,内存是在编译器中自动管理的,所以你没有必要像C语言一样去分配和释放内存。这和PHP是 很相似的。</p><p><br/></p>', '1427022148');
INSERT INTO `bk_article_detail` VALUES ('43', '1', '56', '<h1 style=\"font-size: 30px; margin-top: 10px; font-family: 微软雅黑, Verdana, sans-serif, 宋体; white-space: normal;\">为什么选择 Zephir?</h1><p style=\"margin-top: 0px; margin-bottom: 16px; line-height: 25px; white-space: normal; box-sizing: border-box; color: rgb(51, 51, 51); font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif;\">目前的PHP应用必须使用得稳定性、性能、和功能性保持平衡。 每一个PHP应用是建立在大量的通用组件上的,而这些组件又基于大量的其它应用。</p><p style=\"margin-top: 0px; margin-bottom: 16px; line-height: 25px; white-space: normal; box-sizing: border-box; color: rgb(51, 51, 51); font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif;\">这些通用的组件可能是一个类/框架,或者是它们的结合。一但它们被安装,框架很少会改变。 作为一个应用的基础,它们必须保持很高的功能性,同时也要保持速度优势。</p><p style=\"margin-top: 0px; margin-bottom: 16px; line-height: 25px; white-space: normal; box-sizing: border-box; color: rgb(51, 51, 51); font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif;\">快速强大的类库会变得很难懂,这是由于它们是高度抽象的实现的。考虑到这些基本的类库和框架很少会改变, 这就为编写一个可以提高性能和节省计算机资源的扩展提供了一个机会。</p><p style=\"margin-top: 0px; margin-bottom: 16px; line-height: 25px; white-space: normal; box-sizing: border-box; color: rgb(51, 51, 51); font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif;\">通过Zephir,你可以实现面向对象的/框架/应用,并使你的PHP程序提高到一个高的层次,让你的应用更快,同时改善用户的体验。</p><h2 style=\"font-size: 24px; margin-top: 10px; font-family: 微软雅黑, Verdana, sans-serif, 宋体; white-space: normal;\"><a name=\"user-content-如果你是一个php程序员\" href=\"https://github.com/pfdtk/zephir-docs/blob/master/zh_cn/motivation.rst#%E5%A6%82%E6%9E%9C%E4%BD%A0%E6%98%AF%E4%B8%80%E4%B8%AAphp%E7%A8%8B%E5%BA%8F%E5%91%98\" rel=\"nofollow\"></a>如果你是一个PHP程序员...</h2><p style=\"margin-top: 0px; margin-bottom: 16px; line-height: 25px; white-space: normal; box-sizing: border-box; color: rgb(51, 51, 51); font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif;\">PHP是众多流行的网站应用开发语言之一。 像PHP这种动态解析语言,因为它的灵活性,为应用开发提供了很高的生产力。</p><p style=\"margin-top: 0px; margin-bottom: 16px; line-height: 25px; white-space: normal; box-sizing: border-box; color: rgb(51, 51, 51); font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif;\">从4.x到5.x版本,PHP开始基于Zend引擎实现。Zend引擎其实是一个用来执行PHP代码的字节码实现的虚拟机。 Zend引擎几乎出现在每一个安装PHP的机器上,而通过Zephir,你可以建立运行在Zend引擎的PHP扩展。</p><p style=\"margin-top: 0px; margin-bottom: 16px; line-height: 25px; white-space: normal; box-sizing: border-box; color: rgb(51, 51, 51); font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif;\">Zephir是通过PHP延申出来的,所以它们有很多的相似点。但是它们的重要的不同点在于Zephir它自己所拥有的特点。 比如说:Zephir更加的严格,相对PHP编译来说,它需要更少的资源。</p><h2 style=\"font-size: 24px; margin-top: 10px; font-family: 微软雅黑, Verdana, sans-serif, 宋体; white-space: normal;\"><a name=\"user-content-如果你是一个c程序员\" href=\"https://github.com/pfdtk/zephir-docs/blob/master/zh_cn/motivation.rst#%E5%A6%82%E6%9E%9C%E4%BD%A0%E6%98%AF%E4%B8%80%E4%B8%AAc%E7%A8%8B%E5%BA%8F%E5%91%98\" rel=\"nofollow\"></a>如果你是一个C程序员...</h2><p style=\"margin-top: 0px; margin-bottom: 16px; line-height: 25px; white-space: normal; box-sizing: border-box; color: rgb(51, 51, 51); font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif;\">C是一种强大而流行的开发语言。事实上,PHP语言就是C所编写的。这就是为什么PHP的扩展可以使用C语言来开发的原因之一。 C语言可以自由的管理内存,使用底层的类型,甚至可以内嵌汇编语言。</p><p style=\"margin-top: 0px; margin-bottom: 16px; line-height: 25px; white-space: normal; box-sizing: border-box; color: rgb(51, 51, 51); font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif;\">但是相对PHP和Zephir来说,开发一个大的应用,使用C语言会花费更多的时间。而且如果你不是非常精通C语言,一些程序错误会很难发现。</p><p style=\"margin-top: 0px; margin-bottom: 16px; line-height: 25px; white-space: normal; box-sizing: border-box; color: rgb(51, 51, 51); font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif;\">Zephir语言被设计成安全的,所以它并不支持指针和内存管理,所以如果你是一个C程序员,也许你会感觉Zephir功能没有C那么强大,但是 Zephir要比C更加的人性化。</p><h2 style=\"font-size: 24px; margin-top: 10px; font-family: 微软雅黑, Verdana, sans-serif, 宋体; white-space: normal;\"><a name=\"user-content-编译和解析哪种更好\" href=\"https://github.com/pfdtk/zephir-docs/blob/master/zh_cn/motivation.rst#%E7%BC%96%E8%AF%91%E5%92%8C%E8%A7%A3%E6%9E%90%E5%93%AA%E7%A7%8D%E6%9B%B4%E5%A5%BD\" rel=\"nofollow\"></a>编译和解析哪种更好</h2><p style=\"margin-top: 0px; margin-bottom: 16px; line-height: 25px; white-space: normal; box-sizing: border-box; color: rgb(51, 51, 51); font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif;\">编译通常会减缓开发的进度。你需要更耐心的等待程序的编译,之后你才可以执行它。另一方面,解析型语言会牺牲一点性能来获得 更大的生产力。在一些应用中,不论是编译型语言还是解析型语言,在速度上相差的不会太多。</p><p style=\"margin-top: 0px; margin-bottom: 16px; line-height: 25px; white-space: normal; box-sizing: border-box; color: rgb(51, 51, 51); font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif;\">Zephir是需要预先编译的,但是功能的实现是基于PHP来实现的。</p><p style=\"margin-top: 0px; margin-bottom: 16px; line-height: 25px; white-space: normal; box-sizing: border-box; color: rgb(51, 51, 51); font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif;\">一但代码被编译成功,执行的时间就无需再次编译,但是解析型语言则不同,它会在每一次请求的时候重新解析一次。 开发者可以自由的决定你的应用中哪一部份需要用Zephir来处理,哪一部分不需要。</p><h2 style=\"font-size: 24px; margin-top: 10px; font-family: 微软雅黑, Verdana, sans-serif, 宋体; white-space: normal;\"><a name=\"user-content-静态类型对比静态类型语言强类型语言对比弱类型语言\" href=\"https://github.com/pfdtk/zephir-docs/blob/master/zh_cn/motivation.rst#%E9%9D%99%E6%80%81%E7%B1%BB%E5%9E%8B%E5%AF%B9%E6%AF%94%E9%9D%99%E6%80%81%E7%B1%BB%E5%9E%8B%E8%AF%AD%E8%A8%80%E5%BC%BA%E7%B1%BB%E5%9E%8B%E8%AF%AD%E8%A8%80%E5%AF%B9%E6%AF%94%E5%BC%B1%E7%B1%BB%E5%9E%8B%E8%AF%AD%E8%A8%80\" rel=\"nofollow\"></a>静态类型对比静态类型语言(强类型语言对比弱类型语言)</h2><p style=\"margin-top: 0px; margin-bottom: 16px; line-height: 25px; white-space: normal; box-sizing: border-box; color: rgb(51, 51, 51); font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif;\">一般来说,在静态类型语言中,一个变量一定要预先声明它的变量类型。而且它的类型不能该变,只允许类型引用和操作。 像C/C++来说:</p><pre style=\"margin-top: 5px; margin-bottom: 10px; margin-left: 10px; padding: 5px; border-top-left-radius: 2px; border-top-right-radius: 2px; border-bottom-right-radius: 2px; border-bottom-left-radius: 2px; background-color: rgb(246, 246, 246); line-height: 18px; font-size: 12px; font-family: Consolas, 微软雅黑, monospace, Verdana, sans-serif, 宋体; border-width: 1px 1px 1px 5px; border-style: solid; border-color: rgb(221, 221, 221) rgb(221, 221, 221) rgb(221, 221, 221) rgb(108, 226, 108);\">int&nbsp;a&nbsp;=&nbsp;0;a&nbsp;=&nbsp;&quot;hello&quot;;&nbsp;//&nbsp;不允许</pre><p style=\"margin-bottom: 10px; line-height: 23px; font-family: 微软雅黑, Verdana, sans-serif, 宋体; font-size: 13px; white-space: normal;\"><br/></p><p style=\"margin-top: 0px; margin-bottom: 16px; line-height: 25px; white-space: normal; box-sizing: border-box; color: rgb(51, 51, 51); font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif;\">对于动态语言来说,变量的类型是和变量的值绑定的,并不是变量本身。所以当变量的值的类型该变的时候,变量的类型也会 根着该变。像Javascript/PHP来说:</p><pre style=\"margin-top: 5px; margin-bottom: 10px; margin-left: 10px; padding: 5px; border-top-left-radius: 2px; border-top-right-radius: 2px; border-bottom-right-radius: 2px; border-bottom-left-radius: 2px; background-color: rgb(246, 246, 246); line-height: 18px; font-size: 12px; font-family: Consolas, 微软雅黑, monospace, Verdana, sans-serif, 宋体; border-width: 1px 1px 1px 5px; border-style: solid; border-color: rgb(221, 221, 221) rgb(221, 221, 221) rgb(221, 221, 221) rgb(108, 226, 108);\">var&nbsp;a&nbsp;=&nbsp;0;a&nbsp;=&nbsp;&quot;hello&quot;;&nbsp;//&nbsp;可以这样使用</pre><p style=\"margin-bottom: 10px; line-height: 23px; font-family: 微软雅黑, Verdana, sans-serif, 宋体; font-size: 13px; white-space: normal;\"><br/></p><p style=\"margin-top: 0px; margin-bottom: 16px; line-height: 25px; white-space: normal; box-sizing: border-box; color: rgb(51, 51, 51); font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif;\">尽管动态解析语言有生产忧势,但是它并不是所有应用的最佳选择,特别是一些大数量级的代码和性能的应用。</p><p style=\"margin-top: 0px; margin-bottom: 16px; line-height: 25px; white-space: normal; box-sizing: border-box; color: rgb(51, 51, 51); font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif;\">优化动态语言,比如PHP,会比静态语言,比如C来说会更具挑战性。 对于静态语言来说,优化可以根据类型的信息来做决定。而对于动态语言来说,会更少的些类信息来做优化,这就使得动态语言的优化更加的困难。</p><p style=\"margin-top: 0px; margin-bottom: 16px; line-height: 25px; white-space: normal; box-sizing: border-box; color: rgb(51, 51, 51); font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif;\">然尔近来我们看到了优化动态语言的进展(像JIT编译),但是相对静态语言来说它还是处于劣势。所以,如果你 需要一个高性能的工具,静态语言可能更为的安全可靠。</p><p style=\"margin-top: 0px; margin-bottom: 16px; line-height: 25px; white-space: normal; box-sizing: border-box; color: rgb(51, 51, 51); font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif;\">另一个小的优势,静态语言会额外的检测代码编译的过程。编译器不会发现逻辑错误,但是更重要的是编译器可以预先的知道 程序的错误。而对于动态解析语言来说,只有在执行的时候才会发现错误。</p><p style=\"margin-top: 0px; margin-bottom: 16px; line-height: 25px; white-space: normal; box-sizing: border-box; color: rgb(51, 51, 51); font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif;\">Zephir既是静态语言也是动态语言,你可以很方便的使用两者语言的优势。</p><h2 style=\"font-size: 24px; margin-top: 10px; font-family: 微软雅黑, Verdana, sans-serif, 宋体; white-space: normal;\"><a name=\"user-content-编译方案\" href=\"https://github.com/pfdtk/zephir-docs/blob/master/zh_cn/motivation.rst#%E7%BC%96%E8%AF%91%E6%96%B9%E6%A1%88\" rel=\"nofollow\"></a>编译方案</h2><p style=\"margin-top: 0px; margin-bottom: 16px; line-height: 25px; white-space: normal; box-sizing: border-box; color: rgb(51, 51, 51); font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif;\">Zephir提供原代码的生成(目前会编译成C语言),像gcc/clang/vc++编译器优化代码并编译成机器代码,下面的一张图片 演示了处理的过程:</p><p style=\"margin-bottom: 10px; line-height: 23px; font-family: 微软雅黑, Verdana, sans-serif, 宋体; font-size: 13px; white-space: normal;\"><a href=\"https://github.com/pfdtk/zephir-docs/blob/master/_static/img/scheme.png\" target=\"_blank\" rel=\"nofollow\"><img alt=\"scheme.png\" src=\"http://img.opcache.net/upload/image/20150327/1427437170310619.png\" title=\"1427437170310619.png\"/></a></p><p style=\"margin-top: 0px; margin-bottom: 16px; line-height: 25px; white-space: normal; box-sizing: border-box; color: rgb(51, 51, 51); font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif;\">Zephir除了提供这个外,在处理的过程中,编译器还会实施大量的优化来提高应用的性能。</p><ul class=\" list-paddingleft-2\" style=\"width: 656.4375px; font-family: 微软雅黑, Verdana, sans-serif, 宋体; font-size: 13px; white-space: normal;\"><li><p style=\"margin-bottom: 10px; line-height: 23px;\"><a href=\"http://gcc.gnu.org/onlinedocs/gcc-4.1.0/gcc/Optimize-Options.html\" rel=\"nofollow\">GCC optimizations</a></p></li><li><p style=\"margin-bottom: 10px; line-height: 23px;\"><a href=\"http://llvm.org/docs/Passes.html\" rel=\"nofollow\">LLVM passes</a></p></li><li><p style=\"margin-bottom: 10px; line-height: 23px;\"><a href=\"http://msdn.microsoft.com/en-us/library/k1ack8f1.aspx\" rel=\"nofollow\">Visual C/C++ optimizations</a></p></li></ul><h2 style=\"font-size: 24px; margin-top: 10px; font-family: 微软雅黑, Verdana, sans-serif, 宋体; white-space: normal;\"><a name=\"user-content-代码保护\" href=\"https://github.com/pfdtk/zephir-docs/blob/master/zh_cn/motivation.rst#%E4%BB%A3%E7%A0%81%E4%BF%9D%E6%8A%A4\" rel=\"nofollow\"></a>代码保护</h2><p style=\"margin-top: 0px; margin-bottom: 16px; line-height: 25px; white-space: normal; box-sizing: border-box; color: rgb(51, 51, 51); font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif;\">在一些情况下,编译器并不会提高应用的性能,这可能是由于应用的瓶颈是I/O计算大于内存计算。 但是编译代码可以起到对代码的一种保护作用。通过Zephir,保护本地的文件,你完全有能力去保护你的代码,并 把它们带给你的用户和客户。</p><h2 style=\"font-size: 24px; margin-top: 10px; font-family: 微软雅黑, Verdana, sans-serif, 宋体; white-space: normal;\"><a name=\"user-content-结论\" href=\"https://github.com/pfdtk/zephir-docs/blob/master/zh_cn/motivation.rst#%E7%BB%93%E8%AE%BA\" rel=\"nofollow\"></a>结论</h2><p style=\"margin-top: 0px; line-height: 25px; white-space: normal; box-sizing: border-box; color: rgb(51, 51, 51); font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif; margin-bottom: 0px !important;\">Zephir并不是为了代替PHP或C产生的,而是补充它们的不足,它允许开发者尝试编译和开发静态语言。 Zephir是对PHP和C语言的一些优秀的一些东西的融合的一点尝试,从而令得人的应用更加的快速。</p><p><br/></p>', '1427022228');
INSERT INTO `bk_article_detail` VALUES ('44', '1', '57', '<p>最新更新请留意我的github:&nbsp;<a href=\"https://github.com/pfdtk/zephir-docs/tree/master/zh_cn\" rel=\"nofollow\">https://github.com/pfdtk/zephir-docs/tree/master/zh_cn</a></p><p><br/></p><h1>欢迎来到Zephir!</h1><p style=\"box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(51, 51, 51); font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif; font-size: 16px; line-height: 25px; white-space: normal;\">Zephir 是一个开源的,可以用高级语言安全快速地编写 PHP 的 C 扩展。</p><h2><a name=\"user-content-zephir特点\" href=\"https://github.com/pfdtk/zephir-docs/blob/master/zh_cn/welcome.rst#zephir%E7%89%B9%E7%82%B9\" rel=\"nofollow\"></a>Zephir特点</h2><p style=\"box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(51, 51, 51); font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif; font-size: 16px; line-height: 25px; white-space: normal;\">Zephir的主要特点有:</p><table style=\"width: 675px;\"><tbody><tr class=\"firstRow\"><td style=\"box-sizing: border-box; padding: 6px 13px;\">Type system</td><td style=\"box-sizing: border-box; padding: 6px 13px;\">dynamic/static</td></tr><tr><td style=\"box-sizing: border-box; padding: 6px 13px;\">Memory safety</td><td style=\"box-sizing: border-box; padding: 6px 13px;\">pointers or direct memory management aren&#39;t allowed</td></tr><tr><td style=\"box-sizing: border-box; padding: 6px 13px;\">Compilation model</td><td style=\"box-sizing: border-box; padding: 6px 13px;\">ahead of time</td></tr><tr><td style=\"box-sizing: border-box; padding: 6px 13px;\">Memory model</td><td style=\"box-sizing: border-box; padding: 6px 13px;\">task-local garbage collection</td></tr></tbody></table><h2><a name=\"user-content-牛刀小试\" href=\"https://github.com/pfdtk/zephir-docs/blob/master/zh_cn/welcome.rst#%E7%89%9B%E5%88%80%E5%B0%8F%E8%AF%95\" rel=\"nofollow\"></a>牛刀小试</h2><p style=\"box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(51, 51, 51); font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif; font-size: 16px; line-height: 25px; white-space: normal;\">下面的类中的函数alpha过滤一段字符串,并返回字母字符:</p><pre>namespace&nbsp;MyLibrary;\r\n/**\r\n&nbsp;*&nbsp;Filter\r\n&nbsp;*/\r\nclass&nbsp;Filter{\r\n&nbsp;&nbsp;&nbsp;&nbsp;/**\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;过滤一段字符串,并返回字母字符\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@param&nbsp;string&nbsp;str\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/\r\n&nbsp;&nbsp;&nbsp;&nbsp;public&nbsp;function&nbsp;alpha(string&nbsp;str)\r\n&nbsp;&nbsp;&nbsp;&nbsp;{\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;char&nbsp;ch;&nbsp;string&nbsp;filtered&nbsp;=&nbsp;&quot;&quot;;\r\n\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for&nbsp;ch&nbsp;in&nbsp;str&nbsp;{\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(ch&nbsp;&gt;=&nbsp;&#39;a&#39;&nbsp;&amp;&amp;&nbsp;ch&nbsp;&lt;=&nbsp;&#39;z&#39;)&nbsp;||&nbsp;(ch&nbsp;&gt;=&nbsp;&#39;A&#39;&nbsp;&amp;&amp;&nbsp;ch&nbsp;&lt;=&nbsp;&#39;Z&#39;)&nbsp;{\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;let&nbsp;filtered&nbsp;.=&nbsp;ch;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}\r\n\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;filtered;\r\n&nbsp;&nbsp;&nbsp;&nbsp;}\r\n}</pre><p><br/></p><p style=\"box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(51, 51, 51); font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif; font-size: 16px; line-height: 25px; white-space: normal;\">一但上面的代码编译成扩展后,在php中可以这样使用:</p><pre>&lt;?php\r\n$filter&nbsp;=&nbsp;new&nbsp;MyLibrary\\Filter();\r\necho&nbsp;$filter-&gt;alpha(&quot;hello&quot;);&nbsp;//&nbsp;输出&nbsp;hello</pre><p><br/></p><p><br/></p>', '1427022413');
INSERT INTO `bk_article_detail` VALUES ('45', '1', '58', '<p>1、phpredis下载地址:http://pecl.php.net/package/redis</p><pre class=\"brush:shell;toolbar: true; auto-links: false;\">[jhj@localhost&nbsp;solf]$&nbsp;wget&nbsp;http://pecl.php.net/get/redis-2.2.5.tgz</pre><p><br/></p><p>2、解压安装,安装方法在 https://github.com/nicolasff/phpredis/#installation</p><pre class=\"brush:shell;toolbar: true; auto-links: false;\">[jhj@localhost&nbsp;solf]$&nbsp;tar&nbsp;xzf&nbsp;redis-2.2.5.tgz\r\n[jhj@localhost&nbsp;solf]$&nbsp;cd&nbsp;redis-2.2.</pre><p><br/></p><p>生成configure配置文件</p><pre class=\"brush:shell;toolbar: true; auto-links: false;\">[jhj@localhost&nbsp;redis-2.2.5]$&nbsp;/usr/local/php/bin/phpize&nbsp;\r\nConfiguring&nbsp;for:\r\nPHP&nbsp;Api&nbsp;Version:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;20090626\r\nZend&nbsp;Module&nbsp;Api&nbsp;No:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;20090626\r\nZend&nbsp;Extension&nbsp;Api&nbsp;No:&nbsp;&nbsp;&nbsp;220090626</pre><p><br/></p><pre class=\"brush:shell;toolbar: true; auto-links: false;\">[jhj@localhost&nbsp;redis-2.2.5]$&nbsp;./configure&nbsp;--with-php-config=/usr/local/php/bin/php-config\r\n[jhj@localhost&nbsp;redis-2.2.5]$&nbsp;make\r\n[jhj@localhost&nbsp;redis-2.2.5]$&nbsp;make&nbsp;install\r\nInstalling&nbsp;shared&nbsp;extensions:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/\r\ncp:&nbsp;cannot&nbsp;create&nbsp;regular&nbsp;file&nbsp;`/usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/#INST@6338#&#39;:&nbsp;Permission&nbsp;denied\r\nmake:&nbsp;***&nbsp;[install-modules]&nbsp;Error&nbsp;1\r\n[jhj@localhost&nbsp;redis-2.2.5]$&nbsp;su\r\nPassword:&nbsp;\r\n[root@localhost&nbsp;redis-2.2.5]#&nbsp;make&nbsp;install</pre><p><br/></p><p>3、配置PHP加载扩展</p><pre class=\"brush:shell;toolbar: true; auto-links: false;\">extension=redis.so</pre><p><br/></p><p>4、查看phpinfo</p><h2>redis</h2><table cellpadding=\"3\"><tbody><tr class=\"firstRow\"><th>Redis Support</th><th>enabled</th></tr><tr><td>Redis Version</td><td>2.2.5</td></tr></tbody></table><p><br/></p>', '1427022819');
INSERT INTO `bk_article_detail` VALUES ('46', '1', '59', '<p>1、下载libmemcached库 地址在https://code.launchpad.net/libmemcached</p><pre class=\"brush:shell;toolbar: true; auto-links: false;\">wget&nbsp;https://launchpad.net/libmemcached/1.0/1.0.18/+download/libmemcached-1.0.18.tar.gz</pre><p><br/></p><p>2、下载php memcached扩展,地址在http://pecl.php.net/package/memcached</p><pre class=\"brush:shell;toolbar: true; auto-links: false;\">wget&nbsp;http://pecl.php.net/get/memcached-2.2.0.tgz</pre><p><br/></p><p>3、解压</p><pre class=\"brush:shell;toolbar: true; auto-links: false;\">[root@localhost&nbsp;solf]#&nbsp;tar&nbsp;xzf&nbsp;libmemcached-1.0.18.tar.gz&nbsp;\r\n[root@localhost&nbsp;solf]#&nbsp;tar&nbsp;xzf&nbsp;memcached-2.2.0.tgz</pre><p><br/></p><p>4、安装libmemcached</p><pre class=\"brush:shell;toolbar: true; auto-links: false;\">[root@localhost&nbsp;libmemcached-1.0.18]#&nbsp;./configure&nbsp;--prefix=/usr/local/libmemcached&nbsp;--with-memcached</pre><p><br/></p><pre class=\"brush:shell;toolbar: true; auto-links: false;\">[root@localhost&nbsp;libmemcached-1.0.18]#&nbsp;make&nbsp;&amp;&amp;&nbsp;make&nbsp;install</pre><p><br/></p><p>5、安装PHPmemcached扩展</p><p>运行phpize命令生成configure配置文件</p><pre class=\"brush:shell;toolbar: true; auto-links: false;\">[root@localhost&nbsp;memcached-2.2.0]#&nbsp;/usr/local/php/bin/phpize&nbsp;\r\nConfiguring&nbsp;for:\r\nPHP&nbsp;Api&nbsp;Version:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;20090626\r\nZend&nbsp;Module&nbsp;Api&nbsp;No:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;20090626\r\nZend&nbsp;Extension&nbsp;Api&nbsp;No:&nbsp;&nbsp;&nbsp;220090626</pre><p><br/></p><p>安装,因为机子上可能没有sasl,这里暂时不启用,加上参数--disable-memcached-sasl,否则--enable-sasl</p><pre class=\"brush:shell;toolbar: true; auto-links: false;\">[root@localhost&nbsp;memcached-2.2.0]#&nbsp;./configure&nbsp;--with-php-config=/usr/local/php/bin/php-config&nbsp;--disable-memcached-sasl</pre><p><br/></p><pre class=\"brush:shell;toolbar: true; auto-links: false;\">make&nbsp;&amp;&amp;&nbsp;make&nbsp;install</pre><p><br/></p><p>到些安装完成</p><p>6、配置php,加载memcahed扩展</p><pre class=\"brush:shell;toolbar: true; auto-links: false;\">extension=memcached.so</pre><p><br/></p><p>7、重启httpd</p><pre class=\"brush:shell;toolbar: true; auto-links: false;\">[root@localhost&nbsp;no-debug-non-zts-20090626]#&nbsp;service&nbsp;httpd&nbsp;restart\r\nStopping&nbsp;httpd:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[&nbsp;&nbsp;OK&nbsp;&nbsp;]\r\nStarting&nbsp;httpd:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[&nbsp;&nbsp;OK&nbsp;&nbsp;]</pre><p><br/></p><p>8、查看phpinfo</p><h2><a rel=\"nofollow\" name=\"module_memcached\"></a>memcached</h2><table cellpadding=\"3\"><tbody><tr class=\"firstRow\"><th style=\"font-family: sans-serif; border: 1px solid rgb(0, 0, 0); font-size: 12px; vertical-align: baseline; text-align: center !important;\">memcached support</th><th style=\"font-family: sans-serif; border: 1px solid rgb(0, 0, 0); font-size: 12px; vertical-align: baseline; text-align: center !important;\">enabled</th></tr><tr><td style=\"font-family: sans-serif; border: 1px solid rgb(0, 0, 0); font-size: 12px; vertical-align: baseline; background-color: rgb(204, 204, 255); font-weight: bold; color: rgb(0, 0, 0);\">Version</td><td style=\"font-family: sans-serif; border: 1px solid rgb(0, 0, 0); font-size: 12px; vertical-align: baseline; background-color: rgb(204, 204, 204); color: rgb(0, 0, 0);\">2.2.0</td></tr><tr><td style=\"font-family: sans-serif; border: 1px solid rgb(0, 0, 0); font-size: 12px; vertical-align: baseline; background-color: rgb(204, 204, 255); font-weight: bold; color: rgb(0, 0, 0);\">libmemcached version</td><td style=\"font-family: sans-serif; border: 1px solid rgb(0, 0, 0); font-size: 12px; vertical-align: baseline; background-color: rgb(204, 204, 204); color: rgb(0, 0, 0);\">1.0.18</td></tr><tr><td style=\"font-family: sans-serif; border: 1px solid rgb(0, 0, 0); font-size: 12px; vertical-align: baseline; background-color: rgb(204, 204, 255); font-weight: bold; color: rgb(0, 0, 0);\">SASL support</td><td style=\"font-family: sans-serif; border: 1px solid rgb(0, 0, 0); font-size: 12px; vertical-align: baseline; background-color: rgb(204, 204, 204); color: rgb(0, 0, 0);\">no</td></tr><tr><td style=\"font-family: sans-serif; border: 1px solid rgb(0, 0, 0); font-size: 12px; vertical-align: baseline; background-color: rgb(204, 204, 255); font-weight: bold; color: rgb(0, 0, 0);\">Session support</td><td style=\"font-family: sans-serif; border: 1px solid rgb(0, 0, 0); font-size: 12px; vertical-align: baseline; background-color: rgb(204, 204, 204); color: rgb(0, 0, 0);\">yes</td></tr><tr><td style=\"font-family: sans-serif; border: 1px solid rgb(0, 0, 0); font-size: 12px; vertical-align: baseline; background-color: rgb(204, 204, 255); font-weight: bold; color: rgb(0, 0, 0);\">igbinary support</td><td style=\"font-family: sans-serif; border: 1px solid rgb(0, 0, 0); font-size: 12px; vertical-align: baseline; background-color: rgb(204, 204, 204); color: rgb(0, 0, 0);\">no</td></tr><tr><td style=\"font-family: sans-serif; border: 1px solid rgb(0, 0, 0); font-size: 12px; vertical-align: baseline; background-color: rgb(204, 204, 255); font-weight: bold; color: rgb(0, 0, 0);\">json support</td><td style=\"font-family: sans-serif; border: 1px solid rgb(0, 0, 0); font-size: 12px; vertical-align: baseline; background-color: rgb(204, 204, 204); color: rgb(0, 0, 0);\">no</td></tr><tr><td style=\"font-family: sans-serif; border: 1px solid rgb(0, 0, 0); font-size: 12px; vertical-align: baseline; background-color: rgb(204, 204, 255); font-weight: bold; color: rgb(0, 0, 0);\">msgpack support</td><td style=\"font-family: sans-serif; border: 1px solid rgb(0, 0, 0); font-size: 12px; vertical-align: baseline; background-color: rgb(204, 204, 204); color: rgb(0, 0, 0);\">no</td></tr></tbody></table><p><br/></p><table cellpadding=\"3\"><tbody><tr class=\"firstRow\"><th style=\"font-family: sans-serif; border: 1px solid rgb(0, 0, 0); font-size: 12px; vertical-align: baseline; text-align: center !important;\">Directive</th><th style=\"font-family: sans-serif; border: 1px solid rgb(0, 0, 0); font-size: 12px; vertical-align: baseline; text-align: center !important;\">Local Value</th><th style=\"font-family: sans-serif; border: 1px solid rgb(0, 0, 0); font-size: 12px; vertical-align: baseline; text-align: center !important;\">Master Value</th></tr><tr><td style=\"font-family: sans-serif; border: 1px solid rgb(0, 0, 0); font-size: 12px; vertical-align: baseline; background-color: rgb(204, 204, 255); font-weight: bold; color: rgb(0, 0, 0);\">memcached.compression_factor</td><td style=\"font-family: sans-serif; border: 1px solid rgb(0, 0, 0); font-size: 12px; vertical-align: baseline; background-color: rgb(204, 204, 204); color: rgb(0, 0, 0);\">1.3</td><td style=\"font-family: sans-serif; border: 1px solid rgb(0, 0, 0); font-size: 12px; vertical-align: baseline; background-color: rgb(204, 204, 204); color: rgb(0, 0, 0);\">1.3</td></tr><tr><td style=\"font-family: sans-serif; border: 1px solid rgb(0, 0, 0); font-size: 12px; vertical-align: baseline; background-color: rgb(204, 204, 255); font-weight: bold; color: rgb(0, 0, 0);\">memcached.compression_threshold</td><td style=\"font-family: sans-serif; border: 1px solid rgb(0, 0, 0); font-size: 12px; vertical-align: baseline; background-color: rgb(204, 204, 204); color: rgb(0, 0, 0);\">2000</td><td style=\"font-family: sans-serif; border: 1px solid rgb(0, 0, 0); font-size: 12px; vertical-align: baseline; background-color: rgb(204, 204, 204); color: rgb(0, 0, 0);\">2000</td></tr><tr><td style=\"font-family: sans-serif; border: 1px solid rgb(0, 0, 0); font-size: 12px; vertical-align: baseline; background-color: rgb(204, 204, 255); font-weight: bold; color: rgb(0, 0, 0);\">memcached.compression_type</td><td style=\"font-family: sans-serif; border: 1px solid rgb(0, 0, 0); font-size: 12px; vertical-align: baseline; background-color: rgb(204, 204, 204); color: rgb(0, 0, 0);\">fastlz</td><td style=\"font-family: sans-serif; border: 1px solid rgb(0, 0, 0); font-size: 12px; vertical-align: baseline; background-color: rgb(204, 204, 204); color: rgb(0, 0, 0);\">fastlz</td></tr><tr><td style=\"font-family: sans-serif; border: 1px solid rgb(0, 0, 0); font-size: 12px; vertical-align: baseline; background-color: rgb(204, 204, 255); font-weight: bold; color: rgb(0, 0, 0);\">memcached.serializer</td><td style=\"font-family: sans-serif; border: 1px solid rgb(0, 0, 0); font-size: 12px; vertical-align: baseline; background-color: rgb(204, 204, 204); color: rgb(0, 0, 0);\">php</td><td style=\"font-family: sans-serif; border: 1px solid rgb(0, 0, 0); font-size: 12px; vertical-align: baseline; background-color: rgb(204, 204, 204); color: rgb(0, 0, 0);\">php</td></tr><tr><td style=\"font-family: sans-serif; border: 1px solid rgb(0, 0, 0); font-size: 12px; vertical-align: baseline; background-color: rgb(204, 204, 255); font-weight: bold; color: rgb(0, 0, 0);\">memcached.sess_binary</td><td style=\"font-family: sans-serif; border: 1px solid rgb(0, 0, 0); font-size: 12px; vertical-align: baseline; background-color: rgb(204, 204, 204); color: rgb(0, 0, 0);\">0</td><td style=\"font-family: sans-serif; border: 1px solid rgb(0, 0, 0); font-size: 12px; vertical-align: baseline; background-color: rgb(204, 204, 204); color: rgb(0, 0, 0);\">0</td></tr><tr><td style=\"font-family: sans-serif; border: 1px solid rgb(0, 0, 0); font-size: 12px; vertical-align: baseline; background-color: rgb(204, 204, 255); font-weight: bold; color: rgb(0, 0, 0);\">memcached.sess_connect_timeout</td><td style=\"font-family: sans-serif; border: 1px solid rgb(0, 0, 0); font-size: 12px; vertical-align: baseline; background-color: rgb(204, 204, 204); color: rgb(0, 0, 0);\">1000</td><td style=\"font-family: sans-serif; border: 1px solid rgb(0, 0, 0); font-size: 12px; vertical-align: baseline; background-color: rgb(204, 204, 204); color: rgb(0, 0, 0);\">1000</td></tr><tr><td style=\"font-family: sans-serif; border: 1px solid rgb(0, 0, 0); font-size: 12px; vertical-align: baseline; background-color: rgb(204, 204, 255); font-weight: bold; color: rgb(0, 0, 0);\">memcached.sess_consistent_hash</td><td style=\"font-family: sans-serif; border: 1px solid rgb(0, 0, 0); font-size: 12px; vertical-align: baseline; background-color: rgb(204, 204, 204); color: rgb(0, 0, 0);\">0</td><td style=\"font-family: sans-serif; border: 1px solid rgb(0, 0, 0); font-size: 12px; vertical-align: baseline; background-color: rgb(204, 204, 204); color: rgb(0, 0, 0);\">0</td></tr><tr><td style=\"font-family: sans-serif; border: 1px solid rgb(0, 0, 0); font-size: 12px; vertical-align: baseline; background-color: rgb(204, 204, 255); font-weight: bold; color: rgb(0, 0, 0);\">memcached.sess_lock_expire</td><td style=\"font-family: sans-serif; border: 1px solid rgb(0, 0, 0); font-size: 12px; vertical-align: baseline; background-color: rgb(204, 204, 204); color: rgb(0, 0, 0);\">0</td><td style=\"font-family: sans-serif; border: 1px solid rgb(0, 0, 0); font-size: 12px; vertical-align: baseline; background-color: rgb(204, 204, 204); color: rgb(0, 0, 0);\">0</td></tr><tr><td style=\"font-family: sans-serif; border: 1px solid rgb(0, 0, 0); font-size: 12px; vertical-align: baseline; background-color: rgb(204, 204, 255); font-weight: bold; color: rgb(0, 0, 0);\">memcached.sess_lock_max_wait</td><td style=\"font-family: sans-serif; border: 1px solid rgb(0, 0, 0); font-size: 12px; vertical-align: baseline; background-color: rgb(204, 204, 204); color: rgb(0, 0, 0);\">0</td><td style=\"font-family: sans-serif; border: 1px solid rgb(0, 0, 0); font-size: 12px; vertical-align: baseline; background-color: rgb(204, 204, 204); color: rgb(0, 0, 0);\">0</td></tr><tr><td style=\"font-family: sans-serif; border: 1px solid rgb(0, 0, 0); font-size: 12px; vertical-align: baseline; background-color: rgb(204, 204, 255); font-weight: bold; color: rgb(0, 0, 0);\">memcached.sess_lock_wait</td><td style=\"font-family: sans-serif; border: 1px solid rgb(0, 0, 0); font-size: 12px; vertical-align: baseline; background-color: rgb(204, 204, 204); color: rgb(0, 0, 0);\">150000</td><td style=\"font-family: sans-serif; border: 1px solid rgb(0, 0, 0); font-size: 12px; vertical-align: baseline; background-color: rgb(204, 204, 204); color: rgb(0, 0, 0);\">150000</td></tr><tr><td style=\"font-family: sans-serif; border: 1px solid rgb(0, 0, 0); font-size: 12px; vertical-align: baseline; background-color: rgb(204, 204, 255); font-weight: bold; color: rgb(0, 0, 0);\">memcached.sess_locking</td><td style=\"font-family: sans-serif; border: 1px solid rgb(0, 0, 0); font-size: 12px; vertical-align: baseline; background-color: rgb(204, 204, 204); color: rgb(0, 0, 0);\">1</td><td style=\"font-family: sans-serif; border: 1px solid rgb(0, 0, 0); font-size: 12px; vertical-align: baseline; background-color: rgb(204, 204, 204); color: rgb(0, 0, 0);\">1</td></tr><tr><td style=\"font-family: sans-serif; border: 1px solid rgb(0, 0, 0); font-size: 12px; vertical-align: baseline; background-color: rgb(204, 204, 255); font-weight: bold; color: rgb(0, 0, 0);\">memcached.sess_number_of_replicas</td><td style=\"font-family: sans-serif; border: 1px solid rgb(0, 0, 0); font-size: 12px; vertical-align: baseline; background-color: rgb(204, 204, 204); color: rgb(0, 0, 0);\">0</td><td style=\"font-family: sans-serif; border: 1px solid rgb(0, 0, 0); font-size: 12px; vertical-align: baseline; background-color: rgb(204, 204, 204); color: rgb(0, 0, 0);\">0</td></tr><tr><td style=\"font-family: sans-serif; border: 1px solid rgb(0, 0, 0); font-size: 12px; vertical-align: baseline; background-color: rgb(204, 204, 255); font-weight: bold; color: rgb(0, 0, 0);\">memcached.sess_prefix</td><td style=\"font-family: sans-serif; border: 1px solid rgb(0, 0, 0); font-size: 12px; vertical-align: baseline; background-color: rgb(204, 204, 204); color: rgb(0, 0, 0);\">memc.sess.key.</td><td style=\"font-family: sans-serif; border: 1px solid rgb(0, 0, 0); font-size: 12px; vertical-align: baseline; background-color: rgb(204, 204, 204); color: rgb(0, 0, 0);\">memc.sess.key.</td></tr><tr><td style=\"font-family: sans-serif; border: 1px solid rgb(0, 0, 0); font-size: 12px; vertical-align: baseline; background-color: rgb(204, 204, 255); font-weight: bold; color: rgb(0, 0, 0);\">memcached.sess_randomize_replica_read</td><td style=\"font-family: sans-serif; border: 1px solid rgb(0, 0, 0); font-size: 12px; vertical-align: baseline; background-color: rgb(204, 204, 204); color: rgb(0, 0, 0);\">0</td><td style=\"font-family: sans-serif; border: 1px solid rgb(0, 0, 0); font-size: 12px; vertical-align: baseline; background-color: rgb(204, 204, 204); color: rgb(0, 0, 0);\">0</td></tr><tr><td style=\"font-family: sans-serif; border: 1px solid rgb(0, 0, 0); font-size: 12px; vertical-align: baseline; background-color: rgb(204, 204, 255); font-weight: bold; color: rgb(0, 0, 0);\">memcached.sess_remove_failed</td><td style=\"font-family: sans-serif; border: 1px solid rgb(0, 0, 0); font-size: 12px; vertical-align: baseline; background-color: rgb(204, 204, 204); color: rgb(0, 0, 0);\">0</td><td style=\"font-family: sans-serif; border: 1px solid rgb(0, 0, 0); font-size: 12px; vertical-align: baseline; background-color: rgb(204, 204, 204); color: rgb(0, 0, 0);\">0</td></tr><tr><td style=\"font-family: sans-serif; border: 1px solid rgb(0, 0, 0); font-size: 12px; vertical-align: baseline; background-color: rgb(204, 204, 255); font-weight: bold; color: rgb(0, 0, 0);\">memcached.store_retry_count</td><td style=\"font-family: sans-serif; border: 1px solid rgb(0, 0, 0); font-size: 12px; vertical-align: baseline; background-color: rgb(204, 204, 204); color: rgb(0, 0, 0);\">2</td><td style=\"font-family: sans-serif; border: 1px solid rgb(0, 0, 0); font-size: 12px; vertical-align: baseline; background-color: rgb(204, 204, 204); color: rgb(0, 0, 0);\">2</td></tr></tbody></table><p><br/></p>', '1427022967');
INSERT INTO `bk_article_detail` VALUES ('47', '1', '60', '<p>安装请参考:<a target=\"_blank\" href=\"https://code.google.com/p/memcached/wiki/NewInstallFromSource\" rel=\"nofollow\">https://code.google.com/p/memcached/wiki/NewInstallFromSource</a><br/></p><p>安装memcached之前请先安装libevent-devel</p><pre class=\"brush:shell;toolbar: true; auto-links: false;\">yum&nbsp;install&nbsp;libevent-devel</pre><p><br/></p><p>开始安装</p><pre class=\"brush:shell;toolbar: true; auto-links: false;\">./configure&nbsp;--prefix=/usr/local/memcached\r\nmake&nbsp;&amp;&amp;&nbsp;make&nbsp;install</pre><p><br/></p><p>启动:</p><pre class=\"brush:shell;toolbar: true; auto-links: false;\">/usr/local/memcached/bin/memcached&nbsp;-d&nbsp;-m&nbsp;50&nbsp;-u&nbsp;root&nbsp;-l&nbsp;127.0.0.1&nbsp;-p&nbsp;11211</pre><p><br/></p><p>telnet测试:</p><p>先安装telnet如果没有telnet</p><pre class=\"brush:shell;toolbar: true; auto-links: false;\">yum&nbsp;install&nbsp;telnet</pre><p><br/></p><pre class=\"brush:shell;toolbar: true; auto-links: false;\">[root@localhost&nbsp;bin]#&nbsp;telnet&nbsp;127.0.0.1&nbsp;11211\r\nTrying&nbsp;127.0.0.1...\r\nConnected&nbsp;to&nbsp;127.0.0.1.\r\nEscape&nbsp;character&nbsp;is&nbsp;&#39;^]&#39;.\r\nset&nbsp;u&nbsp;0&nbsp;0&nbsp;3\r\nuuu\r\nSTORED\r\nget&nbsp;u\r\nVALUE&nbsp;u&nbsp;0&nbsp;3\r\nuuu\r\nEND</pre><p><br/></p><p><br/></p>', '1427023125');
INSERT INTO `bk_article_detail` VALUES ('48', '1', '61', '<p>1:安装过程,这里采用了yum的方式安装,编译的话有点麻烦。</p><pre class=\"brush:shell;toolbar: true; auto-links: false;\">[root@localhost&nbsp;data]#&nbsp;yum&nbsp;install&nbsp;subversion</pre><p><br/></p><p>执行以下的命令:</p><pre class=\"brush:shell;toolbar: true; auto-links: false;\">svn&nbsp;--version</pre><p><br/></p><p>如果显示</p><pre class=\"brush:shell;toolbar: true; auto-links: false;\">svn,&nbsp;version&nbsp;1.6.11&nbsp;(r934486)</pre><p><br/></p><p>之类的信息,那么代表安装成功了。<br/></p><p>2、建立版本库</p><p>首先我们建立一个文件夹来专门存放svn项目,如下<br/></p><pre class=\"brush:shell;toolbar: true; auto-links: false;\">[root@localhost&nbsp;data]#&nbsp;mkdir&nbsp;/data</pre><p><br/></p><p>我们使用命令建立两个项目:</p><pre class=\"brush:shell;toolbar: true; auto-links: false;\">[root@localhost&nbsp;data]#&nbsp;svnadmin&nbsp;create&nbsp;/data/onethink\r\n[root@localhost&nbsp;data]#&nbsp;svnadmin&nbsp;create&nbsp;/data/p2</pre><p><br/></p><p>此时会在文件夹/data/下面生成两个项目onethink和p2,目录结构如下:</p><pre class=\"brush:shell;toolbar: true; auto-links: false;\">drwxr-xr-x.&nbsp;6&nbsp;root&nbsp;root&nbsp;4096&nbsp;May&nbsp;23&nbsp;22:10&nbsp;onethink\r\ndrwxr-xr-x.&nbsp;6&nbsp;root&nbsp;root&nbsp;4096&nbsp;May&nbsp;24&nbsp;01:06&nbsp;p2</pre><p><br/></p><p>每个项目的目录结构如下:</p><pre class=\"brush:shell;toolbar: true; auto-links: false;\">drwxr-xr-x.&nbsp;2&nbsp;root&nbsp;root&nbsp;4096&nbsp;May&nbsp;24&nbsp;01:15&nbsp;conf\r\ndrwxr-sr-x.&nbsp;6&nbsp;root&nbsp;root&nbsp;4096&nbsp;May&nbsp;24&nbsp;01:24&nbsp;db\r\n-r--r--r--.&nbsp;1&nbsp;root&nbsp;root&nbsp;&nbsp;&nbsp;&nbsp;2&nbsp;May&nbsp;24&nbsp;01:06&nbsp;format\r\ndrwxr-xr-x.&nbsp;2&nbsp;root&nbsp;root&nbsp;4096&nbsp;May&nbsp;24&nbsp;01:06&nbsp;hooks\r\ndrwxr-xr-x.&nbsp;2&nbsp;root&nbsp;root&nbsp;4096&nbsp;May&nbsp;24&nbsp;01:06&nbsp;locks\r\n-rw-r--r--.&nbsp;1&nbsp;root&nbsp;root&nbsp;&nbsp;229&nbsp;May&nbsp;24&nbsp;01:06&nbsp;README.txt</pre><p><br/></p><p>其中 conf 文件夹中的三个文件为svn的配置文件,包括:</p><pre class=\"brush:shell;toolbar: true; auto-links: false;\">-rw-r--r--.&nbsp;1&nbsp;root&nbsp;root&nbsp;1093&nbsp;May&nbsp;&nbsp;7&nbsp;06:41&nbsp;authz\r\n-rw-r--r--.&nbsp;1&nbsp;root&nbsp;root&nbsp;&nbsp;320&nbsp;May&nbsp;&nbsp;7&nbsp;06:39&nbsp;passwd\r\n-rw-r--r--.&nbsp;1&nbsp;root&nbsp;root&nbsp;2259&nbsp;May&nbsp;&nbsp;7&nbsp;06:43&nbsp;svnserve.conf</pre><p><br/></p><p>其中authz为权限文件,passwd为用户验证文件,svnserve.conf为项目配置文件。为了方便我们把authz passwd这两个文件独立开来,成为每个项目的公用权限和验证文件。我们把它们放在/data/conf目录下。</p><p>此时的目录结构如下:</p><pre class=\"brush:shell;toolbar: true; auto-links: false;\">drwxr-xr-x.&nbsp;2&nbsp;root&nbsp;root&nbsp;4096&nbsp;May&nbsp;24&nbsp;01:26&nbsp;conf\r\ndrwxr-xr-x.&nbsp;6&nbsp;root&nbsp;root&nbsp;4096&nbsp;May&nbsp;23&nbsp;22:10&nbsp;onethink\r\ndrwxr-xr-x.&nbsp;6&nbsp;root&nbsp;root&nbsp;4096&nbsp;May&nbsp;24&nbsp;01:06&nbsp;p2</pre><p><br/></p><pre class=\"brush:shell;toolbar: true; auto-links: false;\">[root@localhost&nbsp;data]#&nbsp;ll&nbsp;conf&nbsp;onethink/&nbsp;p2/\r\nconf:\r\ntotal&nbsp;8\r\n-rw-r--r--.&nbsp;1&nbsp;root&nbsp;root&nbsp;1031&nbsp;May&nbsp;24&nbsp;01:24&nbsp;authz\r\n-rw-r--r--.&nbsp;1&nbsp;root&nbsp;root&nbsp;&nbsp;338&nbsp;May&nbsp;23&nbsp;22:08&nbsp;passwd\r\n\r\nonethink/:\r\ntotal&nbsp;24\r\ndrwxr-xr-x.&nbsp;2&nbsp;root&nbsp;root&nbsp;4096&nbsp;May&nbsp;23&nbsp;22:56&nbsp;conf\r\ndrwxr-sr-x.&nbsp;6&nbsp;root&nbsp;root&nbsp;4096&nbsp;May&nbsp;24&nbsp;01:18&nbsp;db\r\n-r--r--r--.&nbsp;1&nbsp;root&nbsp;root&nbsp;&nbsp;&nbsp;&nbsp;2&nbsp;May&nbsp;23&nbsp;21:50&nbsp;format\r\ndrwxr-xr-x.&nbsp;2&nbsp;root&nbsp;root&nbsp;4096&nbsp;May&nbsp;23&nbsp;21:50&nbsp;hooks\r\ndrwxr-xr-x.&nbsp;2&nbsp;root&nbsp;root&nbsp;4096&nbsp;May&nbsp;23&nbsp;21:50&nbsp;locks\r\n-rw-r--r--.&nbsp;1&nbsp;root&nbsp;root&nbsp;&nbsp;229&nbsp;May&nbsp;23&nbsp;21:50&nbsp;README.txt\r\n\r\np2/:\r\ntotal&nbsp;24\r\ndrwxr-xr-x.&nbsp;2&nbsp;root&nbsp;root&nbsp;4096&nbsp;May&nbsp;24&nbsp;01:15&nbsp;conf\r\ndrwxr-sr-x.&nbsp;6&nbsp;root&nbsp;root&nbsp;4096&nbsp;May&nbsp;24&nbsp;01:24&nbsp;db\r\n-r--r--r--.&nbsp;1&nbsp;root&nbsp;root&nbsp;&nbsp;&nbsp;&nbsp;2&nbsp;May&nbsp;24&nbsp;01:06&nbsp;format\r\ndrwxr-xr-x.&nbsp;2&nbsp;root&nbsp;root&nbsp;4096&nbsp;May&nbsp;24&nbsp;01:06&nbsp;hooks\r\ndrwxr-xr-x.&nbsp;2&nbsp;root&nbsp;root&nbsp;4096&nbsp;May&nbsp;24&nbsp;01:06&nbsp;locks\r\n-rw-r--r--.&nbsp;1&nbsp;root&nbsp;root&nbsp;&nbsp;229&nbsp;May&nbsp;24&nbsp;01:06&nbsp;README.txt</pre><p><br/></p><p>接下来我们配置用户名及密码</p><p>打开/data/conf/passwd文件,增加两个用户</p><pre class=\"brush:shell;toolbar: true; auto-links: false;\">[root@localhost&nbsp;conf]#&nbsp;cat&nbsp;passwd&nbsp;\r\n###&nbsp;This&nbsp;file&nbsp;is&nbsp;an&nbsp;example&nbsp;password&nbsp;file&nbsp;for&nbsp;svnserve.\r\n###&nbsp;Its&nbsp;format&nbsp;is&nbsp;similar&nbsp;to&nbsp;that&nbsp;of&nbsp;svnserve.conf.&nbsp;As&nbsp;shown&nbsp;in&nbsp;the\r\n###&nbsp;example&nbsp;below&nbsp;it&nbsp;contains&nbsp;one&nbsp;section&nbsp;labelled&nbsp;[users].\r\n###&nbsp;The&nbsp;name&nbsp;and&nbsp;password&nbsp;for&nbsp;each&nbsp;user&nbsp;follow,&nbsp;one&nbsp;account&nbsp;per&nbsp;line.\r\n\r\n[users]\r\n#&nbsp;harry&nbsp;=&nbsp;harryssecret\r\n#&nbsp;sally&nbsp;=&nbsp;sallyssecret\r\ntttt&nbsp;=&nbsp;111111&nbsp;&nbsp;#用户1\r\ntttt2&nbsp;=&nbsp;111111&nbsp;&nbsp;&nbsp;#用户2</pre><p><br/></p><p>接着我们设置项目onethink和p2下面的conf/svnserve.conf文件,令到它可以使用公共的/data/conf/passwd及/data/conf/authz</p><pre class=\"brush:shell;toolbar: true; auto-links: false;\">anon-access&nbsp;=&nbsp;none&nbsp;//无权限时\r\nauth-access&nbsp;=&nbsp;write&nbsp;//有权限时\r\n###&nbsp;The&nbsp;password-db&nbsp;option&nbsp;controls&nbsp;the&nbsp;location&nbsp;of&nbsp;the&nbsp;password\r\n###&nbsp;database&nbsp;file.&nbsp;&nbsp;Unless&nbsp;you&nbsp;specify&nbsp;a&nbsp;path&nbsp;starting&nbsp;with&nbsp;a&nbsp;/,\r\n###&nbsp;the&nbsp;file&#39;s&nbsp;location&nbsp;is&nbsp;relative&nbsp;to&nbsp;the&nbsp;directory&nbsp;containing\r\n###&nbsp;this&nbsp;configuration&nbsp;file.\r\n###&nbsp;If&nbsp;SASL&nbsp;is&nbsp;enabled&nbsp;(see&nbsp;below),&nbsp;this&nbsp;file&nbsp;will&nbsp;NOT&nbsp;be&nbsp;used.\r\n###&nbsp;Uncomment&nbsp;the&nbsp;line&nbsp;below&nbsp;to&nbsp;use&nbsp;the&nbsp;default&nbsp;password&nbsp;file.\r\npassword-db&nbsp;=&nbsp;/data/conf/passwd&nbsp;//所使用的用户密码文件\r\n###&nbsp;The&nbsp;authz-db&nbsp;option&nbsp;controls&nbsp;the&nbsp;location&nbsp;of&nbsp;the&nbsp;authorization\r\n###&nbsp;rules&nbsp;for&nbsp;path-based&nbsp;access&nbsp;control.&nbsp;&nbsp;Unless&nbsp;you&nbsp;specify&nbsp;a&nbsp;path\r\n###&nbsp;starting&nbsp;with&nbsp;a&nbsp;/,&nbsp;the&nbsp;file&#39;s&nbsp;location&nbsp;is&nbsp;relative&nbsp;to&nbsp;the&nbsp;the\r\n###&nbsp;directory&nbsp;containing&nbsp;this&nbsp;file.&nbsp;&nbsp;If&nbsp;you&nbsp;don&#39;t&nbsp;specify&nbsp;an\r\n###&nbsp;authz-db,&nbsp;no&nbsp;path-based&nbsp;access&nbsp;control&nbsp;is&nbsp;done.\r\n###&nbsp;Uncomment&nbsp;the&nbsp;line&nbsp;below&nbsp;to&nbsp;use&nbsp;the&nbsp;default&nbsp;authorization&nbsp;file.\r\nauthz-db&nbsp;=&nbsp;/data/conf/authz&nbsp;//权限管理文件\r\n###&nbsp;This&nbsp;option&nbsp;specifies&nbsp;the&nbsp;authentication&nbsp;realm&nbsp;of&nbsp;the&nbsp;repository.\r\n###&nbsp;If&nbsp;two&nbsp;repositories&nbsp;have&nbsp;the&nbsp;same&nbsp;authentication&nbsp;realm,&nbsp;they&nbsp;should\r\n###&nbsp;have&nbsp;the&nbsp;same&nbsp;password&nbsp;database,&nbsp;and&nbsp;vice&nbsp;versa.&nbsp;&nbsp;The&nbsp;default&nbsp;realm\r\n###&nbsp;is&nbsp;repository&#39;s&nbsp;uuid.\r\nrealm&nbsp;=&nbsp;p2&nbsp;//貌似这个叫什么来着?</pre><p><br/></p><p>配置好后,我们还需要配置/data/conf/authz权限管理文件</p><pre class=\"brush:shell;toolbar: true; auto-links: false;\">[groups]\r\ng1&nbsp;=&nbsp;tttt&nbsp;#用户组1\r\ng2&nbsp;=&nbsp;tttt2&nbsp;#用户组2\r\n\r\n[onethink:/]&nbsp;#onethink项目的权限设置\r\n@g1&nbsp;=&nbsp;rw&nbsp;#onethink项目组,用户组1是有读写的\r\n@g2&nbsp;=&nbsp;#onethink项目组,用户组2是没有任何权限的\r\n\r\n[p2:/]&nbsp;#p2项目组的权限,同上\r\n@g2=&nbsp;rw\r\n\r\n[p2:/txt]&nbsp;#配置p2项目下的txt文件夹的权限,这里用户组2是没有权限的\r\n@g2=</pre><p><br/></p><p>配置好后,我们启动svn服务</p><pre class=\"brush:shell;toolbar: true; auto-links: false;\">[root@localhost&nbsp;conf]#&nbsp;svnserve&nbsp;-d&nbsp;-r&nbsp;/data/</pre><p><br/></p><p>这时我们在window环境下就可以使用软件来访问了,两个项目的访问地址分别为</p><p>svn://192.168.110.129/p2</p><p>svn://192.168.110.129/onethink</p>', '1427023296');
INSERT INTO `bk_article_detail` VALUES ('49', '1', '62', '<p>1、下载sphinx:</p><pre class=\"brush:bash;toolbar:false\">wget&nbsp;http://sphinxsearch.com/files/sphinx-2.2.8-release.tar.gz</pre><p>2、开始编译</p><pre class=\"brush:bash;toolbar:false\">$&nbsp;tar&nbsp;xzvf&nbsp;sphinx-2.2.8-release.tar.gz\r\n$&nbsp;cd&nbsp;sphinx\r\n$&nbsp;./configure\r\n$&nbsp;make\r\n$&nbsp;make&nbsp;install</pre><p>编译的时候有几个参数可以选择,我安装的时候是默认的,没有加以下任何的参数:</p><pre class=\"brush:bash;toolbar:false\">There&#39;s&nbsp;a&nbsp;number&nbsp;of&nbsp;options&nbsp;to&nbsp;configure.&nbsp;The&nbsp;complete&nbsp;listing&nbsp;may&nbsp;be&nbsp;obtained&nbsp;by&nbsp;using&nbsp;--help&nbsp;switch.&nbsp;The&nbsp;most&nbsp;important&nbsp;ones&nbsp;are:\r\n\r\n--prefix,&nbsp;which&nbsp;specifies&nbsp;where&nbsp;to&nbsp;install&nbsp;Sphinx;&nbsp;such&nbsp;as&nbsp;--prefix=/usr/local/sphinx&nbsp;(all&nbsp;of&nbsp;the&nbsp;examples&nbsp;use&nbsp;this&nbsp;prefix)\r\n\r\n--with-mysql,&nbsp;which&nbsp;specifies&nbsp;where&nbsp;to&nbsp;look&nbsp;for&nbsp;MySQL&nbsp;include&nbsp;and&nbsp;library&nbsp;files,&nbsp;if&nbsp;auto-detection&nbsp;fails;\r\n\r\n--with-static-mysql,&nbsp;which&nbsp;builds&nbsp;Sphinx&nbsp;with&nbsp;statically&nbsp;linked&nbsp;MySQL&nbsp;support;\r\n\r\n--with-pgsql,&nbsp;which&nbsp;specifies&nbsp;where&nbsp;to&nbsp;look&nbsp;for&nbsp;PostgreSQL&nbsp;include&nbsp;and&nbsp;library&nbsp;files.\r\n\r\n--with-static-pgsql,&nbsp;which&nbsp;builds&nbsp;Sphinx&nbsp;with&nbsp;statically&nbsp;linked&nbsp;PostgreSQL&nbsp;support;</pre><p>如果想知道,安装的文件在哪?可以使用以下的命令查看:</p><pre class=\"brush:bash;toolbar:false\">$&nbsp;./configure&nbsp;--help</pre><p>如果你下载的是rpm包可以使用以下命令查看安装路径:</p><pre class=\"brush:bash;toolbar:false\">$&nbsp;rpm&nbsp;-qpl&nbsp;sphinx-2.2.8-1.rhel7.x86_64.rpm&nbsp;#查看文件安装在哪</pre><p>3、配置文件在/usr/local/etc/sphinx.conf,默认这个文件不存在,但是/usr/local/etc/目录下有sphinx.conf.dist</p><pre class=\"brush:bash;toolbar:false\">copy&nbsp;sphinx.conf.dist&nbsp;sphinx.conf</pre><p>配置文件简单的如下:</p><pre class=\"brush:bash;toolbar:false\">#源\r\nsource&nbsp;mrblog_article\r\n{\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;type&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;mysql\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sql_host&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;localhost\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sql_user&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;root\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sql_pass&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;qqq111!!!\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sql_db&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;mrblog\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sql_port&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;3306\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sql_query_pre&nbsp;&nbsp;&nbsp;=&nbsp;SET&nbsp;NAMES&nbsp;utf8\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sql_sock&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;/tmp/mysql.sock\r\n\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sql_query&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;\\\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SELECT&nbsp;id,&nbsp;article_id,&nbsp;title,&nbsp;summary,&nbsp;content,&nbsp;added_date&nbsp;\\\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;FROM&nbsp;bk_search_index\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;##WARNING:&nbsp;attribute&nbsp;&#39;id&#39;&nbsp;not&nbsp;found&nbsp;-&nbsp;IGNORING\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#出现这个的原因是因为不能使用主键,且上面的查询语句默认且必需第一个字段是id\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sql_attr_uint&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;article_id&nbsp;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sql_attr_timestamp&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;added_date\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sql_ranged_throttle&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;100\r\n}\r\n#索引\r\nindex&nbsp;mrblog_article_1\r\n{\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;source&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;mrblog_article\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;path&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;/alidata/sphinx/data/mrblog_article_1\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;docinfo&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;extern\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dict&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;keywords\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mlock&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;0\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;morphology&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;none\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;min_word_len&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;1\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ngram_len&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;1\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ngram_chars&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;U+3000..U+2FA1F\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;html_strip&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;100\r\n}\r\n\r\n\r\nsource&nbsp;mrblog_articlethrottled&nbsp;:&nbsp;mrblog_article\r\n{\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sql_ranged_throttle&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;100\r\n}\r\n\r\nindex&nbsp;rt\r\n{\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;type&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;rt\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;path&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;/alidata/sphinx/data/rt\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rt_field&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;title\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rt_field&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;content\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rt_attr_uint&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;gid\r\n}\r\n\r\nindexer\r\n{\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mem_limit&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;128M\r\n}\r\n\r\nsearchd\r\n{\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;listen&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;9312\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;log&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;/alidata/sphinx/log/searchd.log\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;query_log&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;/alidata/sphinx/log/query.log\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;read_timeout&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;5\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;client_timeout&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;300\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;max_children&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;30\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;persistent_connections_limit&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;30\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pid_file&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;/alidata/sphinx/data/searchd.pid\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;preopen_indexes&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;1\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;unlink_old&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;1\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mva_updates_pool&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;1M\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;max_packet_size&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;8M\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;max_filters&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;256\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;max_filter_values&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;4096\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;max_batch_queries&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;32\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;workers&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;threads&nbsp;#&nbsp;for&nbsp;RT&nbsp;to&nbsp;work\r\n}\r\n\r\ncommon\r\n{\r\n\r\n}</pre><p>4、生成索引</p><pre class=\"brush:bash;toolbar:false\">/usr/local/bin/indexer&nbsp;--config&nbsp;/usr/local/etc/sphinx.conf&nbsp;--all&nbsp;--rotate</pre><p>6、启动sphinx</p><pre class=\"brush:bash;toolbar:false\">/usr/local/bin/searchd&nbsp;--config&nbsp;/usr/local/etc/sphinx.conf</pre><p>7、安装php扩展:请移步:<a textvalue=\"http://www.opcache.net/index/detail.html?id=63\" target=\"_self\" href=\"http://www.opcache.net/index/detail.html?id=63\">http://www.opcache.net/index/detail.html?id=63</a></p><p>8、php如果处理,请移步:<a _src=\"http://www.opcache.net/index/detail.html?id=64\" href=\"http://www.opcache.net/index/detail.html?id=64\">http://www.opcache.net/index/detail.html?id=64</a>&nbsp; <br/></p>', '1427186776');
INSERT INTO `bk_article_detail` VALUES ('50', '1', '63', '<p>1、下载文件</p><pre class=\"brush:bash;toolbar:false\">wget&nbsp;http://pecl.php.net/get/sphinx-1.3.2.tgz</pre><p>2、编译安装</p><pre class=\"brush:bash;toolbar:false\">tar&nbsp;xzf&nbsp;sphinx-1.3.2.tgz&nbsp;\r\nphpize&nbsp;#或正确的phpize完整命令\r\n./configure</pre><p>如果在执行configure命令的时候出错:</p><pre class=\"brush:bash;toolbar:false\">configure:&nbsp;error:&nbsp;Cannot&nbsp;find&nbsp;libsphinxclient&nbsp;headers</pre><p>那么在sphinx的安装包中(<a _src=\"http://www.opcache.net/index/detail.html?id=62\" href=\"http://www.opcache.net/index/detail.html?id=62\">http://www.opcache.net/index/detail.html?id=62</a> 中的安装包 )有</p><pre class=\"brush:bash;toolbar:false\">/sphinx-2.2.8-release/api/libsphinxclient/</pre><p>进入到这个目录</p><pre class=\"brush:bash;toolbar:false\">cd&nbsp;你的目录/sphinx-2.2.8-release/api/libsphinxclient/</pre><p>安装libsphinxclient</p><pre class=\"brush:bash;toolbar:false\">./configure\r\nmake&nbsp;&amp;&amp;&nbsp;make&nbsp;install</pre><p>安装完成后继续安装php的sphinx扩展,请返回刚才的路径下</p><pre class=\"brush:bash;toolbar:false\">./configure&nbsp;--with-php-config=/alidata/server/php/bin/php-config\r\nmake\r\nmake&nbsp;install</pre><p>到此安装成功。</p><p>3、如果想知道如何安装sphinx,请移步:<a _src=\"http://www.opcache.net/index/detail.html?id=62\" href=\"http://www.opcache.net/index/detail.html?id=62\">http://www.opcache.net/index/detail.html?id=62</a> <br/></p><p>如果想知道php中如何处理:请移步:<a _src=\"http://www.opcache.net/index/detail.html?id=64\" href=\"http://www.opcache.net/index/detail.html?id=64\">http://www.opcache.net/index/detail.html?id=64</a>&nbsp;</p>', '1427187494');
INSERT INTO `bk_article_detail` VALUES ('51', '1', '64', '<p><span style=\"color: rgb(51, 51, 51); font-family: 微软雅黑, Verdana, sans-serif, 宋体; font-size: 13px; line-height: 23px; background-color: rgb(255, 255, 255);\">最近在使用程序生成缓存的时候发现有时候生成成功,有时候生成不成功?</span></p><p><span style=\"color: rgb(51, 51, 51); font-family: 微软雅黑, Verdana, sans-serif, 宋体; font-size: 13px; line-height: 23px; background-color: rgb(255, 255, 255);\">检查程序是没有问题的。</span></p><p><span style=\"color: rgb(51, 51, 51); font-family: 微软雅黑, Verdana, sans-serif, 宋体; font-size: 13px; line-height: 23px; background-color: rgb(255, 255, 255);\">最后查出是因为有脚本在以root用户来跑PHP脚本生成同一个缓存文件。</span></p><p><span style=\"color: rgb(51, 51, 51); font-family: 微软雅黑, Verdana, sans-serif, 宋体; font-size: 13px; line-height: 23px; background-color: rgb(255, 255, 255);\">而我们访问apache的用户是却是www。</span></p><p><span style=\"color: rgb(51, 51, 51); font-family: 微软雅黑, Verdana, sans-serif, 宋体; font-size: 13px; line-height: 23px; background-color: rgb(255, 255, 255);\">比如:</span></p><p><span style=\"color: rgb(51, 51, 51); font-family: 微软雅黑, Verdana, sans-serif, 宋体; font-size: 13px; line-height: 23px; background-color: rgb(255, 255, 255);\">当我们在使用某一系统功能的时候,会生成一个缓存文件,并对这个文件有写的权限。</span></p><p><span style=\"color: rgb(51, 51, 51); font-family: 微软雅黑, Verdana, sans-serif, 宋体; font-size: 13px; line-height: 23px; background-color: rgb(255, 255, 255);\">但是由于某种原因,我们需要一个定时任务来定时更新这个缓存文件。但是由于在跑脚本的时候用的是root的用户来跑的,而因为<span style=\"color: rgb(51, 51, 51); font-family: 微软雅黑, Verdana, sans-serif, 宋体; font-size: 13px; line-height: 23px; background-color: rgb(255, 255, 255);\">root的umask原因,创建文件的时候会会减掉权限0022,即755。这样的一个缓存文件,当apache用www用户再来生成的时候,会因为没有写的权限而更新失败。</span></span></p>', '1427206381');
INSERT INTO `bk_article_detail` VALUES ('52', '1', '65', '<pre class=\"brush:php;toolbar:false\">$handler&nbsp;=&nbsp;new&nbsp;FileSessionHandler();\r\nsession_set_save_handler(\r\n&nbsp;&nbsp;&nbsp;&nbsp;array($handler,&nbsp;&#39;open&#39;),\r\n&nbsp;&nbsp;&nbsp;&nbsp;array($handler,&nbsp;&#39;close&#39;),\r\n&nbsp;&nbsp;&nbsp;&nbsp;array($handler,&nbsp;&#39;read&#39;),\r\n&nbsp;&nbsp;&nbsp;&nbsp;array($handler,&nbsp;&#39;write&#39;),\r\n&nbsp;&nbsp;&nbsp;&nbsp;array($handler,&nbsp;&#39;destroy&#39;),\r\n&nbsp;&nbsp;&nbsp;&nbsp;array($handler,&nbsp;&#39;gc&#39;)\r\n);\r\n&nbsp;\r\n//&nbsp;这个是重点关键处,如果没有加这个语句,那么可能会有机率造成nginx&nbsp;502的问题。\r\nregister_shutdown_function(&#39;session_write_close&#39;);\r\n&nbsp;\r\nsession_start();</pre><p>手册里有说明:</p><p><a href=\"http://cn2.php.net/manual/zh/function.session-set-save-handler.php#refsect1-function.session-set-save-handler-notes\" _src=\"http://cn2.php.net/manual/zh/function.session-set-save-handler.php#refsect1-function.session-set-save-handler-notes\" style=\"color: rgb(255, 0, 0); text-decoration: underline;\"><span style=\"color: rgb(255, 0, 0);\">http://cn2.php.net/manual/zh/function.session-set-save-handler.php#refsect1-function.session-set-save-handler-notes</span></a><span style=\"color: rgb(255, 0, 0);\">&nbsp;</span></p>', '1427206635');
INSERT INTO `bk_article_detail` VALUES ('53', '1', '66', '<p style=\"padding: 0px; margin-top: 8px; margin-bottom: 8px; line-height: 23px; font-size: 13px; color: rgb(51, 51, 51); font-family: 微软雅黑, Verdana, sans-serif, 宋体; white-space: normal; background-color: rgb(255, 255, 255);\">解决方法:</p><pre class=\"brush:bash;toolbar:false\">rpm&nbsp;--import&nbsp;/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6</pre><p style=\"padding: 0px; margin-top: 8px; margin-bottom: 8px; line-height: 23px; font-size: 13px; color: rgb(51, 51, 51); font-family: 微软雅黑, Verdana, sans-serif, 宋体; white-space: normal; background-color: rgb(255, 255, 255);\">后面的6要和你当前的系统版本有关</p><p><br/></p>', '1427206838');
INSERT INTO `bk_article_detail` VALUES ('54', '1', '67', '<p>1、如何在更新svn代码的时候同时更新和svn同一台机的web程序。</p><p>解决:在仓库目录hooks下建立一个文件post-commit增加以下内容</p><pre class=\"brush:bash;toolbar:false\">#!/bin/sh\r\nexport.UTF-8\r\nsvn&nbsp;update&nbsp;--username&nbsp;xx&nbsp;--password&nbsp;xxxx&nbsp;/home/www/xx</pre><p>在使用这个代码之前,需要在路径/home/www/xx先把这个库拉下来,以后每次更新代码到svn的时候,会同时执行这段hooks代码。这样就可以同时更新web中的代码了。</p><p>2、如何在提交更新的时候强制写日志</p><p>解决:在hooks目录下执行下面的命令</p><pre class=\"brush:bash;toolbar:false\">cp&nbsp;pre-commit-tmpl&nbsp;pre-commit\r\nchmod&nbsp;+x&nbsp;pre-commit</pre><p>然后修改pre-commit文件</p><pre class=\"brush:bash;toolbar:false\">REPOS=&quot;$1&quot;\r\nTXN=&quot;$2&quot;\r\n&nbsp;\r\n#&nbsp;Make&nbsp;sure&nbsp;that&nbsp;the&nbsp;log&nbsp;message&nbsp;contains&nbsp;some&nbsp;text.\r\nSVNLOOK=/usr/bin/svnlook\r\nLOGMSG=`$SVNLOOK&nbsp;log&nbsp;-t&nbsp;&quot;$TXN&quot;&nbsp;&quot;$REPOS&quot;&nbsp;|&nbsp;grep&nbsp;&quot;[a-zA-Z0-9]&quot;&nbsp;|&nbsp;wc&nbsp;-c`\r\nif&nbsp;[&nbsp;&quot;$LOGMSG&quot;&nbsp;-lt&nbsp;10&nbsp;];\r\nthen\r\n&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;&#39;日志啊!亲!&#39;&nbsp;1&gt;&amp;2\r\n&nbsp;&nbsp;&nbsp;&nbsp;exit&nbsp;1\r\nfi\r\n&nbsp;\r\n#&nbsp;Check&nbsp;that&nbsp;the&nbsp;author&nbsp;of&nbsp;this&nbsp;commit&nbsp;has&nbsp;the&nbsp;rights&nbsp;to&nbsp;perform\r\n#&nbsp;the&nbsp;commit&nbsp;on&nbsp;the&nbsp;files&nbsp;and&nbsp;directories&nbsp;being&nbsp;modified.\r\n#&nbsp;commit-access-control.pl&nbsp;&quot;$REPOS&quot;&nbsp;&quot;$TXN&quot;&nbsp;commit-access-control.cfg&nbsp;||&nbsp;exit&nbsp;1\r\n&nbsp;\r\n#&nbsp;All&nbsp;checks&nbsp;passed,&nbsp;so&nbsp;allow&nbsp;the&nbsp;commit.\r\nexit&nbsp;0</pre><p><br/></p>', '1427207199');
INSERT INTO `bk_article_detail` VALUES ('55', '1', '68', '<p>js代码:</p><pre class=\"brush:js;toolbar:false\">&nbsp;&nbsp;ZeroClipboard.config({&nbsp;swfPath:&nbsp;&#39;/static/js/ZeroClipboard/ZeroClipboard.swf&#39;&nbsp;});&nbsp;&nbsp;\r\n&nbsp;\r\n&nbsp;&nbsp;function&nbsp;initCopy($o)&nbsp;{&nbsp;&nbsp;\r\n&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;text&nbsp;=&nbsp;$o.html();&nbsp;\r\n&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;k&nbsp;=&nbsp;$o.attr(&#39;ids&#39;);\r\n&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(text)&nbsp;{&nbsp;&nbsp;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;new&nbsp;ZeroClipboard($(&#39;#cpbtn&#39;+k)).on(&quot;copy&quot;,&nbsp;function&nbsp;(event)&nbsp;{&nbsp;&nbsp;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;clipboard&nbsp;=&nbsp;event.clipboardData;&nbsp;&nbsp;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;clipboard.setData(&quot;text/plain&quot;,&nbsp;text);&nbsp;&nbsp;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;alert(&#39;复制成功&#39;);&nbsp;&nbsp;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});&nbsp;&nbsp;\r\n&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;\r\n&nbsp;&nbsp;}&nbsp;&nbsp;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\r\n&nbsp;&nbsp;$(&#39;.cpcontent&#39;).each(function&nbsp;(i,&nbsp;o)&nbsp;{&nbsp;&nbsp;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;initCopy($(o));\r\n&nbsp;&nbsp;});</pre><p>html代码(实际中,可能有多段差不多的代码):</p><pre class=\"brush:html;toolbar:false\">&lt;span&nbsp;ids=&quot;1&quot;&nbsp;class=&quot;cpcontent&quot;&gt;所要复制的文字&lt;/span&gt;//文字\r\n&lt;input&nbsp;id=&quot;cpbtn1&quot;&nbsp;type=&quot;button&quot;&nbsp;class=&quot;chobtn&nbsp;btn&nbsp;cpbtn&quot;&nbsp;value=&quot;复制文本&quot;&nbsp;/&gt;//按钮</pre><pre class=\"brush:html;toolbar:false\">&lt;span&nbsp;ids=&quot;2&quot;&nbsp;class=&quot;cpcontent&quot;&gt;所要复制的文字&lt;/span&gt;//文字\r\n&lt;input&nbsp;id=&quot;cpbtn2&quot;&nbsp;type=&quot;button&quot;&nbsp;class=&quot;chobtn&nbsp;btn&nbsp;cpbtn&quot;&nbsp;value=&quot;复制文本&quot;&nbsp;/&gt;//按钮</pre><p>其中:</p><pre class=\"brush:js;toolbar:false\">$(&#39;.cpcontent&#39;)</pre><p>代表的是需要复制的文字<br/></p><pre class=\"brush:js;toolbar:false\">$(&#39;#cpbtn&#39;+k)</pre><p>代表是文字所绑定的复制按钮。<br/></p>', '1427207602');
INSERT INTO `bk_article_detail` VALUES ('56', '1', '69', '<pre class=\"brush:bash;toolbar:false\"><span style=\"font-family: sans-serif;\">wget http:</span><span style=\"font-family: sans-serif;\">//www.ex-parrot.com/~pdw/iftop/download/iftop-0.17.tar.gz</span><br/></pre><p>下载后解压<br/></p><pre class=\"brush:bash;toolbar:false\">tar&nbsp;xzf&nbsp;iftop-0.17.tar.gz</pre><p>安装必要的支持<br/></p><pre class=\"brush:bash;toolbar:false\">yum&nbsp;install&nbsp;libpcap&nbsp;flex&nbsp;byacc&nbsp;&nbsp;libpcap&nbsp;ncurses&nbsp;ncurses-devel&nbsp;libpcap-devel</pre><p>然后<br/></p><pre class=\"brush:bash;toolbar:false\">./configure&nbsp;\r\nmake\r\nmake&nbsp;install</pre><p>到些应该就好了。</p>', '1427207907');
INSERT INTO `bk_article_detail` VALUES ('57', '1', '70', '<p>在php安装源码的目录sapi/fpm/init.d.php-fpm里面的这个就是了。</p>', '1427208192');
INSERT INTO `bk_article_detail` VALUES ('58', '1', '71', '<p>第一次尝试用sphinx来做全文搜索,可能有很多见解都不是很正确。有不同的想法,大家可以提出来。<br/></p><p>现在版本的sphinx不知道支不支持中文了,问了群里的朋友都说不支持,所有用了以下的这种方法来做。</p><p>1、文章的处理。</p><p>假如文章表为article_main</p><table interlaced=\"enabled\"><tbody><tr class=\"ue-table-interlace-color-single firstRow\"><td style=\"word-break: break-all; border-width: 1px; border-style: solid;\" valign=\"top\" width=\"149\">id<br/></td><td style=\"word-break: break-all; border-width: 1px; border-style: solid;\" valign=\"top\" width=\"149\">title<br/></td><td style=\"word-break: break-all; border-width: 1px; border-style: solid;\" valign=\"top\" width=\"149\">summary<br/></td><td style=\"word-break: break-all; border-width: 1px; border-style: solid;\" valign=\"top\" width=\"149\">content<br/></td><td style=\"word-break: break-all; border-width: 1px; border-style: solid;\" valign=\"top\" width=\"149\">time<br/></td></tr><tr class=\"ue-table-interlace-color-double\"><td style=\"word-break: break-all; border-width: 1px; border-style: solid;\" valign=\"top\" width=\"149\">1<br/></td><td style=\"word-break: break-all; border-width: 1px; border-style: solid;\" valign=\"top\" width=\"149\">测试的标题<br/></td><td style=\"word-break: break-all; border-width: 1px; border-style: solid;\" valign=\"top\" width=\"149\">测试的摘要<br/></td><td style=\"word-break: break-all; border-width: 1px; border-style: solid;\" valign=\"top\" width=\"149\">测试的内容<br/></td><td style=\"word-break: break-all; border-width: 1px; border-style: solid;\" valign=\"top\" width=\"149\">123123123<br/></td></tr></tbody></table><p>由于sphinx不支持中文(真的吗?这里当它是吧)</p><p><br/></p><p>我们新建立一个表article_unicode</p><table interlaced=\"enabled\"><tbody><tr class=\"ue-table-interlace-color-single firstRow\"><td style=\"word-break: break-all; border-width: 1px; border-style: solid;\" valign=\"top\" width=\"117\">id<br/></td><td style=\"border-width: 1px; border-style: solid;\" rowspan=\"1\" colspan=\"1\" valign=\"top\" width=\"117\">article_id<br/></td><td style=\"word-break: break-all; border-width: 1px; border-style: solid;\" valign=\"top\" width=\"117\">title<br/></td><td style=\"word-break: break-all; border-width: 1px; border-style: solid;\" valign=\"top\" width=\"117\">summary<br/></td><td style=\"word-break: break-all; border-width: 1px; border-style: solid;\" valign=\"top\" width=\"117\">content<br/></td><td style=\"word-break: break-all; border-width: 1px; border-style: solid;\" valign=\"top\" width=\"117\">time<br/></td></tr><tr class=\"ue-table-interlace-color-double\"><td style=\"word-break: break-all; border-width: 1px; border-style: solid;\" valign=\"top\" width=\"117\">1<br/></td><td style=\"border-width: 1px; border-style: solid;\" rowspan=\"1\" colspan=\"1\" valign=\"top\" width=\"117\">1<br/></td><td style=\"word-break: break-all; border-width: 1px; border-style: solid;\" valign=\"top\" width=\"117\">23243 23123 12213<br/></td><td style=\"word-break: break-all; border-width: 1px; border-style: solid;\" valign=\"top\" width=\"117\">12312 12312 12345<br/></td><td style=\"word-break: break-all; border-width: 1px; border-style: solid;\" valign=\"top\" width=\"117\">12312 12312 12345</td><td style=\"word-break: break-all; border-width: 1px; border-style: solid;\" valign=\"top\" width=\"117\">123123123<br/></td></tr></tbody></table><p>这个新的表的结构和article_main的内容是一样的,但是储存的是中文的utf-8的unicode码。</p><p><br/></p><p>这样我们在增加文章的时候同时把输入的标题、摘要、内容处理成utf-8的unicode码,然后再保存到article_unicode表中。</p><p><br/></p><p>在配置sphinx的时候再以article_unicode这个表作为源(见:<a _src=\"http://www.opcache.net/index/detail.html?id=62\" href=\"http://www.opcache.net/index/detail.html?id=62\">http://www.opcache.net/index/detail.html?id=62</a> )</p><p><br/></p><p>2、所用到的处理utf-8 unicode的类有如下:</p><pre class=\"brush:php;toolbar:false\">&lt;?php\r\n\r\nnamespace&nbsp;App\\Libraries;\r\n\r\n/**\r\n&nbsp;*&nbsp;class&nbsp;from&nbsp;chanzhi&nbsp;&lt;http://www.chanzhi.org/&gt;,&nbsp;and&nbsp;modified&nbsp;by&nbsp;me&nbsp;at&nbsp;2015.3.23\r\n&nbsp;*\r\n&nbsp;*&nbsp;@author&nbsp;jiang&nbsp;&lt;mylampblog@163.com&gt;\r\n&nbsp;*/\r\nclass&nbsp;Spliter\r\n{\r\n&nbsp;&nbsp;&nbsp;&nbsp;/**\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Split&nbsp;a&nbsp;utf-8&nbsp;string&nbsp;into&nbsp;words,&nbsp;computing&nbsp;unicode&nbsp;for&nbsp;every&nbsp;word.\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@param&nbsp;&nbsp;string&nbsp;&nbsp;&nbsp;&nbsp;$string&nbsp;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@access&nbsp;public\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@return&nbsp;array\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/\r\n&nbsp;&nbsp;&nbsp;&nbsp;public&nbsp;function&nbsp;utf8Split($string)\r\n&nbsp;&nbsp;&nbsp;&nbsp;{\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$string&nbsp;=&nbsp;strtolower($string);\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$i&nbsp;=&nbsp;0;&nbsp;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$length&nbsp;=&nbsp;strlen($string);\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$dict&nbsp;&nbsp;&nbsp;=&nbsp;array();\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$words&nbsp;&nbsp;=&nbsp;&#39;&#39;;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$offset&nbsp;=&nbsp;0;\r\n\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;while($i&nbsp;&lt;=&nbsp;$length)\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$letter&nbsp;=&nbsp;substr($string,&nbsp;$i,&nbsp;1);\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$ord&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;ord($letter);\r\n\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/*&nbsp;The&nbsp;first&nbsp;letter&nbsp;is&nbsp;ascii,&nbsp;try&nbsp;to&nbsp;get&nbsp;a&nbsp;word.&nbsp;*/\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if($ord&nbsp;&gt;=&nbsp;0&nbsp;&amp;&amp;&nbsp;$ord&nbsp;&lt;=&nbsp;191)\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$i&nbsp;++;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if($this-&gt;isLetter($letter))\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$word&nbsp;=&nbsp;$letter;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;while&nbsp;($i&nbsp;&lt;=&nbsp;$length)\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$letter&nbsp;=&nbsp;substr($string,&nbsp;$i,&nbsp;1);\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if(&nbsp;!&nbsp;$this-&gt;isLetter($letter))&nbsp;break;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$word&nbsp;.=&nbsp;$letter;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$i++;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$words&nbsp;.=&nbsp;&#39;&nbsp;&#39;&nbsp;.&nbsp;$word;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;continue;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$words&nbsp;.=&nbsp;&#39;&nbsp;&#39;&nbsp;.&nbsp;$letter;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;continue;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}\r\n\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if($ord&nbsp;&gt;=&nbsp;192&nbsp;&amp;&amp;&nbsp;$ord&nbsp;&lt;=&nbsp;223)&nbsp;$offset&nbsp;=&nbsp;2;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if($ord&nbsp;&gt;=&nbsp;224&nbsp;&amp;&amp;&nbsp;$ord&nbsp;&lt;=&nbsp;239)&nbsp;$offset&nbsp;=&nbsp;3;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if($ord&nbsp;&gt;=&nbsp;240&nbsp;&amp;&amp;&nbsp;$ord&nbsp;&lt;=&nbsp;247)&nbsp;$offset&nbsp;=&nbsp;4;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if($ord&nbsp;&gt;=&nbsp;248&nbsp;&amp;&amp;&nbsp;$ord&nbsp;&lt;=&nbsp;251)&nbsp;$offset&nbsp;=&nbsp;5;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if($ord&nbsp;&gt;=&nbsp;252&nbsp;&amp;&amp;&nbsp;$ord&nbsp;&lt;=&nbsp;253)&nbsp;$offset&nbsp;=&nbsp;6;\r\n\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if($offset&nbsp;&gt;=&nbsp;2)\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$dict[$this-&gt;unicode(substr($string,&nbsp;$i,&nbsp;$offset))]&nbsp;=&nbsp;substr($string,&nbsp;$i,&nbsp;$offset);\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$words&nbsp;.=&nbsp;&#39;&nbsp;&#39;&nbsp;.&nbsp;$this-&gt;unicode(substr($string,&nbsp;$i,&nbsp;$offset));\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$i&nbsp;+=&nbsp;$offset;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}\r\n\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;array(&#39;dict&#39;&nbsp;=&gt;&nbsp;$dict,&nbsp;&#39;words&#39;&nbsp;=&gt;&nbsp;$words);\r\n&nbsp;&nbsp;&nbsp;&nbsp;}\r\n\r\n&nbsp;&nbsp;&nbsp;&nbsp;/**\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Return&nbsp;unicode&nbsp;value&nbsp;for&nbsp;a&nbsp;char.&nbsp;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@param&nbsp;&nbsp;string&nbsp;&nbsp;&nbsp;&nbsp;$c&nbsp;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@access&nbsp;public\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@return&nbsp;int\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/\r\n&nbsp;&nbsp;&nbsp;&nbsp;public&nbsp;function&nbsp;unicode($c)&nbsp;\r\n&nbsp;&nbsp;&nbsp;&nbsp;{\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if(ord($c{0})&nbsp;&gt;=&nbsp;0&nbsp;&nbsp;&nbsp;&amp;&amp;&nbsp;ord($c{0})&nbsp;&lt;=&nbsp;127)&nbsp;return&nbsp;&nbsp;ord($c{0});\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if(ord($c{0})&nbsp;&gt;=&nbsp;192&nbsp;&amp;&amp;&nbsp;ord($c{0})&nbsp;&lt;=&nbsp;223)&nbsp;return&nbsp;(ord($c{0})&nbsp;-&nbsp;192)&nbsp;*&nbsp;64&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+&nbsp;(ord($c{1})&nbsp;-&nbsp;128);\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if(ord($c{0})&nbsp;&gt;=&nbsp;224&nbsp;&amp;&amp;&nbsp;ord($c{0})&nbsp;&lt;=&nbsp;239)&nbsp;return&nbsp;(ord($c{0})&nbsp;-&nbsp;224)&nbsp;*&nbsp;4096&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+&nbsp;(ord($c{1})&nbsp;-&nbsp;128)&nbsp;*&nbsp;64&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+&nbsp;(ord($c{2})&nbsp;-&nbsp;128);\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if(ord($c{0})&nbsp;&gt;=&nbsp;240&nbsp;&amp;&amp;&nbsp;ord($c{0})&nbsp;&lt;=&nbsp;247)&nbsp;return&nbsp;(ord($c{0})&nbsp;-&nbsp;240)&nbsp;*&nbsp;262144&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+&nbsp;(ord($c{1})&nbsp;-&nbsp;128)&nbsp;*&nbsp;4096&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+&nbsp;(ord($c{2})&nbsp;-&nbsp;128)&nbsp;*&nbsp;64&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+&nbsp;(ord($c{3})&nbsp;-&nbsp;128);\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if(ord($c{0})&nbsp;&gt;=&nbsp;248&nbsp;&amp;&amp;&nbsp;ord($c{0})&nbsp;&lt;=&nbsp;251)&nbsp;return&nbsp;(ord($c{0})&nbsp;-&nbsp;248)&nbsp;*&nbsp;16777216&nbsp;&nbsp;&nbsp;+&nbsp;(ord($c{1})&nbsp;-&nbsp;128)&nbsp;*&nbsp;262144&nbsp;&nbsp;&nbsp;+&nbsp;(ord($c{2})&nbsp;-&nbsp;128)&nbsp;*&nbsp;4096&nbsp;&nbsp;&nbsp;+&nbsp;(ord($c{3})&nbsp;-&nbsp;128)&nbsp;*&nbsp;64&nbsp;&nbsp;&nbsp;+&nbsp;(ord($c{4})&nbsp;-&nbsp;128);\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if(ord($c{0})&nbsp;&gt;=&nbsp;252&nbsp;&amp;&amp;&nbsp;ord($c{0})&nbsp;&lt;=&nbsp;253)&nbsp;return&nbsp;(ord($c{0})&nbsp;-&nbsp;252)&nbsp;*&nbsp;1073741824&nbsp;+&nbsp;(ord($c{1})&nbsp;-&nbsp;128)&nbsp;*&nbsp;16777216&nbsp;+&nbsp;(ord($c{2})&nbsp;-&nbsp;128)&nbsp;*&nbsp;262144&nbsp;+&nbsp;(ord($c{3})&nbsp;-&nbsp;128)&nbsp;*&nbsp;4096&nbsp;+&nbsp;(ord($c{4})&nbsp;-&nbsp;128)&nbsp;*&nbsp;64&nbsp;+&nbsp;(ord($c{5})&nbsp;-&nbsp;128);\r\n\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if(ord($c{0})&nbsp;&gt;=&nbsp;254&nbsp;&amp;&amp;&nbsp;ord($c{0})&nbsp;&lt;=&nbsp;255)&nbsp;return&nbsp;false;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;false;\r\n&nbsp;&nbsp;&nbsp;&nbsp;}\r\n\r\n&nbsp;&nbsp;&nbsp;&nbsp;/**\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Judge&nbsp;a&nbsp;char&nbsp;is&nbsp;Letter&nbsp;or&nbsp;not.\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@param&nbsp;&nbsp;string&nbsp;&nbsp;&nbsp;&nbsp;$letter&nbsp;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@access&nbsp;public\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@return&nbsp;bool\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/\r\n&nbsp;&nbsp;&nbsp;&nbsp;public&nbsp;function&nbsp;isLetter($letter)\r\n&nbsp;&nbsp;&nbsp;&nbsp;{\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$ord&nbsp;=&nbsp;ord($letter);\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if($ord&nbsp;&gt;=&nbsp;ord(&#39;a&#39;)&nbsp;and&nbsp;$ord&nbsp;&lt;=&nbsp;ord(&#39;z&#39;))&nbsp;return&nbsp;true;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if($ord&nbsp;&gt;=&nbsp;ord(&#39;A&#39;)&nbsp;and&nbsp;$ord&nbsp;&lt;=&nbsp;ord(&#39;Z&#39;))&nbsp;return&nbsp;true;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if($ord&nbsp;&gt;=&nbsp;ord(0)&nbsp;&nbsp;&nbsp;and&nbsp;$ord&nbsp;&lt;=&nbsp;ord(9))&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;true;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if(strpos(&#39;._/-&gt;:&lt;?&amp;&#39;,&nbsp;$letter)&nbsp;!==&nbsp;false)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;true;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;false;\r\n&nbsp;&nbsp;&nbsp;&nbsp;}\r\n\r\n}</pre><p>调用方法如下:</p><pre class=\"brush:php;toolbar:false\">$titleSplited&nbsp;&nbsp;&nbsp;=&nbsp;$spliterObject-&gt;utf8Split($data[&#39;title&#39;]);//文章标题\r\n$index[&#39;title&#39;]&nbsp;&nbsp;&nbsp;=&nbsp;$titleSplited[&#39;words&#39;];&nbsp;//这样得到的值就是文章标题的utf-8的unicode码了。</pre><p>然后保存到表中。</p><p><br/></p><p>3、当我们作搜索的时候,同样的先把搜索词转化为unicode码,再用这个码来作sphinx的搜索</p><pre class=\"brush:php;toolbar:false\">$object&nbsp;=&nbsp;new&nbsp;\\stdClass();\r\n$object-&gt;keyword&nbsp;=&nbsp;Request::input(&#39;keyword&#39;);\r\n$searchProcess&nbsp;=&nbsp;new&nbsp;Process();\r\n\r\n//这里其实就是把keyword转为unicode,我封装了一下。\r\n$keywordUnicode&nbsp;=&nbsp;$searchProcess-&gt;prepareKeyword($object-&gt;keyword);\r\n\r\n//然后通过sphinx搜索处理数据,最后拿到文章的id,即article_unicode表中的article_id\r\n$object-&gt;sphinxResult_ArticleIds&nbsp;=&nbsp;$searchProcess-&gt;sphinxSearch($keywordUnicode);\r\n\r\n//通过article_id再来做常规的查询。\r\n$articleList&nbsp;=&nbsp;(new&nbsp;SearchModel())-&gt;activeArticleInfoBySearch($object);</pre><p>这样就可以了。<br/></p>', '1427256396');
INSERT INTO `bk_article_detail` VALUES ('59', '1', '72', '<p>执行命令下载软件:</p><pre class=\"brush:bash;toolbar:false\">yumdownloader&nbsp;httpd-tools*</pre><p>提取文件<br/></p><pre class=\"brush:bash;toolbar:false\">rpm2cpio&nbsp;httpd-tools-2.4.6-19.el7.centos.x86_64.rpm&nbsp;|&nbsp;cpio&nbsp;-idmv</pre><p>在解压出来的usr/bin/ab这个就是了。<br/></p><p>如果无法使用,安装:</p><pre class=\"brush:bash;toolbar:false\">yum&nbsp;install&nbsp;apr-util</pre><p><br/></p>', '1427382988');
INSERT INTO `bk_article_detail` VALUES ('60', '1', '73', '<p>1、进入php源码包目录</p><pre class=\"brush:bash;toolbar:false\">php源码包/ext/opcache</pre><p>2、执行以下的命令<br/></p><pre class=\"brush:bash;toolbar:false\">phpize\r\n&nbsp;./configure&nbsp;--with-php-config=/alidata/server/php/bin/php-config&nbsp;\r\n&nbsp;make&nbsp;&amp;&amp;&nbsp;make&nbsp;install</pre><p>3、修改php.ini加载opcache.so,加入以下的配置。</p><pre class=\"brush:bash;toolbar:false\">[opcache]\r\nzend_extension=opcache.so\r\nopcache.enable=1</pre><p>这样其实就可以使用了,当然,还有更多的一些配置,这里就不再讨论了。</p>', '1427383968');
INSERT INTO `bk_article_detail` VALUES ('61', '1', '74', '<p>前提:我的机子是使用了阿里云的一键lnmp安装包,所以很多依赖的包都可能已经安装过了。如果用我的步骤报错的话,那么请自己安装对应的依赖包。</p><p><br/></p><p>1、phpng需要re2c 0.13.4或更新的,而通过yum install的方式安装的没有这么新,所以重新编译一下。</p><pre class=\"brush:bash;toolbar:false\">wget&nbsp;http://downloads.sourceforge.net/project/re2c/re2c/0.13.7.5/re2c-0.13.7.5.tar.gz\r\ntar&nbsp;xzf&nbsp;re2c-0.13.7.5.tar.gz\r\ncd&nbsp;re2c-0.13.7.5\r\n./configure\r\nmake&nbsp;&amp;&amp;&nbsp;make&nbsp;install</pre><p>2、同时也需要安装bison</p><pre class=\"brush:bash;toolbar:false\">yum&nbsp;install&nbsp;bison</pre><p>3、这里我启用了bz2压缩,所以先安装这个。</p><pre class=\"brush:bash;toolbar:false\">yum&nbsp;install&nbsp;bzip2-devel</pre><p>4、如果报错</p><pre class=\"brush:bash;toolbar:false\">configure:&nbsp;error:&nbsp;xpm.h&nbsp;not&nbsp;found.</pre><p>那么安装</p><pre class=\"brush:bash;toolbar:false\">yum&nbsp;install&nbsp;libXpm-devel</pre><p>5、如果还报错</p><pre class=\"brush:bash;toolbar:false\">configure:&nbsp;error:&nbsp;Your&nbsp;t1lib&nbsp;distribution&nbsp;is&nbsp;not&nbsp;installed&nbsp;correctly.&nbsp;Please&nbsp;reinstall&nbsp;it.</pre><p>那么安装</p><pre class=\"brush:bash;toolbar:false\">yum&nbsp;install&nbsp;t1lib\r\nyum&nbsp;install&nbsp;t1lib-devel</pre><p>6、如果还报</p><pre class=\"brush:bash;toolbar:false\">Configure:&nbsp;error:&nbsp;Unable&nbsp;to&nbsp;locate&nbsp;gmp.h</pre><p>那么</p><pre class=\"brush:bash;toolbar:false\">yum&nbsp;install&nbsp;gmp-devel</pre><p>7、如果还报错</p><pre class=\"brush:bash;toolbar:false\">configure:&nbsp;error:&nbsp;Cannot&nbsp;find&nbsp;pspell</pre><p>那么</p><pre class=\"brush:bash;toolbar:false\">未知,暂时去掉了--with-pspell编译参数</pre><p>8、如果报</p><pre class=\"brush:bash;toolbar:false\">configure:&nbsp;error:&nbsp;Can&nbsp;not&nbsp;find&nbsp;recode.h&nbsp;anywhere&nbsp;under&nbsp;/usr&nbsp;/usr/local&nbsp;/usr&nbsp;/opt.</pre><p>那么</p><pre class=\"brush:bash;toolbar:false\">yum&nbsp;install&nbsp;recode\r\nyum&nbsp;install&nbsp;recode-devel</pre><p>9、编译参数</p><pre class=\"brush:bash;toolbar:false\">./configure&nbsp;--prefix=/alidata/server/php7&nbsp;\\\r\n&nbsp;&nbsp;&nbsp;&nbsp;--with-config-file-path=/alidata/server/php7/etc&nbsp;\\\r\n&nbsp;&nbsp;&nbsp;&nbsp;--enable-mbstring&nbsp;\\\r\n&nbsp;&nbsp;&nbsp;&nbsp;--enable-zip&nbsp;\\\r\n&nbsp;&nbsp;&nbsp;&nbsp;--enable-bcmath&nbsp;\\\r\n&nbsp;&nbsp;&nbsp;&nbsp;--enable-pcntl&nbsp;\\\r\n&nbsp;&nbsp;&nbsp;&nbsp;--enable-ftp&nbsp;\\\r\n&nbsp;&nbsp;&nbsp;&nbsp;--enable-exif&nbsp;\\\r\n&nbsp;&nbsp;&nbsp;&nbsp;--enable-calendar&nbsp;\\\r\n&nbsp;&nbsp;&nbsp;&nbsp;--enable-sysvmsg&nbsp;\\\r\n&nbsp;&nbsp;&nbsp;&nbsp;--enable-sysvsem&nbsp;\\\r\n&nbsp;&nbsp;&nbsp;&nbsp;--enable-sysvshm&nbsp;\\\r\n&nbsp;&nbsp;&nbsp;&nbsp;--enable-wddx&nbsp;\\\r\n&nbsp;&nbsp;&nbsp;&nbsp;--with-curl&nbsp;\\\r\n&nbsp;&nbsp;&nbsp;&nbsp;--with-mcrypt&nbsp;\\\r\n&nbsp;&nbsp;&nbsp;&nbsp;--with-iconv&nbsp;\\\r\n&nbsp;&nbsp;&nbsp;&nbsp;--with-gmp&nbsp;\\\r\n&nbsp;&nbsp;&nbsp;&nbsp;--with-gd&nbsp;\\\r\n&nbsp;&nbsp;&nbsp;&nbsp;--with-jpeg-dir=/usr/local/jpeg.6&nbsp;\\\r\n&nbsp;&nbsp;&nbsp;&nbsp;--with-png-dir=/usr/local/libpng.1.2.50&nbsp;\\\r\n&nbsp;&nbsp;&nbsp;&nbsp;--with-zlib-dir=/usr&nbsp;\\\r\n&nbsp;&nbsp;&nbsp;&nbsp;--with-xpm-dir=/usr&nbsp;\\\r\n&nbsp;&nbsp;&nbsp;&nbsp;--with-freetype-dir=/usr/local/freetype.2.1.10&nbsp;\\\r\n&nbsp;&nbsp;&nbsp;&nbsp;--with-t1lib=/usr&nbsp;\\\r\n&nbsp;&nbsp;&nbsp;&nbsp;--enable-gd-native-ttf&nbsp;\\\r\n&nbsp;&nbsp;&nbsp;&nbsp;--enable-gd-jis-conv&nbsp;\\\r\n&nbsp;&nbsp;&nbsp;&nbsp;--with-openssl&nbsp;\\\r\n&nbsp;&nbsp;&nbsp;&nbsp;--with-pdo-mysql=mysqlnd&nbsp;\\\r\n&nbsp;&nbsp;&nbsp;&nbsp;--with-mysqli=mysqlnd&nbsp;\\\r\n&nbsp;&nbsp;&nbsp;&nbsp;--with-gettext=/usr&nbsp;\\\r\n&nbsp;&nbsp;&nbsp;&nbsp;--with-zlib=/usr&nbsp;\\\r\n&nbsp;&nbsp;&nbsp;&nbsp;--with-bz2=/usr&nbsp;\\\r\n&nbsp;&nbsp;&nbsp;&nbsp;--with-recode=/usr&nbsp;\\\r\n&nbsp;&nbsp;&nbsp;&nbsp;--enable-opcache&nbsp;\\\r\n&nbsp;&nbsp;&nbsp;&nbsp;--enable-fpm&nbsp;\\\r\n&nbsp;&nbsp;&nbsp;&nbsp;--enable-sockets&nbsp;\\\r\n&nbsp;&nbsp;&nbsp;&nbsp;--disable-debug&nbsp;\\</pre><pre class=\"brush:bash;toolbar:false\">make&nbsp;&amp;&amp;&nbsp;make&nbsp;install</pre><p>这样就安装成功了。<br/></p>', '1427444712');
INSERT INTO `bk_article_detail` VALUES ('62', '1', '75', '<p>1、方法1<br/></p><p><a href=\"http://wkhtmltopdf.org/\" _src=\"http://wkhtmltopdf.org/\">http://wkhtmltopdf.org/</a></p><p><a href=\"https://github.com/KnpLabs/snappy/tree/master\" _src=\"https://github.com/KnpLabs/snappy/tree/master\">https://github.com/KnpLabs/snappy/tree/master</a></p><p>wkhtmltoimage</p><p>2、方法2</p><p>cutycapt</p><p>http://www.cszhi.com/20130305/cutycapt.html&nbsp;&nbsp;<br/></p>', '1427451364');
INSERT INTO `bk_article_detail` VALUES ('63', '1', '76', '<p><span style=\"color: rgb(255, 0, 0);\">前提:我的机子是使用了阿里云的一键lnmp安装包,所以很多依赖的包都可能已经安装过了。如果用我的步骤报错的话,那么请自己安装对应的依赖包。</span></p><p><br/></p><p>1、先下载软件</p><pre class=\"brush:bash;toolbar:false\">wget&nbsp;http://swupdate.openvpn.org/community/releases/openvpn-2.3.6.tar.gz</pre><p>2、编译</p><pre class=\"brush:bash;toolbar:false\">./configure&nbsp;--prefix=/usr/local/openvpn</pre><p>如果报:</p><pre class=\"brush:bash;toolbar:false\">configure:&nbsp;error:&nbsp;lzo&nbsp;enabled&nbsp;but&nbsp;missing</pre><p>那么安装lzo</p><pre class=\"brush:bash;toolbar:false\">yum&nbsp;install&nbsp;lzo2-dev</pre><p>如果报</p><pre class=\"brush:bash;toolbar:false\">configure:&nbsp;error:&nbsp;libpam&nbsp;required&nbsp;but&nbsp;missing</pre><p>那么安装</p><pre class=\"brush:bash;toolbar:false\">yum&nbsp;install&nbsp;pam-devel</pre><p>如果没有报错了,那么</p><pre class=\"brush:cpp;toolbar:false\">make&nbsp;&amp;&amp;&nbsp;make&nbsp;install</pre><p>3、接下来安装easy-rsa生成密钥</p><pre class=\"brush:bash;toolbar:false\">wget&nbsp;&nbsp;\r\ntar&nbsp;xzf&nbsp;EasyRSA-2.2.2.tgz\r\ncp&nbsp;-rf&nbsp;EasyRSA-2.2.2&nbsp;/usr/local/easy-rsa</pre><p>4、修改/usr/local/easy-rsa/vars文件</p><pre class=\"brush:bash;toolbar:false\">export&nbsp;KEY_COUNTRY=&quot;CN&quot;\r\nexport&nbsp;KEY_PROVINCE=&quot;WIND&quot;\r\nexport&nbsp;KEY_CITY=&quot;SH&quot;\r\nexport&nbsp;KEY_ORG=&quot;SHHHHH&quot;\r\nexport&nbsp;KEY_EMAIL=&quot;me@myhost.mydomain&quot;\r\nexport&nbsp;KEY_OU=&quot;MyOrganizationalUnit&quot;</pre><p>这里应该随便填写不可以了。当然不改也可以。</p><p>5、<br/></p><pre class=\"brush:bash;toolbar:false\">cd&nbsp;/usr/local/easy-rsa/\r\nln&nbsp;-s&nbsp;openssl-1.0.0.cnf&nbsp;openssl-cnf\r\nchmod&nbsp;+x&nbsp;vars&nbsp;;\r\nsource&nbsp;./vars&nbsp;;</pre><pre class=\"brush:bash;toolbar:false\">If&nbsp;you&nbsp;run&nbsp;./clean-all,&nbsp;I&nbsp;will&nbsp;be&nbsp;doing&nbsp;a&nbsp;rm&nbsp;-rf&nbsp;on&nbsp;/usr/local/easy-rsa/keys\r\n#指的是如果你执行./clean-all这个命令,那么/usr/local/easy-rsa/keys目录里的文件都会被删除。</pre><p>6、生成服务端的ca证书</p><pre class=\"brush:bash;toolbar:false\">./build-ca</pre><p>会在/usr/local/easy-rsa/keys下生成证书</p><p><br/></p><p>7、然后执行下面的命令生成服务器端密钥证书</p><pre class=\"brush:bash;toolbar:false\">./build-key-server&nbsp;www.opcache.net</pre><p>过期中会让你填写一些信自和密码,随便填写就可以了。</p><p><br/></p><p>8、然后生成所需客户端证书密钥文件</p><pre class=\"brush:bash;toolbar:false\">./build-key&nbsp;client1</pre><p>过期中也会让你填写一些信自和密码,随便填写就可以了。</p><p><br/></p><p>9、再生成diffie hellman参数,用于增强openvpn安全性</p><pre class=\"brush:bash;toolbar:false\">./build-dh</pre><table cellpadding=\"8\" cellspacing=\"0\"><tbody><tr class=\"firstRow\"><td style=\"border-width: 1px; border-style: solid;\"><strong>文件名</strong></td><td style=\"border-width: 1px; border-style: solid;\"><strong>需要者<br/>Needed By</strong></td><td style=\"border-width: 1px; border-style: solid;\"><strong>说明<br/>Purpose</strong></td><td style=\"border-width: 1px; border-style: solid;\"><strong>秘密<br/>Secret</strong></td></tr><tr><td style=\"border-width: 1px; border-style: solid;\">ca.crt</td><td style=\"border-width: 1px; border-style: solid;\">服务端和所有客户端<br/>server + all clients</td><td style=\"border-width: 1px; border-style: solid;\">根证书<br/>Root CA certificate</td><td style=\"border-width: 1px; border-style: solid;\">否<br/>NO</td></tr><tr><td style=\"border-width: 1px; border-style: solid;\">ca.key</td><td style=\"border-width: 1px; border-style: solid;\">签发私钥的机器 <br/>key signing machine only</td><td style=\"border-width: 1px; border-style: solid;\">根私钥 <br/>Root CA key</td><td style=\"border-width: 1px; border-style: solid;\">是<br/>YES</td></tr><tr><td style=\"border-width: 1px; border-style: solid;\">dh{n}.pem</td><td style=\"border-width: 1px; border-style: solid;\">服务器<br/>server only</td><td style=\"border-width: 1px; border-style: solid;\">Diffie Hellman parameters</td><td style=\"border-width: 1px; border-style: solid;\">否<br/>NO</td></tr><tr><td style=\"border-width: 1px; border-style: solid;\">server.crt</td><td style=\"border-width: 1px; border-style: solid;\">服务器<br/>server only</td><td style=\"border-width: 1px; border-style: solid;\">服务器证书<br/>Server Certificate</td><td style=\"border-width: 1px; border-style: solid;\">否<br/>NO</td></tr><tr><td style=\"border-width: 1px; border-style: solid;\">server.key</td><td style=\"border-width: 1px; border-style: solid;\">服务器<br/>server only</td><td style=\"border-width: 1px; border-style: solid;\">服务器私钥<br/>Server Key</td><td style=\"border-width: 1px; border-style: solid;\">是<br/>YES</td></tr><tr><td style=\"border-width: 1px; border-style: solid;\">client1.crt</td><td style=\"border-width: 1px; border-style: solid;\">client1 only</td><td style=\"border-width: 1px; border-style: solid;\">Clinet1的证书<br/>Client1 Certificate</td><td style=\"border-width: 1px; border-style: solid;\">否<br/>NO</td></tr><tr><td style=\"border-width: 1px; border-style: solid;\">client1.key</td><td style=\"border-width: 1px; border-style: solid;\">client1 only</td><td style=\"border-width: 1px; border-style: solid;\">Clinet1的私钥<br/>Client1 Key</td><td style=\"border-width: 1px; border-style: solid;\">是<br/>YES</td></tr></tbody></table><p>10、Ok,打包密钥</p><pre class=\"brush:bash;toolbar:false\">tar&nbsp;zcvf&nbsp;key.tar.gz&nbsp;./keys/</pre><p>11、修改配置文件</p><pre class=\"brush:bash;toolbar:false\">vi&nbsp;/usr/local/openvpn/conf/server.cnf</pre><p>把对应默认的修改为改为,其它不变:</p><pre class=\"brush:bash;toolbar:false\">#################################################\r\n#&nbsp;Sample&nbsp;OpenVPN&nbsp;2.0&nbsp;config&nbsp;file&nbsp;for&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#\r\n#&nbsp;multi-client&nbsp;server.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#\r\n#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#\r\n#&nbsp;This&nbsp;file&nbsp;is&nbsp;for&nbsp;the&nbsp;server&nbsp;side&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#\r\n#&nbsp;of&nbsp;a&nbsp;many-clients&nbsp;&lt;-&gt;&nbsp;one-server&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#\r\n#&nbsp;OpenVPN&nbsp;configuration.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#\r\n#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#\r\n#&nbsp;OpenVPN&nbsp;also&nbsp;supports&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#\r\n#&nbsp;single-machine&nbsp;&lt;-&gt;&nbsp;single-machine&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#\r\n#&nbsp;configurations&nbsp;(See&nbsp;the&nbsp;Examples&nbsp;page&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#\r\n#&nbsp;on&nbsp;the&nbsp;web&nbsp;site&nbsp;for&nbsp;more&nbsp;info).&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#\r\n#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#\r\n#&nbsp;This&nbsp;config&nbsp;should&nbsp;work&nbsp;on&nbsp;Windows&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#\r\n#&nbsp;or&nbsp;Linux/BSD&nbsp;systems.&nbsp;&nbsp;Remember&nbsp;on&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#\r\n#&nbsp;Windows&nbsp;to&nbsp;quote&nbsp;pathnames&nbsp;and&nbsp;use&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#\r\n#&nbsp;double&nbsp;backslashes,&nbsp;e.g.:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#\r\n#&nbsp;&quot;C:\\\\Program&nbsp;Files\\\\OpenVPN\\\\config\\\\foo.key&quot;&nbsp;#\r\n#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#\r\n#&nbsp;Comments&nbsp;are&nbsp;preceded&nbsp;with&nbsp;&#39;#&#39;&nbsp;or&nbsp;&#39;;&#39;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#\r\n#################################################\r\n\r\n#&nbsp;Which&nbsp;local&nbsp;IP&nbsp;address&nbsp;should&nbsp;OpenVPN\r\n#&nbsp;listen&nbsp;on?&nbsp;(optional)\r\n#local&nbsp;127.0.0.1\r\n\r\n#&nbsp;Which&nbsp;TCP/UDP&nbsp;port&nbsp;should&nbsp;OpenVPN&nbsp;listen&nbsp;on?\r\n#&nbsp;If&nbsp;you&nbsp;want&nbsp;to&nbsp;run&nbsp;multiple&nbsp;OpenVPN&nbsp;instances\r\n#&nbsp;on&nbsp;the&nbsp;same&nbsp;machine,&nbsp;use&nbsp;a&nbsp;different&nbsp;port\r\n#&nbsp;number&nbsp;for&nbsp;each&nbsp;one.&nbsp;&nbsp;You&nbsp;will&nbsp;need&nbsp;to\r\n#&nbsp;open&nbsp;up&nbsp;this&nbsp;port&nbsp;on&nbsp;your&nbsp;firewall.\r\nport&nbsp;1194\r\n\r\n#&nbsp;TCP&nbsp;or&nbsp;UDP&nbsp;server?\r\n;proto&nbsp;tcp\r\nproto&nbsp;udp\r\n\r\n#&nbsp;&quot;dev&nbsp;tun&quot;&nbsp;will&nbsp;create&nbsp;a&nbsp;routed&nbsp;IP&nbsp;tunnel,\r\n#&nbsp;&quot;dev&nbsp;tap&quot;&nbsp;will&nbsp;create&nbsp;an&nbsp;ethernet&nbsp;tunnel.\r\n#&nbsp;Use&nbsp;&quot;dev&nbsp;tap0&quot;&nbsp;if&nbsp;you&nbsp;are&nbsp;ethernet&nbsp;bridging\r\n#&nbsp;and&nbsp;have&nbsp;precreated&nbsp;a&nbsp;tap0&nbsp;virtual&nbsp;interface\r\n#&nbsp;and&nbsp;bridged&nbsp;it&nbsp;with&nbsp;your&nbsp;ethernet&nbsp;interface.\r\n#&nbsp;If&nbsp;you&nbsp;want&nbsp;to&nbsp;control&nbsp;access&nbsp;policies\r\n#&nbsp;over&nbsp;the&nbsp;VPN,&nbsp;you&nbsp;must&nbsp;create&nbsp;firewall\r\n#&nbsp;rules&nbsp;for&nbsp;the&nbsp;the&nbsp;TUN/TAP&nbsp;interface.\r\n#&nbsp;On&nbsp;non-Windows&nbsp;systems,&nbsp;you&nbsp;can&nbsp;give\r\n#&nbsp;an&nbsp;explicit&nbsp;unit&nbsp;number,&nbsp;such&nbsp;as&nbsp;tun0.\r\n#&nbsp;On&nbsp;Windows,&nbsp;use&nbsp;&quot;dev-node&quot;&nbsp;for&nbsp;this.\r\n#&nbsp;On&nbsp;most&nbsp;systems,&nbsp;the&nbsp;VPN&nbsp;will&nbsp;not&nbsp;function\r\n#&nbsp;unless&nbsp;you&nbsp;partially&nbsp;or&nbsp;fully&nbsp;disable\r\n#&nbsp;the&nbsp;firewall&nbsp;for&nbsp;the&nbsp;TUN/TAP&nbsp;interface.\r\n;dev&nbsp;tap\r\ndev&nbsp;tun\r\n\r\n#&nbsp;Windows&nbsp;needs&nbsp;the&nbsp;TAP-Win32&nbsp;adapter&nbsp;name\r\n#&nbsp;from&nbsp;the&nbsp;Network&nbsp;Connections&nbsp;panel&nbsp;if&nbsp;you\r\n#&nbsp;have&nbsp;more&nbsp;than&nbsp;one.&nbsp;&nbsp;On&nbsp;XP&nbsp;SP2&nbsp;or&nbsp;higher,\r\n#&nbsp;you&nbsp;may&nbsp;need&nbsp;to&nbsp;selectively&nbsp;disable&nbsp;the\r\n#&nbsp;Windows&nbsp;firewall&nbsp;for&nbsp;the&nbsp;TAP&nbsp;adapter.\r\n#&nbsp;Non-Windows&nbsp;systems&nbsp;usually&nbsp;don&#39;t&nbsp;need&nbsp;this.\r\n;dev-node&nbsp;MyTap\r\n\r\n#&nbsp;SSL/TLS&nbsp;root&nbsp;certificate&nbsp;(ca),&nbsp;certificate\r\n#&nbsp;(cert),&nbsp;and&nbsp;private&nbsp;key&nbsp;(key).&nbsp;&nbsp;Each&nbsp;client\r\n#&nbsp;and&nbsp;the&nbsp;server&nbsp;must&nbsp;have&nbsp;their&nbsp;own&nbsp;cert&nbsp;and\r\n#&nbsp;key&nbsp;file.&nbsp;&nbsp;The&nbsp;server&nbsp;and&nbsp;all&nbsp;clients&nbsp;will\r\n#&nbsp;use&nbsp;the&nbsp;same&nbsp;ca&nbsp;file.\r\n#\r\n#&nbsp;See&nbsp;the&nbsp;&quot;easy-rsa&quot;&nbsp;directory&nbsp;for&nbsp;a&nbsp;series\r\n#&nbsp;of&nbsp;scripts&nbsp;for&nbsp;generating&nbsp;RSA&nbsp;certificates\r\n#&nbsp;and&nbsp;private&nbsp;keys.&nbsp;&nbsp;Remember&nbsp;to&nbsp;use\r\n#&nbsp;a&nbsp;unique&nbsp;Common&nbsp;Name&nbsp;for&nbsp;the&nbsp;server\r\n#&nbsp;and&nbsp;each&nbsp;of&nbsp;the&nbsp;client&nbsp;certificates.\r\n#\r\n#&nbsp;Any&nbsp;X509&nbsp;key&nbsp;management&nbsp;system&nbsp;can&nbsp;be&nbsp;used.\r\n#&nbsp;OpenVPN&nbsp;can&nbsp;also&nbsp;use&nbsp;a&nbsp;PKCS&nbsp;#12&nbsp;formatted&nbsp;key&nbsp;file\r\n#&nbsp;(see&nbsp;&quot;pkcs12&quot;&nbsp;directive&nbsp;in&nbsp;man&nbsp;page).\r\nca&nbsp;/usr/local/easy-rsa/keys/ca.crt\r\ncert&nbsp;/usr/local/easy-rsa/keys/www.opcache.net.crt\r\nkey&nbsp;/usr/local/easy-rsa/keys/www.opcache.net.key&nbsp;&nbsp;#&nbsp;This&nbsp;file&nbsp;should&nbsp;be&nbsp;kept&nbsp;secret\r\n\r\n#&nbsp;Diffie&nbsp;hellman&nbsp;parameters.\r\n#&nbsp;Generate&nbsp;your&nbsp;own&nbsp;with:\r\n#&nbsp;&nbsp;&nbsp;openssl&nbsp;dhparam&nbsp;-out&nbsp;dh2048.pem&nbsp;2048\r\ndh&nbsp;/usr/local/easy-rsa/keys/dh2048.pem\r\n\r\n#&nbsp;Network&nbsp;topology\r\n#&nbsp;Should&nbsp;be&nbsp;subnet&nbsp;(addressing&nbsp;via&nbsp;IP)\r\n#&nbsp;unless&nbsp;Windows&nbsp;clients&nbsp;v2.0.9&nbsp;and&nbsp;lower&nbsp;have&nbsp;to\r\n#&nbsp;be&nbsp;supported&nbsp;(then&nbsp;net30,&nbsp;i.e.&nbsp;a&nbsp;/30&nbsp;per&nbsp;client)\r\n#&nbsp;Defaults&nbsp;to&nbsp;net30&nbsp;(not&nbsp;recommended)\r\n;topology&nbsp;subnet\r\n\r\n#&nbsp;Configure&nbsp;server&nbsp;mode&nbsp;and&nbsp;supply&nbsp;a&nbsp;VPN&nbsp;subnet\r\n#&nbsp;for&nbsp;OpenVPN&nbsp;to&nbsp;draw&nbsp;client&nbsp;addresses&nbsp;from.\r\n#&nbsp;The&nbsp;server&nbsp;will&nbsp;take&nbsp;10.8.0.1&nbsp;for&nbsp;itself,\r\n#&nbsp;the&nbsp;rest&nbsp;will&nbsp;be&nbsp;made&nbsp;available&nbsp;to&nbsp;clients.\r\n#&nbsp;Each&nbsp;client&nbsp;will&nbsp;be&nbsp;able&nbsp;to&nbsp;reach&nbsp;the&nbsp;server\r\n#&nbsp;on&nbsp;10.8.0.1.&nbsp;Comment&nbsp;this&nbsp;line&nbsp;out&nbsp;if&nbsp;you&nbsp;are\r\n#&nbsp;ethernet&nbsp;bridging.&nbsp;See&nbsp;the&nbsp;man&nbsp;page&nbsp;for&nbsp;more&nbsp;info.\r\nserver&nbsp;10.8.0.0&nbsp;255.255.255.0\r\n\r\n#&nbsp;Maintain&nbsp;a&nbsp;record&nbsp;of&nbsp;client&nbsp;&lt;-&gt;&nbsp;virtual&nbsp;IP&nbsp;address\r\n#&nbsp;associations&nbsp;in&nbsp;this&nbsp;file.&nbsp;&nbsp;If&nbsp;OpenVPN&nbsp;goes&nbsp;down&nbsp;or\r\n#&nbsp;is&nbsp;restarted,&nbsp;reconnecting&nbsp;clients&nbsp;can&nbsp;be&nbsp;assigned\r\n#&nbsp;the&nbsp;same&nbsp;virtual&nbsp;IP&nbsp;address&nbsp;from&nbsp;the&nbsp;pool&nbsp;that&nbsp;was\r\n#&nbsp;previously&nbsp;assigned.\r\nifconfig-pool-persist&nbsp;ipp.txt\r\n\r\n#&nbsp;Configure&nbsp;server&nbsp;mode&nbsp;for&nbsp;ethernet&nbsp;bridging.\r\n#&nbsp;You&nbsp;must&nbsp;first&nbsp;use&nbsp;your&nbsp;OS&#39;s&nbsp;bridging&nbsp;capability\r\n#&nbsp;to&nbsp;bridge&nbsp;the&nbsp;TAP&nbsp;interface&nbsp;with&nbsp;the&nbsp;ethernet\r\n#&nbsp;NIC&nbsp;interface.&nbsp;&nbsp;Then&nbsp;you&nbsp;must&nbsp;manually&nbsp;set&nbsp;the\r\n#&nbsp;IP/netmask&nbsp;on&nbsp;the&nbsp;bridge&nbsp;interface,&nbsp;here&nbsp;we\r\n#&nbsp;assume&nbsp;10.8.0.4/255.255.255.0.&nbsp;&nbsp;Finally&nbsp;we\r\n#&nbsp;must&nbsp;set&nbsp;aside&nbsp;an&nbsp;IP&nbsp;range&nbsp;in&nbsp;this&nbsp;subnet\r\n#&nbsp;(start=10.8.0.50&nbsp;end=10.8.0.100)&nbsp;to&nbsp;allocate\r\n#&nbsp;to&nbsp;connecting&nbsp;clients.&nbsp;&nbsp;Leave&nbsp;this&nbsp;line&nbsp;commented\r\n#&nbsp;out&nbsp;unless&nbsp;you&nbsp;are&nbsp;ethernet&nbsp;bridging.\r\n;server-bridge&nbsp;10.8.0.4&nbsp;255.255.255.0&nbsp;10.8.0.50&nbsp;10.8.0.100\r\n\r\n#&nbsp;Configure&nbsp;server&nbsp;mode&nbsp;for&nbsp;ethernet&nbsp;bridging\r\n#&nbsp;using&nbsp;a&nbsp;DHCP-proxy,&nbsp;where&nbsp;clients&nbsp;talk\r\n#&nbsp;to&nbsp;the&nbsp;OpenVPN&nbsp;server-side&nbsp;DHCP&nbsp;server\r\n#&nbsp;to&nbsp;receive&nbsp;their&nbsp;IP&nbsp;address&nbsp;allocation\r\n#&nbsp;and&nbsp;DNS&nbsp;server&nbsp;addresses.&nbsp;&nbsp;You&nbsp;must&nbsp;first&nbsp;use\r\n#&nbsp;your&nbsp;OS&#39;s&nbsp;bridging&nbsp;capability&nbsp;to&nbsp;bridge&nbsp;the&nbsp;TAP\r\n#&nbsp;interface&nbsp;with&nbsp;the&nbsp;ethernet&nbsp;NIC&nbsp;interface.\r\n#&nbsp;Note:&nbsp;this&nbsp;mode&nbsp;only&nbsp;works&nbsp;on&nbsp;clients&nbsp;(such&nbsp;as\r\n#&nbsp;Windows),&nbsp;where&nbsp;the&nbsp;client-side&nbsp;TAP&nbsp;adapter&nbsp;is\r\n#&nbsp;bound&nbsp;to&nbsp;a&nbsp;DHCP&nbsp;client.\r\n;server-bridge\r\n\r\n#&nbsp;Push&nbsp;routes&nbsp;to&nbsp;the&nbsp;client&nbsp;to&nbsp;allow&nbsp;it\r\n#&nbsp;to&nbsp;reach&nbsp;other&nbsp;private&nbsp;subnets&nbsp;behind\r\n#&nbsp;the&nbsp;server.&nbsp;&nbsp;Remember&nbsp;that&nbsp;these\r\n#&nbsp;private&nbsp;subnets&nbsp;will&nbsp;also&nbsp;need\r\n#&nbsp;to&nbsp;know&nbsp;to&nbsp;route&nbsp;the&nbsp;OpenVPN&nbsp;client\r\n#&nbsp;address&nbsp;pool&nbsp;(10.8.0.0/255.255.255.0)\r\n#&nbsp;back&nbsp;to&nbsp;the&nbsp;OpenVPN&nbsp;server.\r\n;push&nbsp;&quot;route&nbsp;192.168.10.0&nbsp;255.255.255.0&quot;\r\n;push&nbsp;&quot;route&nbsp;192.168.20.0&nbsp;255.255.255.0&quot;\r\n\r\n#&nbsp;To&nbsp;assign&nbsp;specific&nbsp;IP&nbsp;addresses&nbsp;to&nbsp;specific\r\n#&nbsp;clients&nbsp;or&nbsp;if&nbsp;a&nbsp;connecting&nbsp;client&nbsp;has&nbsp;a&nbsp;private\r\n#&nbsp;subnet&nbsp;behind&nbsp;it&nbsp;that&nbsp;should&nbsp;also&nbsp;have&nbsp;VPN&nbsp;access,\r\n#&nbsp;use&nbsp;the&nbsp;subdirectory&nbsp;&quot;ccd&quot;&nbsp;for&nbsp;client-specific\r\n#&nbsp;configuration&nbsp;files&nbsp;(see&nbsp;man&nbsp;page&nbsp;for&nbsp;more&nbsp;info).\r\n\r\n#&nbsp;EXAMPLE:&nbsp;Suppose&nbsp;the&nbsp;client\r\n#&nbsp;having&nbsp;the&nbsp;certificate&nbsp;common&nbsp;name&nbsp;&quot;Thelonious&quot;\r\n#&nbsp;also&nbsp;has&nbsp;a&nbsp;small&nbsp;subnet&nbsp;behind&nbsp;his&nbsp;connecting\r\n#&nbsp;machine,&nbsp;such&nbsp;as&nbsp;192.168.40.128/255.255.255.248.\r\n#&nbsp;First,&nbsp;uncomment&nbsp;out&nbsp;these&nbsp;lines:\r\n;client-config-dir&nbsp;ccd\r\n;route&nbsp;192.168.40.128&nbsp;255.255.255.248\r\n#&nbsp;Then&nbsp;create&nbsp;a&nbsp;file&nbsp;ccd/Thelonious&nbsp;with&nbsp;this&nbsp;line:\r\n#&nbsp;&nbsp;&nbsp;iroute&nbsp;192.168.40.128&nbsp;255.255.255.248\r\n#&nbsp;This&nbsp;will&nbsp;allow&nbsp;Thelonious&#39;&nbsp;private&nbsp;subnet&nbsp;to\r\n#&nbsp;access&nbsp;the&nbsp;VPN.&nbsp;&nbsp;This&nbsp;example&nbsp;will&nbsp;only&nbsp;work\r\n#&nbsp;if&nbsp;you&nbsp;are&nbsp;routing,&nbsp;not&nbsp;bridging,&nbsp;i.e.&nbsp;you&nbsp;are\r\n#&nbsp;using&nbsp;&quot;dev&nbsp;tun&quot;&nbsp;and&nbsp;&quot;server&quot;&nbsp;directives.\r\n\r\n#&nbsp;EXAMPLE:&nbsp;Suppose&nbsp;you&nbsp;want&nbsp;to&nbsp;give\r\n#&nbsp;Thelonious&nbsp;a&nbsp;fixed&nbsp;VPN&nbsp;IP&nbsp;address&nbsp;of&nbsp;10.9.0.1.\r\n#&nbsp;First&nbsp;uncomment&nbsp;out&nbsp;these&nbsp;lines:\r\n;client-config-dir&nbsp;ccd\r\n;route&nbsp;10.9.0.0&nbsp;255.255.255.252\r\n#&nbsp;Then&nbsp;add&nbsp;this&nbsp;line&nbsp;to&nbsp;ccd/Thelonious:\r\n#&nbsp;&nbsp;&nbsp;ifconfig-push&nbsp;10.9.0.1&nbsp;10.9.0.2\r\n\r\n#&nbsp;Suppose&nbsp;that&nbsp;you&nbsp;want&nbsp;to&nbsp;enable&nbsp;different\r\n#&nbsp;firewall&nbsp;access&nbsp;policies&nbsp;for&nbsp;different&nbsp;groups\r\n#&nbsp;of&nbsp;clients.&nbsp;&nbsp;There&nbsp;are&nbsp;two&nbsp;methods:\r\n#&nbsp;(1)&nbsp;Run&nbsp;multiple&nbsp;OpenVPN&nbsp;daemons,&nbsp;one&nbsp;for&nbsp;each\r\n#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;group,&nbsp;and&nbsp;firewall&nbsp;the&nbsp;TUN/TAP&nbsp;interface\r\n#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for&nbsp;each&nbsp;group/daemon&nbsp;appropriately.\r\n#&nbsp;(2)&nbsp;(Advanced)&nbsp;Create&nbsp;a&nbsp;script&nbsp;to&nbsp;dynamically\r\n#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;modify&nbsp;the&nbsp;firewall&nbsp;in&nbsp;response&nbsp;to&nbsp;access\r\n#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from&nbsp;different&nbsp;clients.&nbsp;&nbsp;See&nbsp;man\r\n#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;page&nbsp;for&nbsp;more&nbsp;info&nbsp;on&nbsp;learn-address&nbsp;script.\r\n;learn-address&nbsp;./script\r\n\r\n#&nbsp;If&nbsp;enabled,&nbsp;this&nbsp;directive&nbsp;will&nbsp;configure\r\n#&nbsp;all&nbsp;clients&nbsp;to&nbsp;redirect&nbsp;their&nbsp;default\r\n#&nbsp;network&nbsp;gateway&nbsp;through&nbsp;the&nbsp;VPN,&nbsp;causing\r\n#&nbsp;all&nbsp;IP&nbsp;traffic&nbsp;such&nbsp;as&nbsp;web&nbsp;browsing&nbsp;and\r\n#&nbsp;and&nbsp;DNS&nbsp;lookups&nbsp;to&nbsp;go&nbsp;through&nbsp;the&nbsp;VPN\r\n#&nbsp;(The&nbsp;OpenVPN&nbsp;server&nbsp;machine&nbsp;may&nbsp;need&nbsp;to&nbsp;NAT\r\n#&nbsp;or&nbsp;bridge&nbsp;the&nbsp;TUN/TAP&nbsp;interface&nbsp;to&nbsp;the&nbsp;internet\r\n#&nbsp;in&nbsp;order&nbsp;for&nbsp;this&nbsp;to&nbsp;work&nbsp;properly).\r\npush&nbsp;&quot;redirect-gateway&nbsp;def1&nbsp;bypass-dhcp&quot;\r\n\r\n#&nbsp;Certain&nbsp;Windows-specific&nbsp;network&nbsp;settings\r\n#&nbsp;can&nbsp;be&nbsp;pushed&nbsp;to&nbsp;clients,&nbsp;such&nbsp;as&nbsp;DNS\r\n#&nbsp;or&nbsp;WINS&nbsp;server&nbsp;addresses.&nbsp;&nbsp;CAVEAT:\r\n#&nbsp;http://openvpn.net/faq.html#dhcpcaveats\r\n#&nbsp;The&nbsp;addresses&nbsp;below&nbsp;refer&nbsp;to&nbsp;the&nbsp;public\r\n#&nbsp;DNS&nbsp;servers&nbsp;provided&nbsp;by&nbsp;opendns.com.\r\npush&nbsp;&quot;dhcp-option&nbsp;DNS&nbsp;8.8.8.8&quot;\r\npush&nbsp;&quot;dhcp-option&nbsp;DNS&nbsp;8.8.8.4&quot;\r\n\r\n#&nbsp;Uncomment&nbsp;this&nbsp;directive&nbsp;to&nbsp;allow&nbsp;different\r\n#&nbsp;clients&nbsp;to&nbsp;be&nbsp;able&nbsp;to&nbsp;&quot;see&quot;&nbsp;each&nbsp;other.\r\n#&nbsp;By&nbsp;default,&nbsp;clients&nbsp;will&nbsp;only&nbsp;see&nbsp;the&nbsp;server.\r\n#&nbsp;To&nbsp;force&nbsp;clients&nbsp;to&nbsp;only&nbsp;see&nbsp;the&nbsp;server,&nbsp;you\r\n#&nbsp;will&nbsp;also&nbsp;need&nbsp;to&nbsp;appropriately&nbsp;firewall&nbsp;the\r\n#&nbsp;server&#39;s&nbsp;TUN/TAP&nbsp;interface.\r\nclient-to-client\r\n\r\n#&nbsp;Uncomment&nbsp;this&nbsp;directive&nbsp;if&nbsp;multiple&nbsp;clients\r\n#&nbsp;might&nbsp;connect&nbsp;with&nbsp;the&nbsp;same&nbsp;certificate/key\r\n#&nbsp;files&nbsp;or&nbsp;common&nbsp;names.&nbsp;&nbsp;This&nbsp;is&nbsp;recommended\r\n#&nbsp;only&nbsp;for&nbsp;testing&nbsp;purposes.&nbsp;&nbsp;For&nbsp;production&nbsp;use,\r\n#&nbsp;each&nbsp;client&nbsp;should&nbsp;have&nbsp;its&nbsp;own&nbsp;certificate/key\r\n#&nbsp;pair.\r\n#\r\n#&nbsp;IF&nbsp;YOU&nbsp;HAVE&nbsp;NOT&nbsp;GENERATED&nbsp;INDIVIDUAL\r\n#&nbsp;CERTIFICATE/KEY&nbsp;PAIRS&nbsp;FOR&nbsp;EACH&nbsp;CLIENT,\r\n#&nbsp;EACH&nbsp;HAVING&nbsp;ITS&nbsp;OWN&nbsp;UNIQUE&nbsp;&quot;COMMON&nbsp;NAME&quot;,\r\n#&nbsp;UNCOMMENT&nbsp;THIS&nbsp;LINE&nbsp;OUT.\r\nduplicate-cn\r\n\r\n#&nbsp;The&nbsp;keepalive&nbsp;directive&nbsp;causes&nbsp;ping-like\r\n#&nbsp;messages&nbsp;to&nbsp;be&nbsp;sent&nbsp;back&nbsp;and&nbsp;forth&nbsp;over\r\n#&nbsp;the&nbsp;link&nbsp;so&nbsp;that&nbsp;each&nbsp;side&nbsp;knows&nbsp;when\r\n#&nbsp;the&nbsp;other&nbsp;side&nbsp;has&nbsp;gone&nbsp;down.\r\n#&nbsp;Ping&nbsp;every&nbsp;10&nbsp;seconds,&nbsp;assume&nbsp;that&nbsp;remote\r\n#&nbsp;peer&nbsp;is&nbsp;down&nbsp;if&nbsp;no&nbsp;ping&nbsp;received&nbsp;during\r\n#&nbsp;a&nbsp;120&nbsp;second&nbsp;time&nbsp;period.\r\nkeepalive&nbsp;10&nbsp;120\r\n\r\n#&nbsp;For&nbsp;extra&nbsp;security&nbsp;beyond&nbsp;that&nbsp;provided\r\n#&nbsp;by&nbsp;SSL/TLS,&nbsp;create&nbsp;an&nbsp;&quot;HMAC&nbsp;firewall&quot;\r\n#&nbsp;to&nbsp;help&nbsp;block&nbsp;DoS&nbsp;attacks&nbsp;and&nbsp;UDP&nbsp;port&nbsp;flooding.\r\n#\r\n#&nbsp;Generate&nbsp;with:\r\n#&nbsp;&nbsp;&nbsp;openvpn&nbsp;--genkey&nbsp;--secret&nbsp;ta.key\r\n#\r\n#&nbsp;The&nbsp;server&nbsp;and&nbsp;each&nbsp;client&nbsp;must&nbsp;have\r\n#&nbsp;a&nbsp;copy&nbsp;of&nbsp;this&nbsp;key.\r\n#&nbsp;The&nbsp;second&nbsp;parameter&nbsp;should&nbsp;be&nbsp;&#39;0&#39;\r\n#&nbsp;on&nbsp;the&nbsp;server&nbsp;and&nbsp;&#39;1&#39;&nbsp;on&nbsp;the&nbsp;clients.\r\n;tls-auth&nbsp;ta.key&nbsp;0&nbsp;#&nbsp;This&nbsp;file&nbsp;is&nbsp;secret\r\n\r\n#&nbsp;Select&nbsp;a&nbsp;cryptographic&nbsp;cipher.\r\n#&nbsp;This&nbsp;config&nbsp;item&nbsp;must&nbsp;be&nbsp;copied&nbsp;to\r\n#&nbsp;the&nbsp;client&nbsp;config&nbsp;file&nbsp;as&nbsp;well.\r\n;cipher&nbsp;BF-CBC&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;Blowfish&nbsp;(default)\r\n;cipher&nbsp;AES-128-CBC&nbsp;&nbsp;&nbsp;#&nbsp;AES\r\n;cipher&nbsp;DES-EDE3-CBC&nbsp;&nbsp;#&nbsp;Triple-DES\r\n\r\n#&nbsp;Enable&nbsp;compression&nbsp;on&nbsp;the&nbsp;VPN&nbsp;link.\r\n#&nbsp;If&nbsp;you&nbsp;enable&nbsp;it&nbsp;here,&nbsp;you&nbsp;must&nbsp;also\r\n#&nbsp;enable&nbsp;it&nbsp;in&nbsp;the&nbsp;client&nbsp;config&nbsp;file.\r\ncomp-lzo\r\n\r\n#&nbsp;The&nbsp;maximum&nbsp;number&nbsp;of&nbsp;concurrently&nbsp;connected\r\n#&nbsp;clients&nbsp;we&nbsp;want&nbsp;to&nbsp;allow.\r\n;max-clients&nbsp;100\r\n\r\n#&nbsp;It&#39;s&nbsp;a&nbsp;good&nbsp;idea&nbsp;to&nbsp;reduce&nbsp;the&nbsp;OpenVPN\r\n#&nbsp;daemon&#39;s&nbsp;privileges&nbsp;after&nbsp;initialization.\r\n#\r\n#&nbsp;You&nbsp;can&nbsp;uncomment&nbsp;this&nbsp;out&nbsp;on\r\n#&nbsp;non-Windows&nbsp;systems.\r\n;user&nbsp;nobody\r\n;group&nbsp;nobody\r\n\r\n#&nbsp;The&nbsp;persist&nbsp;options&nbsp;will&nbsp;try&nbsp;to&nbsp;avoid\r\n#&nbsp;accessing&nbsp;certain&nbsp;resources&nbsp;on&nbsp;restart\r\n#&nbsp;that&nbsp;may&nbsp;no&nbsp;longer&nbsp;be&nbsp;accessible&nbsp;because\r\n#&nbsp;of&nbsp;the&nbsp;privilege&nbsp;downgrade.\r\npersist-key\r\npersist-tun\r\n\r\n#&nbsp;Output&nbsp;a&nbsp;short&nbsp;status&nbsp;file&nbsp;showing\r\n#&nbsp;current&nbsp;connections,&nbsp;truncated\r\n#&nbsp;and&nbsp;rewritten&nbsp;every&nbsp;minute.\r\nstatus&nbsp;openvpn-status.log\r\n\r\n#&nbsp;By&nbsp;default,&nbsp;log&nbsp;messages&nbsp;will&nbsp;go&nbsp;to&nbsp;the&nbsp;syslog&nbsp;(or\r\n#&nbsp;on&nbsp;Windows,&nbsp;if&nbsp;running&nbsp;as&nbsp;a&nbsp;service,&nbsp;they&nbsp;will&nbsp;go&nbsp;to\r\n#&nbsp;the&nbsp;&quot;\\Program&nbsp;Files\\OpenVPN\\log&quot;&nbsp;directory).\r\n#&nbsp;Use&nbsp;log&nbsp;or&nbsp;log-append&nbsp;to&nbsp;override&nbsp;this&nbsp;default.\r\n#&nbsp;&quot;log&quot;&nbsp;will&nbsp;truncate&nbsp;the&nbsp;log&nbsp;file&nbsp;on&nbsp;OpenVPN&nbsp;startup,\r\n#&nbsp;while&nbsp;&quot;log-append&quot;&nbsp;will&nbsp;append&nbsp;to&nbsp;it.&nbsp;&nbsp;Use&nbsp;one\r\n#&nbsp;or&nbsp;the&nbsp;other&nbsp;(but&nbsp;not&nbsp;both).\r\n;log&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;openvpn.log\r\n;log-append&nbsp;&nbsp;openvpn.log\r\n\r\n#&nbsp;Set&nbsp;the&nbsp;appropriate&nbsp;level&nbsp;of&nbsp;log\r\n#&nbsp;file&nbsp;verbosity.\r\n#\r\n#&nbsp;0&nbsp;is&nbsp;silent,&nbsp;except&nbsp;for&nbsp;fatal&nbsp;errors\r\n#&nbsp;4&nbsp;is&nbsp;reasonable&nbsp;for&nbsp;general&nbsp;usage\r\n#&nbsp;5&nbsp;and&nbsp;6&nbsp;can&nbsp;help&nbsp;to&nbsp;debug&nbsp;connection&nbsp;problems\r\n#&nbsp;9&nbsp;is&nbsp;extremely&nbsp;verbose\r\nverb&nbsp;3\r\n\r\n#&nbsp;Silence&nbsp;repeating&nbsp;messages.&nbsp;&nbsp;At&nbsp;most&nbsp;20\r\n#&nbsp;sequential&nbsp;messages&nbsp;of&nbsp;the&nbsp;same&nbsp;message\r\n#&nbsp;category&nbsp;will&nbsp;be&nbsp;output&nbsp;to&nbsp;the&nbsp;log.\r\n;mute&nbsp;20</pre><p>12、设置代理</p><p><br/></p><p>13、启动openvpn</p><pre class=\"brush:bash;toolbar:false\">/usr/local/openvpn/sbin/openvpn&nbsp;/usr/local/openvpn/conf/server.conf</pre><p>14、windows设置</p><p>1)安装客户端:</p><pre class=\"brush:bash;toolbar:false\">http://swupdate.openvpn.org/community/releases/openvpn-install-2.3.6-I603-x86_64.exe</pre><p>2)拷贝刚才打包下来的服务端ca.crt&nbsp; 用户秘钥client1.crt client1.key 到OpenVpn客户端安装根目录下下的config目录内</p><p>3)增加配置client.ovpn,如果没有那么先建立,输入以下的内容</p><pre class=\"brush:bash;toolbar:false\">##############################################\r\n#&nbsp;Sample&nbsp;client-side&nbsp;OpenVPN&nbsp;2.0&nbsp;config&nbsp;file&nbsp;#\r\n#&nbsp;for&nbsp;connecting&nbsp;to&nbsp;multi-client&nbsp;server.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#\r\n#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#\r\n#&nbsp;This&nbsp;configuration&nbsp;can&nbsp;be&nbsp;used&nbsp;by&nbsp;multiple&nbsp;#\r\n#&nbsp;clients,&nbsp;however&nbsp;each&nbsp;client&nbsp;should&nbsp;have&nbsp;&nbsp;&nbsp;#\r\n#&nbsp;its&nbsp;own&nbsp;cert&nbsp;and&nbsp;key&nbsp;files.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#\r\n#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#\r\n#&nbsp;On&nbsp;Windows,&nbsp;you&nbsp;might&nbsp;want&nbsp;to&nbsp;rename&nbsp;this&nbsp;&nbsp;#\r\n#&nbsp;file&nbsp;so&nbsp;it&nbsp;has&nbsp;a&nbsp;.ovpn&nbsp;extension&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#\r\n##############################################\r\n\r\n#&nbsp;Specify&nbsp;that&nbsp;we&nbsp;are&nbsp;a&nbsp;client&nbsp;and&nbsp;that&nbsp;we\r\n#&nbsp;will&nbsp;be&nbsp;pulling&nbsp;certain&nbsp;config&nbsp;file&nbsp;directives\r\n#&nbsp;from&nbsp;the&nbsp;server.\r\nclient\r\n\r\n#&nbsp;Use&nbsp;the&nbsp;same&nbsp;setting&nbsp;as&nbsp;you&nbsp;are&nbsp;using&nbsp;on\r\n#&nbsp;the&nbsp;server.\r\n#&nbsp;On&nbsp;most&nbsp;systems,&nbsp;the&nbsp;VPN&nbsp;will&nbsp;not&nbsp;function\r\n#&nbsp;unless&nbsp;you&nbsp;partially&nbsp;or&nbsp;fully&nbsp;disable\r\n#&nbsp;the&nbsp;firewall&nbsp;for&nbsp;the&nbsp;TUN/TAP&nbsp;interface.\r\n;dev&nbsp;tap\r\ndev&nbsp;tun\r\n\r\n#&nbsp;Windows&nbsp;needs&nbsp;the&nbsp;TAP-Win32&nbsp;adapter&nbsp;name\r\n#&nbsp;from&nbsp;the&nbsp;Network&nbsp;Connections&nbsp;panel\r\n#&nbsp;if&nbsp;you&nbsp;have&nbsp;more&nbsp;than&nbsp;one.&nbsp;&nbsp;On&nbsp;XP&nbsp;SP2,\r\n#&nbsp;you&nbsp;may&nbsp;need&nbsp;to&nbsp;disable&nbsp;the&nbsp;firewall\r\n#&nbsp;for&nbsp;the&nbsp;TAP&nbsp;adapter.\r\n;dev-node&nbsp;MyTap\r\n\r\n#&nbsp;Are&nbsp;we&nbsp;connecting&nbsp;to&nbsp;a&nbsp;TCP&nbsp;or\r\n#&nbsp;UDP&nbsp;server?&nbsp;&nbsp;Use&nbsp;the&nbsp;same&nbsp;setting&nbsp;as\r\n#&nbsp;on&nbsp;the&nbsp;server.\r\n;proto&nbsp;tcp\r\nproto&nbsp;udp\r\n\r\n#&nbsp;The&nbsp;hostname/IP&nbsp;and&nbsp;port&nbsp;of&nbsp;the&nbsp;server.\r\n#&nbsp;You&nbsp;can&nbsp;have&nbsp;multiple&nbsp;remote&nbsp;entries\r\n#&nbsp;to&nbsp;load&nbsp;balance&nbsp;between&nbsp;the&nbsp;servers.\r\nremote&nbsp;207.226.141.212&nbsp;1194\r\n;remote&nbsp;my-server-2&nbsp;1194\r\n\r\n#&nbsp;Choose&nbsp;a&nbsp;random&nbsp;host&nbsp;from&nbsp;the&nbsp;remote\r\n#&nbsp;list&nbsp;for&nbsp;load-balancing.&nbsp;&nbsp;Otherwise\r\n#&nbsp;try&nbsp;hosts&nbsp;in&nbsp;the&nbsp;order&nbsp;specified.\r\n;remote-random\r\n\r\n#&nbsp;Keep&nbsp;trying&nbsp;indefinitely&nbsp;to&nbsp;resolve&nbsp;the\r\n#&nbsp;host&nbsp;name&nbsp;of&nbsp;the&nbsp;OpenVPN&nbsp;server.&nbsp;&nbsp;Very&nbsp;useful\r\n#&nbsp;on&nbsp;machines&nbsp;which&nbsp;are&nbsp;not&nbsp;permanently&nbsp;connected\r\n#&nbsp;to&nbsp;the&nbsp;internet&nbsp;such&nbsp;as&nbsp;laptops.\r\nresolv-retry&nbsp;infinite\r\n\r\n#&nbsp;Most&nbsp;clients&nbsp;don&#39;t&nbsp;need&nbsp;to&nbsp;bind&nbsp;to\r\n#&nbsp;a&nbsp;specific&nbsp;local&nbsp;port&nbsp;number.\r\nnobind\r\n\r\n#&nbsp;Downgrade&nbsp;privileges&nbsp;after&nbsp;initialization&nbsp;(non-Windows&nbsp;only)\r\n;user&nbsp;nobody\r\n;group&nbsp;nobody\r\n\r\n#&nbsp;Try&nbsp;to&nbsp;preserve&nbsp;some&nbsp;state&nbsp;across&nbsp;restarts.\r\npersist-key\r\npersist-tun\r\n\r\n#&nbsp;If&nbsp;you&nbsp;are&nbsp;connecting&nbsp;through&nbsp;an\r\n#&nbsp;HTTP&nbsp;proxy&nbsp;to&nbsp;reach&nbsp;the&nbsp;actual&nbsp;OpenVPN\r\n#&nbsp;server,&nbsp;put&nbsp;the&nbsp;proxy&nbsp;server/IP&nbsp;and\r\n#&nbsp;port&nbsp;number&nbsp;here.&nbsp;&nbsp;See&nbsp;the&nbsp;man&nbsp;page\r\n#&nbsp;if&nbsp;your&nbsp;proxy&nbsp;server&nbsp;requires\r\n#&nbsp;authentication.\r\n;http-proxy-retry&nbsp;#&nbsp;retry&nbsp;on&nbsp;connection&nbsp;failures\r\n;http-proxy&nbsp;[proxy&nbsp;server]&nbsp;[proxy&nbsp;port&nbsp;#]\r\n\r\n#&nbsp;Wireless&nbsp;networks&nbsp;often&nbsp;produce&nbsp;a&nbsp;lot\r\n#&nbsp;of&nbsp;duplicate&nbsp;packets.&nbsp;&nbsp;Set&nbsp;this&nbsp;flag\r\n#&nbsp;to&nbsp;silence&nbsp;duplicate&nbsp;packet&nbsp;warnings.\r\n;mute-replay-warnings\r\n\r\n#&nbsp;SSL/TLS&nbsp;parms.\r\n#&nbsp;See&nbsp;the&nbsp;server&nbsp;config&nbsp;file&nbsp;for&nbsp;more\r\n#&nbsp;description.&nbsp;&nbsp;It&#39;s&nbsp;best&nbsp;to&nbsp;use\r\n#&nbsp;a&nbsp;separate&nbsp;.crt/.key&nbsp;file&nbsp;pair\r\n#&nbsp;for&nbsp;each&nbsp;client.&nbsp;&nbsp;A&nbsp;single&nbsp;ca\r\n#&nbsp;file&nbsp;can&nbsp;be&nbsp;used&nbsp;for&nbsp;all&nbsp;clients.\r\nca&nbsp;ca.crt\r\ncert&nbsp;client1.crt\r\nkey&nbsp;client1.key\r\n\r\n#&nbsp;Verify&nbsp;server&nbsp;certificate&nbsp;by&nbsp;checking&nbsp;that&nbsp;the\r\n#&nbsp;certicate&nbsp;has&nbsp;the&nbsp;correct&nbsp;key&nbsp;usage&nbsp;set.\r\n#&nbsp;This&nbsp;is&nbsp;an&nbsp;important&nbsp;precaution&nbsp;to&nbsp;protect&nbsp;against\r\n#&nbsp;a&nbsp;potential&nbsp;attack&nbsp;discussed&nbsp;here:\r\n#&nbsp;&nbsp;http://openvpn.net/howto.html#mitm\r\n#\r\n#&nbsp;To&nbsp;use&nbsp;this&nbsp;feature,&nbsp;you&nbsp;will&nbsp;need&nbsp;to&nbsp;generate\r\n#&nbsp;your&nbsp;server&nbsp;certificates&nbsp;with&nbsp;the&nbsp;keyUsage&nbsp;set&nbsp;to\r\n#&nbsp;&nbsp;&nbsp;digitalSignature,&nbsp;keyEncipherment\r\n#&nbsp;and&nbsp;the&nbsp;extendedKeyUsage&nbsp;to\r\n#&nbsp;&nbsp;&nbsp;serverAuth\r\n#&nbsp;EasyRSA&nbsp;can&nbsp;do&nbsp;this&nbsp;for&nbsp;you.\r\nremote-cert-tls&nbsp;server\r\n\r\n#&nbsp;If&nbsp;a&nbsp;tls-auth&nbsp;key&nbsp;is&nbsp;used&nbsp;on&nbsp;the&nbsp;server\r\n#&nbsp;then&nbsp;every&nbsp;client&nbsp;must&nbsp;also&nbsp;have&nbsp;the&nbsp;key.\r\n;tls-auth&nbsp;ta.key&nbsp;1\r\n\r\n#&nbsp;Select&nbsp;a&nbsp;cryptographic&nbsp;cipher.\r\n#&nbsp;If&nbsp;the&nbsp;cipher&nbsp;option&nbsp;is&nbsp;used&nbsp;on&nbsp;the&nbsp;server\r\n#&nbsp;then&nbsp;you&nbsp;must&nbsp;also&nbsp;specify&nbsp;it&nbsp;here.\r\n;cipher&nbsp;x\r\n\r\n#&nbsp;Enable&nbsp;compression&nbsp;on&nbsp;the&nbsp;VPN&nbsp;link.\r\n#&nbsp;Don&#39;t&nbsp;enable&nbsp;this&nbsp;unless&nbsp;it&nbsp;is&nbsp;also\r\n#&nbsp;enabled&nbsp;in&nbsp;the&nbsp;server&nbsp;config&nbsp;file.\r\ncomp-lzo\r\n\r\n#&nbsp;Set&nbsp;log&nbsp;file&nbsp;verbosity.\r\nverb&nbsp;3\r\n\r\n#&nbsp;Silence&nbsp;repeating&nbsp;messages\r\n;mute&nbsp;20</pre><p>15、设置IP转发,因为我的是centos7,所以(from:<a _src=\"http://www.tuicool.com/articles/V3aIF3v\" href=\"http://www.tuicool.com/articles/V3aIF3v\">http://www.tuicool.com/articles/V3aIF3v</a>&nbsp; ):</p><p>注:以下命令重启后可能要重新执行。囧!!</p><pre class=\"brush:bash;toolbar:false\">yum&nbsp;install&nbsp;iptables-services</pre><pre class=\"prettyprint undefined\">systemctl&nbsp;mask&nbsp;firewalld</pre><pre class=\"prettyprint undefined\">systemctl&nbsp;enable&nbsp;iptables</pre><pre class=\"prettyprint undefined\">systemctl&nbsp;stop&nbsp;firewalld</pre><pre class=\"prettyprint sql\">systemctl&nbsp;start&nbsp;iptables</pre><pre class=\"prettyprint sql\">iptables&nbsp;--flush</pre><pre class=\"prettyprint undefined\">iptables&nbsp;-t&nbsp;nat&nbsp;-A&nbsp;POSTROUTING&nbsp;-s&nbsp;10.8.0.0/24&nbsp;-o&nbsp;eth0&nbsp;-j&nbsp;MASQUERADE</pre><pre class=\"prettyprint ruby\">iptables-save&nbsp;&gt;&nbsp;/etc/sysconfig/iptables</pre><pre class=\"prettyprint undefined\">vi&nbsp;/etc/sysctl.conf</pre><pre class=\"prettyprint undefined\">net.ipv4.ip_forward&nbsp;=&nbsp;1</pre><pre class=\"prettyprint sql\">systemctl&nbsp;restart&nbsp;network.service</pre><p><br/></p>', '1427870851');
INSERT INTO `bk_article_detail` VALUES ('64', '1', '77', '<p>Security is most important aspect in internet. Outsiders can monitor \r\ninternet traffic between your computer and the web. Here the importance \r\nof &nbsp; &nbsp;<strong>VPN</strong>comes. VPN, or virtual private network, is a secure method of connecting\r\n remote internet resources together as if they were under the same LAN. \r\n &nbsp; <strong>OpenVPN</strong>is a popular open source application that implements a virtual private \r\nnetwork. works on Linux, Windows, and Mac operating systems. It can be \r\nutilized to create a secure connection between physically distributed \r\nservers.</p><p>This Article explains How to install and configure OpenVPN in centOS 7 server.</p><h3>Prerequisites</h3><ul class=\" list-paddingleft-2\"><li><p>CentOS 7 server.</p></li><li><p><strong>root</strong>&nbsp;access to the server.</p></li><li><p>Domain or sub-domain that resolves to your server that you can use for the certificates</p></li></ul><p>OpenVpn isn’t available in the default CentOS repositories. So we \r\nneed to install Enterprise Linux (EPEL) repository. Use the following \r\ncommand to install EPEL repository.</p><pre class=\"prettyprint undefined\">yum&nbsp;install&nbsp;epel-release</pre><p>&nbsp;</p><h2>Step 1 — Installing OpenVPN</h2><p>First, We are going to install in the server by issuing the following command.</p><pre class=\"prettyprint undefined\">yum&nbsp;install&nbsp;openvpn&nbsp;-y</pre><p>&nbsp;</p><h2>Step&nbsp;2 —&nbsp; Install Easy RSA</h2><p>For generating our SSL key pairs, which will secure our VPN connections. Execute the following command:</p><pre class=\"prettyprint undefined\">yum&nbsp;install&nbsp;easy-rsa&nbsp;-y</pre><p>&nbsp;</p><h2>Step 3 — Configuring OpenVPN</h2><p>We can find an example configuration file in its documentation directory &nbsp; &nbsp;<strong>.</strong>We need to copy the &nbsp; &nbsp;<strong>sampleserver.conf</strong>by the following command.</p><pre class=\"prettyprint ruby\">cp&nbsp;/usr/share/doc/openvpn-*/sample/sample-config-files/server.conf&nbsp;&nbsp;/etc/openvpn</pre><p>&nbsp;</p><p>Open the file in your favorite editor, I’m using&nbsp;editor,</p><pre class=\"prettyprint undefined\">vi&nbsp;/etc/openvpn/server.conf</pre><p>&nbsp;</p><p>Most of the lines just need to be uncommented (remove the&nbsp;;) and some of there are to be changed.</p><p>Do the following changes.</p><p>We need to change the&nbsp;dh&nbsp;file name to &nbsp; &nbsp;<strong>dh2048.pem</strong>. Because the default Diffie-Hellman encryption length for Easy RSA will\r\n be 2048 bytes. We will do the key generation in next step.</p><pre class=\"prettyprint undefined\">dh&nbsp;dh2048.pem</pre><p>&nbsp;</p><p>Next, uncomment the &nbsp; &nbsp;<strong>push “redirect-gateway def1 bypass-dhcp”</strong>line, which tells the client to redirect all traffic through our OpenVPN.</p><pre class=\"prettyprint perl\">push&nbsp;&quot;redirect-gateway&nbsp;def1&nbsp;bypass-dhcp&quot;</pre><p>&nbsp;</p><p>Next we need to provide DNS servers to the client, as it will not \r\nbe able to use the default DNS servers provided by your Internet service\r\n provider. We’re going to use Google’s public DNS \r\nservers,&nbsp;8.8.8.8&nbsp;and8.8.4.4.</p><p>For this, uncomment the &nbsp; &nbsp;<strong>push “dhcp-option DNS</strong>lines and updating the IP addresses.</p><pre class=\"prettyprint perl\">push&nbsp;&quot;dhcp-option&nbsp;DNS&nbsp;8.8.8.8&quot;push&nbsp;&quot;dhcp-option&nbsp;DNS&nbsp;8.8.4.4&quot;</pre><p>&nbsp;</p><p>Change user and group to nobody</p><pre class=\"prettyprint cs\">user&nbsp;nobodygroup&nbsp;nobody</pre><p>&nbsp;</p><p>Save and exit the OpenVPN server configuration file.</p><h2>Step 4 — Generating Keys and Certificates</h2><p>Now &nbsp; &nbsp;<strong>,</strong>we’ll need to generate our keys and certificates. Easy RSA installs some scripts to generate these keys and certificates.</p><p>Create a directory for the keys by the following command</p><pre class=\"prettyprint perl\">mkdir&nbsp;-p&nbsp;/etc/openvpn/easy-rsa/keys</pre><p>&nbsp;</p><p>We also need to copy the key and certificate generation scripts into the directory.</p><pre class=\"prettyprint ruby\">cp&nbsp;-rf&nbsp;/usr/share/easy-rsa/2.0/*&nbsp;/etc/openvpn/easy-rsa</pre><p>&nbsp;</p><p>Now, we’re going to edit the default values in the script. So we \r\ndon’t have to type our information in each time. Open the file in vi \r\neditor.</p><pre class=\"prettyprint undefined\">vi&nbsp;/etc/openvpn/easy-rsa/vars</pre><p>&nbsp;</p><p>Change values that start with &nbsp; &nbsp;<strong>KEY_</strong>. Update the following values to be accurate for your organization.</p><p>Some of the important value that should be change carefully are,</p><ul class=\" list-paddingleft-2\"><li><p>KEY_NAME: You should enter&nbsp;server&nbsp;here; you could enter \r\nsomething else, but then you would also have to update the configuration\r\n files that reference&nbsp;&nbsp;and</p></li><li><p>KEY_CN: Enter the domain or subdomain that resolves to your server</p></li></ul><p>Refer the sample file below,</p><pre class=\"prettyprint cpp\">.&nbsp;.&nbsp;.#&nbsp;These&nbsp;are&nbsp;the&nbsp;default&nbsp;values&nbsp;for&nbsp;fields#&nbsp;which&nbsp;will&nbsp;be&nbsp;placed&nbsp;in&nbsp;the&nbsp;certificate.#&nbsp;Don&#39;t&nbsp;leave&nbsp;any&nbsp;of&nbsp;these&nbsp;fields&nbsp;blank.export&nbsp;KEY_COUNTRY=&quot;US&quot;export&nbsp;KEY_PROVINCE=&quot;NY&quot;export&nbsp;KEY_CITY=&quot;New&nbsp;York&quot;export&nbsp;KEY_ORG=&quot;unixmen&quot;export&nbsp;KEY_EMAIL=&quot;jijojamestj@gmail.com&quot;export&nbsp;KEY_OU=&quot;Community&quot;#&nbsp;X509&nbsp;Subject&nbsp;Fieldexport&nbsp;KEY_NAME=&quot;server&quot;.&nbsp;.&nbsp;.export&nbsp;KEY_CN=openvpn.unixmen.com\r\n.&nbsp;.&nbsp;.</pre><p>&nbsp;</p><p>OpenSSL configuration may not load due to the version being \r\nundetectable. To avoid this remove the version number from the openSSl \r\nfile name.</p><pre class=\"prettyprint undefined\">cp&nbsp;/etc/openvpn/easy-rsa/openssl-1.0.0.cnf&nbsp;/etc/openvpn/easy-rsa/openssl.cnf</pre><p>&nbsp;</p><p>Next, We are going to generate the keys and certificates. Move to easy-rsa&nbsp;directory and &nbsp; &nbsp;<em>\r\n &nbsp; &nbsp; &nbsp;<strong>source</strong>\r\n &nbsp; &nbsp;</em>in our new variables.</p><pre class=\"prettyprint undefined\">cd&nbsp;/etc/openvpn/easy-rsa</pre><p>&nbsp;</p><pre class=\"prettyprint ruby\">source&nbsp;./vars</pre><p>&nbsp;</p><p>Then, we will clean up any keys and certificates which may already be in this folder and generate our certificate authority.</p><pre class=\"prettyprint ruby\">./clean-all</pre><p>&nbsp;</p><p>When you build the certificate authority, you will be asked to \r\nenter all the information we put into the vars&nbsp;file, but you will see \r\nthat your options are already set as the defaults. So, you can just \r\npress ENTER for each one.</p><pre class=\"prettyprint ruby\">./build-ca</pre><p>&nbsp;</p><p>Next, We will generate the key and certificate for the server. Please press ENTER for each question as for the above step</p><pre class=\"prettyprint ruby\">./build-key-server&nbsp;server</pre><p>&nbsp;</p><p>Now we will generate Diffie-Hellman key exchange file. This command will take few to complete:</p><pre class=\"prettyprint ruby\">./build-dh</pre><p>&nbsp;</p><p>So, we completed the server keys and certificates generation process. Copy them all into our OpenVPN directory.</p><pre class=\"prettyprint perl\">cd&nbsp;/etc/openvpn/easy-rsa/keys</pre><p>&nbsp;</p><pre class=\"prettyprint undefined\">cp&nbsp;dh2048.pem&nbsp;ca.crt&nbsp;server.crt&nbsp;server.key&nbsp;/etc/openvpn</pre><p>&nbsp;</p><p>For authenticate our clients will also need certificates. These \r\nkeys and certificates will be shared with your clients, and it’s best to\r\n generate separate keys and certificates for each client you intend on \r\nconnecting.</p><p>Make sure that if you do this you give them descriptive names, but \r\nfor now we’re going to have one client so we’ll just call it&nbsp;client.</p><pre class=\"prettyprint undefined\">cd&nbsp;/etc/openvpn/easy-rsa</pre><p>&nbsp;</p><pre class=\"prettyprint ruby\">./build-key&nbsp;client</pre><p>&nbsp;</p><pre class=\"prettyprint undefined\">&nbsp;That&#39;s&nbsp;it&nbsp;for&nbsp;keys&nbsp;and&nbsp;certificates.</pre><p>&nbsp;</p><h2>Step 5 — Routing</h2><p>Install the iptables and disablefirewalld by execute the following commands</p><pre class=\"prettyprint undefined\">yum&nbsp;install&nbsp;iptables-services&nbsp;-y</pre><p>&nbsp;</p><pre class=\"prettyprint undefined\">systemctl&nbsp;mask&nbsp;firewalld</pre><p>&nbsp;</p><pre class=\"prettyprint undefined\">systemctl&nbsp;enable&nbsp;iptables</pre><p>&nbsp;</p><pre class=\"prettyprint undefined\">systemctl&nbsp;stop&nbsp;firewalld</pre><p>&nbsp;</p><pre class=\"prettyprint sql\">systemctl&nbsp;start&nbsp;iptables</pre><p>&nbsp;</p><pre class=\"prettyprint sql\">iptables&nbsp;--flush</pre><p>&nbsp;</p><p>Next, We need to add a rule to iptables to forward our routing to our OpenVPN subnet, and save this rule.</p><pre class=\"prettyprint undefined\">iptables&nbsp;-t&nbsp;nat&nbsp;-A&nbsp;POSTROUTING&nbsp;-s&nbsp;10.8.0.0/24&nbsp;-o&nbsp;eth0&nbsp;-j&nbsp;MASQUERADE</pre><p>&nbsp;</p><pre class=\"prettyprint ruby\">iptables-save&nbsp;&gt;&nbsp;/etc/sysconfig/iptables</pre><p>&nbsp;</p><p>Next, enable &nbsp;IP forwarding in&nbsp;sysctl. Open&nbsp;sysctl.conf&nbsp;in vi editor.</p><pre class=\"prettyprint undefined\">vi&nbsp;/etc/sysctl.conf</pre><p>&nbsp;</p><p>Add the following line at the top of the file:</p><pre class=\"prettyprint undefined\">net.ipv4.ip_forward&nbsp;=&nbsp;1</pre><p>&nbsp;</p><p>For the IP forwarding will take effect. We need to restart the network service. Issue the following command</p><pre class=\"prettyprint sql\">systemctl&nbsp;restart&nbsp;network.service</pre><p>&nbsp;</p><h2>Step 6 — Starting OpenVPN</h2><p>Now, we completed the installation and ready start the openVPN service. add it to&nbsp;systemctl using the command</p><pre class=\"prettyprint ruby\">systemctl&nbsp;-f&nbsp;enable&nbsp;openvpn@server.service</pre><p>&nbsp;</p><p>Start OpenVPN:</p><pre class=\"prettyprint sql\">systemctl&nbsp;start&nbsp;openvpn@server.service</pre><p>&nbsp;</p><p>So we have successfully completed all the server-side configuration done for OpenVPN.</p><p>Next Let’s see how to connect a client to the server.</p><h2>Step 6 — Configuring a Client</h2><p>To connectyou will definitely need a copy of the ca certificate from the server, along with the client key and certificate.</p><p>Locate the following files on the &nbsp; &nbsp;<strong>server</strong>. In this article we used&nbsp;‘client’ as the descriptive name for the client keys.</p><pre class=\"prettyprint perl\">/etc/openvpn/easy-rsa/keys/ca.crt</pre><p>&nbsp;</p><pre class=\"prettyprint perl\">/etc/openvpn/easy-rsa/keys/client.crt</pre><p>&nbsp;</p><pre class=\"prettyprint perl\">/etc/openvpn/easy-rsa/keys/client.key</pre><p>&nbsp;</p><p>Copy these three files to your&nbsp;client machine. For this, Open the file \r\nin the server and copy the content of the file into a new file in the \r\nclient system an save, or use &nbsp; &nbsp;<strong>SFTP</strong>.</p><p>We’re going to create a file called&nbsp;client.ovpn. This is a \r\nconfiguration file for an OpenVPN client, telling it how to connect to \r\nthe server.</p><ul class=\" list-paddingleft-2\"><li><p>You’ll need to change the first line to reflect the name you \r\ngave the client in your key and certificate; in our case, this is \r\njust&nbsp;client</p></li><li><p>You also need to update the IP address from&nbsp;your_server_ip&nbsp;to the IP address of your server; port1194&nbsp;can stay the same</p></li><li><p>Make sure the paths to your key and certificate files are correct</p></li></ul><pre class=\"prettyprint ruby\">client\r\ndev&nbsp;tun\r\nproto&nbsp;udp\r\nremote&nbsp;your_server_ip&nbsp;1194resolv-retry&nbsp;infinite\r\nnobind\r\npersist-key\r\npersist-tun\r\ncomp-lzo\r\nverb&nbsp;3ca&nbsp;/path/to/ca.crt\r\ncert&nbsp;/path/to/client.crt\r\nkey&nbsp;/path/to/client.key</pre><p>&nbsp;</p><p>This file can now be used by any OpenVPN client to connect to your server.</p><p>Assume the client machine has Windows OS.</p><p>You will need the official &nbsp; &nbsp;<a href=\"http://openvpn.net/index.php/open-source/downloads.html\" target=\"_blank\" rel=\"nofollow,noindex\">OpenVPN Community Edition binaries</a>which come with a GUI. Then, place your&nbsp;.ovpn&nbsp;configuration file into the proper directory, &nbsp; &nbsp;<strong>ex. C:\\Program Files\\OpenVPN\\config</strong>, and click&nbsp; &nbsp; &nbsp;<strong>Connect</strong>in the GUI. OpenVPN GUI on Windows must be executed with administrative privileges.</p><p><br/></p>', '1427894135');
INSERT INTO `bk_article_detail` VALUES ('65', '1', '78', '<p><span style=\"color: rgb(255, 0, 0);\">转自:</span><a style=\"color: rgb(255, 0, 0); text-decoration: underline;\" _src=\"http://www.woyaohuijia.cn/show/121.html\" href=\"http://www.woyaohuijia.cn/show/121.html\"><span style=\"color: rgb(255, 0, 0);\">http://www.woyaohuijia.cn/show/121.html</span></a><span style=\"color: rgb(255, 0, 0);\"> <br/></span></p><p><span style=\"color: rgb(255, 0, 0);\"><br/></span></p><p><span style=\"color: rgb(255, 0, 0);\"><span style=\"color: rgb(0, 0, 0);\"></span></span>本文将介绍如何配置OpenVPN服务器端的配置文件。在Windows系统中,该配置文件一般叫做server.ovpn;在Linux/BSD系统中,该配置文件一般叫做server.conf。虽然配置文件名称不同,但其中的配置内容与配置方法却是相同的。<br/><br/>本文根据官方提供的server.ovpn示例文件直接翻译得出。Windows、Linux、BSD等系统的服务器端配置文件均可参考本文。<br/>#################################################<br/># 针对多客户端的OpenVPN 2.0 的服务器端配置文件示例<br/>#<br/># 本文件用于多客户端&lt;-&gt;单服务器端的OpenVPN服务器端配置<br/>#<br/># OpenVPN也支持单机&lt;-&gt;单机的配置(更多信息请查看网站上的示例页面)<br/>#<br/># 该配置支持Windows或者Linux/BSD系统。此外,在Windows上,记得将路径加上双引号,<br/># 并且使用两个反斜杠,例如:&quot;C:\\\\Program Files\\\\OpenVPN\\\\config\\\\foo.key&quot;<br/>#<br/># &#39;#&#39; or &#39;;&#39;开头的均为注释内容<br/>#################################################<br/><br/>#OpenVPN应该监听本机的哪些IP地址?<br/>#该命令是可选的,如果不设置,则默认监听本机的所有IP地址。<br/>;local a.b.c.d<br/><br/># OpenVPN应该监听哪个TCP/UDP端口?<br/># 如果你想在同一台计算机上运行多个OpenVPN实例,你可以使用不同的端口号来区分它们。<br/># 此外,你需要在防火墙上开放这些端口。<br/>port 1194<br/><br/>#OpenVPN使用TCP还是UDP协议?<br/>;proto tcp<br/>proto udp<br/><br/># 指定OpenVPN创建的通信隧道类型。<br/># &quot;dev tun&quot;将会创建一个路由IP隧道,<br/># &quot;dev tap&quot;将会创建一个以太网隧道。<br/>#<br/># 如果你是以太网桥接模式,并且提前创建了一个名为&quot;tap0&quot;的与以太网接口进行桥接的虚拟接口,则你可以使用&quot;dev tap0&quot;<br/>#<br/># 如果你想控制VPN的访问策略,你必须为TUN/TAP接口创建防火墙规则。<br/>#<br/># 在非Windows系统中,你可以给出明确的单位编号(unit number),例如&quot;tun0&quot;。<br/># 在Windows中,你也可以使用&quot;dev-node&quot;。<br/># 在多数系统中,除非你部分禁用或者完全禁用了TUN/TAP接口的防火墙,否则VPN将不起作用。<br/>;dev tap<br/>dev tun<br/><br/># 如果你想配置多个隧道,你需要用到网络连接面板中TAP-Win32适配器的名称(例如&quot;MyTap&quot;)。<br/># 在XP SP2或更高版本的系统中,你可能需要有选择地禁用掉针对TAP适配器的防火墙<br/># 通常情况下,非Windows系统则不需要该指令。<br/>;dev-node MyTap<br/><br/># 设置SSL/TLS根证书(ca)、证书(cert)和私钥(key)。<br/># 每个客户端和服务器端都需要它们各自的证书和私钥文件。<br/># 服务器端和所有的客户端都将使用相同的CA证书文件。<br/>#<br/># 通过easy-rsa目录下的一系列脚本可以生成所需的证书和私钥。<br/># 记住,服务器端和每个客户端的证书必须使用唯一的Common Name。<br/>#<br/># 你也可以使用遵循X509标准的任何密钥管理系统来生成证书和私钥。<br/># OpenVPN 也支持使用一个PKCS #12格式的密钥文件(详情查看站点手册页面的&quot;pkcs12&quot;指令)<br/>ca ca.crt<br/>cert server.crt<br/>key server.key&nbsp; # 该文件应该保密<br/><br/># 指定迪菲·赫尔曼参数。<br/># 你可以使用如下名称命令生成你的参数:<br/>#&nbsp;&nbsp; openssl dhparam -out dh1024.pem 1024<br/># 如果你使用的是2048位密钥,使用2048替换其中的1024。<br/>dh dh1024.pem<br/><br/># 设置服务器端模式,并提供一个VPN子网,以便于从中为客户端分配IP地址。<br/># 在此处的示例中,服务器端自身将占用10.8.0.1,其他的将提供客户端使用。<br/># 如果你使用的是以太网桥接模式,请注释掉该行。更多信息请查看官方手册页面。<br/>server 10.8.0.0 255.255.255.0<br/><br/># 指定用于记录客户端和虚拟IP地址的关联关系的文件。<br/># 当重启OpenVPN时,再次连接的客户端将分配到与上一次分配相同的虚拟IP地址<br/>ifconfig-pool-persist ipp.txt<br/><br/># 该指令仅针对以太网桥接模式。<br/># 首先,你必须使用操作系统的桥接能力将以太网网卡接口和TAP接口进行桥接。<br/># 然后,你需要手动设置桥接接口的IP地址、子网掩码;<br/># 在这里,我们假设为10.8.0.4和255.255.255.0。<br/># 最后,我们必须指定子网的一个IP范围(例如从10.8.0.50开始,到10.8.0.100结束),以便于分配给连接的客户端。<br/># 如果你不是以太网桥接模式,直接注释掉这行指令即可。<br/>;server-bridge 10.8.0.4 255.255.255.0 10.8.0.50 10.8.0.100<br/><br/># 该指令仅针对使用DHCP代理的以太网桥接模式,<br/># 此时客户端将请求服务器端的DHCP服务器,从而获得分配给它的IP地址和DNS服务器地址。<br/>#<br/># 在此之前,你也需要先将以太网网卡接口和TAP接口进行桥接。<br/># 注意:该指令仅用于OpenVPN客户端,并且该客户端的TAP适配器需要绑定到一个DHCP客户端上。<br/>;server-bridge<br/><br/># 推送路由信息到客户端,以允许客户端能够连接到服务器背后的其他私有子网。<br/># (简而言之,就是允许客户端访问VPN服务器自身所在的其他局域网)<br/># 记住,这些私有子网也要将OpenVPN客户端的地址池(10.8.0.0/255.255.255.0)反馈回OpenVPN服务器。<br/>;push &quot;route 192.168.10.0 255.255.255.0&quot;<br/>;push &quot;route 192.168.20.0 255.255.255.0&quot;<br/><br/># 为指定的客户端分配指定的IP地址,或者客户端背后也有一个私有子网想要访问VPN,<br/># 那么你可以针对该客户端的配置文件使用ccd子目录。<br/># (简而言之,就是允许客户端所在的局域网成员也能够访问VPN)<br/><br/># 举个例子:假设有个Common Name为&quot;Thelonious&quot;的客户端背后也有一个小型子网想要连接到VPN,该子网为192.168.40.128/255.255.255.248。<br/># 首先,你需要去掉下面两行指令的注释:<br/>;client-config-dir ccd<br/>;route 192.168.40.128 255.255.255.248<br/># 然后创建一个文件ccd/Thelonious,该文件的内容为:<br/>#&nbsp;&nbsp;&nbsp;&nbsp; iroute 192.168.40.128 255.255.255.248<br/>#这样客户端所在的局域网就可以访问VPN了。<br/># 注意,这个指令只能在你是基于路由、而不是基于桥接的模式下才能生效。<br/># 比如,你使用了&quot;dev tun&quot;和&quot;server&quot;指令。<br/><br/># 再举个例子:假设你想给Thelonious分配一个固定的IP地址10.9.0.1。<br/># 首先,你需要去掉下面两行指令的注释:<br/>;client-config-dir ccd<br/>;route 10.9.0.0 255.255.255.252<br/># 然后在文件ccd/Thelonious中添加如下指令:<br/>#&nbsp;&nbsp; ifconfig-push 10.9.0.1 10.9.0.2<br/><br/># 如果你想要为不同群组的客户端启用不同的防火墙访问策略,你可以使用如下两种方法:<br/># (1)运行多个OpenVPN守护进程,每个进程对应一个群组,并为每个进程(群组)启用适当的防火墙规则。<br/># (2) (进阶)创建一个脚本来动态地修改响应于来自不同客户的防火墙规则。<br/># 关于learn-address脚本的更多信息请参考官方手册页面。<br/>;learn-address ./script<br/><br/># 如果启用该指令,所有客户端的默认网关都将重定向到VPN,这将导致诸如web浏览器、DNS查询等所有客户端流量都经过VPN。<br/># (为确保能正常工作,OpenVPN服务器所在计算机可能需要在TUN/TAP接口与以太网之间使用NAT或桥接技术进行连接)<br/>;push &quot;redirect-gateway def1 bypass-dhcp&quot;<br/><br/># 某些具体的Windows网络设置可以被推送到客户端,例如DNS或WINS服务器地址。<br/># 下列地址来自opendns.com提供的Public DNS 服务器。<br/>;push &quot;dhcp-option DNS 208.67.222.222&quot;<br/>;push &quot;dhcp-option DNS 208.67.220.220&quot;<br/><br/># 去掉该指令的注释将允许不同的客户端之间相互&quot;可见&quot;(允许客户端之间互相访问)。<br/># 默认情况下,客户端只能&quot;看见&quot;服务器。为了确保客户端只能看见服务器,你还可以在服务器端的TUN/TAP接口上设置适当的防火墙规则。<br/>;client-to-client<br/><br/># 如果多个客户端可能使用相同的证书/私钥文件或Common Name进行连接,那么你可以取消该指令的注释。<br/># 建议该指令仅用于测试目的。对于生产使用环境而言,每个客户端都应该拥有自己的证书和私钥。<br/># 如果你没有为每个客户端分别生成Common Name唯一的证书/私钥,你可以取消该行的注释(但不推荐这样做)。<br/>;duplicate-cn<br/><br/># keepalive指令将导致类似于ping命令的消息被来回发送,以便于服务器端和客户端知道对方何时被关闭。<br/># 每10秒钟ping一次,如果120秒内都没有收到对方的回复,则表示远程连接已经关闭。<br/>keepalive 10 120<br/><br/># 出于SSL/TLS之外更多的安全考虑,创建一个&quot;HMAC 防火墙&quot;可以帮助抵御DoS攻击和UDP端口淹没攻击。<br/># 你可以使用以下命令来生成:<br/>#&nbsp;&nbsp; openvpn --genkey --secret ta.key<br/>#<br/># 服务器和每个客户端都需要拥有该密钥的一个拷贝。<br/># 第二个参数在服务器端应该为&#39;0&#39;,在客户端应该为&#39;1&#39;。<br/>;tls-auth ta.key 0 # 该文件应该保密<br/><br/># 选择一个密码加密算法。<br/># 该配置项也必须复制到每个客户端配置文件中。<br/>;cipher BF-CBC&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # Blowfish (默认)<br/>;cipher AES-128-CBC&nbsp;&nbsp; # AES<br/>;cipher DES-EDE3-CBC&nbsp; # Triple-DES<br/><br/># 在VPN连接上启用压缩。<br/># 如果你在此处启用了该指令,那么也应该在每个客户端配置文件中启用它。<br/>comp-lzo<br/><br/># 允许并发连接的客户端的最大数量<br/>;max-clients 100<br/><br/># 在完成初始化工作之后,降低OpenVPN守护进程的权限是个不错的主意。<br/># 该指令仅限于非Windows系统中使用。<br/>;user nobody<br/>;group nobody<br/><br/># 持久化选项可以尽量避免访问那些在重启之后由于用户权限降低而无法访问的某些资源。<br/>persist-key<br/>persist-tun<br/><br/># 输出一个简短的状态文件,用于显示当前的连接状态,该文件每分钟都会清空并重写一次。<br/>status openvpn-status.log<br/><br/># 默认情况下,日志消息将写入syslog(在Windows系统中,如果以服务方式运行,日志消息将写入OpenVPN安装目录的log文件夹中)。<br/># 你可以使用log或者log-append来改变这种默认情况。<br/># &quot;log&quot;方式在每次启动时都会清空之前的日志文件。<br/># &quot;log-append&quot;这是在之前的日志内容后进行追加。<br/># 你可以使用两种方式之一(但不要同时使用)。<br/>;log&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; openvpn.log<br/>;log-append&nbsp; openvpn.log<br/><br/># 为日志文件设置适当的冗余级别(0~9)。冗余级别越高,输出的信息越详细。<br/>#<br/># 0 表示静默运行,只记录致命错误。<br/># 4 表示合理的常规用法。<br/># 5 和 6 可以帮助调试连接错误。<br/># 9 表示极度冗余,输出非常详细的日志信息。<br/>verb 3<br/><br/># 重复信息的沉默度。<br/># 相同类别的信息只有前20条会输出到日志文件中。<br/>;mute 20</p>', '1427939462');
INSERT INTO `bk_article_detail` VALUES ('66', '1', '79', '<p>1、OpenVPN连接成功后无法ping通服务器的原因之一。</p><p>原因:客户端的时间不能大于服务器的,请修改自己电脑的时间。</p><p>2、如何安装</p><p>在:<a _src=\"http://www.opcache.net/index/detail.html?id=76\" href=\"http://www.opcache.net/index/detail.html?id=76\">http://www.opcache.net/index/detail.html?id=76</a> <br/></p><p>3、配置文件的说明</p><p>在:<a textvalue=\"http://www.opcache.net/index/detail.html?id=78\" target=\"_self\" href=\"http://www.opcache.net/index/detail.html?id=78\">http://www.opcache.net/index/detail.html?id=78</a> <br/></p>', '1427942465');
INSERT INTO `bk_article_detail` VALUES ('67', '1', '80', '<p>1、如何抓网卡的包</p><pre class=\"brush:bash;toolbar:false\">tcpdump&nbsp;-i&nbsp;eth0&nbsp;#代表侦听网卡eth0的流量包。</pre><p>2、<br/></p>', '1427960404');
INSERT INTO `bk_article_detail` VALUES ('68', '1', '81', '<pre class=\"brush:bash;toolbar:false\">#!/bin/bash\r\nPATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin\r\nexport&nbsp;PATH\r\ndbuser=&#39;root&#39;\r\ndbpasswd=&#39;xx&#39;\r\ndbname=&#39;db1&nbsp;db2&#39;\r\nbacktime=`date&nbsp;+%Y%m%d%H%M%S`\r\nlogpath=&#39;/root/mysql_backup/log&#39;\r\ndatapath=&#39;/root/mysql_backup&#39;\r\necho&nbsp;&quot;backup&nbsp;time:${backtime},database:${dbname}&nbsp;touching...&quot;&nbsp;&gt;&gt;&nbsp;${logpath}/mysqllog.log\r\nfor&nbsp;table&nbsp;in&nbsp;$dbname;&nbsp;do\r\nsource=`/usr/local/mysql/bin/mysqldump&nbsp;-u${dbuser}&nbsp;-p${dbpasswd}&nbsp;${table}&gt;&nbsp;${datapath}/${table}${backtime}.sql`&nbsp;2&gt;&gt;&nbsp;${logpath}/mysqllog.log;\r\nif&nbsp;[&nbsp;&quot;$?&quot;&nbsp;==&nbsp;0&nbsp;];then\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cd&nbsp;${datapath}\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tar&nbsp;czf&nbsp;${table}${backtime}.tar.gz&nbsp;${table}${backtime}.sql&nbsp;&gt;&nbsp;/dev/null\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mv&nbsp;${table}${backtime}.tar.gz&nbsp;backup/\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cd&nbsp;${datapath}/backup\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;svn&nbsp;add&nbsp;${table}${backtime}.tar.gz\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;&quot;database&nbsp;${dbname}&nbsp;backup&nbsp;success!!&quot;&nbsp;&gt;&gt;&nbsp;${logpath}/mysqllog.log\r\nelse\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;&quot;database&nbsp;${dbname}&nbsp;backup&nbsp;error!!&quot;&nbsp;&gt;&gt;&nbsp;${logpath}/mysqllog.log\r\nfi\r\ndone\r\ncd&nbsp;${datapath}/backup\r\nsvn&nbsp;commit&nbsp;-m&nbsp;&quot;mysql&nbsp;auto&nbsp;backup&quot;</pre><p><br/></p>', '1427961483');
INSERT INTO `bk_article_detail` VALUES ('69', '1', '82', '<p>1、安装apr apr-util</p><pre class=\"brush:bash;toolbar:false\">#安装apr\r\ncd&nbsp;./apr-1.5.1\r\n./configure&nbsp;--prefix=/usr/local/apr\r\nmake&nbsp;&amp;&amp;&nbsp;make&nbsp;install\r\n\r\n#安装apr-util\r\ncd&nbsp;../apr-util-1.5.3\r\n./configure&nbsp;--prefix=/usr/local/apr-util&nbsp;--with-apr=/usr/local/apr/\r\nmake&nbsp;&amp;&amp;&nbsp;make&nbsp;install</pre><p>2.1安装sqlite-autoconf</p><pre class=\"brush:bash;toolbar:false\">wget&nbsp;&nbsp;\r\ntar&nbsp;xzf&nbsp;sqlite-autoconf-xxx.tar.gz\r\n./configure&nbsp;--prefix=/usr/local/sqlite_autoconf\r\nmake&nbsp;&amp;&amp;&nbsp;make&nbsp;install</pre><p>2.2如果没有expat</p><pre class=\"brush:bash;toolbar:false\">yum&nbsp;install&nbsp;expat</pre><p>2.3安装zlib</p><pre class=\"brush:bash;toolbar:false\">/configure&nbsp;--prefix=/usr/local/zlib\r\nmake&nbsp;&amp;&amp;&nbsp;make&nbsp;install</pre><p>3、</p><pre class=\"brush:bash;toolbar:false\">./configure&nbsp;--prefix=/usr/local/subversion&nbsp;--with-apr=/usr/local/apr&nbsp;\\\r\n--with-apr-util=/usr/local/apr-util&nbsp;--with-zlib&nbsp;--with-openssl&nbsp;\\\r\n--enable-maintainer-mode&nbsp;--with-sqlite=/usr/local/sqlite_autoconf</pre><pre class=\"brush:bash;toolbar:false\">make&nbsp;&amp;&amp;&nbsp;make&nbsp;install</pre><p>4、check</p><pre class=\"brush:bash;toolbar:false\">/usr/local/subversion/bin/svn&nbsp;--version</pre><p><span style=\"color: rgb(255, 0, 0);\">5、如果有问题的话,下载rpm安装包,以rpm的方式安装</span></p><pre class=\"brush:bash;toolbar:false\"><a _src=\"http://www.collab.net/downloads/subversion#tab-1\" href=\"http://www.collab.net/downloads/subversion#tab-1\">http://www.collab.net/downloads/subversion#tab-1</a> <br/></pre><p>下载CollabNetSubversion-client-1.8.11-1.x86_64.rpm</p><p>安装rpm -ivh CollabNetSubversion-client-1.8.11-1.x86_64.rpm</p><p>默认安装在/opt/下,不过你可以复制到任何地方。<br/></p><p><br/></p><p><br/></p>', '1427964450');
INSERT INTO `bk_article_detail` VALUES ('70', '1', '83', '<p>123<br/></p>', '1433904915');
-- ----------------------------
-- Table structure for `bk_article_main`
-- ----------------------------
DROP TABLE IF EXISTS `bk_article_main`;
CREATE TABLE `bk_article_main` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL COMMENT '用户ID',
`title` varchar(128) NOT NULL COMMENT '文章标题',
`summary` text NOT NULL COMMENT '文章概要',
`head_pic` varchar(255) NOT NULL COMMENT '头图地址',
`little_head_pic` varchar(255) NOT NULL COMMENT '头图地址(小图)',
`write_time` int(11) NOT NULL COMMENT '写作时间',
`count_view` int(11) NOT NULL COMMENT '累计阅读数',
`count_praise` int(11) NOT NULL DEFAULT '0' COMMENT '累计点赞数',
`count_fav` int(11) NOT NULL DEFAULT '0' COMMENT '累计收藏数',
`count_comment` int(11) NOT NULL DEFAULT '0' COMMENT '累计评论数(对文章的评论数+对评论的评论数+向作者提问数)',
`is_delete` tinyint(1) NOT NULL DEFAULT '1' COMMENT '状态(0-删除、1-正常、2-撤稿)',
`status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '审核状态(0-未处理、1-通过、2-拒绝)',
PRIMARY KEY (`id`),
KEY `user_id` (`user_id`) USING BTREE,
KEY `count_praise` (`count_praise`) USING BTREE,
KEY `count_fav` (`count_fav`) USING BTREE,
KEY `conunt_comment` (`count_comment`) USING BTREE,
KEY `is_delete` (`is_delete`) USING BTREE,
KEY `status` (`status`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=84 DEFAULT CHARSET=utf8 COMMENT='文章主表';
-- ----------------------------
-- Records of bk_article_main
-- ----------------------------
INSERT INTO `bk_article_main` VALUES ('53', '1', '[Zephir官方文档翻译之五] 入门指导', 'Zephir还有这本手册,是为了PHP开发者想开发C扩展并降低复杂度面打算的。\r\n我们假设你有编程语言的基础。我们会在介绍的时候尽可能的向PHP,C,Javascript等语言的特点来陈述。 如果你懂得这些语言中的某一种的话,我们会指出它们来Zephir的相似点。当然其它的一些Zephir的新特性还有 不同点我们也会一一介绍。', '', '', '1426954976', '0', '0', '0', '0', '1', '1');
INSERT INTO `bk_article_main` VALUES ('54', '1', '[Zephir官方文档翻译之四] 安装Zephir', '为了安装Zephir,请根据下面的步骤来做。', '', '', '1426955799', '0', '0', '0', '0', '1', '1');
INSERT INTO `bk_article_main` VALUES ('55', '1', '[Zephir官方文档翻译之三] 介绍 Zephir', 'Zephir是一种可以让PHP开发者尝试编写和编译可以被PHP执行代码的一种语言。它是动态/静态类型,它的一些特性对于PHP 开发者来说是非常的相似的。', '', '', '1427022148', '0', '0', '0', '0', '1', '1');
INSERT INTO `bk_article_main` VALUES ('56', '1', '[Zephir官方文档翻译之二] 为什么选择 Zephir?', '目前的PHP应用必须使用得稳定性、性能、和功能性保持平衡。 每一个PHP应用是建立在大量的通用组件上的,而这些组件又基于大量的其它应用。\r\n\r\n这些通用的组件可能是一个类/框架,或者是它们的结合。一但它们被安装,框架很少会改变。 作为一个应用的基础,它们必须保持很高的功能性,同时也要保持速度优势。\r\n\r\n快速强大的类库会变得很难懂,这是由于它们是高度抽象的实现的。考虑到这些基本的类库和框架很少会改变, 这就为编写一个可以提高性能和节省计算机资源的扩展提供了一个机会。\r\n\r\n通过Zephir,你可以实现面向对象的/框架/应用,并使你的PHP程序提高到一个高的层次,让你的应用更快,同时改善用户的体验。', '', '', '1427022228', '0', '0', '0', '0', '1', '1');
INSERT INTO `bk_article_main` VALUES ('57', '1', '[Zephir官方文档翻译之一] 欢迎来到Zephir!', 'Zephir 是一个开源的,可以用高级语言安全快速地编写 PHP 的 C 扩展。', '', '', '1427022413', '0', '0', '0', '0', '1', '1');
INSERT INTO `bk_article_main` VALUES ('58', '1', '[php扩展安装]为php安装redis扩展', '简单的部奏介绍php扩展redis的安装。', '', '', '1427022819', '0', '0', '0', '0', '1', '1');
INSERT INTO `bk_article_main` VALUES ('59', '1', '[php扩展安装]为php安装memcached扩展', '简单的步骤,为php安装memcached扩展。', '', '', '1427022967', '0', '0', '0', '0', '1', '1');
INSERT INTO `bk_article_main` VALUES ('60', '1', '[centos软件安装]安装memcached', '简单的介绍了如何安装memcached', '', '', '1427023125', '0', '0', '0', '0', '1', '1');
INSERT INTO `bk_article_main` VALUES ('61', '1', '[centos软件安装]subversion的安装与多项目权限配置', '简单的介绍了svn软件的安装,已及配置权限的方法。', '', '', '1427023296', '0', '0', '0', '0', '1', '1');
INSERT INTO `bk_article_main` VALUES ('62', '1', '[centos软件安装]sphinx的安装与配置以及php方面的处理', '简单的介绍sphinx的安装与配置以及php方面的处理。', '', '', '1427186776', '0', '0', '0', '0', '1', '1');
INSERT INTO `bk_article_main` VALUES ('63', '1', '[php扩展的安装]sphinx扩展的安装', '简单的介绍sphinx扩展的安装。', '', '', '1427187494', '0', '0', '0', '0', '1', '1');
INSERT INTO `bk_article_main` VALUES ('64', '1', '[问题集]两个不同用户执行生成同一个文件所导至的读取权限问题。', '请注意不同用户用户操作同一个文件的时候可能会导致程序没有权限进行操作。', '', '', '1427206381', '0', '0', '0', '0', '1', '1');
INSERT INTO `bk_article_main` VALUES ('65', '1', '[问题集]重写session类的时候可能会导至nginx 502的问题的原因', '重写session类的时候可能会导至nginx 502的问题的原因,在这里可以找到答案:http://cn2.php.net/manual/zh/function.session-set-save-handler.php#refsect1-function.session-set-save-handler-notes', '', '', '1427206635', '0', '0', '0', '0', '1', '1');
INSERT INTO `bk_article_main` VALUES ('66', '1', '[centos问题集]yum install时报warning: rpmts_HdrFromFdno: Header V3 RSA/SHA256 Signature, key ID c105b9de: NOKEY', '解决:rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 ', '', '', '1427206838', '0', '0', '0', '0', '1', '1');
INSERT INTO `bk_article_main` VALUES ('67', '1', '[svn相关]使用记录', '这里记录了有关个人在使用svn的一些问题,以及解决方法。', '', '', '1427207199', '0', '0', '0', '0', '1', '1');
INSERT INTO `bk_article_main` VALUES ('68', '1', 'ZeroClipboard插件如何批量初始化。', '记录了ZeroClipboard插件批量初始化的方法。', '', '', '1427207602', '0', '0', '0', '0', '1', '1');
INSERT INTO `bk_article_main` VALUES ('69', '1', '[centos软件安装]iftop的安装', '简单的介绍了如何安装iftop软件。', '', '', '1427207907', '0', '0', '0', '0', '1', '1');
INSERT INTO `bk_article_main` VALUES ('70', '1', '[centos使用记录]如何启动多个php-fpm且互不影响?', '在php安装源码的目录sapi/fpm/init.d.php-fpm里面的这个就是了。', '', '', '1427208192', '0', '0', '0', '0', '1', '1');
INSERT INTO `bk_article_main` VALUES ('71', '1', 'sphinx全文搜索Php方面的处理', '简单地介绍sphinx全文搜索Php方面的处理,现在版本的sphinx不知道支不支持中文了,问了群里的朋友都说不支持,所有用了这种方法来做。', '', '', '1427256396', '0', '0', '0', '0', '1', '1');
INSERT INTO `bk_article_main` VALUES ('72', '1', '[centos软件安装]如何独立安装apache的ab?', '简单的介绍了如何独立安装apache的ab压力测试软件。', '', '', '1427382988', '0', '0', '0', '0', '1', '1');
INSERT INTO `bk_article_main` VALUES ('73', '1', '[php扩展安装]opcache的安装', '简单的介绍了如何安装php的opcache的扩展。', '', '', '1427383968', '0', '0', '0', '0', '1', '1');
INSERT INTO `bk_article_main` VALUES ('74', '1', '[centos软件安装]phpng的安装', '简单的介绍了phpng的安装。', '', '', '1427444712', '0', '0', '0', '0', '1', '1');
INSERT INTO `bk_article_main` VALUES ('75', '1', '如何把网页生成imges,pdf?', '简单的介绍了如何把一个网页生成pdf,或者image', '', '', '1427451364', '0', '0', '0', '0', '1', '1');
INSERT INTO `bk_article_main` VALUES ('76', '1', '[centos软件安装]openvpn的安装与配置', '简单的介绍了openvpn的安装与配置。', '', '', '1427870851', '0', '0', '0', '0', '1', '1');
INSERT INTO `bk_article_main` VALUES ('77', '1', 'How To Install OpenVPN On CentOS 7', 'How To Install OpenVPN On CentOS 7', '', '', '1427894135', '0', '0', '0', '0', '1', '0');
INSERT INTO `bk_article_main` VALUES ('78', '1', 'OpenVPN server端配置文件详细说明', '简单的介绍了OpenVPN server端配置文件里的各项所代表的意思。', '', '', '1427939462', '0', '0', '0', '0', '1', '1');
INSERT INTO `bk_article_main` VALUES ('79', '1', 'OpenVPN使用问题总结。', '本文介绍了OpenVPN的一些使用。', '', '', '1427942465', '0', '0', '0', '0', '1', '1');
INSERT INTO `bk_article_main` VALUES ('80', '1', 'centos 使用过程中遇到的问题笔记', 'centos 使用过程中遇到的问题笔记', '', '', '1427960404', '0', '0', '0', '0', '1', '1');
INSERT INTO `bk_article_main` VALUES ('81', '1', '自动备份mysql数据库脚本', '在用的mysql数据库备份脚本,适合小量的。', '', '', '1427961483', '0', '0', '0', '0', '1', '1');
INSERT INTO `bk_article_main` VALUES ('82', '1', 'subversion的编译安装', 'subversion的编译安装subversion-1.8.13', '', '', '1427964450', '0', '0', '0', '0', '1', '1');
INSERT INTO `bk_article_main` VALUES ('83', '1', '123', '123', '', '', '1433904915', '0', '0', '0', '0', '0', '0');
-- ----------------------------
-- Table structure for `bk_article_position`
-- ----------------------------
DROP TABLE IF EXISTS `bk_article_position`;
CREATE TABLE `bk_article_position` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(128) NOT NULL COMMENT '推荐位名称',
`is_delete` tinyint(1) NOT NULL COMMENT '是否删除(做软删除)(0-删除、1-未删除)',
`is_active` tinyint(1) NOT NULL COMMENT '是否激活(0-未激活、1-激活)',
`classify_id` int(11) NOT NULL COMMENT '分类的ID,0代表全部 -1代表没有选择分类',
`time` int(11) NOT NULL,
PRIMARY KEY (`id`),
KEY `name` (`name`) USING BTREE,
KEY `classify_id` (`classify_id`) USING BTREE,
KEY `is_delete` (`is_delete`) USING BTREE,
KEY `is_active` (`is_active`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8 COMMENT='文章推荐位表';
-- ----------------------------
-- Records of bk_article_position
-- ----------------------------
INSERT INTO `bk_article_position` VALUES ('1', '测试推荐位', '1', '0', '0', '0');
INSERT INTO `bk_article_position` VALUES ('2', '原创首页金融头条', '0', '0', '1', '0');
INSERT INTO `bk_article_position` VALUES ('3', '原创首页汽车头条', '0', '0', '2', '0');
INSERT INTO `bk_article_position` VALUES ('4', '原创首页时尚头条', '0', '0', '3', '0');
INSERT INTO `bk_article_position` VALUES ('5', '原创首页房地产头条', '0', '0', '4', '0');
INSERT INTO `bk_article_position` VALUES ('6', '原创首页移动互联网头条', '0', '0', '5', '0');
INSERT INTO `bk_article_position` VALUES ('18', 'd1', '0', '0', '0', '0');
-- ----------------------------
-- Table structure for `bk_article_position_relation`
-- ----------------------------
DROP TABLE IF EXISTS `bk_article_position_relation`;
CREATE TABLE `bk_article_position_relation` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`article_id` int(11) NOT NULL COMMENT '文章ID',
`position_id` int(11) NOT NULL COMMENT '推荐位ID',
`sort` int(11) NOT NULL COMMENT '排序',
`time` int(11) NOT NULL,
PRIMARY KEY (`id`),
KEY `Position_id` (`position_id`) USING BTREE,
KEY `article_id` (`article_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=utf8 COMMENT='文章与推荐位关系表';
-- ----------------------------
-- Records of bk_article_position_relation
-- ----------------------------
INSERT INTO `bk_article_position_relation` VALUES ('1', '1', '2', '0', '0');
INSERT INTO `bk_article_position_relation` VALUES ('4', '1', '1', '0', '0');
INSERT INTO `bk_article_position_relation` VALUES ('5', '2', '1', '0', '1421810822');
INSERT INTO `bk_article_position_relation` VALUES ('6', '2', '3', '0', '1421810823');
INSERT INTO `bk_article_position_relation` VALUES ('7', '1', '3', '0', '1421810823');
INSERT INTO `bk_article_position_relation` VALUES ('8', '12', '3', '0', '1421813804');
INSERT INTO `bk_article_position_relation` VALUES ('9', '6', '3', '1', '1421813804');
INSERT INTO `bk_article_position_relation` VALUES ('10', '7', '3', '0', '1421813804');
INSERT INTO `bk_article_position_relation` VALUES ('11', '8', '3', '0', '1421813804');
INSERT INTO `bk_article_position_relation` VALUES ('12', '9', '3', '0', '1421813804');
INSERT INTO `bk_article_position_relation` VALUES ('13', '10', '3', '0', '1421813804');
INSERT INTO `bk_article_position_relation` VALUES ('14', '11', '3', '0', '1421813805');
INSERT INTO `bk_article_position_relation` VALUES ('15', '13', '1', '0', '1421917211');
INSERT INTO `bk_article_position_relation` VALUES ('16', '15', '6', '0', '1421984274');
INSERT INTO `bk_article_position_relation` VALUES ('17', '1', '6', '0', '1421984297');
INSERT INTO `bk_article_position_relation` VALUES ('18', '19', '1', '0', '1422261973');
INSERT INTO `bk_article_position_relation` VALUES ('19', '19', '2', '0', '1422261973');
INSERT INTO `bk_article_position_relation` VALUES ('20', '19', '6', '0', '1422261973');
INSERT INTO `bk_article_position_relation` VALUES ('21', '22', '1', '1', '1422330844');
INSERT INTO `bk_article_position_relation` VALUES ('22', '22', '6', '0', '1422330844');
INSERT INTO `bk_article_position_relation` VALUES ('23', '23', '1', '1', '1422352277');
INSERT INTO `bk_article_position_relation` VALUES ('24', '23', '6', '1', '1422352277');
-- ----------------------------
-- Table structure for `bk_article_tags`
-- ----------------------------
DROP TABLE IF EXISTS `bk_article_tags`;
CREATE TABLE `bk_article_tags` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`name` char(32) NOT NULL COMMENT '标签名称',
`sort` tinyint(2) NOT NULL COMMENT '排序码',
`is_active` tinyint(1) NOT NULL COMMENT '是否激活(0-未激活、1-激活)',
`is_delete` tinyint(1) NOT NULL COMMENT '是否删除(做软删除)(0-删除、1-未删除)',
`time` int(11) NOT NULL COMMENT '操作时间',
PRIMARY KEY (`id`),
KEY `is_active` (`is_active`) USING BTREE,
KEY `is_delete` (`is_delete`) USING BTREE,
KEY `sort` (`sort`) USING BTREE,
KEY `name` (`name`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=58 DEFAULT CHARSET=utf8 COMMENT='文章标签配置表';
-- ----------------------------
-- Records of bk_article_tags
-- ----------------------------
INSERT INTO `bk_article_tags` VALUES ('40', 'zephir', '0', '1', '1', '1426955387');
INSERT INTO `bk_article_tags` VALUES ('41', 'php', '0', '1', '1', '1426955387');
INSERT INTO `bk_article_tags` VALUES ('42', 'module', '0', '1', '1', '1426955387');
INSERT INTO `bk_article_tags` VALUES ('43', '翻译', '0', '1', '1', '1427022148');
INSERT INTO `bk_article_tags` VALUES ('44', '扩展', '0', '1', '1', '1427022819');
INSERT INTO `bk_article_tags` VALUES ('45', 'redis', '0', '1', '1', '1427022819');
INSERT INTO `bk_article_tags` VALUES ('46', 'memcached', '0', '1', '1', '1427022967');
INSERT INTO `bk_article_tags` VALUES ('47', 'centos', '0', '1', '1', '1427023125');
INSERT INTO `bk_article_tags` VALUES ('48', 'svn', '0', '1', '1', '1427023296');
INSERT INTO `bk_article_tags` VALUES ('49', 'sphinx', '0', '1', '1', '1427186776');
INSERT INTO `bk_article_tags` VALUES ('50', 'js', '0', '1', '1', '1427207602');
INSERT INTO `bk_article_tags` VALUES ('51', '安装软件', '0', '1', '1', '1427207907');
INSERT INTO `bk_article_tags` VALUES ('52', 'ab', '0', '1', '1', '1427382988');
INSERT INTO `bk_article_tags` VALUES ('53', 'opcache', '0', '1', '1', '1427383968');
INSERT INTO `bk_article_tags` VALUES ('54', '软件安装', '0', '1', '1', '1427444712');
INSERT INTO `bk_article_tags` VALUES ('55', 'openvpn', '0', '1', '1', '1427939462');
INSERT INTO `bk_article_tags` VALUES ('56', 'mysql', '0', '1', '1', '1427961483');
INSERT INTO `bk_article_tags` VALUES ('57', '123', '0', '1', '1', '1433904916');
-- ----------------------------
-- Table structure for `bk_article_tag_relation`
-- ----------------------------
DROP TABLE IF EXISTS `bk_article_tag_relation`;
CREATE TABLE `bk_article_tag_relation` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`article_id` int(11) NOT NULL COMMENT '文章ID',
`tag_id` int(11) NOT NULL COMMENT '标签ID',
`time` int(11) NOT NULL COMMENT '操作时间',
PRIMARY KEY (`id`),
KEY `article_id` (`article_id`) USING BTREE,
KEY `tag_id` (`tag_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=358 DEFAULT CHARSET=utf8 COMMENT='文章所属标签表';
-- ----------------------------
-- Records of bk_article_tag_relation
-- ----------------------------
INSERT INTO `bk_article_tag_relation` VALUES ('219', '53', '40', '1427198477');
INSERT INTO `bk_article_tag_relation` VALUES ('220', '53', '41', '1427198477');
INSERT INTO `bk_article_tag_relation` VALUES ('221', '53', '42', '1427198477');
INSERT INTO `bk_article_tag_relation` VALUES ('222', '54', '40', '1427198491');
INSERT INTO `bk_article_tag_relation` VALUES ('223', '54', '41', '1427198491');
INSERT INTO `bk_article_tag_relation` VALUES ('224', '54', '42', '1427198491');
INSERT INTO `bk_article_tag_relation` VALUES ('225', '55', '40', '1427198506');
INSERT INTO `bk_article_tag_relation` VALUES ('226', '55', '43', '1427198506');
INSERT INTO `bk_article_tag_relation` VALUES ('229', '57', '40', '1427198529');
INSERT INTO `bk_article_tag_relation` VALUES ('230', '57', '43', '1427198529');
INSERT INTO `bk_article_tag_relation` VALUES ('231', '63', '41', '1427198544');
INSERT INTO `bk_article_tag_relation` VALUES ('232', '63', '44', '1427198544');
INSERT INTO `bk_article_tag_relation` VALUES ('233', '62', '41', '1427198558');
INSERT INTO `bk_article_tag_relation` VALUES ('234', '62', '49', '1427198558');
INSERT INTO `bk_article_tag_relation` VALUES ('235', '62', '47', '1427198558');
INSERT INTO `bk_article_tag_relation` VALUES ('236', '61', '47', '1427198568');
INSERT INTO `bk_article_tag_relation` VALUES ('237', '61', '48', '1427198568');
INSERT INTO `bk_article_tag_relation` VALUES ('238', '60', '47', '1427198576');
INSERT INTO `bk_article_tag_relation` VALUES ('239', '60', '46', '1427198576');
INSERT INTO `bk_article_tag_relation` VALUES ('240', '59', '41', '1427198592');
INSERT INTO `bk_article_tag_relation` VALUES ('241', '59', '44', '1427198592');
INSERT INTO `bk_article_tag_relation` VALUES ('242', '59', '46', '1427198592');
INSERT INTO `bk_article_tag_relation` VALUES ('243', '58', '41', '1427198609');
INSERT INTO `bk_article_tag_relation` VALUES ('244', '58', '44', '1427198609');
INSERT INTO `bk_article_tag_relation` VALUES ('245', '58', '45', '1427198609');
INSERT INTO `bk_article_tag_relation` VALUES ('246', '64', '41', '1427206381');
INSERT INTO `bk_article_tag_relation` VALUES ('248', '65', '41', '1427206660');
INSERT INTO `bk_article_tag_relation` VALUES ('249', '66', '47', '1427206838');
INSERT INTO `bk_article_tag_relation` VALUES ('252', '68', '50', '1427207602');
INSERT INTO `bk_article_tag_relation` VALUES ('253', '69', '47', '1427207907');
INSERT INTO `bk_article_tag_relation` VALUES ('254', '69', '51', '1427207907');
INSERT INTO `bk_article_tag_relation` VALUES ('255', '67', '48', '1427208041');
INSERT INTO `bk_article_tag_relation` VALUES ('256', '67', '47', '1427208041');
INSERT INTO `bk_article_tag_relation` VALUES ('257', '70', '47', '1427208192');
INSERT INTO `bk_article_tag_relation` VALUES ('258', '70', '41', '1427208192');
INSERT INTO `bk_article_tag_relation` VALUES ('267', '71', '41', '1427285900');
INSERT INTO `bk_article_tag_relation` VALUES ('268', '71', '49', '1427285900');
INSERT INTO `bk_article_tag_relation` VALUES ('271', '72', '47', '1427383229');
INSERT INTO `bk_article_tag_relation` VALUES ('272', '72', '52', '1427383229');
INSERT INTO `bk_article_tag_relation` VALUES ('282', '56', '40', '1427437181');
INSERT INTO `bk_article_tag_relation` VALUES ('283', '56', '43', '1427437181');
INSERT INTO `bk_article_tag_relation` VALUES ('298', '74', '41', '1427451002');
INSERT INTO `bk_article_tag_relation` VALUES ('299', '74', '54', '1427451002');
INSERT INTO `bk_article_tag_relation` VALUES ('300', '75', '41', '1427451365');
INSERT INTO `bk_article_tag_relation` VALUES ('301', '73', '41', '1427468057');
INSERT INTO `bk_article_tag_relation` VALUES ('302', '73', '53', '1427468057');
INSERT INTO `bk_article_tag_relation` VALUES ('303', '73', '44', '1427468057');
INSERT INTO `bk_article_tag_relation` VALUES ('324', '77', '47', '1427894136');
INSERT INTO `bk_article_tag_relation` VALUES ('327', '78', '55', '1427939462');
INSERT INTO `bk_article_tag_relation` VALUES ('335', '79', '55', '1427944600');
INSERT INTO `bk_article_tag_relation` VALUES ('336', '80', '47', '1427960404');
INSERT INTO `bk_article_tag_relation` VALUES ('338', '81', '56', '1427961629');
INSERT INTO `bk_article_tag_relation` VALUES ('345', '76', '47', '1427968979');
INSERT INTO `bk_article_tag_relation` VALUES ('355', '82', '48', '1427981466');
INSERT INTO `bk_article_tag_relation` VALUES ('357', '83', '57', '1433904944');
-- ----------------------------
-- Table structure for `bk_comment`
-- ----------------------------
DROP TABLE IF EXISTS `bk_comment`;
CREATE TABLE `bk_comment` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`object_type` tinyint(4) NOT NULL COMMENT '评论的类型1:文章',
`object_id` int(11) NOT NULL COMMENT '评论的唯一ID',
`nickname` varchar(20) NOT NULL,
`content` text NOT NULL COMMENT '评论的内容',
`reply_ids` varchar(255) NOT NULL COMMENT '所评论的内容',
`time` int(11) NOT NULL COMMENT '评论的时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=37 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of bk_comment
-- ----------------------------
INSERT INTO `bk_comment` VALUES ('12', '1', '57', '游客', '评论一下。', '', '1427356801');
INSERT INTO `bk_comment` VALUES ('13', '1', '57', '风', '我也来评论一下,不支持带html标签评论。', '12', '1427356940');
INSERT INTO `bk_comment` VALUES ('14', '1', '57', '风丰', '我也来评论一下。可以不?', '13,12', '1427357014');
INSERT INTO `bk_comment` VALUES ('15', '1', '57', '风风', '如果被删除了一条,会怎么样?', '14,13,12,1', '1427357046');
INSERT INTO `bk_comment` VALUES ('16', '1', '57', '风', '哦', '15,14,13,12,1', '1427357843');
INSERT INTO `bk_comment` VALUES ('17', '1', '57', '风', '哦哦哦', '', '1427357857');
INSERT INTO `bk_comment` VALUES ('20', '1', '71', '浑然', '学习了。', '', '1427363944');
INSERT INTO `bk_comment` VALUES ('21', '1', '57', '甩', '为什么呢', '16,15,14,13,12,1', '1427367708');
INSERT INTO `bk_comment` VALUES ('22', '1', '62', '小黑', '第八点连接貌似错了啊', '', '1427368087');
INSERT INTO `bk_comment` VALUES ('23', '1', '57', '风', '测试一下异步评论', '', '1427421850');
INSERT INTO `bk_comment` VALUES ('24', '1', '57', '风', '正常了吗?再测试一下。', '23', '1427421867');
INSERT INTO `bk_comment` VALUES ('25', '1', '57', '风', '貌似是正常了。', '24,23', '1427421880');
INSERT INTO `bk_comment` VALUES ('26', '1', '57', '风', '再测试一下', '', '1427429183');
INSERT INTO `bk_comment` VALUES ('27', '1', '57', '风', '可以了没', '26', '1427429215');
INSERT INTO `bk_comment` VALUES ('28', '1', '57', '风', '哦', '27,26', '1427430132');
INSERT INTO `bk_comment` VALUES ('29', '1', '57', '风', '好的,测试完毕', '28,27,26', '1427440846');
INSERT INTO `bk_comment` VALUES ('30', '1', '73', 'Tommy', '第三部,写的不详细', '', '1427451863');
INSERT INTO `bk_comment` VALUES ('31', '1', '73', '阿君', 'hi, Tomy,已经补上简单的配置。', '30', '1427468125');
INSERT INTO `bk_comment` VALUES ('32', '1', '74', '阿君', '不懂为什么用ab测试简单的一个脚本,phpng的比php5.5.x的慢了好几倍,为什么呢?', '', '1427470639');
INSERT INTO `bk_comment` VALUES ('33', '1', '81', '美女', '可以', '', '1428027488');
INSERT INTO `bk_comment` VALUES ('34', '1', '81', '刘洋', '你好', '', '1428027537');
INSERT INTO `bk_comment` VALUES ('35', '1', '82', '风', '建议使用第5点的方法安装。', '', '1428034649');
INSERT INTO `bk_comment` VALUES ('36', '1', '82', '123123', '123123', '', '1433904890');
-- ----------------------------
-- Table structure for `bk_group`
-- ----------------------------
DROP TABLE IF EXISTS `bk_group`;
CREATE TABLE `bk_group` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`group_name` varchar(255) NOT NULL COMMENT '用户组名',
`mark` varchar(255) NOT NULL COMMENT '备注',
`status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '是否禁用',
`level` int(11) NOT NULL DEFAULT '0' COMMENT '用户组等级,低等级的不能对高等级的用户做修改',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COMMENT='用户组表_by_jiang';
-- ----------------------------
-- Records of bk_group
-- ----------------------------
INSERT INTO `bk_group` VALUES ('1', '超级用户组', '123123a', '1', '1');
INSERT INTO `bk_group` VALUES ('2', 'test', '1', '1', '1');
INSERT INTO `bk_group` VALUES ('3', 'test2', '', '1', '2');
-- ----------------------------
-- Table structure for `bk_permission`
-- ----------------------------
DROP TABLE IF EXISTS `bk_permission`;
CREATE TABLE `bk_permission` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`module` varchar(255) NOT NULL COMMENT '模块',
`class` varchar(255) NOT NULL COMMENT '类',
`action` varchar(255) NOT NULL COMMENT '函数',
`name` varchar(255) NOT NULL COMMENT '节点的名字',
`display` tinyint(1) NOT NULL DEFAULT '0' COMMENT '1为显示为菜单,0则不显示',
`pid` int(11) NOT NULL DEFAULT '0' COMMENT '节点的父节点,此值一般用于输出树形结构,0则为顶级',
`sort` int(11) NOT NULL DEFAULT '0' COMMENT '排序',
`level` tinyint(2) NOT NULL DEFAULT '1' COMMENT '第几级菜单',
`mark` varchar(255) NOT NULL COMMENT '备注',
`add_time` bigint(20) NOT NULL COMMENT '增加的日期',
PRIMARY KEY (`id`),
KEY `module` (`module`) USING BTREE,
KEY `class` (`class`) USING BTREE,
KEY `action` (`action`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=74 DEFAULT CHARSET=utf8 COMMENT='权限节点表_by_jiang';
-- ----------------------------
-- Records of bk_permission
-- ----------------------------
INSERT INTO `bk_permission` VALUES ('1', 'foundation', '系统管理', '系统管理', '系统管理', '1', '0', '0', '1', '系统管理页面,不作权限验证,只用做菜单显示', '0');
INSERT INTO `bk_permission` VALUES ('2', 'foundation', 'group', 'index', '用户组管理', '1', '67', '2', '3', '用户组管理页面', '0');
INSERT INTO `bk_permission` VALUES ('3', 'foundation', 'acl', 'index', '功能管理', '1', '67', '1', '3', '功能管理页面', '0');
INSERT INTO `bk_permission` VALUES ('4', 'foundation', 'user', 'index', '用户管理', '1', '67', '3', '3', '用户管理页面', '0');
INSERT INTO `bk_permission` VALUES ('20', 'foundation', 'user', 'add', '增加用户', '0', '4', '0', '4', '增加一个用户', '0');
INSERT INTO `bk_permission` VALUES ('23', 'foundation', 'group', 'add', '增加用户组', '0', '2', '0', '4', '增加用户组', '1406882443');
INSERT INTO `bk_permission` VALUES ('24', 'foundation', 'group', 'edit', '用户组编辑', '0', '2', '0', '4', '用户组编辑', '1406882515');
INSERT INTO `bk_permission` VALUES ('25', 'foundation', 'group', 'delete', '用户组删除', '0', '2', '0', '4', '用户组删除、批量删除', '1406882542');
INSERT INTO `bk_permission` VALUES ('26', 'foundation', 'acl', 'group', '用户组权限管理', '0', '2', '0', '4', '用户组权限管理', '1406882568');
INSERT INTO `bk_permission` VALUES ('27', 'foundation', 'user', 'edit', '用户编辑', '0', '4', '0', '4', '用户编辑', '1406882640');
INSERT INTO `bk_permission` VALUES ('28', 'foundation', 'user', 'delete', '用户删除', '0', '4', '0', '4', '用户删除', '1406882664');
INSERT INTO `bk_permission` VALUES ('29', 'foundation', 'acl', 'user', '用户权限管理', '0', '4', '0', '4', '用户权限管理、设置用户权限', '1406882698');
INSERT INTO `bk_permission` VALUES ('30', 'foundation', 'acl', 'add', '增加功能菜单', '0', '3', '0', '4', '增加功能菜单', '1406882729');
INSERT INTO `bk_permission` VALUES ('31', 'foundation', 'acl', 'edit', '功能菜单编辑', '0', '3', '0', '4', '功能菜单编辑', '1406882754');
INSERT INTO `bk_permission` VALUES ('32', 'foundation', 'acl', 'delete', '功能菜单删除', '0', '3', '0', '4', '功能菜单删除', '1406882775');
INSERT INTO `bk_permission` VALUES ('33', 'foundation', 'acl', 'sort', '功能菜单排序', '0', '3', '0', '4', '功能菜单排序', '1406882815');
INSERT INTO `bk_permission` VALUES ('34', 'blog', '内容管理', '内容管理', '内容管理', '1', '0', '0', '1', '内容管理', '1407374295');
INSERT INTO `bk_permission` VALUES ('35', 'blog', 'content', 'add', '发表文章', '0', '36', '0', '4', '发表文章', '1407374316');
INSERT INTO `bk_permission` VALUES ('36', 'blog', 'content', 'index', '文章列表', '1', '69', '0', '3', '文章列表', '1407374358');
INSERT INTO `bk_permission` VALUES ('37', 'blog', 'category', 'index', '文章分类管理', '1', '69', '0', '3', '文章分类管理', '0');
INSERT INTO `bk_permission` VALUES ('42', 'blog', 'position', 'index', '推荐位管理', '1', '69', '0', '3', '推荐位管理', '1426735289');
INSERT INTO `bk_permission` VALUES ('43', 'foundation', 'index', 'cs', '功能示例', '1', '1', '0', '2', '一些小功能的合集,可以用来加快开发的速度。', '1427788812');
INSERT INTO `bk_permission` VALUES ('44', 'foundation', 'upload', 'index', '弹出窗口上传', '0', '66', '0', '2', '通用的弹出窗口上传。', '1427790345');
INSERT INTO `bk_permission` VALUES ('45', 'blog', 'category', 'add', '文章分类增加', '0', '37', '0', '4', '', '1429509721');
INSERT INTO `bk_permission` VALUES ('46', 'blog', 'category', 'edit', '文章分类编辑', '0', '37', '0', '4', '', '1429509748');
INSERT INTO `bk_permission` VALUES ('47', 'blog', 'category', 'delete', '文章分类删除', '0', '37', '0', '3', '', '1429509769');
INSERT INTO `bk_permission` VALUES ('48', 'blog', 'content', 'edit', '编辑文章', '0', '36', '0', '4', '', '1429509849');
INSERT INTO `bk_permission` VALUES ('49', 'blog', 'content', 'delete', '删除文章', '0', '36', '0', '3', '', '1429509889');
INSERT INTO `bk_permission` VALUES ('50', 'blog', 'position', 'add', '推荐位增加', '0', '42', '0', '4', '', '1429509926');
INSERT INTO `bk_permission` VALUES ('51', 'blog', 'position', 'edit', '推荐位编辑', '0', '42', '0', '4', '', '1429509949');
INSERT INTO `bk_permission` VALUES ('52', 'blog', 'position', 'delete', '推荐位删除', '0', '42', '0', '4', '', '1429509972');
INSERT INTO `bk_permission` VALUES ('53', 'foundation', 'log', 'action', '操作日志', '1', '68', '0', '3', '查看操作日志', '1433319136');
INSERT INTO `bk_permission` VALUES ('55', '工作流管理', '工作流管理', '工作流管理', '工作流管理', '1', '1', '0', '2', '', '1434093108');
INSERT INTO `bk_permission` VALUES ('56', 'workflow', 'index', 'add', '工作流增加', '0', '73', '0', '4', '增加新的工作流程', '1434333268');
INSERT INTO `bk_permission` VALUES ('57', 'workflow', 'index', 'edit', '工作流编辑', '0', '73', '0', '4', '修改工作流信息', '1434336714');
INSERT INTO `bk_permission` VALUES ('58', 'workflow', 'index', 'delete', '工作流删除', '0', '73', '0', '4', '删除工作流', '1434338279');
INSERT INTO `bk_permission` VALUES ('59', 'workflow', 'step', 'index', '工作流详情', '0', '55', '1', '3', '查看工作流详情', '1434345119');
INSERT INTO `bk_permission` VALUES ('60', 'workflow', 'step', 'add', '增加工作流步骤', '0', '59', '0', '4', '增加工作流步骤', '1434349481');
INSERT INTO `bk_permission` VALUES ('61', 'workflow', 'step', 'edit', '编辑工作流步骤', '0', '59', '0', '4', '编辑工作流步骤', '1434353110');
INSERT INTO `bk_permission` VALUES ('62', 'workflow', 'step', 'delete', '工作流步骤删除', '0', '59', '0', '4', '工作流步骤删除', '1434354926');
INSERT INTO `bk_permission` VALUES ('63', 'workflow', 'step', 'relation', '工作流设置关联人员', '0', '59', '0', '4', '工作流设置关联人员', '1434422499');
INSERT INTO `bk_permission` VALUES ('66', '通用功能', '通用功能', '通用功能', '通用功能', '0', '0', '0', '1', '通用功能,一般会开发这些功能给用户。', '1435545336');
INSERT INTO `bk_permission` VALUES ('67', '用户与权限管理', '用户与权限管理', '用户与权限管理', '用户与权限管理', '1', '1', '0', '2', '包括功能用户管理、用户组管理、功能管理,权限管理。', '1436147892');
INSERT INTO `bk_permission` VALUES ('68', '系统日志', '系统日志', '系统日志', '系统日志', '1', '1', '0', '2', '主要是各类的系统日志', '1436147908');
INSERT INTO `bk_permission` VALUES ('69', '文章管理', '文章管理', '文章管理', '文章管理', '1', '34', '0', '2', '文章管理', '1436150232');
INSERT INTO `bk_permission` VALUES ('73', 'workflow', 'index', 'index', '工作流列表', '1', '55', '2', '3', '', '1436232634');
-- ----------------------------
-- Table structure for `bk_search_index`
-- ----------------------------
DROP TABLE IF EXISTS `bk_search_index`;
CREATE TABLE `bk_search_index` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`article_id` int(11) NOT NULL COMMENT '文章的ID',
`title` text NOT NULL COMMENT '文章的标题',
`summary` text NOT NULL,
`content` text NOT NULL COMMENT '文章的内容',
`added_date` int(11) NOT NULL,
`edited_date` int(11) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `article_id` (`article_id`) USING BTREE,
KEY `added_date` (`added_date`) USING BTREE,
FULLTEXT KEY `content` (`title`,`summary`,`content`)
) ENGINE=MyISAM AUTO_INCREMENT=53 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of bk_search_index
-- ----------------------------
INSERT INTO `bk_search_index` VALUES ('22', '53', ' [ zephir 23448 26041 25991 26723 32763 35793 20043 20116 ] 20837 38376 25351 23548 ', ' zephir 36824 26377 36825 26412 25163 20876 65292 26159 20026 20102 php 24320 21457 32773 24819 24320 21457 c 25193 23637 24182 38477 20302 22797 26434 24230 38754 25171 31639 30340 12290 \r \n 25105 20204 20551 35774 20320 26377 32534 31243 35821 35328 30340 22522 30784 12290 25105 20204 20250 22312 20171 32461 30340 26102 20505 23613 21487 33021 30340 21521 php 65292 c 65292 javascript 31561 35821 35328 30340 29305 28857 26469 38472 36848 12290 22914 26524 20320 25026 24471 36825 20123 35821 35328 20013 30340 26576 19968 31181 30340 35805 65292 25105 20204 20250 25351 20986 23427 20204 26469 zephir 30340 30456 20284 28857 12290 24403 28982 20854 23427 30340 19968 20123 zephir 30340 26032 29305 24615 36824 26377 19981 21516 28857 25105 20204 20063 20250 19968 19968 20171 32461 12290 ', ' 20837 38376 25351 23548 zephir 36824 26377 36825 26412 25163 20876 65292 26159 20026 20102 php 24320 21457 32773 24819 24320 21457 c 25193 23637 24182 38477 20302 22797 26434 24230 38754 25171 31639 30340 12290 25105 20204 20551 35774 20320 26377 32534 31243 35821 35328 30340 22522 30784 12290 25105 20204 20250 22312 20171 32461 30340 26102 20505 23613 21487 33021 30340 21521 php 65292 c 65292 javascript 31561 35821 35328 30340 29305 28857 26469 38472 36848 12290 22914 26524 20320 25026 24471 36825 20123 35821 35328 20013 30340 26576 19968 31181 30340 35805 65292 25105 20204 20250 25351 20986 23427 20204 26469 zephir 30340 30456 20284 28857 12290 24403 28982 20854 23427 30340 19968 20123 zephir 30340 26032 29305 24615 36824 26377 19981 21516 28857 25105 20204 20063 20250 19968 19968 20171 32461 12290 26816 27979 23433 35013 24773 20917 22914 26524 20320 25104 21151 30340 23433 35013 20102 zephir 65292 20320 21487 20197 22312 21629 20196 34892 20013 25191 34892 19979 38754 30340 21629 20196 : $ &nbsp ; zephir&nbsp ; help 22914 26524 23433 35013 27491 30830 30340 35805 65292 20320 20250 30475 21040 19979 38754 30340 25552 31034 :&nbsp ; _____&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; __&nbsp ; &nbsp ; &nbsp ; &nbsp ; _ \r \n /__&nbsp ; &nbsp ; /&nbsp ; &nbsp ; ___&nbsp ; &nbsp ; ____&nbsp ; &nbsp ; /&nbsp ; /_&nbsp ; &nbsp ; ( _ ) ____ \r \n &nbsp ; &nbsp ; /&nbsp ; /&nbsp ; &nbsp ; /&nbsp ; _&nbsp ; \\ /&nbsp ; __&nbsp ; \\ /&nbsp ; __&nbsp ; \\ /&nbsp ; /&nbsp ; ___/ \r \n &nbsp ; /&nbsp ; /__/&nbsp ; &nbsp ; __/&nbsp ; /_/&nbsp ; /&nbsp ; /&nbsp ; /&nbsp ; /&nbsp ; /&nbsp ; / \r \n /____/ \\ ___/&nbsp ; .___/_/&nbsp ; /_/_/_/ \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; /_/ \r \n \r \n zephir&nbsp ; version&nbsp ; 0.4.5a \r \n \r \n usage:&nbsp ; &nbsp ; &nbsp ; &nbsp ; command&nbsp ; [ options ] available&nbsp ; commands: \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; build&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; generate/compile/install&nbsp ; a&nbsp ; zephir&nbsp ; extension \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; clean&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; cleans&nbsp ; the&nbsp ; generated&nbsp ; object&nbsp ; files&nbsp ; in&nbsp ; compilation \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; compile&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; compile&nbsp ; a&nbsp ; zephir&nbsp ; extension \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; full-clean&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; cleans&nbsp ; the&nbsp ; generated&nbsp ; object&nbsp ; files&nbsp ; in&nbsp ; compilation \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; generate&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; generates&nbsp ; c&nbsp ; code&nbsp ; from&nbsp ; the&nbsp ; zephir&nbsp ; code&nbsp ; &nbsp ; &nbsp ; &nbsp ; help&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; displays&nbsp ; this&nbsp ; help&nbsp ; &nbsp ; &nbsp ; &nbsp ; init&nbsp ; [ namespace ] &nbsp ; &nbsp ; &nbsp ; &nbsp ; initializes&nbsp ; a&nbsp ; zephir&nbsp ; extension \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; install&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; installs&nbsp ; the&nbsp ; extension&nbsp ; ( requires&nbsp ; root&nbsp ; password ) \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; version&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; shows&nbsp ; zephir&nbsp ; version 30446 24405 32467 26500 39318 20808 25105 20204 35201 20570 30340 26159 24314 31435 19968 20010 22522 30784 30340 39033 30446 32467 26500 65292 23427 20026 25105 20204 24320 21457 25193 23637 25552 20379 20102 22522 26412 30340 32467 26500 12290 36825 37324 65292 25105 20204 24314 31435 20102 19968 20010 25193 23637 21483 20570 &quot ; utils&quot ; : $ &nbsp ; zephir&nbsp ; init&nbsp ; utils 25191 34892 19978 38754 30340 21629 20196 21518 65292 19968 20010 21517 20026 &quot ; utils&quot ; 30340 30446 24405 34987 24314 31435 22312 24403 21069 30340 30446 24405 19979 65306 utils/ \r \n &nbsp ; &nbsp ; &nbsp ; ext/ \r \n &nbsp ; &nbsp ; &nbsp ; utils/ 30446 24405 &quot ; ext/&quot ; ( inside utils ) 21253 21547 20102 32534 35793 22120 23558 20250 29992 21040 26469 32534 35793 25193 23637 30340 20195 30721 . 21478 19968 20010 30446 24405 26159 &quot ; utils&quot ; 65292 36825 20010 30446 24405 30340 21517 23383 24517 39035 35201 21644 25105 20204 30340 25193 23637 21517 23383 20445 25345 19968 33267 12290 25105 20204 20889 30340 zephir 20195 30721 23558 20250 34987 25918 21040 36825 37324 12290 we need to change the working directory to &quot ; utils&quot ; to start compiling our code: $ &nbsp ; cd&nbsp ; utils \r \n $ &nbsp ; ls \r \n ext/&nbsp ; utils/&nbsp ; config.json 21015 20986 30340 30446 24405 20013 65292 36824 26377 19968 20010 25991 20214 21483 20570 &quot ; config.json&quot ; 65292 36825 20010 25991 20214 21253 25324 20102 19968 20123 37197 32622 65292 23427 21487 20197 29992 26469 25913 21464 zephir 21644 25193 23637 30340 34892 20026 12290 22686 21152 25105 20204 30340 31532 19968 20010 31867 zephir 26159 34987 35774 35745 25104 24320 21457 38754 21521 23545 35937 25193 23637 30340 12290 20026 20102 24320 21457 20986 25105 20204 30340 31532 19968 20010 21151 33021 65292 25105 20204 22686 21152 19968 20010 31867 21040 25193 23637 20013 12290 23601 20687 24456 22810 24037 20855 21644 35821 35328 19968 26679 65292 31532 19968 20214 20107 23601 26159 21435 20889 &quot ; hello world&quot ; 12290 21516 26102 20063 26816 27979 zephir 26159 19981 26159 21487 20197 27491 24120 36816 20316 12290 25152 20197 25105 20204 30340 31532 19968 20010 31867 23601 21483 20316 &quot ; utils \\ greeting&quot ; 65292 23427 21253 21547 20102 19968 20010 20989 25968 65292 36825 20010 20989 25968 20250 25171 21360 20986 &quot ; hello world ! &quot ; 12290 the code for this class must be placed in &quot ; utils/utils/greeting.zep&quot ; :namespace&nbsp ; utils ; \r \n class&nbsp ; greeting { \r \n \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; public&nbsp ; static&nbsp ; function&nbsp ; say ( ) \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; { \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; echo&nbsp ; &quot ; hello&nbsp ; world ! &quot ; ; \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; } \r \n } 19979 38754 24320 22987 32534 35793 24182 29983 25104 25193 23637 65306 $ &nbsp ; zephir&nbsp ; build 39318 20808 65292 21482 20250 22312 31532 19968 27425 25191 34892 30340 26102 20505 65292 22823 37327 30340 20869 37096 21629 20196 34987 25191 34892 65292 24182 20135 29983 20102 19968 20123 24517 35201 30340 20195 30721 21644 37197 32622 25991 20214 65292 26368 32456 25226 36825 20010 31867 29983 25104 php 30340 25193 23637 12290 22914 26524 19968 20999 39034 21033 30340 35805 65292 20320 23558 20250 30475 21040 65306 ...extension&nbsp ; installed ! \r \n add&nbsp ; extension = utils.so \r \n to&nbsp ; your&nbsp ; php.inidon& # 39 ; t&nbsp ; forget&nbsp ; to&nbsp ; restart&nbsp ; your&nbsp ; web&nbsp ; server 22312 19978 38754 30340 27493 39588 20013 65292 20320 21487 33021 38656 35201 25552 20379 20320 30340 root 24080 21495 21644 23494 30721 21435 23433 35013 36825 20010 25193 23637 12290 26368 21518 65292 36825 20010 25193 23637 24517 39035 22686 21152 21040 php.ini 25991 20214 20013 65292 20197 20415 php 21487 20197 21152 36733 23427 65306 extension = utils.so 21021 22987 21270 27979 35797 29616 22312 36825 20010 25193 23637 24050 32463 22686 21152 21040 php.ini 25991 20214 20013 20102 65292 25191 34892 19979 38754 30340 21629 20196 26469 30830 35748 25193 23637 26159 21542 24050 32463 27491 30830 30340 21152 36733 36827 26469 20102 65306 $ &nbsp ; php&nbsp ; -m \r \n [ php&nbsp ; modules ] \r \n core \r \n date \r \n libxml \r \n pcre \r \n reflection \r \n session \r \n spl \r \n standard \r \n tokenizer \r \n utils \r \n xdebug \r \n xml 25193 23637 utils 24517 39035 35201 20986 29616 22312 19978 38754 30340 21015 34920 20013 12290 37027 20040 29616 22312 65292 25105 20204 23581 35797 22312 php 20013 36816 34892 36825 20010 hello world 25193 23637 12290 20026 20102 23436 25104 36825 20010 27979 35797 65292 25105 20204 20889 20102 19968 20010 31616 21333 30340 php 20195 30721 26469 25191 34892 25193 23637 20013 30340 38745 24577 20989 25968 65306 &lt ; ?php \r \n echo&nbsp ; utils \\ greeting::say ( ) , &nbsp ; &quot ; \\ n&quot ; ; 24685 21916 65281 65292 20320 24050 32463 23436 25104 20320 30340 31532 19968 20010 php 25193 23637 20102 12290 19968 20123 26377 29992 30340 31867 &quot ; hello world&quot ; 36825 20010 31867 30340 25193 23637 26159 29992 26469 26816 27979 25105 20204 30340 19981 24184 26159 21542 27491 30830 30340 12290 29616 22312 65292 35753 25105 20204 24314 31435 19968 20123 20854 23427 26356 26377 29992 22788 30340 31867 12290 31532 19968 20010 26377 29992 30340 31867 25105 20204 23558 35201 22686 21152 21040 php 25193 23637 20013 23558 20250 25552 20379 19968 20010 36807 28388 24037 20855 32473 29992 25143 12290 36825 20010 31867 23601 21483 20570 &quot ; utils \\ filter&quot ; 65292 36825 20010 31867 30340 20195 30721 24517 39035 35201 25918 22312 &quot ; utils/utils/filter.zep&quot ; 20013 : 36825 20010 31867 30340 22522 26412 30340 26694 26550 22914 19979 :namespace&nbsp ; utils ; \r \n class&nbsp ; filter { } 36825 20010 31867 21253 21547 20102 19968 20010 20989 25968 65292 36825 20010 20989 25968 30340 20316 29992 26159 24110 21161 29992 25143 21435 36807 28388 19968 20123 19981 21512 27861 30340 23383 31526 12290 31532 19968 20010 20989 25968 21483 20570 &quot ; alpha&quot ; 65292 23427 30340 30446 26631 23601 26159 21435 36807 28388 38750 ascii 30721 30340 23383 31526 12290 24320 22987 65292 25105 20204 21482 26159 31616 21333 30340 25171 21360 20986 23383 31526 20018 30340 27599 19968 20010 23383 33410 65306 namespace&nbsp ; utils ; class&nbsp ; filter { \r \n \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; public&nbsp ; function&nbsp ; alpha ( string&nbsp ; str ) \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; { \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; char&nbsp ; ch ; \r \n \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; for&nbsp ; ch&nbsp ; in&nbsp ; str&nbsp ; { \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; echo&nbsp ; ch , &nbsp ; &quot ; \\ n&quot ; ; \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; } \r \n \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; } \r \n } 24403 35843 29992 36825 20010 20989 25968 30340 26102 20505 :&lt ; ?php $ f&nbsp ; = &nbsp ; new&nbsp ; utils \\ filter ( ) ; $ f-&gt ; alpha ( &quot ; hello&quot ; ) ; you will see:hello 26816 26597 23383 31526 20018 20013 30340 27599 19968 20010 23383 31526 26159 19968 20010 30452 25509 20102 24403 30340 26041 27861 65292 29616 22312 25105 20204 24314 31435 21478 19968 20010 27491 30830 36807 28388 23383 31526 30340 20989 25968 65306 class&nbsp ; filter { \r \n \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; public&nbsp ; function&nbsp ; alpha ( string&nbsp ; str ) &nbsp ; -&gt ; &nbsp ; string \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; { \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; char&nbsp ; ch ; &nbsp ; string&nbsp ; filtered&nbsp ; = &nbsp ; &quot ; &quot ; ; \r \n \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; for&nbsp ; ch&nbsp ; in&nbsp ; str&nbsp ; { \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; if&nbsp ; ( ch&nbsp ; &gt ; = &nbsp ; & # 39 ; a& # 39 ; &nbsp ; &amp ; &amp ; &nbsp ; ch&nbsp ; &lt ; = &nbsp ; & # 39 ; z& # 39 ; ) &nbsp ; | | &nbsp ; ( ch&nbsp ; &gt ; = &nbsp ; & # 39 ; a& # 39 ; &nbsp ; &amp ; &amp ; &nbsp ; ch&nbsp ; &lt ; = &nbsp ; & # 39 ; z& # 39 ; ) &nbsp ; { \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; let&nbsp ; filtered&nbsp ; . = &nbsp ; ch ; \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; } \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; } \r \n \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; return&nbsp ; filtered ; \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; } \r \n } 36825 20010 20889 22909 30340 20989 25968 21487 20197 20687 21018 25165 19968 26679 27979 35797 :&lt ; ?php \r \n $ f&nbsp ; = &nbsp ; new&nbsp ; utils \\ filter ( ) ; \r \n echo&nbsp ; $ f-&gt ; alpha ( &quot ; hello&quot ; ) ; &nbsp ; //&nbsp ; prints&nbsp ; &quot ; hello&quot ; 19979 38754 30340 35270 39057 28436 31034 20102 19978 38754 30340 36825 20123 36807 31243 : 32467 35770 36825 26159 19968 20010 31616 21333 30340 25351 23548 25945 31243 65292 20294 26159 27491 22914 20320 25152 35265 21040 30340 65292 20351 29992 zephir 20320 21487 20197 24456 23481 26131 30340 24314 31435 19968 20010 php 25193 23637 12290 25105 20204 24314 35758 20320 32487 32493 38405 35835 36825 20010 25163 20876 65292 20197 20415 20320 21487 20197 20102 35299 26356 22810 zephir 30340 29305 24615 12290 ', '1427100716', '1427198477');
INSERT INTO `bk_search_index` VALUES ('23', '54', ' [ zephir 23448 26041 25991 26723 32763 35793 20043 22235 ] 23433 35013 zephir ', ' 20026 20102 23433 35013 zephir 65292 35831 26681 25454 19979 38754 30340 27493 39588 26469 20570 12290 ', ' 23433 35013 zephir 20026 20102 23433 35013 zephir 65292 35831 26681 25454 19979 38754 30340 27493 39588 26469 20570 65306 39044 22791 30693 35782 20351 29992 zephir 26469 32534 35793 php 25193 23637 65292 19979 38754 30340 19968 20123 36719 20214 26159 24517 39035 30340 65306 gcc &gt ; = 4.x/clang &gt ; = 3.xre2c 0.13 or latergnu make 3.81 or laterautoconf 2.31 or laterautomake 1.14 or laterlibpcre3php development headers and tools 22914 26524 20320 22312 20351 29992 ubuntu 65292 20320 21487 20197 20351 29992 20381 36182 21253 26469 23433 35013 65306 $ &nbsp ; sudo&nbsp ; apt-get&nbsp ; update \r \n $ &nbsp ; sudo&nbsp ; apt-get&nbsp ; install&nbsp ; git&nbsp ; gcc&nbsp ; make&nbsp ; re2c&nbsp ; php5&nbsp ; php5-json&nbsp ; php5-dev&nbsp ; libpcre3-dev 22240 20026 zephir 26159 22522 20110 php 26469 32534 20889 30340 65292 20320 24517 39035 23433 35013 26368 26032 30340 php 29256 26412 65292 24182 30830 20445 20320 33021 22312 32456 31471 20013 25191 34892 php , php-config , phize 31561 21629 20196 65288 19968 33324 32534 35793 40664 35748 26159 19981 20250 21152 21040 $ path 20013 30340 65292 21152 20010 36719 36830 21543 65289 65306 $ &nbsp ; php&nbsp ; -v \r \n php&nbsp ; 5.5.7&nbsp ; ( cli ) &nbsp ; ( built:&nbsp ; dec&nbsp ; 14&nbsp ; 2013&nbsp ; 00:44:43 ) copyright&nbsp ; ( c ) &nbsp ; 1997-2013&nbsp ; the&nbsp ; php&nbsp ; group \r \n zend&nbsp ; engine&nbsp ; v2.5.0 , &nbsp ; copyright&nbsp ; ( c ) &nbsp ; 1998-2013&nbsp ; zend&nbsp ; technologies 36824 26377 65292 35831 30830 20445 php 30340 24320 21457 24211 24050 32463 34987 23433 35013 65306 $ &nbsp ; phpize&nbsp ; -v \r \n configuring&nbsp ; for: \r \n php&nbsp ; api&nbsp ; version:&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; 20121113 \r \n zend&nbsp ; module&nbsp ; api&nbsp ; no:&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; 20121212 \r \n zend&nbsp ; extension&nbsp ; api&nbsp ; no:&nbsp ; &nbsp ; &nbsp ; 220121212 25191 34892 19978 38754 30340 21629 20196 30340 36755 20986 21487 33021 20250 26377 25152 19981 21516 65292 20294 26159 36825 20960 26465 21629 20196 26159 38750 24120 37325 35201 30340 65292 25152 20197 35831 20107 20808 23433 35013 22909 23427 20204 12290 23433 35013 zephirjson-c 26159 29992 26469 35299 26512 zephir 35821 27861 30340 65292 35831 20808 23433 35013 23427 65306 $ &nbsp ; git&nbsp ; submodule&nbsp ; update&nbsp ; --init \r \n $ &nbsp ; cd&nbsp ; json-c $ &nbsp ; sh&nbsp ; autogen.sh \r \n $ &nbsp ; ./configure \r \n $ &nbsp ; make&nbsp ; &amp ; &amp ; &nbsp ; sudo&nbsp ; make&nbsp ; install 22312 github 20013 20811 38534 zephir: $ &nbsp ; git&nbsp ; clone&nbsp ; https://github.com/phalcon/zephir 25191 34892 23433 35013 65306 .. code-block:: bash $ cd zephir $ ./install -c 27979 35797 26159 21542 23433 35013 25104 21151 25191 34892 19979 38754 30340 21629 20196 26469 27979 35797 26159 21542 24050 32463 23433 35013 25104 21151 : $ &nbsp ; zephir&nbsp ; help ', '1427100723', '1427198491');
INSERT INTO `bk_search_index` VALUES ('24', '55', ' [ zephir 23448 26041 25991 26723 32763 35793 20043 19977 ] 20171 32461 zephir ', ' zephir 26159 19968 31181 21487 20197 35753 php 24320 21457 32773 23581 35797 32534 20889 21644 32534 35793 21487 20197 34987 php 25191 34892 20195 30721 30340 19968 31181 35821 35328 12290 23427 26159 21160 24577 / 38745 24577 31867 22411 65292 23427 30340 19968 20123 29305 24615 23545 20110 php 24320 21457 32773 26469 35828 26159 38750 24120 30340 30456 20284 30340 12290 ', ' 20171 32461 zephirzephir 26159 19968 31181 21487 20197 35753 php 24320 21457 32773 23581 35797 32534 20889 21644 32534 35793 21487 20197 34987 php 25191 34892 20195 30721 30340 19968 31181 35821 35328 12290 23427 26159 21160 24577 / 38745 24577 31867 22411 65292 23427 30340 19968 20123 29305 24615 23545 20110 php 24320 21457 32773 26469 35828 26159 38750 24120 30340 30456 20284 30340 12290 zephir 30340 21517 23383 26159 21462 33258 zend engine/php/intermediate 30340 32553 20889 12290 24314 35758 21457 38899 20026 zephyr 30456 21516 12290 20107 23454 19978 zephir 30340 21019 36896 32773 21457 38899 20026 zaefire_.hello world ! 27599 19968 31181 35821 35328 37117 20250 26377 23427 20204 30340 &quot ; hello world ! &quot ; 20363 23376 65292 23545 20110 zehpir 26469 35828 20063 19981 20363 22806 65292 19979 38754 30340 36825 20010 24341 23548 20363 23376 21015 20030 20102 35768 22810 23427 37325 35201 30340 29305 24615 12290 zephir 30340 20195 30721 24517 39035 25918 32622 22312 31867 20013 12290 zephir 26159 22522 20110 38754 21521 23545 35937 31867 / 26694 26550 25171 36896 30340 12290 25152 20197 20195 30721 25918 32622 22312 31867 30340 22806 38754 26159 19981 20801 35768 30340 12290 21478 22806 65292 19968 20010 21629 21517 31354 38388 20063 26159 24517 39035 30340 65306 namespace&nbsp ; test ; \r \n / * * \r \n &nbsp ; * &nbsp ; this&nbsp ; is&nbsp ; a&nbsp ; sample&nbsp ; class \r \n &nbsp ; * / \r \n class&nbsp ; hello { \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; / * * \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; * &nbsp ; this&nbsp ; is&nbsp ; a&nbsp ; sample&nbsp ; method \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; * / \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; public&nbsp ; function&nbsp ; say ( ) \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; { \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; echo&nbsp ; &quot ; hello&nbsp ; world ! &quot ; ; \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; } \r \n } 19968 20294 36825 20010 31867 34987 32534 35793 23436 25104 65292 23427 20250 20135 29983 19979 38754 30340 19968 27573 c 20195 30721 65288 gcc/clang/vc + + 32534 35793 65289 : # ifdef&nbsp ; have_config_h \r \n # include&nbsp ; &quot ; config.h&quot ; \r \n # endif # include&nbsp ; &quot ; php.h&quot ; \r \n # include&nbsp ; &quot ; php_test.h&quot ; \r \n # include&nbsp ; &quot ; test.h&quot ; \r \n # include&nbsp ; &quot ; kernel/main.h&quot ; \r \n / * * \r \n &nbsp ; * &nbsp ; this&nbsp ; is&nbsp ; a&nbsp ; sample&nbsp ; class \r \n &nbsp ; * / \r \n zephir_init_class ( test_hello ) &nbsp ; { \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; zephir_register_class ( test , &nbsp ; hello , &nbsp ; hello , &nbsp ; test_hello_method_entry , &nbsp ; 0 ) ; \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; return&nbsp ; success ; \r \n } \r \n / * * \r \n &nbsp ; * &nbsp ; this&nbsp ; is&nbsp ; a&nbsp ; sample&nbsp ; method \r \n &nbsp ; * / \r \n php_method ( test_hello , &nbsp ; say ) &nbsp ; { \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; php_printf ( &quot ; % s&quot ; , &nbsp ; &quot ; hello&nbsp ; world ! &quot ; ) ; \r \n } 20107 23454 19978 65292 20351 29992 zephir 30340 24320 21457 32773 26080 38656 25026 24471 c 35821 35328 65292 22914 26524 20320 26377 20351 29992 32534 35793 22120 65292 25110 32773 php 20869 37096 30340 26500 36896 65292 25110 32773 c 35821 35328 26412 36523 30340 32463 39564 65292 22312 20351 29992 zephir 30340 26102 20505 20320 23558 20250 24863 21040 26356 21152 30340 28165 26224 12290 zephir 21021 35797 22312 25509 19979 26469 30340 20363 23376 20013 65292 25105 20204 23558 20250 23613 35814 32454 30340 25551 36848 65292 20197 20415 20320 30693 36947 26159 24590 20040 22238 20107 12290 25105 20204 30340 30446 26631 26159 35753 20320 24863 35273 19968 19979 21040 24213 zephir 26159 24590 20040 26679 30340 19968 20010 19996 35199 12290 38543 20415 25105 20204 23558 20250 35814 32454 30340 25506 32034 zephir 30340 26032 29305 24615 12290 19979 38754 30340 20363 23376 24456 31616 21333 65292 23427 25552 20379 19968 20010 31867 21644 19968 20010 20989 25968 65292 26816 27979 19968 20010 25968 32452 30340 31867 22411 35753 25105 20204 35748 30495 30340 26816 26597 19979 38754 30340 20195 30721 65292 24320 22987 35748 30495 30340 30340 23398 20064 zephir. 36825 20960 34892 20195 30721 21253 25324 20102 24456 22810 35814 32454 30340 19996 35199 65292 25105 20204 23558 20250 24930 24930 30340 35299 37322 65306 namespace&nbsp ; test ; \r \n / * * \r \n &nbsp ; * &nbsp ; mytest&nbsp ; ( test/mytest.zep ) \r \n &nbsp ; * / \r \n class&nbsp ; mytest { \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; public&nbsp ; function&nbsp ; somemethod ( ) \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; { \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; / * &nbsp ; variables&nbsp ; must&nbsp ; be&nbsp ; declared&nbsp ; * / \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; var&nbsp ; myarray ; \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; int&nbsp ; i&nbsp ; = &nbsp ; 0 , &nbsp ; length ; \r \n \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; / * &nbsp ; create&nbsp ; an&nbsp ; array&nbsp ; * / \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; let&nbsp ; myarray&nbsp ; = &nbsp ; [ &quot ; hello&quot ; , &nbsp ; 0 , &nbsp ; 100.25 , &nbsp ; false , &nbsp ; null ] ; \r \n \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; / * &nbsp ; count&nbsp ; the&nbsp ; array&nbsp ; into&nbsp ; a&nbsp ; & # 39 ; int& # 39 ; &nbsp ; variable&nbsp ; * / \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; let&nbsp ; length&nbsp ; = &nbsp ; count ( myarray ) ; \r \n \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; / * &nbsp ; print&nbsp ; value&nbsp ; types&nbsp ; * / \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; while&nbsp ; i&nbsp ; &lt ; &nbsp ; length&nbsp ; { \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; echo&nbsp ; typeof&nbsp ; myarray [ i ] , &nbsp ; &quot ; \\ n&quot ; ; \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; let&nbsp ; i + + ; \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; } \r \n \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; return&nbsp ; myarray ; \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; } \r \n } 22312 20989 25968 20013 65292 31532 19968 34892 20351 29992 20102 & # 39 ; var& # 39 ; 21644 & # 39 ; int& # 39 ; 20851 38190 35789 26469 22768 26126 19968 20010 20989 25968 20869 30340 31169 26377 21464 37327 12290 22312 20989 25968 20013 30340 27599 19968 20010 21464 37327 24517 39035 20107 20808 22768 26126 23427 20204 33258 24049 30340 31867 22411 12290 36825 20123 22768 26126 24182 19981 26159 38543 24847 30340 65292 23427 24110 21161 32534 35793 22120 26469 25253 21578 32473 20320 20851 20110 38169 35823 30340 21464 37327 65292 25110 32773 21464 37327 30340 20351 29992 26159 21542 36229 20986 30340 23427 30340 33539 22260 65292 36890 24120 23427 20250 22312 26368 21518 25243 20986 38169 35823 12290 21160 24577 30340 21464 37327 24517 39035 20197 20851 38190 35789 & # 39 ; var& # 39 ; 26469 22768 26126 12290 36825 20123 21464 37327 21487 20197 34987 25351 23450 25110 20877 25351 23450 25104 19981 21516 30340 21464 37327 31867 22411 12290 21478 19968 26041 38754 65292 & # 39 ; i& # 39 ; and & # 39 ; length& # 39 ; 20351 29992 20102 25972 25968 30340 38745 24577 21464 37327 65292 22312 25191 34892 31243 24207 30340 36807 31243 20013 65292 23427 21482 33021 25913 21464 20540 65292 32780 19981 33021 25913 21464 21464 37327 30340 31867 22411 12290 19982 php 19981 21516 30340 26159 65292 20320 19981 29992 22312 21464 37327 30340 21069 38754 21152 19978 ( $ ) 31526 21495 12290 zephir 30340 27880 37322 21644 java , c # , c + + 31561 31561 19968 20123 35821 35328 30340 19968 26679 12290 20363 22914 65306 &nbsp ; a //comment goes to the end of a line , while a / * comment * / can cross line boundaries. 40664 35748 30340 65292 21464 37327 26159 19981 21464 30340 65292 24847 24605 26159 35828 zephir 26399 26395 22823 37096 20998 30340 21464 37327 20445 25345 19981 21464 12290 21464 37327 20445 25345 23427 20204 21407 22987 30340 20540 19981 21464 21487 20197 20248 21270 25104 38745 24577 24120 37327 12290 22914 26524 38656 35201 25913 21464 21464 37327 30340 20540 65292 35831 20351 29992 20851 38190 35789 & # 39 ; let& # 39 ; 65306 / * &nbsp ; 24314 31435 19968 20010 25968 32452 &nbsp ; * / \r \n let&nbsp ; myarray&nbsp ; = &nbsp ; [ &quot ; hello&quot ; , &nbsp ; 0 , &nbsp ; 100.25 , &nbsp ; false , &nbsp ; null ] ; 40664 35748 30340 65292 25968 32452 26159 19968 31181 35937 php 19968 26679 30340 21160 24577 21464 37327 65292 23427 21253 21547 20102 35768 22810 19981 21516 31867 22411 30340 20540 12290 20196 20154 21507 24778 30340 26159 65292 php 20869 37096 30340 20989 25968 21487 20197 22312 zephir 20013 20351 29992 65292 22312 19979 38754 30340 20363 23376 20013 65292 & # 39 ; count& # 39 ; 20989 25968 34987 20351 29992 20102 65292 32534 36753 22120 21487 20197 20197 26368 20339 30340 29366 24577 26469 25191 34892 65292 22240 20026 23427 24050 32463 30693 36947 20102 25968 32452 30340 38271 24230 20102 12290 / * &nbsp ; 35745 31639 20986 25968 32452 30340 22823 23567 &nbsp ; * / \r \n let&nbsp ; length&nbsp ; = &nbsp ; count ( myarray ) ; 21516 26679 30340 65292 25105 20204 21487 20197 20351 29992 33457 25324 21495 26469 25511 21046 31243 24207 30340 27969 31243 .while&nbsp ; i&nbsp ; &lt ; &nbsp ; length&nbsp ; { \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; echo&nbsp ; typeof&nbsp ; myarray [ i ] , &nbsp ; &quot ; \\ n&quot ; ; \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; let&nbsp ; i + + ; \r \n } php 30340 21464 37327 24635 26159 21160 24577 30340 65292 20989 25968 24635 26159 36820 22238 30340 26159 21487 21464 30340 21160 24577 21464 37327 65292 36825 23601 24847 21619 30528 22914 26524 19968 20010 38745 24577 21464 37327 22312 zphir 20013 34987 36820 22238 20102 65292 22312 php 30340 35843 29992 20013 20320 24471 21040 30340 21364 26159 19968 20010 21160 24577 21464 37327 12290 35831 27880 24847 65292 20869 23384 26159 22312 32534 35793 22120 20013 33258 21160 31649 29702 30340 65292 25152 20197 20320 27809 26377 24517 35201 20687 c 35821 35328 19968 26679 21435 20998 37197 21644 37322 25918 20869 23384 12290 36825 21644 php 26159 24456 30456 20284 30340 12290 ', '1427100731', '1427198506');
INSERT INTO `bk_search_index` VALUES ('25', '56', ' [ zephir 23448 26041 25991 26723 32763 35793 20043 20108 ] 20026 20160 20040 36873 25321 zephir? ', ' 30446 21069 30340 php 24212 29992 24517 39035 20351 29992 24471 31283 23450 24615 12289 24615 33021 12289 21644 21151 33021 24615 20445 25345 24179 34913 12290 27599 19968 20010 php 24212 29992 26159 24314 31435 22312 22823 37327 30340 36890 29992 32452 20214 19978 30340 65292 32780 36825 20123 32452 20214 21448 22522 20110 22823 37327 30340 20854 23427 24212 29992 12290 \r \n \r \n 36825 20123 36890 29992 30340 32452 20214 21487 33021 26159 19968 20010 31867 / 26694 26550 65292 25110 32773 26159 23427 20204 30340 32467 21512 12290 19968 20294 23427 20204 34987 23433 35013 65292 26694 26550 24456 23569 20250 25913 21464 12290 20316 20026 19968 20010 24212 29992 30340 22522 30784 65292 23427 20204 24517 39035 20445 25345 24456 39640 30340 21151 33021 24615 65292 21516 26102 20063 35201 20445 25345 36895 24230 20248 21183 12290 \r \n \r \n 24555 36895 24378 22823 30340 31867 24211 20250 21464 24471 24456 38590 25026 65292 36825 26159 30001 20110 23427 20204 26159 39640 24230 25277 35937 30340 23454 29616 30340 12290 32771 34385 21040 36825 20123 22522 26412 30340 31867 24211 21644 26694 26550 24456 23569 20250 25913 21464 65292 36825 23601 20026 32534 20889 19968 20010 21487 20197 25552 39640 24615 33021 21644 33410 30465 35745 31639 26426 36164 28304 30340 25193 23637 25552 20379 20102 19968 20010 26426 20250 12290 \r \n \r \n 36890 36807 zephir 65292 20320 21487 20197 23454 29616 38754 21521 23545 35937 30340 / 26694 26550 / 24212 29992 65292 24182 20351 20320 30340 php 31243 24207 25552 39640 21040 19968 20010 39640 30340 23618 27425 65292 35753 20320 30340 24212 29992 26356 24555 65292 21516 26102 25913 21892 29992 25143 30340 20307 39564 12290 ', ' 20026 20160 20040 36873 25321 zephir? 30446 21069 30340 php 24212 29992 24517 39035 20351 29992 24471 31283 23450 24615 12289 24615 33021 12289 21644 21151 33021 24615 20445 25345 24179 34913 12290 27599 19968 20010 php 24212 29992 26159 24314 31435 22312 22823 37327 30340 36890 29992 32452 20214 19978 30340 65292 32780 36825 20123 32452 20214 21448 22522 20110 22823 37327 30340 20854 23427 24212 29992 12290 36825 20123 36890 29992 30340 32452 20214 21487 33021 26159 19968 20010 31867 / 26694 26550 65292 25110 32773 26159 23427 20204 30340 32467 21512 12290 19968 20294 23427 20204 34987 23433 35013 65292 26694 26550 24456 23569 20250 25913 21464 12290 20316 20026 19968 20010 24212 29992 30340 22522 30784 65292 23427 20204 24517 39035 20445 25345 24456 39640 30340 21151 33021 24615 65292 21516 26102 20063 35201 20445 25345 36895 24230 20248 21183 12290 24555 36895 24378 22823 30340 31867 24211 20250 21464 24471 24456 38590 25026 65292 36825 26159 30001 20110 23427 20204 26159 39640 24230 25277 35937 30340 23454 29616 30340 12290 32771 34385 21040 36825 20123 22522 26412 30340 31867 24211 21644 26694 26550 24456 23569 20250 25913 21464 65292 36825 23601 20026 32534 20889 19968 20010 21487 20197 25552 39640 24615 33021 21644 33410 30465 35745 31639 26426 36164 28304 30340 25193 23637 25552 20379 20102 19968 20010 26426 20250 12290 36890 36807 zephir 65292 20320 21487 20197 23454 29616 38754 21521 23545 35937 30340 / 26694 26550 / 24212 29992 65292 24182 20351 20320 30340 php 31243 24207 25552 39640 21040 19968 20010 39640 30340 23618 27425 65292 35753 20320 30340 24212 29992 26356 24555 65292 21516 26102 25913 21892 29992 25143 30340 20307 39564 12290 22914 26524 20320 26159 19968 20010 php 31243 24207 21592 ...php 26159 20247 22810 27969 34892 30340 32593 31449 24212 29992 24320 21457 35821 35328 20043 19968 12290 20687 php 36825 31181 21160 24577 35299 26512 35821 35328 65292 22240 20026 23427 30340 28789 27963 24615 65292 20026 24212 29992 24320 21457 25552 20379 20102 24456 39640 30340 29983 20135 21147 12290 20174 4.x 21040 5.x 29256 26412 65292 php 24320 22987 22522 20110 zend 24341 25806 23454 29616 12290 zend 24341 25806 20854 23454 26159 19968 20010 29992 26469 25191 34892 php 20195 30721 30340 23383 33410 30721 23454 29616 30340 34394 25311 26426 12290 zend 24341 25806 20960 20046 20986 29616 22312 27599 19968 20010 23433 35013 php 30340 26426 22120 19978 65292 32780 36890 36807 zephir 65292 20320 21487 20197 24314 31435 36816 34892 22312 zend 24341 25806 30340 php 25193 23637 12290 zephir 26159 36890 36807 php 24310 30003 20986 26469 30340 65292 25152 20197 23427 20204 26377 24456 22810 30340 30456 20284 28857 12290 20294 26159 23427 20204 30340 37325 35201 30340 19981 21516 28857 22312 20110 zephir 23427 33258 24049 25152 25317 26377 30340 29305 28857 12290 27604 22914 35828 65306 zephir 26356 21152 30340 20005 26684 65292 30456 23545 php 32534 35793 26469 35828 65292 23427 38656 35201 26356 23569 30340 36164 28304 12290 22914 26524 20320 26159 19968 20010 c 31243 24207 21592 ...c 26159 19968 31181 24378 22823 32780 27969 34892 30340 24320 21457 35821 35328 12290 20107 23454 19978 65292 php 35821 35328 23601 26159 c 25152 32534 20889 30340 12290 36825 23601 26159 20026 20160 20040 php 30340 25193 23637 21487 20197 20351 29992 c 35821 35328 26469 24320 21457 30340 21407 22240 20043 19968 12290 c 35821 35328 21487 20197 33258 30001 30340 31649 29702 20869 23384 65292 20351 29992 24213 23618 30340 31867 22411 65292 29978 33267 21487 20197 20869 23884 27719 32534 35821 35328 12290 20294 26159 30456 23545 php 21644 zephir 26469 35828 65292 24320 21457 19968 20010 22823 30340 24212 29992 65292 20351 29992 c 35821 35328 20250 33457 36153 26356 22810 30340 26102 38388 12290 32780 19988 22914 26524 20320 19981 26159 38750 24120 31934 36890 c 35821 35328 65292 19968 20123 31243 24207 38169 35823 20250 24456 38590 21457 29616 12290 zephir 35821 35328 34987 35774 35745 25104 23433 20840 30340 65292 25152 20197 23427 24182 19981 25903 25345 25351 38024 21644 20869 23384 31649 29702 65292 25152 20197 22914 26524 20320 26159 19968 20010 c 31243 24207 21592 65292 20063 35768 20320 20250 24863 35273 zephir 21151 33021 27809 26377 c 37027 20040 24378 22823 65292 20294 26159 zephir 35201 27604 c 26356 21152 30340 20154 24615 21270 12290 32534 35793 21644 35299 26512 21738 31181 26356 22909 32534 35793 36890 24120 20250 20943 32531 24320 21457 30340 36827 24230 12290 20320 38656 35201 26356 32784 24515 30340 31561 24453 31243 24207 30340 32534 35793 65292 20043 21518 20320 25165 21487 20197 25191 34892 23427 12290 21478 19968 26041 38754 65292 35299 26512 22411 35821 35328 20250 29306 29298 19968 28857 24615 33021 26469 33719 24471 26356 22823 30340 29983 20135 21147 12290 22312 19968 20123 24212 29992 20013 65292 19981 35770 26159 32534 35793 22411 35821 35328 36824 26159 35299 26512 22411 35821 35328 65292 22312 36895 24230 19978 30456 24046 30340 19981 20250 22826 22810 12290 zephir 26159 38656 35201 39044 20808 32534 35793 30340 65292 20294 26159 21151 33021 30340 23454 29616 26159 22522 20110 php 26469 23454 29616 30340 12290 19968 20294 20195 30721 34987 32534 35793 25104 21151 65292 25191 34892 30340 26102 38388 23601 26080 38656 20877 27425 32534 35793 65292 20294 26159 35299 26512 22411 35821 35328 21017 19981 21516 65292 23427 20250 22312 27599 19968 27425 35831 27714 30340 26102 20505 37325 26032 35299 26512 19968 27425 12290 24320 21457 32773 21487 20197 33258 30001 30340 20915 23450 20320 30340 24212 29992 20013 21738 19968 37096 20221 38656 35201 29992 zephir 26469 22788 29702 65292 21738 19968 37096 20998 19981 38656 35201 12290 38745 24577 31867 22411 23545 27604 38745 24577 31867 22411 35821 35328 65288 24378 31867 22411 35821 35328 23545 27604 24369 31867 22411 35821 35328 65289 19968 33324 26469 35828 65292 22312 38745 24577 31867 22411 35821 35328 20013 65292 19968 20010 21464 37327 19968 23450 35201 39044 20808 22768 26126 23427 30340 21464 37327 31867 22411 12290 32780 19988 23427 30340 31867 22411 19981 33021 35813 21464 65292 21482 20801 35768 31867 22411 24341 29992 21644 25805 20316 12290 20687 c/c + + 26469 35828 65306 int&nbsp ; a&nbsp ; = &nbsp ; 0 ; a&nbsp ; = &nbsp ; &quot ; hello&quot ; ; &nbsp ; //&nbsp ; 19981 20801 35768 23545 20110 21160 24577 35821 35328 26469 35828 65292 21464 37327 30340 31867 22411 26159 21644 21464 37327 30340 20540 32465 23450 30340 65292 24182 19981 26159 21464 37327 26412 36523 12290 25152 20197 24403 21464 37327 30340 20540 30340 31867 22411 35813 21464 30340 26102 20505 65292 21464 37327 30340 31867 22411 20063 20250 26681 30528 35813 21464 12290 20687 javascript/php 26469 35828 65306 var&nbsp ; a&nbsp ; = &nbsp ; 0 ; a&nbsp ; = &nbsp ; &quot ; hello&quot ; ; &nbsp ; //&nbsp ; 21487 20197 36825 26679 20351 29992 23613 31649 21160 24577 35299 26512 35821 35328 26377 29983 20135 24551 21183 65292 20294 26159 23427 24182 19981 26159 25152 26377 24212 29992 30340 26368 20339 36873 25321 65292 29305 21035 26159 19968 20123 22823 25968 37327 32423 30340 20195 30721 21644 24615 33021 30340 24212 29992 12290 20248 21270 21160 24577 35821 35328 65292 27604 22914 php 65292 20250 27604 38745 24577 35821 35328 65292 27604 22914 c 26469 35828 20250 26356 20855 25361 25112 24615 12290 23545 20110 38745 24577 35821 35328 26469 35828 65292 20248 21270 21487 20197 26681 25454 31867 22411 30340 20449 24687 26469 20570 20915 23450 12290 32780 23545 20110 21160 24577 35821 35328 26469 35828 65292 20250 26356 23569 30340 20123 31867 20449 24687 26469 20570 20248 21270 65292 36825 23601 20351 24471 21160 24577 35821 35328 30340 20248 21270 26356 21152 30340 22256 38590 12290 28982 23572 36817 26469 25105 20204 30475 21040 20102 20248 21270 21160 24577 35821 35328 30340 36827 23637 65288 20687 jit 32534 35793 65289 65292 20294 26159 30456 23545 38745 24577 35821 35328 26469 35828 23427 36824 26159 22788 20110 21155 21183 12290 25152 20197 65292 22914 26524 20320 38656 35201 19968 20010 39640 24615 33021 30340 24037 20855 65292 38745 24577 35821 35328 21487 33021 26356 20026 30340 23433 20840 21487 38752 12290 21478 19968 20010 23567 30340 20248 21183 65292 38745 24577 35821 35328 20250 39069 22806 30340 26816 27979 20195 30721 32534 35793 30340 36807 31243 12290 32534 35793 22120 19981 20250 21457 29616 36923 36753 38169 35823 65292 20294 26159 26356 37325 35201 30340 26159 32534 35793 22120 21487 20197 39044 20808 30340 30693 36947 31243 24207 30340 38169 35823 12290 32780 23545 20110 21160 24577 35299 26512 35821 35328 26469 35828 65292 21482 26377 22312 25191 34892 30340 26102 20505 25165 20250 21457 29616 38169 35823 12290 zephir 26082 26159 38745 24577 35821 35328 20063 26159 21160 24577 35821 35328 65292 20320 21487 20197 24456 26041 20415 30340 20351 29992 20004 32773 35821 35328 30340 20248 21183 12290 32534 35793 26041 26696 zephir 25552 20379 21407 20195 30721 30340 29983 25104 65288 30446 21069 20250 32534 35793 25104 c 35821 35328 65289 65292 20687 gcc/clang/vc + + 32534 35793 22120 20248 21270 20195 30721 24182 32534 35793 25104 26426 22120 20195 30721 65292 19979 38754 30340 19968 24352 22270 29255 28436 31034 20102 22788 29702 30340 36807 31243 65306 zephir 38500 20102 25552 20379 36825 20010 22806 65292 22312 22788 29702 30340 36807 31243 20013 65292 32534 35793 22120 36824 20250 23454 26045 22823 37327 30340 20248 21270 26469 25552 39640 24212 29992 30340 24615 33021 12290 gcc optimizationsllvm passesvisual c/c + + optimizations 20195 30721 20445 25252 22312 19968 20123 24773 20917 19979 65292 32534 35793 22120 24182 19981 20250 25552 39640 24212 29992 30340 24615 33021 65292 36825 21487 33021 26159 30001 20110 24212 29992 30340 29942 39048 26159 i/o 35745 31639 22823 20110 20869 23384 35745 31639 12290 20294 26159 32534 35793 20195 30721 21487 20197 36215 21040 23545 20195 30721 30340 19968 31181 20445 25252 20316 29992 12290 36890 36807 zephir 65292 20445 25252 26412 22320 30340 25991 20214 65292 20320 23436 20840 26377 33021 21147 21435 20445 25252 20320 30340 20195 30721 65292 24182 25226 23427 20204 24102 32473 20320 30340 29992 25143 21644 23458 25143 12290 32467 35770 zephir 24182 19981 26159 20026 20102 20195 26367 php 25110 c 20135 29983 30340 65292 32780 26159 34917 20805 23427 20204 30340 19981 36275 65292 23427 20801 35768 24320 21457 32773 23581 35797 32534 35793 21644 24320 21457 38745 24577 35821 35328 12290 zephir 26159 23545 php 21644 c 35821 35328 30340 19968 20123 20248 31168 30340 19968 20123 19996 35199 30340 34701 21512 30340 19968 28857 23581 35797 65292 20174 32780 20196 24471 20154 30340 24212 29992 26356 21152 30340 24555 36895 12290 ', '1427100739', '1427437181');
INSERT INTO `bk_search_index` VALUES ('26', '57', ' [ zephir 23448 26041 25991 26723 32763 35793 20043 19968 ] 27426 36814 26469 21040 zephir 65281 ', ' zephir 26159 19968 20010 24320 28304 30340 65292 21487 20197 29992 39640 32423 35821 35328 23433 20840 24555 36895 22320 32534 20889 php 30340 c 25193 23637 12290 ', ' 26368 26032 26356 26032 35831 30041 24847 25105 30340 github:&nbsp ; https://github.com/pfdtk/zephir-docs/tree/master/zh_cn 27426 36814 26469 21040 zephir 65281 zephir 26159 19968 20010 24320 28304 30340 65292 21487 20197 29992 39640 32423 35821 35328 23433 20840 24555 36895 22320 32534 20889 php 30340 c 25193 23637 12290 zephir 29305 28857 zephir 30340 20027 35201 29305 28857 26377 :type systemdynamic/staticmemory safetypointers or direct memory management aren& # 39 ; t allowedcompilation modelahead of timememory modeltask-local garbage collection 29275 20992 23567 35797 19979 38754 30340 31867 20013 30340 20989 25968 alpha 36807 28388 19968 27573 23383 31526 20018 65292 24182 36820 22238 23383 27597 23383 31526 :namespace&nbsp ; mylibrary ; \r \n / * * \r \n &nbsp ; * &nbsp ; filter \r \n &nbsp ; * / \r \n class&nbsp ; filter { \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; / * * \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; * &nbsp ; 36807 28388 19968 27573 23383 31526 20018 65292 24182 36820 22238 23383 27597 23383 31526 \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; * \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; * &nbsp ; @ param&nbsp ; string&nbsp ; str \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; * / \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; public&nbsp ; function&nbsp ; alpha ( string&nbsp ; str ) \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; { \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; char&nbsp ; ch ; &nbsp ; string&nbsp ; filtered&nbsp ; = &nbsp ; &quot ; &quot ; ; \r \n \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; for&nbsp ; ch&nbsp ; in&nbsp ; str&nbsp ; { \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; if&nbsp ; ( ch&nbsp ; &gt ; = &nbsp ; & # 39 ; a& # 39 ; &nbsp ; &amp ; &amp ; &nbsp ; ch&nbsp ; &lt ; = &nbsp ; & # 39 ; z& # 39 ; ) &nbsp ; | | &nbsp ; ( ch&nbsp ; &gt ; = &nbsp ; & # 39 ; a& # 39 ; &nbsp ; &amp ; &amp ; &nbsp ; ch&nbsp ; &lt ; = &nbsp ; & # 39 ; z& # 39 ; ) &nbsp ; { \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; let&nbsp ; filtered&nbsp ; . = &nbsp ; ch ; \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; } \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; } \r \n \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; return&nbsp ; filtered ; \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; } \r \n } 19968 20294 19978 38754 30340 20195 30721 32534 35793 25104 25193 23637 21518 65292 22312 php 20013 21487 20197 36825 26679 20351 29992 :&lt ; ?php \r \n $ filter&nbsp ; = &nbsp ; new&nbsp ; mylibrary \\ filter ( ) ; \r \n echo&nbsp ; $ filter-&gt ; alpha ( &quot ; hello&quot ; ) ; &nbsp ; //&nbsp ; 36755 20986 &nbsp ; hello ', '1427100747', '1427198529');
INSERT INTO `bk_search_index` VALUES ('27', '58', ' [ php 25193 23637 23433 35013 ] 20026 php 23433 35013 redis 25193 23637 ', ' 31616 21333 30340 37096 22863 20171 32461 php 25193 23637 redis 30340 23433 35013 12290 ', ' 1 12289 phpredis 19979 36733 22320 22336 65306 http://pecl.php.net/package/redis [ jhj @ localhost&nbsp ; solf ] $ &nbsp ; wget&nbsp ; http://pecl.php.net/get/redis-2.2.5.tgz2 12289 35299 21387 23433 35013 65292 23433 35013 26041 27861 22312 https://github.com/nicolasff/phpredis/ # installation [ jhj @ localhost&nbsp ; solf ] $ &nbsp ; tar&nbsp ; xzf&nbsp ; redis-2.2.5.tgz \r \n [ jhj @ localhost&nbsp ; solf ] $ &nbsp ; cd&nbsp ; redis-2.2. 29983 25104 configure 37197 32622 25991 20214 [ jhj @ localhost&nbsp ; redis-2.2.5 ] $ &nbsp ; /usr/local/php/bin/phpize&nbsp ; \r \n configuring&nbsp ; for: \r \n php&nbsp ; api&nbsp ; version:&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; 20090626 \r \n zend&nbsp ; module&nbsp ; api&nbsp ; no:&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; 20090626 \r \n zend&nbsp ; extension&nbsp ; api&nbsp ; no:&nbsp ; &nbsp ; &nbsp ; 220090626 [ jhj @ localhost&nbsp ; redis-2.2.5 ] $ &nbsp ; ./configure&nbsp ; --with-php-config = /usr/local/php/bin/php-config \r \n [ jhj @ localhost&nbsp ; redis-2.2.5 ] $ &nbsp ; make \r \n [ jhj @ localhost&nbsp ; redis-2.2.5 ] $ &nbsp ; make&nbsp ; install \r \n installing&nbsp ; shared&nbsp ; extensions:&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; /usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/ \r \n cp:&nbsp ; cannot&nbsp ; create&nbsp ; regular&nbsp ; file&nbsp ; ` /usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/ # inst @ 6338 # & # 39 ; :&nbsp ; permission&nbsp ; denied \r \n make:&nbsp ; * * * &nbsp ; [ install-modules ] &nbsp ; error&nbsp ; 1 \r \n [ jhj @ localhost&nbsp ; redis-2.2.5 ] $ &nbsp ; su \r \n password:&nbsp ; \r \n [ root @ localhost&nbsp ; redis-2.2.5 ] # &nbsp ; make&nbsp ; install3 12289 37197 32622 php 21152 36733 25193 23637 extension = redis.so4 12289 26597 30475 phpinforedisredis supportenabledredis version2.2.5 ', '1427100756', '1427198609');
INSERT INTO `bk_search_index` VALUES ('28', '59', ' [ php 25193 23637 23433 35013 ] 20026 php 23433 35013 memcached 25193 23637 ', ' 31616 21333 30340 27493 39588 65292 20026 php 23433 35013 memcached 25193 23637 12290 ', ' 1 12289 19979 36733 libmemcached 24211 22320 22336 22312 https://code.launchpad.net/libmemcachedwget&nbsp ; https://launchpad.net/libmemcached/1.0/1.0.18/ + download/libmemcached-1.0.18.tar.gz2 12289 19979 36733 php memcached 25193 23637 65292 22320 22336 22312 http://pecl.php.net/package/memcachedwget&nbsp ; http://pecl.php.net/get/memcached-2.2.0.tgz3 12289 35299 21387 [ root @ localhost&nbsp ; solf ] # &nbsp ; tar&nbsp ; xzf&nbsp ; libmemcached-1.0.18.tar.gz&nbsp ; \r \n [ root @ localhost&nbsp ; solf ] # &nbsp ; tar&nbsp ; xzf&nbsp ; memcached-2.2.0.tgz4 12289 23433 35013 libmemcached [ root @ localhost&nbsp ; libmemcached-1.0.18 ] # &nbsp ; ./configure&nbsp ; --prefix = /usr/local/libmemcached&nbsp ; --with-memcached [ root @ localhost&nbsp ; libmemcached-1.0.18 ] # &nbsp ; make&nbsp ; &amp ; &amp ; &nbsp ; make&nbsp ; install5 12289 23433 35013 phpmemcached 25193 23637 36816 34892 phpize 21629 20196 29983 25104 configure 37197 32622 25991 20214 [ root @ localhost&nbsp ; memcached-2.2.0 ] # &nbsp ; /usr/local/php/bin/phpize&nbsp ; \r \n configuring&nbsp ; for: \r \n php&nbsp ; api&nbsp ; version:&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; 20090626 \r \n zend&nbsp ; module&nbsp ; api&nbsp ; no:&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; 20090626 \r \n zend&nbsp ; extension&nbsp ; api&nbsp ; no:&nbsp ; &nbsp ; &nbsp ; 220090626 23433 35013 65292 22240 20026 26426 23376 19978 21487 33021 27809 26377 sasl 65292 36825 37324 26242 26102 19981 21551 29992 65292 21152 19978 21442 25968 --disable-memcached-sasl 65292 21542 21017 --enable-sasl [ root @ localhost&nbsp ; memcached-2.2.0 ] # &nbsp ; ./configure&nbsp ; --with-php-config = /usr/local/php/bin/php-config&nbsp ; --disable-memcached-saslmake&nbsp ; &amp ; &amp ; &nbsp ; make&nbsp ; install 21040 20123 23433 35013 23436 25104 6 12289 37197 32622 php 65292 21152 36733 memcahed 25193 23637 extension = memcached.so7 12289 37325 21551 httpd [ root @ localhost&nbsp ; no-debug-non-zts-20090626 ] # &nbsp ; service&nbsp ; httpd&nbsp ; restart \r \n stopping&nbsp ; httpd:&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; [ &nbsp ; &nbsp ; ok&nbsp ; &nbsp ; ] \r \n starting&nbsp ; httpd:&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; [ &nbsp ; &nbsp ; ok&nbsp ; &nbsp ; ] 8 12289 26597 30475 phpinfomemcachedmemcached supportenabledversion2.2.0libmemcached version1.0.18sasl supportnosession supportyesigbinary supportnojson supportnomsgpack supportnodirectivelocal valuemaster valuememcached.compression_factor1.31.3memcached.compression_threshold20002000memcached.compression_typefastlzfastlzmemcached.serializerphpphpmemcached.sess_binary00memcached.sess_connect_timeout10001000memcached.sess_consistent_hash00memcached.sess_lock_expire00memcached.sess_lock_max_wait00memcached.sess_lock_wait150000150000memcached.sess_locking11memcached.sess_number_of_replicas00memcached.sess_prefixmemc.sess.key.memc.sess.key.memcached.sess_randomize_replica_read00memcached.sess_remove_failed00memcached.store_retry_count22 ', '1427100764', '1427198592');
INSERT INTO `bk_search_index` VALUES ('29', '60', ' [ centos 36719 20214 23433 35013 ] 23433 35013 memcached ', ' 31616 21333 30340 20171 32461 20102 22914 20309 23433 35013 memcached ', ' 23433 35013 35831 21442 32771 65306 https://code.google.com/p/memcached/wiki/newinstallfromsource 23433 35013 memcached 20043 21069 35831 20808 23433 35013 libevent-develyum&nbsp ; install&nbsp ; libevent-devel 24320 22987 23433 35013 ./configure&nbsp ; --prefix = /usr/local/memcached \r \n make&nbsp ; &amp ; &amp ; &nbsp ; make&nbsp ; install 21551 21160 65306 /usr/local/memcached/bin/memcached&nbsp ; -d&nbsp ; -m&nbsp ; 50&nbsp ; -u&nbsp ; root&nbsp ; -l&nbsp ; 127.0.0.1&nbsp ; -p&nbsp ; 11211telnet 27979 35797 65306 20808 23433 35013 telnet 22914 26524 27809 26377 telnetyum&nbsp ; install&nbsp ; telnet [ root @ localhost&nbsp ; bin ] # &nbsp ; telnet&nbsp ; 127.0.0.1&nbsp ; 11211 \r \n trying&nbsp ; 127.0.0.1... \r \n connected&nbsp ; to&nbsp ; 127.0.0.1. \r \n escape&nbsp ; character&nbsp ; is&nbsp ; & # 39 ; ^ ] & # 39 ; . \r \n set&nbsp ; u&nbsp ; 0&nbsp ; 0&nbsp ; 3 \r \n uuu \r \n stored \r \n get&nbsp ; u \r \n value&nbsp ; u&nbsp ; 0&nbsp ; 3 \r \n uuu \r \n end ', '1427100771', '1427198576');
INSERT INTO `bk_search_index` VALUES ('30', '61', ' [ centos 36719 20214 23433 35013 ] subversion 30340 23433 35013 19982 22810 39033 30446 26435 38480 37197 32622 ', ' 31616 21333 30340 20171 32461 20102 svn 36719 20214 30340 23433 35013 65292 24050 21450 37197 32622 26435 38480 30340 26041 27861 12290 ', ' 1 65306 23433 35013 36807 31243 65292 36825 37324 37319 29992 20102 yum 30340 26041 24335 23433 35013 65292 32534 35793 30340 35805 26377 28857 40635 28902 12290 [ root @ localhost&nbsp ; data ] # &nbsp ; yum&nbsp ; install&nbsp ; subversion 25191 34892 20197 19979 30340 21629 20196 65306 svn&nbsp ; --version 22914 26524 26174 31034 svn , &nbsp ; version&nbsp ; 1.6.11&nbsp ; ( r934486 ) 20043 31867 30340 20449 24687 65292 37027 20040 20195 34920 23433 35013 25104 21151 20102 12290 2 12289 24314 31435 29256 26412 24211 39318 20808 25105 20204 24314 31435 19968 20010 25991 20214 22841 26469 19987 38376 23384 25918 svn 39033 30446 65292 22914 19979 [ root @ localhost&nbsp ; data ] # &nbsp ; mkdir&nbsp ; /data 25105 20204 20351 29992 21629 20196 24314 31435 20004 20010 39033 30446 65306 [ root @ localhost&nbsp ; data ] # &nbsp ; svnadmin&nbsp ; create&nbsp ; /data/onethink \r \n [ root @ localhost&nbsp ; data ] # &nbsp ; svnadmin&nbsp ; create&nbsp ; /data/p2 27492 26102 20250 22312 25991 20214 22841 /data/ 19979 38754 29983 25104 20004 20010 39033 30446 onethink 21644 p2 65292 30446 24405 32467 26500 22914 19979 65306 drwxr-xr-x.&nbsp ; 6&nbsp ; root&nbsp ; root&nbsp ; 4096&nbsp ; may&nbsp ; 23&nbsp ; 22:10&nbsp ; onethink \r \n drwxr-xr-x.&nbsp ; 6&nbsp ; root&nbsp ; root&nbsp ; 4096&nbsp ; may&nbsp ; 24&nbsp ; 01:06&nbsp ; p2 27599 20010 39033 30446 30340 30446 24405 32467 26500 22914 19979 65306 drwxr-xr-x.&nbsp ; 2&nbsp ; root&nbsp ; root&nbsp ; 4096&nbsp ; may&nbsp ; 24&nbsp ; 01:15&nbsp ; conf \r \n drwxr-sr-x.&nbsp ; 6&nbsp ; root&nbsp ; root&nbsp ; 4096&nbsp ; may&nbsp ; 24&nbsp ; 01:24&nbsp ; db \r \n -r--r--r--.&nbsp ; 1&nbsp ; root&nbsp ; root&nbsp ; &nbsp ; &nbsp ; &nbsp ; 2&nbsp ; may&nbsp ; 24&nbsp ; 01:06&nbsp ; format \r \n drwxr-xr-x.&nbsp ; 2&nbsp ; root&nbsp ; root&nbsp ; 4096&nbsp ; may&nbsp ; 24&nbsp ; 01:06&nbsp ; hooks \r \n drwxr-xr-x.&nbsp ; 2&nbsp ; root&nbsp ; root&nbsp ; 4096&nbsp ; may&nbsp ; 24&nbsp ; 01:06&nbsp ; locks \r \n -rw-r--r--.&nbsp ; 1&nbsp ; root&nbsp ; root&nbsp ; &nbsp ; 229&nbsp ; may&nbsp ; 24&nbsp ; 01:06&nbsp ; readme.txt 20854 20013 conf 25991 20214 22841 20013 30340 19977 20010 25991 20214 20026 svn 30340 37197 32622 25991 20214 65292 21253 25324 65306 -rw-r--r--.&nbsp ; 1&nbsp ; root&nbsp ; root&nbsp ; 1093&nbsp ; may&nbsp ; &nbsp ; 7&nbsp ; 06:41&nbsp ; authz \r \n -rw-r--r--.&nbsp ; 1&nbsp ; root&nbsp ; root&nbsp ; &nbsp ; 320&nbsp ; may&nbsp ; &nbsp ; 7&nbsp ; 06:39&nbsp ; passwd \r \n -rw-r--r--.&nbsp ; 1&nbsp ; root&nbsp ; root&nbsp ; 2259&nbsp ; may&nbsp ; &nbsp ; 7&nbsp ; 06:43&nbsp ; svnserve.conf 20854 20013 authz 20026 26435 38480 25991 20214 65292 passwd 20026 29992 25143 39564 35777 25991 20214 65292 svnserve.conf 20026 39033 30446 37197 32622 25991 20214 12290 20026 20102 26041 20415 25105 20204 25226 authz passwd 36825 20004 20010 25991 20214 29420 31435 24320 26469 65292 25104 20026 27599 20010 39033 30446 30340 20844 29992 26435 38480 21644 39564 35777 25991 20214 12290 25105 20204 25226 23427 20204 25918 22312 /data/conf 30446 24405 19979 12290 27492 26102 30340 30446 24405 32467 26500 22914 19979 65306 drwxr-xr-x.&nbsp ; 2&nbsp ; root&nbsp ; root&nbsp ; 4096&nbsp ; may&nbsp ; 24&nbsp ; 01:26&nbsp ; conf \r \n drwxr-xr-x.&nbsp ; 6&nbsp ; root&nbsp ; root&nbsp ; 4096&nbsp ; may&nbsp ; 23&nbsp ; 22:10&nbsp ; onethink \r \n drwxr-xr-x.&nbsp ; 6&nbsp ; root&nbsp ; root&nbsp ; 4096&nbsp ; may&nbsp ; 24&nbsp ; 01:06&nbsp ; p2 [ root @ localhost&nbsp ; data ] # &nbsp ; ll&nbsp ; conf&nbsp ; onethink/&nbsp ; p2/ \r \n conf: \r \n total&nbsp ; 8 \r \n -rw-r--r--.&nbsp ; 1&nbsp ; root&nbsp ; root&nbsp ; 1031&nbsp ; may&nbsp ; 24&nbsp ; 01:24&nbsp ; authz \r \n -rw-r--r--.&nbsp ; 1&nbsp ; root&nbsp ; root&nbsp ; &nbsp ; 338&nbsp ; may&nbsp ; 23&nbsp ; 22:08&nbsp ; passwd \r \n \r \n onethink/: \r \n total&nbsp ; 24 \r \n drwxr-xr-x.&nbsp ; 2&nbsp ; root&nbsp ; root&nbsp ; 4096&nbsp ; may&nbsp ; 23&nbsp ; 22:56&nbsp ; conf \r \n drwxr-sr-x.&nbsp ; 6&nbsp ; root&nbsp ; root&nbsp ; 4096&nbsp ; may&nbsp ; 24&nbsp ; 01:18&nbsp ; db \r \n -r--r--r--.&nbsp ; 1&nbsp ; root&nbsp ; root&nbsp ; &nbsp ; &nbsp ; &nbsp ; 2&nbsp ; may&nbsp ; 23&nbsp ; 21:50&nbsp ; format \r \n drwxr-xr-x.&nbsp ; 2&nbsp ; root&nbsp ; root&nbsp ; 4096&nbsp ; may&nbsp ; 23&nbsp ; 21:50&nbsp ; hooks \r \n drwxr-xr-x.&nbsp ; 2&nbsp ; root&nbsp ; root&nbsp ; 4096&nbsp ; may&nbsp ; 23&nbsp ; 21:50&nbsp ; locks \r \n -rw-r--r--.&nbsp ; 1&nbsp ; root&nbsp ; root&nbsp ; &nbsp ; 229&nbsp ; may&nbsp ; 23&nbsp ; 21:50&nbsp ; readme.txt \r \n \r \n p2/: \r \n total&nbsp ; 24 \r \n drwxr-xr-x.&nbsp ; 2&nbsp ; root&nbsp ; root&nbsp ; 4096&nbsp ; may&nbsp ; 24&nbsp ; 01:15&nbsp ; conf \r \n drwxr-sr-x.&nbsp ; 6&nbsp ; root&nbsp ; root&nbsp ; 4096&nbsp ; may&nbsp ; 24&nbsp ; 01:24&nbsp ; db \r \n -r--r--r--.&nbsp ; 1&nbsp ; root&nbsp ; root&nbsp ; &nbsp ; &nbsp ; &nbsp ; 2&nbsp ; may&nbsp ; 24&nbsp ; 01:06&nbsp ; format \r \n drwxr-xr-x.&nbsp ; 2&nbsp ; root&nbsp ; root&nbsp ; 4096&nbsp ; may&nbsp ; 24&nbsp ; 01:06&nbsp ; hooks \r \n drwxr-xr-x.&nbsp ; 2&nbsp ; root&nbsp ; root&nbsp ; 4096&nbsp ; may&nbsp ; 24&nbsp ; 01:06&nbsp ; locks \r \n -rw-r--r--.&nbsp ; 1&nbsp ; root&nbsp ; root&nbsp ; &nbsp ; 229&nbsp ; may&nbsp ; 24&nbsp ; 01:06&nbsp ; readme.txt 25509 19979 26469 25105 20204 37197 32622 29992 25143 21517 21450 23494 30721 25171 24320 /data/conf/passwd 25991 20214 65292 22686 21152 20004 20010 29992 25143 [ root @ localhost&nbsp ; conf ] # &nbsp ; cat&nbsp ; passwd&nbsp ; \r \n # # # &nbsp ; this&nbsp ; file&nbsp ; is&nbsp ; an&nbsp ; example&nbsp ; password&nbsp ; file&nbsp ; for&nbsp ; svnserve. \r \n # # # &nbsp ; its&nbsp ; format&nbsp ; is&nbsp ; similar&nbsp ; to&nbsp ; that&nbsp ; of&nbsp ; svnserve.conf.&nbsp ; as&nbsp ; shown&nbsp ; in&nbsp ; the \r \n # # # &nbsp ; example&nbsp ; below&nbsp ; it&nbsp ; contains&nbsp ; one&nbsp ; section&nbsp ; labelled&nbsp ; [ users ] . \r \n # # # &nbsp ; the&nbsp ; name&nbsp ; and&nbsp ; password&nbsp ; for&nbsp ; each&nbsp ; user&nbsp ; follow , &nbsp ; one&nbsp ; account&nbsp ; per&nbsp ; line. \r \n \r \n [ users ] \r \n # &nbsp ; harry&nbsp ; = &nbsp ; harryssecret \r \n # &nbsp ; sally&nbsp ; = &nbsp ; sallyssecret \r \n tttt&nbsp ; = &nbsp ; 111111&nbsp ; &nbsp ; # 29992 25143 1 \r \n tttt2&nbsp ; = &nbsp ; 111111&nbsp ; &nbsp ; &nbsp ; # 29992 25143 2 25509 30528 25105 20204 35774 32622 39033 30446 onethink 21644 p2 19979 38754 30340 conf/svnserve.conf 25991 20214 65292 20196 21040 23427 21487 20197 20351 29992 20844 20849 30340 /data/conf/passwd 21450 /data/conf/authzanon-access&nbsp ; = &nbsp ; none&nbsp ; // 26080 26435 38480 26102 \r \n auth-access&nbsp ; = &nbsp ; write&nbsp ; // 26377 26435 38480 26102 \r \n # # # &nbsp ; the&nbsp ; password-db&nbsp ; option&nbsp ; controls&nbsp ; the&nbsp ; location&nbsp ; of&nbsp ; the&nbsp ; password \r \n # # # &nbsp ; database&nbsp ; file.&nbsp ; &nbsp ; unless&nbsp ; you&nbsp ; specify&nbsp ; a&nbsp ; path&nbsp ; starting&nbsp ; with&nbsp ; a&nbsp ; / , \r \n # # # &nbsp ; the&nbsp ; file& # 39 ; s&nbsp ; location&nbsp ; is&nbsp ; relative&nbsp ; to&nbsp ; the&nbsp ; directory&nbsp ; containing \r \n # # # &nbsp ; this&nbsp ; configuration&nbsp ; file. \r \n # # # &nbsp ; if&nbsp ; sasl&nbsp ; is&nbsp ; enabled&nbsp ; ( see&nbsp ; below ) , &nbsp ; this&nbsp ; file&nbsp ; will&nbsp ; not&nbsp ; be&nbsp ; used. \r \n # # # &nbsp ; uncomment&nbsp ; the&nbsp ; line&nbsp ; below&nbsp ; to&nbsp ; use&nbsp ; the&nbsp ; default&nbsp ; password&nbsp ; file. \r \n password-db&nbsp ; = &nbsp ; /data/conf/passwd&nbsp ; // 25152 20351 29992 30340 29992 25143 23494 30721 25991 20214 \r \n # # # &nbsp ; the&nbsp ; authz-db&nbsp ; option&nbsp ; controls&nbsp ; the&nbsp ; location&nbsp ; of&nbsp ; the&nbsp ; authorization \r \n # # # &nbsp ; rules&nbsp ; for&nbsp ; path-based&nbsp ; access&nbsp ; control.&nbsp ; &nbsp ; unless&nbsp ; you&nbsp ; specify&nbsp ; a&nbsp ; path \r \n # # # &nbsp ; starting&nbsp ; with&nbsp ; a&nbsp ; / , &nbsp ; the&nbsp ; file& # 39 ; s&nbsp ; location&nbsp ; is&nbsp ; relative&nbsp ; to&nbsp ; the&nbsp ; the \r \n # # # &nbsp ; directory&nbsp ; containing&nbsp ; this&nbsp ; file.&nbsp ; &nbsp ; if&nbsp ; you&nbsp ; don& # 39 ; t&nbsp ; specify&nbsp ; an \r \n # # # &nbsp ; authz-db , &nbsp ; no&nbsp ; path-based&nbsp ; access&nbsp ; control&nbsp ; is&nbsp ; done. \r \n # # # &nbsp ; uncomment&nbsp ; the&nbsp ; line&nbsp ; below&nbsp ; to&nbsp ; use&nbsp ; the&nbsp ; default&nbsp ; authorization&nbsp ; file. \r \n authz-db&nbsp ; = &nbsp ; /data/conf/authz&nbsp ; // 26435 38480 31649 29702 25991 20214 \r \n # # # &nbsp ; this&nbsp ; option&nbsp ; specifies&nbsp ; the&nbsp ; authentication&nbsp ; realm&nbsp ; of&nbsp ; the&nbsp ; repository. \r \n # # # &nbsp ; if&nbsp ; two&nbsp ; repositories&nbsp ; have&nbsp ; the&nbsp ; same&nbsp ; authentication&nbsp ; realm , &nbsp ; they&nbsp ; should \r \n # # # &nbsp ; have&nbsp ; the&nbsp ; same&nbsp ; password&nbsp ; database , &nbsp ; and&nbsp ; vice&nbsp ; versa.&nbsp ; &nbsp ; the&nbsp ; default&nbsp ; realm \r \n # # # &nbsp ; is&nbsp ; repository& # 39 ; s&nbsp ; uuid. \r \n realm&nbsp ; = &nbsp ; p2&nbsp ; // 35980 20284 36825 20010 21483 20160 20040 26469 30528 65311 37197 32622 22909 21518 65292 25105 20204 36824 38656 35201 37197 32622 /data/conf/authz 26435 38480 31649 29702 25991 20214 [ groups ] \r \n g1&nbsp ; = &nbsp ; tttt&nbsp ; # 29992 25143 32452 1 \r \n g2&nbsp ; = &nbsp ; tttt2&nbsp ; # 29992 25143 32452 2 \r \n \r \n [ onethink:/ ] &nbsp ; # onethink 39033 30446 30340 26435 38480 35774 32622 \r \n @ g1&nbsp ; = &nbsp ; rw&nbsp ; # onethink 39033 30446 32452 65292 29992 25143 32452 1 26159 26377 35835 20889 30340 \r \n @ g2&nbsp ; = &nbsp ; # onethink 39033 30446 32452 65292 29992 25143 32452 2 26159 27809 26377 20219 20309 26435 38480 30340 \r \n \r \n [ p2:/ ] &nbsp ; # p2 39033 30446 32452 30340 26435 38480 65292 21516 19978 \r \n @ g2 = &nbsp ; rw \r \n \r \n [ p2:/txt ] &nbsp ; # 37197 32622 p2 39033 30446 19979 30340 txt 25991 20214 22841 30340 26435 38480 65292 36825 37324 29992 25143 32452 2 26159 27809 26377 26435 38480 30340 \r \n @ g2 = 37197 32622 22909 21518 65292 25105 20204 21551 21160 svn 26381 21153 [ root @ localhost&nbsp ; conf ] # &nbsp ; svnserve&nbsp ; -d&nbsp ; -r&nbsp ; /data/ 36825 26102 25105 20204 22312 window 29615 22659 19979 23601 21487 20197 20351 29992 36719 20214 26469 35775 38382 20102 65292 20004 20010 39033 30446 30340 35775 38382 22320 22336 20998 21035 20026 svn://192.168.110.129/p2svn://192.168.110.129/onethink ', '1427100778', '1427198568');
INSERT INTO `bk_search_index` VALUES ('36', '67', ' [ svn 30456 20851 ] 20351 29992 35760 24405 ', ' 36825 37324 35760 24405 20102 26377 20851 20010 20154 22312 20351 29992 svn 30340 19968 20123 38382 39064 65292 20197 21450 35299 20915 26041 27861 12290 ', ' 1 12289 22914 20309 22312 26356 26032 svn 20195 30721 30340 26102 20505 21516 26102 26356 26032 21644 svn 21516 19968 21488 26426 30340 web 31243 24207 12290 35299 20915 65306 22312 20179 24211 30446 24405 hooks 19979 24314 31435 19968 20010 25991 20214 post-commit 22686 21152 20197 19979 20869 23481 # ! /bin/sh \r \n export.utf-8 \r \n svn&nbsp ; update&nbsp ; --username&nbsp ; xx&nbsp ; --password&nbsp ; xxxx&nbsp ; /home/www/xx 22312 20351 29992 36825 20010 20195 30721 20043 21069 65292 38656 35201 22312 36335 24452 /home/www/xx 20808 25226 36825 20010 24211 25289 19979 26469 65292 20197 21518 27599 27425 26356 26032 20195 30721 21040 svn 30340 26102 20505 65292 20250 21516 26102 25191 34892 36825 27573 hooks 20195 30721 12290 36825 26679 23601 21487 20197 21516 26102 26356 26032 web 20013 30340 20195 30721 20102 12290 2 12289 22914 20309 22312 25552 20132 26356 26032 30340 26102 20505 24378 21046 20889 26085 24535 35299 20915 65306 22312 hooks 30446 24405 19979 25191 34892 19979 38754 30340 21629 20196 cp&nbsp ; pre-commit-tmpl&nbsp ; pre-commit \r \n chmod&nbsp ; + x&nbsp ; pre-commit 28982 21518 20462 25913 pre-commit 25991 20214 repos = &quot ; $ 1&quot ; \r \n txn = &quot ; $ 2&quot ; \r \n &nbsp ; \r \n # &nbsp ; make&nbsp ; sure&nbsp ; that&nbsp ; the&nbsp ; log&nbsp ; message&nbsp ; contains&nbsp ; some&nbsp ; text. \r \n svnlook = /usr/bin/svnlook \r \n logmsg = ` $ svnlook&nbsp ; log&nbsp ; -t&nbsp ; &quot ; $ txn&quot ; &nbsp ; &quot ; $ repos&quot ; &nbsp ; | &nbsp ; grep&nbsp ; &quot ; [ a-za-z0-9 ] &quot ; &nbsp ; | &nbsp ; wc&nbsp ; -c ` \r \n if&nbsp ; [ &nbsp ; &quot ; $ logmsg&quot ; &nbsp ; -lt&nbsp ; 10&nbsp ; ] ; \r \n then \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; echo&nbsp ; & # 39 ; 26085 24535 21834 65281 20146 65281 & # 39 ; &nbsp ; 1&gt ; &amp ; 2 \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; exit&nbsp ; 1 \r \n fi \r \n &nbsp ; \r \n # &nbsp ; check&nbsp ; that&nbsp ; the&nbsp ; author&nbsp ; of&nbsp ; this&nbsp ; commit&nbsp ; has&nbsp ; the&nbsp ; rights&nbsp ; to&nbsp ; perform \r \n # &nbsp ; the&nbsp ; commit&nbsp ; on&nbsp ; the&nbsp ; files&nbsp ; and&nbsp ; directories&nbsp ; being&nbsp ; modified. \r \n # &nbsp ; commit-access-control.pl&nbsp ; &quot ; $ repos&quot ; &nbsp ; &quot ; $ txn&quot ; &nbsp ; commit-access-control.cfg&nbsp ; | | &nbsp ; exit&nbsp ; 1 \r \n &nbsp ; \r \n # &nbsp ; all&nbsp ; checks&nbsp ; passed , &nbsp ; so&nbsp ; allow&nbsp ; the&nbsp ; commit. \r \n exit&nbsp ; 0 ', '1427207199', '1427208041');
INSERT INTO `bk_search_index` VALUES ('37', '68', ' zeroclipboard 25554 20214 22914 20309 25209 37327 21021 22987 21270 12290 ', ' 35760 24405 20102 zeroclipboard 25554 20214 25209 37327 21021 22987 21270 30340 26041 27861 12290 ', ' js 20195 30721 65306 &nbsp ; &nbsp ; zeroclipboard.config ( { &nbsp ; swfpath:&nbsp ; & # 39 ; /static/js/zeroclipboard/zeroclipboard.swf& # 39 ; &nbsp ; } ) ; &nbsp ; &nbsp ; \r \n &nbsp ; \r \n &nbsp ; &nbsp ; function&nbsp ; initcopy ( $ o ) &nbsp ; { &nbsp ; &nbsp ; \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; var&nbsp ; text&nbsp ; = &nbsp ; $ o.html ( ) ; &nbsp ; \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; var&nbsp ; k&nbsp ; = &nbsp ; $ o.attr ( & # 39 ; ids& # 39 ; ) ; \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; if&nbsp ; ( text ) &nbsp ; { &nbsp ; &nbsp ; \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; new&nbsp ; zeroclipboard ( $ ( & # 39 ; # cpbtn& # 39 ; + k ) ) .on ( &quot ; copy&quot ; , &nbsp ; function&nbsp ; ( event ) &nbsp ; { &nbsp ; &nbsp ; \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; var&nbsp ; clipboard&nbsp ; = &nbsp ; event.clipboarddata ; &nbsp ; &nbsp ; \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; clipboard.setdata ( &quot ; text/plain&quot ; , &nbsp ; text ) ; &nbsp ; &nbsp ; \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; alert ( & # 39 ; 22797 21046 25104 21151 & # 39 ; ) ; &nbsp ; &nbsp ; \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; } ) ; &nbsp ; &nbsp ; \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; } &nbsp ; &nbsp ; \r \n &nbsp ; &nbsp ; } &nbsp ; &nbsp ; \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; \r \n &nbsp ; &nbsp ; $ ( & # 39 ; .cpcontent& # 39 ; ) .each ( function&nbsp ; ( i , &nbsp ; o ) &nbsp ; { &nbsp ; &nbsp ; \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; initcopy ( $ ( o ) ) ; \r \n &nbsp ; &nbsp ; } ) ; html 20195 30721 65288 23454 38469 20013 65292 21487 33021 26377 22810 27573 24046 19981 22810 30340 20195 30721 65289 65306 &lt ; span&nbsp ; ids = &quot ; 1&quot ; &nbsp ; class = &quot ; cpcontent&quot ; &gt ; 25152 35201 22797 21046 30340 25991 23383 &lt ; /span&gt ; // 25991 23383 \r \n &lt ; input&nbsp ; id = &quot ; cpbtn1&quot ; &nbsp ; type = &quot ; button&quot ; &nbsp ; class = &quot ; chobtn&nbsp ; btn&nbsp ; cpbtn&quot ; &nbsp ; value = &quot ; 22797 21046 25991 26412 &quot ; &nbsp ; /&gt ; // 25353 38062 &lt ; span&nbsp ; ids = &quot ; 2&quot ; &nbsp ; class = &quot ; cpcontent&quot ; &gt ; 25152 35201 22797 21046 30340 25991 23383 &lt ; /span&gt ; // 25991 23383 \r \n &lt ; input&nbsp ; id = &quot ; cpbtn2&quot ; &nbsp ; type = &quot ; button&quot ; &nbsp ; class = &quot ; chobtn&nbsp ; btn&nbsp ; cpbtn&quot ; &nbsp ; value = &quot ; 22797 21046 25991 26412 &quot ; &nbsp ; /&gt ; // 25353 38062 20854 20013 65306 $ ( & # 39 ; .cpcontent& # 39 ; ) 20195 34920 30340 26159 38656 35201 22797 21046 30340 25991 23383 $ ( & # 39 ; # cpbtn& # 39 ; + k ) 20195 34920 26159 25991 23383 25152 32465 23450 30340 22797 21046 25353 38062 12290 ', '1427207602', '1427207602');
INSERT INTO `bk_search_index` VALUES ('38', '69', ' [ centos 36719 20214 23433 35013 ] iftop 30340 23433 35013 ', ' 31616 21333 30340 20171 32461 20102 22914 20309 23433 35013 iftop 36719 20214 12290 ', ' wget http://www.ex-parrot.com/ ~ pdw/iftop/download/iftop-0.17.tar.gz 19979 36733 21518 35299 21387 tar&nbsp ; xzf&nbsp ; iftop-0.17.tar.gz 23433 35013 24517 35201 30340 25903 25345 yum&nbsp ; install&nbsp ; libpcap&nbsp ; flex&nbsp ; byacc&nbsp ; &nbsp ; libpcap&nbsp ; ncurses&nbsp ; ncurses-devel&nbsp ; libpcap-devel 28982 21518 ./configure&nbsp ; \r \n make \r \n make&nbsp ; install 21040 20123 24212 35813 23601 22909 20102 12290 ', '1427207907', '1427207907');
INSERT INTO `bk_search_index` VALUES ('35', '66', ' [ centos 38382 39064 38598 ] yum install 26102 25253 warning: rpmts_hdrfromfdno: header v3 rsa/sha256 signature , key id c105b9de: nokey ', ' 35299 20915 65306 rpm --import /etc/pki/rpm-gpg/rpm-gpg-key-centos-6 ', ' 35299 20915 26041 27861 65306 rpm&nbsp ; --import&nbsp ; /etc/pki/rpm-gpg/rpm-gpg-key-centos-6 21518 38754 30340 6 35201 21644 20320 24403 21069 30340 31995 32479 29256 26412 26377 20851 ', '1427206838', '1427206838');
INSERT INTO `bk_search_index` VALUES ('34', '65', ' [ 38382 39064 38598 ] 37325 20889 session 31867 30340 26102 20505 21487 33021 20250 23548 33267 nginx 502 30340 38382 39064 30340 21407 22240 ', ' 37325 20889 session 31867 30340 26102 20505 21487 33021 20250 23548 33267 nginx 502 30340 38382 39064 30340 21407 22240 65292 22312 36825 37324 21487 20197 25214 21040 31572 26696 65306 http://cn2.php.net/manual/zh/function.session-set-save-handler.php # refsect1-function.session-set-save-handler-notes ', ' $ handler&nbsp ; = &nbsp ; new&nbsp ; filesessionhandler ( ) ; \r \n session_set_save_handler ( \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; array ( $ handler , &nbsp ; & # 39 ; open& # 39 ; ) , \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; array ( $ handler , &nbsp ; & # 39 ; close& # 39 ; ) , \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; array ( $ handler , &nbsp ; & # 39 ; read& # 39 ; ) , \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; array ( $ handler , &nbsp ; & # 39 ; write& # 39 ; ) , \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; array ( $ handler , &nbsp ; & # 39 ; destroy& # 39 ; ) , \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; array ( $ handler , &nbsp ; & # 39 ; gc& # 39 ; ) \r \n ) ; \r \n &nbsp ; \r \n //&nbsp ; 36825 20010 26159 37325 28857 20851 38190 22788 , 22914 26524 27809 26377 21152 36825 20010 35821 21477 65292 37027 20040 21487 33021 20250 26377 26426 29575 36896 25104 nginx&nbsp ; 502 30340 38382 39064 12290 \r \n register_shutdown_function ( & # 39 ; session_write_close& # 39 ; ) ; \r \n &nbsp ; \r \n session_start ( ) ; 25163 20876 37324 26377 35828 26126 65306 http://cn2.php.net/manual/zh/function.session-set-save-handler.php # refsect1-function.session-set-save-handler-notes&nbsp ; ', '1427206635', '1427206660');
INSERT INTO `bk_search_index` VALUES ('33', '64', ' [ 38382 39064 38598 ] 20004 20010 19981 21516 29992 25143 25191 34892 29983 25104 21516 19968 20010 25991 20214 25152 23548 33267 30340 35835 21462 26435 38480 38382 39064 12290 ', ' 35831 27880 24847 19981 21516 29992 25143 29992 25143 25805 20316 21516 19968 20010 25991 20214 30340 26102 20505 21487 33021 20250 23548 33268 31243 24207 27809 26377 26435 38480 36827 34892 25805 20316 12290 ', ' 26368 36817 22312 20351 29992 31243 24207 29983 25104 32531 23384 30340 26102 20505 21457 29616 26377 26102 20505 29983 25104 25104 21151 65292 26377 26102 20505 29983 25104 19981 25104 21151 65311 26816 26597 31243 24207 26159 27809 26377 38382 39064 30340 12290 26368 21518 26597 20986 26159 22240 20026 26377 33050 26412 22312 20197 root 29992 25143 26469 36305 php 33050 26412 29983 25104 21516 19968 20010 32531 23384 25991 20214 12290 32780 25105 20204 35775 38382 apache 30340 29992 25143 26159 21364 26159 www 12290 27604 22914 65306 24403 25105 20204 22312 20351 29992 26576 19968 31995 32479 21151 33021 30340 26102 20505 65292 20250 29983 25104 19968 20010 32531 23384 25991 20214 65292 24182 23545 36825 20010 25991 20214 26377 20889 30340 26435 38480 12290 20294 26159 30001 20110 26576 31181 21407 22240 65292 25105 20204 38656 35201 19968 20010 23450 26102 20219 21153 26469 23450 26102 26356 26032 36825 20010 32531 23384 25991 20214 12290 20294 26159 30001 20110 22312 36305 33050 26412 30340 26102 20505 29992 30340 26159 root 30340 29992 25143 26469 36305 30340 65292 32780 22240 20026 root 30340 umask 21407 22240 65292 21019 24314 25991 20214 30340 26102 20505 20250 20250 20943 25481 26435 38480 0022 65292 21363 755 12290 36825 26679 30340 19968 20010 32531 23384 25991 20214 65292 24403 apache 29992 www 29992 25143 20877 26469 29983 25104 30340 26102 20505 65292 20250 22240 20026 27809 26377 20889 30340 26435 38480 32780 26356 26032 22833 36133 12290 ', '1427206381', '1427206381');
INSERT INTO `bk_search_index` VALUES ('31', '62', ' [ centos 36719 20214 23433 35013 ] sphinx 30340 23433 35013 19982 37197 32622 20197 21450 php 26041 38754 30340 22788 29702 ', ' 31616 21333 30340 20171 32461 sphinx 30340 23433 35013 19982 37197 32622 20197 21450 php 26041 38754 30340 22788 29702 12290 ', ' 1 12289 19979 36733 sphinx:wget&nbsp ; http://sphinxsearch.com/files/sphinx-2.2.8-release.tar.gz2 12289 24320 22987 32534 35793 $ &nbsp ; tar&nbsp ; xzvf&nbsp ; sphinx-2.2.8-release.tar.gz \r \n $ &nbsp ; cd&nbsp ; sphinx \r \n $ &nbsp ; ./configure \r \n $ &nbsp ; make \r \n $ &nbsp ; make&nbsp ; install 32534 35793 30340 26102 20505 26377 20960 20010 21442 25968 21487 20197 36873 25321 65292 25105 23433 35013 30340 26102 20505 26159 40664 35748 30340 65292 27809 26377 21152 20197 19979 20219 20309 30340 21442 25968 65306 there& # 39 ; s&nbsp ; a&nbsp ; number&nbsp ; of&nbsp ; options&nbsp ; to&nbsp ; configure.&nbsp ; the&nbsp ; complete&nbsp ; listing&nbsp ; may&nbsp ; be&nbsp ; obtained&nbsp ; by&nbsp ; using&nbsp ; --help&nbsp ; switch.&nbsp ; the&nbsp ; most&nbsp ; important&nbsp ; ones&nbsp ; are: \r \n \r \n --prefix , &nbsp ; which&nbsp ; specifies&nbsp ; where&nbsp ; to&nbsp ; install&nbsp ; sphinx ; &nbsp ; such&nbsp ; as&nbsp ; --prefix = /usr/local/sphinx&nbsp ; ( all&nbsp ; of&nbsp ; the&nbsp ; examples&nbsp ; use&nbsp ; this&nbsp ; prefix ) \r \n \r \n --with-mysql , &nbsp ; which&nbsp ; specifies&nbsp ; where&nbsp ; to&nbsp ; look&nbsp ; for&nbsp ; mysql&nbsp ; include&nbsp ; and&nbsp ; library&nbsp ; files , &nbsp ; if&nbsp ; auto-detection&nbsp ; fails ; \r \n \r \n --with-static-mysql , &nbsp ; which&nbsp ; builds&nbsp ; sphinx&nbsp ; with&nbsp ; statically&nbsp ; linked&nbsp ; mysql&nbsp ; support ; \r \n \r \n --with-pgsql , &nbsp ; which&nbsp ; specifies&nbsp ; where&nbsp ; to&nbsp ; look&nbsp ; for&nbsp ; postgresql&nbsp ; include&nbsp ; and&nbsp ; library&nbsp ; files. \r \n \r \n --with-static-pgsql , &nbsp ; which&nbsp ; builds&nbsp ; sphinx&nbsp ; with&nbsp ; statically&nbsp ; linked&nbsp ; postgresql&nbsp ; support ; 22914 26524 24819 30693 36947 65292 23433 35013 30340 25991 20214 22312 21738 65311 21487 20197 20351 29992 20197 19979 30340 21629 20196 26597 30475 65306 $ &nbsp ; ./configure&nbsp ; --help 22914 26524 20320 19979 36733 30340 26159 rpm 21253 21487 20197 20351 29992 20197 19979 21629 20196 26597 30475 23433 35013 36335 24452 65306 $ &nbsp ; rpm&nbsp ; -qpl&nbsp ; sphinx-2.2.8-1.rhel7.x86_64.rpm&nbsp ; # 26597 30475 25991 20214 23433 35013 22312 21738 3 12289 37197 32622 25991 20214 22312 /usr/local/etc/sphinx.conf 65292 40664 35748 36825 20010 25991 20214 19981 23384 22312 65292 20294 26159 /usr/local/etc/ 30446 24405 19979 26377 sphinx.conf.distcopy&nbsp ; sphinx.conf.dist&nbsp ; sphinx.conf 37197 32622 25991 20214 31616 21333 30340 22914 19979 65306 # 28304 \r \n source&nbsp ; mrblog_article \r \n { \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; type&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; = &nbsp ; mysql \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; sql_host&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; = &nbsp ; localhost \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; sql_user&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; = &nbsp ; root \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; sql_pass&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; = &nbsp ; qqq111 ! ! ! \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; sql_db&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; = &nbsp ; mrblog \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; sql_port&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; = &nbsp ; 3306 \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; sql_query_pre&nbsp ; &nbsp ; &nbsp ; = &nbsp ; set&nbsp ; names&nbsp ; utf8 \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; sql_sock&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; = &nbsp ; /tmp/mysql.sock \r \n \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; sql_query&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; = &nbsp ; \\ \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; select&nbsp ; id , &nbsp ; article_id , &nbsp ; title , &nbsp ; summary , &nbsp ; content , &nbsp ; added_date&nbsp ; \\ \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; from&nbsp ; bk_search_index \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; # # warning:&nbsp ; attribute&nbsp ; & # 39 ; id& # 39 ; &nbsp ; not&nbsp ; found&nbsp ; -&nbsp ; ignoring \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; # 20986 29616 36825 20010 30340 21407 22240 26159 22240 20026 19981 33021 20351 29992 20027 38190 , 19988 19978 38754 30340 26597 35810 35821 21477 40664 35748 19988 24517 38656 31532 19968 20010 23383 27573 26159 id \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; sql_attr_uint&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; = &nbsp ; article_id&nbsp ; \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; sql_attr_timestamp&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; = &nbsp ; added_date \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; sql_ranged_throttle&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; = &nbsp ; 100 \r \n } \r \n # 32034 24341 \r \n index&nbsp ; mrblog_article_1 \r \n { \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; source&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; = &nbsp ; mrblog_article \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; path&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; = &nbsp ; /alidata/sphinx/data/mrblog_article_1 \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; docinfo&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; = &nbsp ; extern \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; dict&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; = &nbsp ; keywords \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; mlock&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; = &nbsp ; 0 \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; morphology&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; = &nbsp ; none \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; min_word_len&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; = &nbsp ; 1 \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; ngram_len&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; = &nbsp ; 1 \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; ngram_chars&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; = &nbsp ; u + 3000..u + 2fa1f \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; html_strip&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; = &nbsp ; 100 \r \n } \r \n \r \n \r \n source&nbsp ; mrblog_articlethrottled&nbsp ; :&nbsp ; mrblog_article \r \n { \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; sql_ranged_throttle&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; = &nbsp ; 100 \r \n } \r \n \r \n index&nbsp ; rt \r \n { \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; type&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; = &nbsp ; rt \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; path&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; = &nbsp ; /alidata/sphinx/data/rt \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; rt_field&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; = &nbsp ; title \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; rt_field&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; = &nbsp ; content \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; rt_attr_uint&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; = &nbsp ; gid \r \n } \r \n \r \n indexer \r \n { \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; mem_limit&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; = &nbsp ; 128m \r \n } \r \n \r \n searchd \r \n { \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; listen&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; = &nbsp ; 9312 \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; log&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; = &nbsp ; /alidata/sphinx/log/searchd.log \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; query_log&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; = &nbsp ; /alidata/sphinx/log/query.log \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; read_timeout&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; = &nbsp ; 5 \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; client_timeout&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; = &nbsp ; 300 \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; max_children&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; = &nbsp ; 30 \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; persistent_connections_limit&nbsp ; &nbsp ; &nbsp ; &nbsp ; = &nbsp ; 30 \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; pid_file&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; = &nbsp ; /alidata/sphinx/data/searchd.pid \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; preopen_indexes&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; = &nbsp ; 1 \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; unlink_old&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; = &nbsp ; 1 \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; mva_updates_pool&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; = &nbsp ; 1m \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; max_packet_size&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; = &nbsp ; 8m \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; max_filters&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; = &nbsp ; 256 \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; max_filter_values&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; = &nbsp ; 4096 \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; max_batch_queries&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; = &nbsp ; 32 \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; workers&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; = &nbsp ; threads&nbsp ; # &nbsp ; for&nbsp ; rt&nbsp ; to&nbsp ; work \r \n } \r \n \r \n common \r \n { \r \n \r \n } 4 12289 29983 25104 32034 24341 /usr/local/bin/indexer&nbsp ; --config&nbsp ; /usr/local/etc/sphinx.conf&nbsp ; --all&nbsp ; --rotate6 12289 21551 21160 sphinx/usr/local/bin/searchd&nbsp ; --config&nbsp ; /usr/local/etc/sphinx.conf7 12289 23433 35013 php 25193 23637 65306 35831 31227 27493 65306 http://www.opcache.net/index/detail.html?id = 638 12289 php 22914 26524 22788 29702 65292 35831 31227 27493 65306 http://www.opcache.net/index/detail.html?id = 64&nbsp ; ', '1427186776', '1427198558');
INSERT INTO `bk_search_index` VALUES ('39', '70', ' [ centos 20351 29992 35760 24405 ] 22914 20309 21551 21160 22810 20010 php-fpm 19988 20114 19981 24433 21709 65311 ', ' 22312 php 23433 35013 28304 30721 30340 30446 24405 sapi/fpm/init.d.php-fpm 37324 38754 30340 36825 20010 23601 26159 20102 12290 ', ' 22312 php 23433 35013 28304 30721 30340 30446 24405 sapi/fpm/init.d.php-fpm 37324 38754 30340 36825 20010 23601 26159 20102 12290 ', '1427208192', '1427208192');
INSERT INTO `bk_search_index` VALUES ('40', '71', ' sphinx 20840 25991 25628 32034 php 26041 38754 30340 22788 29702 ', ' 31616 21333 22320 20171 32461 sphinx 20840 25991 25628 32034 php 26041 38754 30340 22788 29702 65292 29616 22312 29256 26412 30340 sphinx 19981 30693 36947 25903 19981 25903 25345 20013 25991 20102 65292 38382 20102 32676 37324 30340 26379 21451 37117 35828 19981 25903 25345 65292 25152 26377 29992 20102 36825 31181 26041 27861 26469 20570 12290 ', ' 31532 19968 27425 23581 35797 29992 sphinx 26469 20570 20840 25991 25628 32034 65292 21487 33021 26377 24456 22810 35265 35299 37117 19981 26159 24456 27491 30830 12290 26377 19981 21516 30340 24819 27861 65292 22823 23478 21487 20197 25552 20986 26469 12290 29616 22312 29256 26412 30340 sphinx 19981 30693 36947 25903 19981 25903 25345 20013 25991 20102 65292 38382 20102 32676 37324 30340 26379 21451 37117 35828 19981 25903 25345 65292 25152 26377 29992 20102 20197 19979 30340 36825 31181 26041 27861 26469 20570 12290 1 12289 25991 31456 30340 22788 29702 12290 20551 22914 25991 31456 34920 20026 article_mainidtitlesummarycontenttime1 27979 35797 30340 26631 39064 27979 35797 30340 25688 35201 27979 35797 30340 20869 23481 123123123 30001 20110 sphinx 19981 25903 25345 20013 25991 65288 30495 30340 21527 65311 36825 37324 24403 23427 26159 21543 65289 25105 20204 26032 24314 31435 19968 20010 34920 article_unicodeidarticle_idtitlesummarycontenttime1123243 23123 1221312312 12312 1234512312 12312 12345123123123 36825 20010 26032 30340 34920 30340 32467 26500 21644 article_main 30340 20869 23481 26159 19968 26679 30340 65292 20294 26159 20648 23384 30340 26159 20013 25991 30340 utf-8 30340 unicode 30721 12290 36825 26679 25105 20204 22312 22686 21152 25991 31456 30340 26102 20505 21516 26102 25226 36755 20837 30340 26631 39064 12289 25688 35201 12289 20869 23481 22788 29702 25104 utf-8 30340 unicode 30721 65292 28982 21518 20877 20445 23384 21040 article_unicode 34920 20013 12290 22312 37197 32622 sphinx 30340 26102 20505 20877 20197 article_unicode 36825 20010 34920 20316 20026 28304 65288 35265 65306 http://www.opcache.net/index/detail.html?id = 62 65289 2 12289 25152 29992 21040 30340 22788 29702 utf-8 unicode 30340 31867 26377 22914 19979 65306 &lt ; ?php \r \n \r \n namespace&nbsp ; app \\ libraries ; \r \n \r \n / * * \r \n &nbsp ; * &nbsp ; class&nbsp ; from&nbsp ; chanzhi&nbsp ; &lt ; http://www.chanzhi.org/&gt ; , &nbsp ; and&nbsp ; modified&nbsp ; by&nbsp ; me&nbsp ; at&nbsp ; 2015.3.23 \r \n &nbsp ; * \r \n &nbsp ; * &nbsp ; @ author&nbsp ; jiang&nbsp ; &lt ; mylampblog @ 163.com&gt ; \r \n &nbsp ; * / \r \n class&nbsp ; spliter \r \n { \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; / * * \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; * &nbsp ; split&nbsp ; a&nbsp ; utf-8&nbsp ; string&nbsp ; into&nbsp ; words , &nbsp ; computing&nbsp ; unicode&nbsp ; for&nbsp ; every&nbsp ; word. \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; * &nbsp ; \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; * &nbsp ; @ param&nbsp ; &nbsp ; string&nbsp ; &nbsp ; &nbsp ; &nbsp ; $ string&nbsp ; \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; * &nbsp ; @ access&nbsp ; public \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; * &nbsp ; @ return&nbsp ; array \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; * / \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; public&nbsp ; function&nbsp ; utf8split ( $ string ) \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; { \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; $ string&nbsp ; = &nbsp ; strtolower ( $ string ) ; \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; $ i&nbsp ; = &nbsp ; 0 ; &nbsp ; \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; $ length&nbsp ; = &nbsp ; strlen ( $ string ) ; \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; $ dict&nbsp ; &nbsp ; &nbsp ; = &nbsp ; array ( ) ; \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; $ words&nbsp ; &nbsp ; = &nbsp ; & # 39 ; & # 39 ; ; \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; $ offset&nbsp ; = &nbsp ; 0 ; \r \n \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; while ( $ i&nbsp ; &lt ; = &nbsp ; $ length ) \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; { \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; $ letter&nbsp ; = &nbsp ; substr ( $ string , &nbsp ; $ i , &nbsp ; 1 ) ; \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; $ ord&nbsp ; &nbsp ; &nbsp ; &nbsp ; = &nbsp ; ord ( $ letter ) ; \r \n \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; / * &nbsp ; the&nbsp ; first&nbsp ; letter&nbsp ; is&nbsp ; ascii , &nbsp ; try&nbsp ; to&nbsp ; get&nbsp ; a&nbsp ; word.&nbsp ; * / \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; if ( $ ord&nbsp ; &gt ; = &nbsp ; 0&nbsp ; &amp ; &amp ; &nbsp ; $ ord&nbsp ; &lt ; = &nbsp ; 191 ) \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; { \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; $ i&nbsp ; + + ; \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; if ( $ this-&gt ; isletter ( $ letter ) ) \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; { \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; $ word&nbsp ; = &nbsp ; $ letter ; \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; while&nbsp ; ( $ i&nbsp ; &lt ; = &nbsp ; $ length ) \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; { \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; $ letter&nbsp ; = &nbsp ; substr ( $ string , &nbsp ; $ i , &nbsp ; 1 ) ; \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; if ( &nbsp ; ! &nbsp ; $ this-&gt ; isletter ( $ letter ) ) &nbsp ; break ; \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; $ word&nbsp ; . = &nbsp ; $ letter ; \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; $ i + + ; \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; } \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; $ words&nbsp ; . = &nbsp ; & # 39 ; &nbsp ; & # 39 ; &nbsp ; .&nbsp ; $ word ; \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; continue ; \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; } \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; $ words&nbsp ; . = &nbsp ; & # 39 ; &nbsp ; & # 39 ; &nbsp ; .&nbsp ; $ letter ; \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; continue ; \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; } \r \n \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; if ( $ ord&nbsp ; &gt ; = &nbsp ; 192&nbsp ; &amp ; &amp ; &nbsp ; $ ord&nbsp ; &lt ; = &nbsp ; 223 ) &nbsp ; $ offset&nbsp ; = &nbsp ; 2 ; \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; if ( $ ord&nbsp ; &gt ; = &nbsp ; 224&nbsp ; &amp ; &amp ; &nbsp ; $ ord&nbsp ; &lt ; = &nbsp ; 239 ) &nbsp ; $ offset&nbsp ; = &nbsp ; 3 ; \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; if ( $ ord&nbsp ; &gt ; = &nbsp ; 240&nbsp ; &amp ; &amp ; &nbsp ; $ ord&nbsp ; &lt ; = &nbsp ; 247 ) &nbsp ; $ offset&nbsp ; = &nbsp ; 4 ; \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; if ( $ ord&nbsp ; &gt ; = &nbsp ; 248&nbsp ; &amp ; &amp ; &nbsp ; $ ord&nbsp ; &lt ; = &nbsp ; 251 ) &nbsp ; $ offset&nbsp ; = &nbsp ; 5 ; \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; if ( $ ord&nbsp ; &gt ; = &nbsp ; 252&nbsp ; &amp ; &amp ; &nbsp ; $ ord&nbsp ; &lt ; = &nbsp ; 253 ) &nbsp ; $ offset&nbsp ; = &nbsp ; 6 ; \r \n \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; if ( $ offset&nbsp ; &gt ; = &nbsp ; 2 ) \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; { \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; $ dict [ $ this-&gt ; unicode ( substr ( $ string , &nbsp ; $ i , &nbsp ; $ offset ) ) ] &nbsp ; = &nbsp ; substr ( $ string , &nbsp ; $ i , &nbsp ; $ offset ) ; \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; $ words&nbsp ; . = &nbsp ; & # 39 ; &nbsp ; & # 39 ; &nbsp ; .&nbsp ; $ this-&gt ; unicode ( substr ( $ string , &nbsp ; $ i , &nbsp ; $ offset ) ) ; \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; $ i&nbsp ; + = &nbsp ; $ offset ; \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; } \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; } \r \n \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; return&nbsp ; array ( & # 39 ; dict& # 39 ; &nbsp ; = &gt ; &nbsp ; $ dict , &nbsp ; & # 39 ; words& # 39 ; &nbsp ; = &gt ; &nbsp ; $ words ) ; \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; } \r \n \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; / * * \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; * &nbsp ; return&nbsp ; unicode&nbsp ; value&nbsp ; for&nbsp ; a&nbsp ; char.&nbsp ; \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; * &nbsp ; \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; * &nbsp ; @ param&nbsp ; &nbsp ; string&nbsp ; &nbsp ; &nbsp ; &nbsp ; $ c&nbsp ; \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; * &nbsp ; @ access&nbsp ; public \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; * &nbsp ; @ return&nbsp ; int \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; * / \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; public&nbsp ; function&nbsp ; unicode ( $ c ) &nbsp ; \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; { \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; if ( ord ( $ c { 0 } ) &nbsp ; &gt ; = &nbsp ; 0&nbsp ; &nbsp ; &nbsp ; &amp ; &amp ; &nbsp ; ord ( $ c { 0 } ) &nbsp ; &lt ; = &nbsp ; 127 ) &nbsp ; return&nbsp ; &nbsp ; ord ( $ c { 0 } ) ; \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; if ( ord ( $ c { 0 } ) &nbsp ; &gt ; = &nbsp ; 192&nbsp ; &amp ; &amp ; &nbsp ; ord ( $ c { 0 } ) &nbsp ; &lt ; = &nbsp ; 223 ) &nbsp ; return&nbsp ; ( ord ( $ c { 0 } ) &nbsp ; -&nbsp ; 192 ) &nbsp ; * &nbsp ; 64&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; + &nbsp ; ( ord ( $ c { 1 } ) &nbsp ; -&nbsp ; 128 ) ; \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; if ( ord ( $ c { 0 } ) &nbsp ; &gt ; = &nbsp ; 224&nbsp ; &amp ; &amp ; &nbsp ; ord ( $ c { 0 } ) &nbsp ; &lt ; = &nbsp ; 239 ) &nbsp ; return&nbsp ; ( ord ( $ c { 0 } ) &nbsp ; -&nbsp ; 224 ) &nbsp ; * &nbsp ; 4096&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; + &nbsp ; ( ord ( $ c { 1 } ) &nbsp ; -&nbsp ; 128 ) &nbsp ; * &nbsp ; 64&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; + &nbsp ; ( ord ( $ c { 2 } ) &nbsp ; -&nbsp ; 128 ) ; \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; if ( ord ( $ c { 0 } ) &nbsp ; &gt ; = &nbsp ; 240&nbsp ; &amp ; &amp ; &nbsp ; ord ( $ c { 0 } ) &nbsp ; &lt ; = &nbsp ; 247 ) &nbsp ; return&nbsp ; ( ord ( $ c { 0 } ) &nbsp ; -&nbsp ; 240 ) &nbsp ; * &nbsp ; 262144&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; + &nbsp ; ( ord ( $ c { 1 } ) &nbsp ; -&nbsp ; 128 ) &nbsp ; * &nbsp ; 4096&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; + &nbsp ; ( ord ( $ c { 2 } ) &nbsp ; -&nbsp ; 128 ) &nbsp ; * &nbsp ; 64&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; + &nbsp ; ( ord ( $ c { 3 } ) &nbsp ; -&nbsp ; 128 ) ; \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; if ( ord ( $ c { 0 } ) &nbsp ; &gt ; = &nbsp ; 248&nbsp ; &amp ; &amp ; &nbsp ; ord ( $ c { 0 } ) &nbsp ; &lt ; = &nbsp ; 251 ) &nbsp ; return&nbsp ; ( ord ( $ c { 0 } ) &nbsp ; -&nbsp ; 248 ) &nbsp ; * &nbsp ; 16777216&nbsp ; &nbsp ; &nbsp ; + &nbsp ; ( ord ( $ c { 1 } ) &nbsp ; -&nbsp ; 128 ) &nbsp ; * &nbsp ; 262144&nbsp ; &nbsp ; &nbsp ; + &nbsp ; ( ord ( $ c { 2 } ) &nbsp ; -&nbsp ; 128 ) &nbsp ; * &nbsp ; 4096&nbsp ; &nbsp ; &nbsp ; + &nbsp ; ( ord ( $ c { 3 } ) &nbsp ; -&nbsp ; 128 ) &nbsp ; * &nbsp ; 64&nbsp ; &nbsp ; &nbsp ; + &nbsp ; ( ord ( $ c { 4 } ) &nbsp ; -&nbsp ; 128 ) ; \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; if ( ord ( $ c { 0 } ) &nbsp ; &gt ; = &nbsp ; 252&nbsp ; &amp ; &amp ; &nbsp ; ord ( $ c { 0 } ) &nbsp ; &lt ; = &nbsp ; 253 ) &nbsp ; return&nbsp ; ( ord ( $ c { 0 } ) &nbsp ; -&nbsp ; 252 ) &nbsp ; * &nbsp ; 1073741824&nbsp ; + &nbsp ; ( ord ( $ c { 1 } ) &nbsp ; -&nbsp ; 128 ) &nbsp ; * &nbsp ; 16777216&nbsp ; + &nbsp ; ( ord ( $ c { 2 } ) &nbsp ; -&nbsp ; 128 ) &nbsp ; * &nbsp ; 262144&nbsp ; + &nbsp ; ( ord ( $ c { 3 } ) &nbsp ; -&nbsp ; 128 ) &nbsp ; * &nbsp ; 4096&nbsp ; + &nbsp ; ( ord ( $ c { 4 } ) &nbsp ; -&nbsp ; 128 ) &nbsp ; * &nbsp ; 64&nbsp ; + &nbsp ; ( ord ( $ c { 5 } ) &nbsp ; -&nbsp ; 128 ) ; \r \n \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; if ( ord ( $ c { 0 } ) &nbsp ; &gt ; = &nbsp ; 254&nbsp ; &amp ; &amp ; &nbsp ; ord ( $ c { 0 } ) &nbsp ; &lt ; = &nbsp ; 255 ) &nbsp ; return&nbsp ; false ; \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; return&nbsp ; false ; \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; } \r \n \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; / * * \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; * &nbsp ; judge&nbsp ; a&nbsp ; char&nbsp ; is&nbsp ; letter&nbsp ; or&nbsp ; not. \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; * &nbsp ; \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; * &nbsp ; @ param&nbsp ; &nbsp ; string&nbsp ; &nbsp ; &nbsp ; &nbsp ; $ letter&nbsp ; \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; * &nbsp ; @ access&nbsp ; public \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; * &nbsp ; @ return&nbsp ; bool \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; * / \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; public&nbsp ; function&nbsp ; isletter ( $ letter ) \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; { \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; $ ord&nbsp ; = &nbsp ; ord ( $ letter ) ; \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; if ( $ ord&nbsp ; &gt ; = &nbsp ; ord ( & # 39 ; a& # 39 ; ) &nbsp ; and&nbsp ; $ ord&nbsp ; &lt ; = &nbsp ; ord ( & # 39 ; z& # 39 ; ) ) &nbsp ; return&nbsp ; true ; \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; if ( $ ord&nbsp ; &gt ; = &nbsp ; ord ( & # 39 ; a& # 39 ; ) &nbsp ; and&nbsp ; $ ord&nbsp ; &lt ; = &nbsp ; ord ( & # 39 ; z& # 39 ; ) ) &nbsp ; return&nbsp ; true ; \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; if ( $ ord&nbsp ; &gt ; = &nbsp ; ord ( 0 ) &nbsp ; &nbsp ; &nbsp ; and&nbsp ; $ ord&nbsp ; &lt ; = &nbsp ; ord ( 9 ) ) &nbsp ; &nbsp ; &nbsp ; &nbsp ; return&nbsp ; true ; \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; if ( strpos ( & # 39 ; ._/-&gt ; :&lt ; ?&amp ; & # 39 ; , &nbsp ; $ letter ) &nbsp ; ! = = &nbsp ; false ) &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; return&nbsp ; true ; \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; return&nbsp ; false ; \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; } \r \n \r \n } 35843 29992 26041 27861 22914 19979 65306 $ titlesplited&nbsp ; &nbsp ; &nbsp ; = &nbsp ; $ spliterobject-&gt ; utf8split ( $ data [ & # 39 ; title& # 39 ; ] ) ; // 25991 31456 26631 39064 \r \n $ index [ & # 39 ; title& # 39 ; ] &nbsp ; &nbsp ; &nbsp ; = &nbsp ; $ titlesplited [ & # 39 ; words& # 39 ; ] ; &nbsp ; // 36825 26679 24471 21040 30340 20540 23601 26159 25991 31456 26631 39064 30340 utf-8 30340 unicode 30721 20102 12290 28982 21518 20445 23384 21040 34920 20013 12290 3 12289 24403 25105 20204 20316 25628 32034 30340 26102 20505 65292 21516 26679 30340 20808 25226 25628 32034 35789 36716 21270 20026 unicode 30721 65292 20877 29992 36825 20010 30721 26469 20316 sphinx 30340 25628 32034 $ object&nbsp ; = &nbsp ; new&nbsp ; \\ stdclass ( ) ; \r \n $ object-&gt ; keyword&nbsp ; = &nbsp ; request::input ( & # 39 ; keyword& # 39 ; ) ; \r \n $ searchprocess&nbsp ; = &nbsp ; new&nbsp ; process ( ) ; \r \n \r \n // 36825 37324 20854 23454 23601 26159 25226 keyword 36716 20026 unicode , 25105 23553 35013 20102 19968 19979 12290 \r \n $ keywordunicode&nbsp ; = &nbsp ; $ searchprocess-&gt ; preparekeyword ( $ object-&gt ; keyword ) ; \r \n \r \n // 28982 21518 36890 36807 sphinx 25628 32034 22788 29702 25968 25454 65292 26368 21518 25343 21040 25991 31456 30340 id , 21363 article_unicode 34920 20013 30340 article_id \r \n $ object-&gt ; sphinxresult_articleids&nbsp ; = &nbsp ; $ searchprocess-&gt ; sphinxsearch ( $ keywordunicode ) ; \r \n \r \n // 36890 36807 article_id 20877 26469 20570 24120 35268 30340 26597 35810 12290 \r \n $ articlelist&nbsp ; = &nbsp ; ( new&nbsp ; searchmodel ( ) ) -&gt ; activearticleinfobysearch ( $ object ) ; 36825 26679 23601 21487 20197 20102 12290 ', '1427256396', '1427285900');
INSERT INTO `bk_search_index` VALUES ('32', '63', ' [ php 25193 23637 30340 23433 35013 ] sphinx 25193 23637 30340 23433 35013 ', ' 31616 21333 30340 20171 32461 sphinx 25193 23637 30340 23433 35013 12290 ', ' 1 12289 19979 36733 25991 20214 wget&nbsp ; http://pecl.php.net/get/sphinx-1.3.2.tgz2 12289 32534 35793 23433 35013 tar&nbsp ; xzf&nbsp ; sphinx-1.3.2.tgz&nbsp ; \r \n phpize&nbsp ; # 25110 27491 30830 30340 phpize 23436 25972 21629 20196 \r \n ./configure 22914 26524 22312 25191 34892 configure 21629 20196 30340 26102 20505 20986 38169 65306 configure:&nbsp ; error:&nbsp ; cannot&nbsp ; find&nbsp ; libsphinxclient&nbsp ; headers 37027 20040 22312 sphinx 30340 23433 35013 21253 20013 65288 http://www.opcache.net/index/detail.html?id = 62 20013 30340 23433 35013 21253 65289 26377 /sphinx-2.2.8-release/api/libsphinxclient/ 36827 20837 21040 36825 20010 30446 24405 cd&nbsp ; 20320 30340 30446 24405 /sphinx-2.2.8-release/api/libsphinxclient/ 23433 35013 libsphinxclient./configure \r \n make&nbsp ; &amp ; &amp ; &nbsp ; make&nbsp ; install 23433 35013 23436 25104 21518 32487 32493 23433 35013 php 30340 sphinx 25193 23637 65292 35831 36820 22238 21018 25165 30340 36335 24452 19979 ./configure&nbsp ; --with-php-config = /alidata/server/php/bin/php-config \r \n make \r \n make&nbsp ; install 21040 27492 23433 35013 25104 21151 12290 3 12289 22914 26524 24819 30693 36947 22914 20309 23433 35013 sphinx , 35831 31227 27493 65306 http://www.opcache.net/index/detail.html?id = 62 22914 26524 24819 30693 36947 php 20013 22914 20309 22788 29702 65306 35831 31227 27493 65306 http://www.opcache.net/index/detail.html?id = 64&nbsp ; ', '1427187494', '1427198544');
INSERT INTO `bk_search_index` VALUES ('41', '72', ' [ centos 36719 20214 23433 35013 ] 22914 20309 29420 31435 23433 35013 apache 30340 ab 65311 ', ' 31616 21333 30340 20171 32461 20102 22914 20309 29420 31435 23433 35013 apache 30340 ab 21387 21147 27979 35797 36719 20214 12290 ', ' 25191 34892 21629 20196 19979 36733 36719 20214 65306 yumdownloader&nbsp ; httpd-tools * 25552 21462 25991 20214 rpm2cpio&nbsp ; httpd-tools-2.4.6-19.el7.centos.x86_64.rpm&nbsp ; | &nbsp ; cpio&nbsp ; -idmv 22312 35299 21387 20986 26469 30340 usr/bin/ab 36825 20010 23601 26159 20102 12290 22914 26524 26080 27861 20351 29992 65292 23433 35013 65306 yum&nbsp ; install&nbsp ; apr-util ', '1427382988', '1427383229');
INSERT INTO `bk_search_index` VALUES ('42', '73', ' [ php 25193 23637 23433 35013 ] opcache 30340 23433 35013 ', ' 31616 21333 30340 20171 32461 20102 22914 20309 23433 35013 php 30340 opcache 30340 25193 23637 12290 ', ' 1 12289 36827 20837 php 28304 30721 21253 30446 24405 php 28304 30721 21253 /ext/opcache2 12289 25191 34892 20197 19979 30340 21629 20196 phpize \r \n &nbsp ; ./configure&nbsp ; --with-php-config = /alidata/server/php/bin/php-config&nbsp ; \r \n &nbsp ; make&nbsp ; &amp ; &amp ; &nbsp ; make&nbsp ; install3 12289 20462 25913 php.ini 21152 36733 opcache.so , 21152 20837 20197 19979 30340 37197 32622 12290 [ opcache ] \r \n zend_extension = opcache.so \r \n opcache.enable = 1 36825 26679 20854 23454 23601 21487 20197 20351 29992 20102 65292 24403 28982 65292 36824 26377 26356 22810 30340 19968 20123 37197 32622 65292 36825 37324 23601 19981 20877 35752 35770 20102 12290 ', '1427383968', '1427468057');
INSERT INTO `bk_search_index` VALUES ('43', '74', ' [ centos 36719 20214 23433 35013 ] phpng 30340 23433 35013 ', ' 31616 21333 30340 20171 32461 20102 phpng 30340 23433 35013 12290 ', ' 21069 25552 65306 25105 30340 26426 23376 26159 20351 29992 20102 38463 37324 20113 30340 19968 38190 lnmp 23433 35013 21253 65292 25152 20197 24456 22810 20381 36182 30340 21253 37117 21487 33021 24050 32463 23433 35013 36807 20102 12290 22914 26524 29992 25105 30340 27493 39588 25253 38169 30340 35805 65292 37027 20040 35831 33258 24049 23433 35013 23545 24212 30340 20381 36182 21253 12290 1 12289 phpng 38656 35201 re2c 0.13.4 25110 26356 26032 30340 65292 32780 36890 36807 yum install 30340 26041 24335 23433 35013 30340 27809 26377 36825 20040 26032 65292 25152 20197 37325 26032 32534 35793 19968 19979 12290 wget&nbsp ; http://downloads.sourceforge.net/project/re2c/re2c/0.13.7.5/re2c-0.13.7.5.tar.gz \r \n tar&nbsp ; xzf&nbsp ; re2c-0.13.7.5.tar.gz \r \n cd&nbsp ; re2c-0.13.7.5 \r \n ./configure \r \n make&nbsp ; &amp ; &amp ; &nbsp ; make&nbsp ; install2 12289 21516 26102 20063 38656 35201 23433 35013 bisonyum&nbsp ; install&nbsp ; bison3 12289 36825 37324 25105 21551 29992 20102 bz2 21387 32553 65292 25152 20197 20808 23433 35013 36825 20010 12290 yum&nbsp ; install&nbsp ; bzip2-devel4 12289 22914 26524 25253 38169 configure:&nbsp ; error:&nbsp ; xpm.h&nbsp ; not&nbsp ; found. 37027 20040 23433 35013 yum&nbsp ; install&nbsp ; libxpm-devel5 12289 22914 26524 36824 25253 38169 configure:&nbsp ; error:&nbsp ; your&nbsp ; t1lib&nbsp ; distribution&nbsp ; is&nbsp ; not&nbsp ; installed&nbsp ; correctly.&nbsp ; please&nbsp ; reinstall&nbsp ; it. 37027 20040 23433 35013 yum&nbsp ; install&nbsp ; t1lib \r \n yum&nbsp ; install&nbsp ; t1lib-devel6 12289 22914 26524 36824 25253 configure:&nbsp ; error:&nbsp ; unable&nbsp ; to&nbsp ; locate&nbsp ; gmp.h 37027 20040 yum&nbsp ; install&nbsp ; gmp-devel7 12289 22914 26524 36824 25253 38169 configure:&nbsp ; error:&nbsp ; cannot&nbsp ; find&nbsp ; pspell 37027 20040 26410 30693 65292 26242 26102 21435 25481 20102 --with-pspell 32534 35793 21442 25968 8 12289 22914 26524 25253 configure:&nbsp ; error:&nbsp ; can&nbsp ; not&nbsp ; find&nbsp ; recode.h&nbsp ; anywhere&nbsp ; under&nbsp ; /usr&nbsp ; /usr/local&nbsp ; /usr&nbsp ; /opt. 37027 20040 yum&nbsp ; install&nbsp ; recode \r \n yum&nbsp ; install&nbsp ; recode-devel9 12289 32534 35793 21442 25968 ./configure&nbsp ; --prefix = /alidata/server/php7&nbsp ; \\ \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; --with-config-file-path = /alidata/server/php7/etc&nbsp ; \\ \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; --enable-mbstring&nbsp ; \\ \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; --enable-zip&nbsp ; \\ \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; --enable-bcmath&nbsp ; \\ \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; --enable-pcntl&nbsp ; \\ \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; --enable-ftp&nbsp ; \\ \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; --enable-exif&nbsp ; \\ \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; --enable-calendar&nbsp ; \\ \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; --enable-sysvmsg&nbsp ; \\ \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; --enable-sysvsem&nbsp ; \\ \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; --enable-sysvshm&nbsp ; \\ \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; --enable-wddx&nbsp ; \\ \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; --with-curl&nbsp ; \\ \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; --with-mcrypt&nbsp ; \\ \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; --with-iconv&nbsp ; \\ \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; --with-gmp&nbsp ; \\ \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; --with-gd&nbsp ; \\ \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; --with-jpeg-dir = /usr/local/jpeg.6&nbsp ; \\ \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; --with-png-dir = /usr/local/libpng.1.2.50&nbsp ; \\ \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; --with-zlib-dir = /usr&nbsp ; \\ \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; --with-xpm-dir = /usr&nbsp ; \\ \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; --with-freetype-dir = /usr/local/freetype.2.1.10&nbsp ; \\ \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; --with-t1lib = /usr&nbsp ; \\ \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; --enable-gd-native-ttf&nbsp ; \\ \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; --enable-gd-jis-conv&nbsp ; \\ \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; --with-openssl&nbsp ; \\ \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; --with-pdo-mysql = mysqlnd&nbsp ; \\ \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; --with-mysqli = mysqlnd&nbsp ; \\ \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; --with-gettext = /usr&nbsp ; \\ \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; --with-zlib = /usr&nbsp ; \\ \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; --with-bz2 = /usr&nbsp ; \\ \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; --with-recode = /usr&nbsp ; \\ \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; --enable-opcache&nbsp ; \\ \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; --enable-fpm&nbsp ; \\ \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; --enable-sockets&nbsp ; \\ \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; --disable-debug&nbsp ; \\ make&nbsp ; &amp ; &amp ; &nbsp ; make&nbsp ; install 36825 26679 23601 23433 35013 25104 21151 20102 12290 ', '1427444713', '1427451002');
INSERT INTO `bk_search_index` VALUES ('44', '75', ' 22914 20309 25226 32593 39029 29983 25104 imges , pdf 65311 ', ' 31616 21333 30340 20171 32461 20102 22914 20309 25226 19968 20010 32593 39029 29983 25104 pdf , 25110 32773 image ', ' 1 12289 26041 27861 1http://wkhtmltopdf.org/https://github.com/knplabs/snappy/tree/masterwkhtmltoimage2 12289 26041 27861 2cutycapthttp://www.cszhi.com/20130305/cutycapt.html&nbsp ; &nbsp ; ', '1427451365', '1427451365');
INSERT INTO `bk_search_index` VALUES ('45', '76', ' [ centos 36719 20214 23433 35013 ] openvpn 30340 23433 35013 19982 37197 32622 ', ' 31616 21333 30340 20171 32461 20102 openvpn 30340 23433 35013 19982 37197 32622 12290 ', ' 21069 25552 65306 25105 30340 26426 23376 26159 20351 29992 20102 38463 37324 20113 30340 19968 38190 lnmp 23433 35013 21253 65292 25152 20197 24456 22810 20381 36182 30340 21253 37117 21487 33021 24050 32463 23433 35013 36807 20102 12290 22914 26524 29992 25105 30340 27493 39588 25253 38169 30340 35805 65292 37027 20040 35831 33258 24049 23433 35013 23545 24212 30340 20381 36182 21253 12290 1 12289 20808 19979 36733 36719 20214 wget&nbsp ; http://swupdate.openvpn.org/community/releases/openvpn-2.3.6.tar.gz2 12289 32534 35793 ./configure&nbsp ; --prefix = /usr/local/openvpn 22914 26524 25253 65306 configure:&nbsp ; error:&nbsp ; lzo&nbsp ; enabled&nbsp ; but&nbsp ; missing 37027 20040 23433 35013 lzoyum&nbsp ; install&nbsp ; lzo2-dev 22914 26524 25253 configure:&nbsp ; error:&nbsp ; libpam&nbsp ; required&nbsp ; but&nbsp ; missing 37027 20040 23433 35013 yum&nbsp ; install&nbsp ; pam-devel 22914 26524 27809 26377 25253 38169 20102 65292 37027 20040 make&nbsp ; &amp ; &amp ; &nbsp ; make&nbsp ; install3 12289 25509 19979 26469 23433 35013 easy-rsa 29983 25104 23494 38053 wget&nbsp ; &nbsp ; \r \n tar&nbsp ; xzf&nbsp ; easyrsa-2.2.2.tgz \r \n cp&nbsp ; -rf&nbsp ; easyrsa-2.2.2&nbsp ; /usr/local/easy-rsa4 12289 20462 25913 /usr/local/easy-rsa/vars 25991 20214 export&nbsp ; key_country = &quot ; cn&quot ; \r \n export&nbsp ; key_province = &quot ; wind&quot ; \r \n export&nbsp ; key_city = &quot ; sh&quot ; \r \n export&nbsp ; key_org = &quot ; shhhhh&quot ; \r \n export&nbsp ; key_email = &quot ; me @ myhost.mydomain&quot ; \r \n export&nbsp ; key_ou = &quot ; myorganizationalunit&quot ; 36825 37324 24212 35813 38543 20415 22635 20889 19981 21487 20197 20102 12290 24403 28982 19981 25913 20063 21487 20197 12290 5 12289 cd&nbsp ; /usr/local/easy-rsa/ \r \n ln&nbsp ; -s&nbsp ; openssl-1.0.0.cnf&nbsp ; openssl-cnf \r \n chmod&nbsp ; + x&nbsp ; vars&nbsp ; ; \r \n source&nbsp ; ./vars&nbsp ; ; if&nbsp ; you&nbsp ; run&nbsp ; ./clean-all , &nbsp ; i&nbsp ; will&nbsp ; be&nbsp ; doing&nbsp ; a&nbsp ; rm&nbsp ; -rf&nbsp ; on&nbsp ; /usr/local/easy-rsa/keys \r \n # 25351 30340 26159 22914 26524 20320 25191 34892 ./clean-all 36825 20010 21629 20196 65292 37027 20040 /usr/local/easy-rsa/keys 30446 24405 37324 30340 25991 20214 37117 20250 34987 21024 38500 12290 6 12289 29983 25104 26381 21153 31471 30340 ca 35777 20070 ./build-ca 20250 22312 /usr/local/easy-rsa/keys 19979 29983 25104 35777 20070 7 12289 28982 21518 25191 34892 19979 38754 30340 21629 20196 29983 25104 26381 21153 22120 31471 23494 38053 35777 20070 ./build-key-server&nbsp ; www.opcache.net 36807 26399 20013 20250 35753 20320 22635 20889 19968 20123 20449 33258 21644 23494 30721 65292 38543 20415 22635 20889 23601 21487 20197 20102 12290 8 12289 28982 21518 29983 25104 25152 38656 23458 25143 31471 35777 20070 23494 38053 25991 20214 ./build-key&nbsp ; client1 36807 26399 20013 20063 20250 35753 20320 22635 20889 19968 20123 20449 33258 21644 23494 30721 65292 38543 20415 22635 20889 23601 21487 20197 20102 12290 9 12289 20877 29983 25104 diffie hellman 21442 25968 65292 29992 20110 22686 24378 openvpn 23433 20840 24615 ./build-dh 25991 20214 21517 38656 35201 32773 needed by 35828 26126 purpose 31192 23494 secretca.crt 26381 21153 31471 21644 25152 26377 23458 25143 31471 server + all clients 26681 35777 20070 root ca certificate 21542 noca.key 31614 21457 31169 38053 30340 26426 22120 key signing machine only 26681 31169 38053 root ca key 26159 yesdh { n } .pem 26381 21153 22120 server onlydiffie hellman parameters 21542 noserver.crt 26381 21153 22120 server only 26381 21153 22120 35777 20070 server certificate 21542 noserver.key 26381 21153 22120 server only 26381 21153 22120 31169 38053 server key 26159 yesclient1.crtclient1 onlyclinet1 30340 35777 20070 client1 certificate 21542 noclient1.keyclient1 onlyclinet1 30340 31169 38053 client1 key 26159 yes10 12289 ok 65292 25171 21253 23494 38053 tar&nbsp ; zcvf&nbsp ; key.tar.gz&nbsp ; ./keys/11 12289 20462 25913 37197 32622 25991 20214 vi&nbsp ; /usr/local/openvpn/conf/server.cnf 25226 23545 24212 40664 35748 30340 20462 25913 20026 25913 20026 65292 20854 23427 19981 21464 65306 # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # \r \n # &nbsp ; sample&nbsp ; openvpn&nbsp ; 2.0&nbsp ; config&nbsp ; file&nbsp ; for&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; # \r \n # &nbsp ; multi-client&nbsp ; server.&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; # \r \n # &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; # \r \n # &nbsp ; this&nbsp ; file&nbsp ; is&nbsp ; for&nbsp ; the&nbsp ; server&nbsp ; side&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; # \r \n # &nbsp ; of&nbsp ; a&nbsp ; many-clients&nbsp ; &lt ; -&gt ; &nbsp ; one-server&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; # \r \n # &nbsp ; openvpn&nbsp ; configuration.&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; # \r \n # &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; # \r \n # &nbsp ; openvpn&nbsp ; also&nbsp ; supports&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; # \r \n # &nbsp ; single-machine&nbsp ; &lt ; -&gt ; &nbsp ; single-machine&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; # \r \n # &nbsp ; configurations&nbsp ; ( see&nbsp ; the&nbsp ; examples&nbsp ; page&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; # \r \n # &nbsp ; on&nbsp ; the&nbsp ; web&nbsp ; site&nbsp ; for&nbsp ; more&nbsp ; info ) .&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; # \r \n # &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; # \r \n # &nbsp ; this&nbsp ; config&nbsp ; should&nbsp ; work&nbsp ; on&nbsp ; windows&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; # \r \n # &nbsp ; or&nbsp ; linux/bsd&nbsp ; systems.&nbsp ; &nbsp ; remember&nbsp ; on&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; # \r \n # &nbsp ; windows&nbsp ; to&nbsp ; quote&nbsp ; pathnames&nbsp ; and&nbsp ; use&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; # \r \n # &nbsp ; double&nbsp ; backslashes , &nbsp ; e.g.:&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; # \r \n # &nbsp ; &quot ; c: \\ \\ program&nbsp ; files \\ \\ openvpn \\ \\ config \\ \\ foo.key&quot ; &nbsp ; # \r \n # &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; # \r \n # &nbsp ; comments&nbsp ; are&nbsp ; preceded&nbsp ; with&nbsp ; & # 39 ; # & # 39 ; &nbsp ; or&nbsp ; & # 39 ; ; & # 39 ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; # \r \n # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # \r \n \r \n # &nbsp ; which&nbsp ; local&nbsp ; ip&nbsp ; address&nbsp ; should&nbsp ; openvpn \r \n # &nbsp ; listen&nbsp ; on?&nbsp ; ( optional ) \r \n # local&nbsp ; 127.0.0.1 \r \n \r \n # &nbsp ; which&nbsp ; tcp/udp&nbsp ; port&nbsp ; should&nbsp ; openvpn&nbsp ; listen&nbsp ; on? \r \n # &nbsp ; if&nbsp ; you&nbsp ; want&nbsp ; to&nbsp ; run&nbsp ; multiple&nbsp ; openvpn&nbsp ; instances \r \n # &nbsp ; on&nbsp ; the&nbsp ; same&nbsp ; machine , &nbsp ; use&nbsp ; a&nbsp ; different&nbsp ; port \r \n # &nbsp ; number&nbsp ; for&nbsp ; each&nbsp ; one.&nbsp ; &nbsp ; you&nbsp ; will&nbsp ; need&nbsp ; to \r \n # &nbsp ; open&nbsp ; up&nbsp ; this&nbsp ; port&nbsp ; on&nbsp ; your&nbsp ; firewall. \r \n port&nbsp ; 1194 \r \n \r \n # &nbsp ; tcp&nbsp ; or&nbsp ; udp&nbsp ; server? \r \n ; proto&nbsp ; tcp \r \n proto&nbsp ; udp \r \n \r \n # &nbsp ; &quot ; dev&nbsp ; tun&quot ; &nbsp ; will&nbsp ; create&nbsp ; a&nbsp ; routed&nbsp ; ip&nbsp ; tunnel , \r \n # &nbsp ; &quot ; dev&nbsp ; tap&quot ; &nbsp ; will&nbsp ; create&nbsp ; an&nbsp ; ethernet&nbsp ; tunnel. \r \n # &nbsp ; use&nbsp ; &quot ; dev&nbsp ; tap0&quot ; &nbsp ; if&nbsp ; you&nbsp ; are&nbsp ; ethernet&nbsp ; bridging \r \n # &nbsp ; and&nbsp ; have&nbsp ; precreated&nbsp ; a&nbsp ; tap0&nbsp ; virtual&nbsp ; interface \r \n # &nbsp ; and&nbsp ; bridged&nbsp ; it&nbsp ; with&nbsp ; your&nbsp ; ethernet&nbsp ; interface. \r \n # &nbsp ; if&nbsp ; you&nbsp ; want&nbsp ; to&nbsp ; control&nbsp ; access&nbsp ; policies \r \n # &nbsp ; over&nbsp ; the&nbsp ; vpn , &nbsp ; you&nbsp ; must&nbsp ; create&nbsp ; firewall \r \n # &nbsp ; rules&nbsp ; for&nbsp ; the&nbsp ; the&nbsp ; tun/tap&nbsp ; interface. \r \n # &nbsp ; on&nbsp ; non-windows&nbsp ; systems , &nbsp ; you&nbsp ; can&nbsp ; give \r \n # &nbsp ; an&nbsp ; explicit&nbsp ; unit&nbsp ; number , &nbsp ; such&nbsp ; as&nbsp ; tun0. \r \n # &nbsp ; on&nbsp ; windows , &nbsp ; use&nbsp ; &quot ; dev-node&quot ; &nbsp ; for&nbsp ; this. \r \n # &nbsp ; on&nbsp ; most&nbsp ; systems , &nbsp ; the&nbsp ; vpn&nbsp ; will&nbsp ; not&nbsp ; function \r \n # &nbsp ; unless&nbsp ; you&nbsp ; partially&nbsp ; or&nbsp ; fully&nbsp ; disable \r \n # &nbsp ; the&nbsp ; firewall&nbsp ; for&nbsp ; the&nbsp ; tun/tap&nbsp ; interface. \r \n ; dev&nbsp ; tap \r \n dev&nbsp ; tun \r \n \r \n # &nbsp ; windows&nbsp ; needs&nbsp ; the&nbsp ; tap-win32&nbsp ; adapter&nbsp ; name \r \n # &nbsp ; from&nbsp ; the&nbsp ; network&nbsp ; connections&nbsp ; panel&nbsp ; if&nbsp ; you \r \n # &nbsp ; have&nbsp ; more&nbsp ; than&nbsp ; one.&nbsp ; &nbsp ; on&nbsp ; xp&nbsp ; sp2&nbsp ; or&nbsp ; higher , \r \n # &nbsp ; you&nbsp ; may&nbsp ; need&nbsp ; to&nbsp ; selectively&nbsp ; disable&nbsp ; the \r \n # &nbsp ; windows&nbsp ; firewall&nbsp ; for&nbsp ; the&nbsp ; tap&nbsp ; adapter. \r \n # &nbsp ; non-windows&nbsp ; systems&nbsp ; usually&nbsp ; don& # 39 ; t&nbsp ; need&nbsp ; this. \r \n ; dev-node&nbsp ; mytap \r \n \r \n # &nbsp ; ssl/tls&nbsp ; root&nbsp ; certificate&nbsp ; ( ca ) , &nbsp ; certificate \r \n # &nbsp ; ( cert ) , &nbsp ; and&nbsp ; private&nbsp ; key&nbsp ; ( key ) .&nbsp ; &nbsp ; each&nbsp ; client \r \n # &nbsp ; and&nbsp ; the&nbsp ; server&nbsp ; must&nbsp ; have&nbsp ; their&nbsp ; own&nbsp ; cert&nbsp ; and \r \n # &nbsp ; key&nbsp ; file.&nbsp ; &nbsp ; the&nbsp ; server&nbsp ; and&nbsp ; all&nbsp ; clients&nbsp ; will \r \n # &nbsp ; use&nbsp ; the&nbsp ; same&nbsp ; ca&nbsp ; file. \r \n # \r \n # &nbsp ; see&nbsp ; the&nbsp ; &quot ; easy-rsa&quot ; &nbsp ; directory&nbsp ; for&nbsp ; a&nbsp ; series \r \n # &nbsp ; of&nbsp ; scripts&nbsp ; for&nbsp ; generating&nbsp ; rsa&nbsp ; certificates \r \n # &nbsp ; and&nbsp ; private&nbsp ; keys.&nbsp ; &nbsp ; remember&nbsp ; to&nbsp ; use \r \n # &nbsp ; a&nbsp ; unique&nbsp ; common&nbsp ; name&nbsp ; for&nbsp ; the&nbsp ; server \r \n # &nbsp ; and&nbsp ; each&nbsp ; of&nbsp ; the&nbsp ; client&nbsp ; certificates. \r \n # \r \n # &nbsp ; any&nbsp ; x509&nbsp ; key&nbsp ; management&nbsp ; system&nbsp ; can&nbsp ; be&nbsp ; used. \r \n # &nbsp ; openvpn&nbsp ; can&nbsp ; also&nbsp ; use&nbsp ; a&nbsp ; pkcs&nbsp ; # 12&nbsp ; formatted&nbsp ; key&nbsp ; file \r \n # &nbsp ; ( see&nbsp ; &quot ; pkcs12&quot ; &nbsp ; directive&nbsp ; in&nbsp ; man&nbsp ; page ) . \r \n ca&nbsp ; /usr/local/easy-rsa/keys/ca.crt \r \n cert&nbsp ; /usr/local/easy-rsa/keys/www.opcache.net.crt \r \n key&nbsp ; /usr/local/easy-rsa/keys/www.opcache.net.key&nbsp ; &nbsp ; # &nbsp ; this&nbsp ; file&nbsp ; should&nbsp ; be&nbsp ; kept&nbsp ; secret \r \n \r \n # &nbsp ; diffie&nbsp ; hellman&nbsp ; parameters. \r \n # &nbsp ; generate&nbsp ; your&nbsp ; own&nbsp ; with: \r \n # &nbsp ; &nbsp ; &nbsp ; openssl&nbsp ; dhparam&nbsp ; -out&nbsp ; dh2048.pem&nbsp ; 2048 \r \n dh&nbsp ; /usr/local/easy-rsa/keys/dh2048.pem \r \n \r \n # &nbsp ; network&nbsp ; topology \r \n # &nbsp ; should&nbsp ; be&nbsp ; subnet&nbsp ; ( addressing&nbsp ; via&nbsp ; ip ) \r \n # &nbsp ; unless&nbsp ; windows&nbsp ; clients&nbsp ; v2.0.9&nbsp ; and&nbsp ; lower&nbsp ; have&nbsp ; to \r \n # &nbsp ; be&nbsp ; supported&nbsp ; ( then&nbsp ; net30 , &nbsp ; i.e.&nbsp ; a&nbsp ; /30&nbsp ; per&nbsp ; client ) \r \n # &nbsp ; defaults&nbsp ; to&nbsp ; net30&nbsp ; ( not&nbsp ; recommended ) \r \n ; topology&nbsp ; subnet \r \n \r \n # &nbsp ; configure&nbsp ; server&nbsp ; mode&nbsp ; and&nbsp ; supply&nbsp ; a&nbsp ; vpn&nbsp ; subnet \r \n # &nbsp ; for&nbsp ; openvpn&nbsp ; to&nbsp ; draw&nbsp ; client&nbsp ; addresses&nbsp ; from. \r \n # &nbsp ; the&nbsp ; server&nbsp ; will&nbsp ; take&nbsp ; 10.8.0.1&nbsp ; for&nbsp ; itself , \r \n # &nbsp ; the&nbsp ; rest&nbsp ; will&nbsp ; be&nbsp ; made&nbsp ; available&nbsp ; to&nbsp ; clients. \r \n # &nbsp ; each&nbsp ; client&nbsp ; will&nbsp ; be&nbsp ; able&nbsp ; to&nbsp ; reach&nbsp ; the&nbsp ; server \r \n # &nbsp ; on&nbsp ; 10.8.0.1.&nbsp ; comment&nbsp ; this&nbsp ; line&nbsp ; out&nbsp ; if&nbsp ; you&nbsp ; are \r \n # &nbsp ; ethernet&nbsp ; bridging.&nbsp ; see&nbsp ; the&nbsp ; man&nbsp ; page&nbsp ; for&nbsp ; more&nbsp ; info. \r \n server&nbsp ; 10.8.0.0&nbsp ; 255.255.255.0 \r \n \r \n # &nbsp ; maintain&nbsp ; a&nbsp ; record&nbsp ; of&nbsp ; client&nbsp ; &lt ; -&gt ; &nbsp ; virtual&nbsp ; ip&nbsp ; address \r \n # &nbsp ; associations&nbsp ; in&nbsp ; this&nbsp ; file.&nbsp ; &nbsp ; if&nbsp ; openvpn&nbsp ; goes&nbsp ; down&nbsp ; or \r \n # &nbsp ; is&nbsp ; restarted , &nbsp ; reconnecting&nbsp ; clients&nbsp ; can&nbsp ; be&nbsp ; assigned \r \n # &nbsp ; the&nbsp ; same&nbsp ; virtual&nbsp ; ip&nbsp ; address&nbsp ; from&nbsp ; the&nbsp ; pool&nbsp ; that&nbsp ; was \r \n # &nbsp ; previously&nbsp ; assigned. \r \n ifconfig-pool-persist&nbsp ; ipp.txt \r \n \r \n # &nbsp ; configure&nbsp ; server&nbsp ; mode&nbsp ; for&nbsp ; ethernet&nbsp ; bridging. \r \n # &nbsp ; you&nbsp ; must&nbsp ; first&nbsp ; use&nbsp ; your&nbsp ; os& # 39 ; s&nbsp ; bridging&nbsp ; capability \r \n # &nbsp ; to&nbsp ; bridge&nbsp ; the&nbsp ; tap&nbsp ; interface&nbsp ; with&nbsp ; the&nbsp ; ethernet \r \n # &nbsp ; nic&nbsp ; interface.&nbsp ; &nbsp ; then&nbsp ; you&nbsp ; must&nbsp ; manually&nbsp ; set&nbsp ; the \r \n # &nbsp ; ip/netmask&nbsp ; on&nbsp ; the&nbsp ; bridge&nbsp ; interface , &nbsp ; here&nbsp ; we \r \n # &nbsp ; assume&nbsp ; 10.8.0.4/255.255.255.0.&nbsp ; &nbsp ; finally&nbsp ; we \r \n # &nbsp ; must&nbsp ; set&nbsp ; aside&nbsp ; an&nbsp ; ip&nbsp ; range&nbsp ; in&nbsp ; this&nbsp ; subnet \r \n # &nbsp ; ( start = 10.8.0.50&nbsp ; end = 10.8.0.100 ) &nbsp ; to&nbsp ; allocate \r \n # &nbsp ; to&nbsp ; connecting&nbsp ; clients.&nbsp ; &nbsp ; leave&nbsp ; this&nbsp ; line&nbsp ; commented \r \n # &nbsp ; out&nbsp ; unless&nbsp ; you&nbsp ; are&nbsp ; ethernet&nbsp ; bridging. \r \n ; server-bridge&nbsp ; 10.8.0.4&nbsp ; 255.255.255.0&nbsp ; 10.8.0.50&nbsp ; 10.8.0.100 \r \n \r \n # &nbsp ; configure&nbsp ; server&nbsp ; mode&nbsp ; for&nbsp ; ethernet&nbsp ; bridging \r \n # &nbsp ; using&nbsp ; a&nbsp ; dhcp-proxy , &nbsp ; where&nbsp ; clients&nbsp ; talk \r \n # &nbsp ; to&nbsp ; the&nbsp ; openvpn&nbsp ; server-side&nbsp ; dhcp&nbsp ; server \r \n # &nbsp ; to&nbsp ; receive&nbsp ; their&nbsp ; ip&nbsp ; address&nbsp ; allocation \r \n # &nbsp ; and&nbsp ; dns&nbsp ; server&nbsp ; addresses.&nbsp ; &nbsp ; you&nbsp ; must&nbsp ; first&nbsp ; use \r \n # &nbsp ; your&nbsp ; os& # 39 ; s&nbsp ; bridging&nbsp ; capability&nbsp ; to&nbsp ; bridge&nbsp ; the&nbsp ; tap \r \n # &nbsp ; interface&nbsp ; with&nbsp ; the&nbsp ; ethernet&nbsp ; nic&nbsp ; interface. \r \n # &nbsp ; note:&nbsp ; this&nbsp ; mode&nbsp ; only&nbsp ; works&nbsp ; on&nbsp ; clients&nbsp ; ( such&nbsp ; as \r \n # &nbsp ; windows ) , &nbsp ; where&nbsp ; the&nbsp ; client-side&nbsp ; tap&nbsp ; adapter&nbsp ; is \r \n # &nbsp ; bound&nbsp ; to&nbsp ; a&nbsp ; dhcp&nbsp ; client. \r \n ; server-bridge \r \n \r \n # &nbsp ; push&nbsp ; routes&nbsp ; to&nbsp ; the&nbsp ; client&nbsp ; to&nbsp ; allow&nbsp ; it \r \n # &nbsp ; to&nbsp ; reach&nbsp ; other&nbsp ; private&nbsp ; subnets&nbsp ; behind \r \n # &nbsp ; the&nbsp ; server.&nbsp ; &nbsp ; remember&nbsp ; that&nbsp ; these \r \n # &nbsp ; private&nbsp ; subnets&nbsp ; will&nbsp ; also&nbsp ; need \r \n # &nbsp ; to&nbsp ; know&nbsp ; to&nbsp ; route&nbsp ; the&nbsp ; openvpn&nbsp ; client \r \n # &nbsp ; address&nbsp ; pool&nbsp ; ( 10.8.0.0/255.255.255.0 ) \r \n # &nbsp ; back&nbsp ; to&nbsp ; the&nbsp ; openvpn&nbsp ; server. \r \n ; push&nbsp ; &quot ; route&nbsp ; 192.168.10.0&nbsp ; 255.255.255.0&quot ; \r \n ; push&nbsp ; &quot ; route&nbsp ; 192.168.20.0&nbsp ; 255.255.255.0&quot ; \r \n \r \n # &nbsp ; to&nbsp ; assign&nbsp ; specific&nbsp ; ip&nbsp ; addresses&nbsp ; to&nbsp ; specific \r \n # &nbsp ; clients&nbsp ; or&nbsp ; if&nbsp ; a&nbsp ; connecting&nbsp ; client&nbsp ; has&nbsp ; a&nbsp ; private \r \n # &nbsp ; subnet&nbsp ; behind&nbsp ; it&nbsp ; that&nbsp ; should&nbsp ; also&nbsp ; have&nbsp ; vpn&nbsp ; access , \r \n # &nbsp ; use&nbsp ; the&nbsp ; subdirectory&nbsp ; &quot ; ccd&quot ; &nbsp ; for&nbsp ; client-specific \r \n # &nbsp ; configuration&nbsp ; files&nbsp ; ( see&nbsp ; man&nbsp ; page&nbsp ; for&nbsp ; more&nbsp ; info ) . \r \n \r \n # &nbsp ; example:&nbsp ; suppose&nbsp ; the&nbsp ; client \r \n # &nbsp ; having&nbsp ; the&nbsp ; certificate&nbsp ; common&nbsp ; name&nbsp ; &quot ; thelonious&quot ; \r \n # &nbsp ; also&nbsp ; has&nbsp ; a&nbsp ; small&nbsp ; subnet&nbsp ; behind&nbsp ; his&nbsp ; connecting \r \n # &nbsp ; machine , &nbsp ; such&nbsp ; as&nbsp ; 192.168.40.128/255.255.255.248. \r \n # &nbsp ; first , &nbsp ; uncomment&nbsp ; out&nbsp ; these&nbsp ; lines: \r \n ; client-config-dir&nbsp ; ccd \r \n ; route&nbsp ; 192.168.40.128&nbsp ; 255.255.255.248 \r \n # &nbsp ; then&nbsp ; create&nbsp ; a&nbsp ; file&nbsp ; ccd/thelonious&nbsp ; with&nbsp ; this&nbsp ; line: \r \n # &nbsp ; &nbsp ; &nbsp ; iroute&nbsp ; 192.168.40.128&nbsp ; 255.255.255.248 \r \n # &nbsp ; this&nbsp ; will&nbsp ; allow&nbsp ; thelonious& # 39 ; &nbsp ; private&nbsp ; subnet&nbsp ; to \r \n # &nbsp ; access&nbsp ; the&nbsp ; vpn.&nbsp ; &nbsp ; this&nbsp ; example&nbsp ; will&nbsp ; only&nbsp ; work \r \n # &nbsp ; if&nbsp ; you&nbsp ; are&nbsp ; routing , &nbsp ; not&nbsp ; bridging , &nbsp ; i.e.&nbsp ; you&nbsp ; are \r \n # &nbsp ; using&nbsp ; &quot ; dev&nbsp ; tun&quot ; &nbsp ; and&nbsp ; &quot ; server&quot ; &nbsp ; directives. \r \n \r \n # &nbsp ; example:&nbsp ; suppose&nbsp ; you&nbsp ; want&nbsp ; to&nbsp ; give \r \n # &nbsp ; thelonious&nbsp ; a&nbsp ; fixed&nbsp ; vpn&nbsp ; ip&nbsp ; address&nbsp ; of&nbsp ; 10.9.0.1. \r \n # &nbsp ; first&nbsp ; uncomment&nbsp ; out&nbsp ; these&nbsp ; lines: \r \n ; client-config-dir&nbsp ; ccd \r \n ; route&nbsp ; 10.9.0.0&nbsp ; 255.255.255.252 \r \n # &nbsp ; then&nbsp ; add&nbsp ; this&nbsp ; line&nbsp ; to&nbsp ; ccd/thelonious: \r \n # &nbsp ; &nbsp ; &nbsp ; ifconfig-push&nbsp ; 10.9.0.1&nbsp ; 10.9.0.2 \r \n \r \n # &nbsp ; suppose&nbsp ; that&nbsp ; you&nbsp ; want&nbsp ; to&nbsp ; enable&nbsp ; different \r \n # &nbsp ; firewall&nbsp ; access&nbsp ; policies&nbsp ; for&nbsp ; different&nbsp ; groups \r \n # &nbsp ; of&nbsp ; clients.&nbsp ; &nbsp ; there&nbsp ; are&nbsp ; two&nbsp ; methods: \r \n # &nbsp ; ( 1 ) &nbsp ; run&nbsp ; multiple&nbsp ; openvpn&nbsp ; daemons , &nbsp ; one&nbsp ; for&nbsp ; each \r \n # &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; group , &nbsp ; and&nbsp ; firewall&nbsp ; the&nbsp ; tun/tap&nbsp ; interface \r \n # &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; for&nbsp ; each&nbsp ; group/daemon&nbsp ; appropriately. \r \n # &nbsp ; ( 2 ) &nbsp ; ( advanced ) &nbsp ; create&nbsp ; a&nbsp ; script&nbsp ; to&nbsp ; dynamically \r \n # &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; modify&nbsp ; the&nbsp ; firewall&nbsp ; in&nbsp ; response&nbsp ; to&nbsp ; access \r \n # &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; from&nbsp ; different&nbsp ; clients.&nbsp ; &nbsp ; see&nbsp ; man \r \n # &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; page&nbsp ; for&nbsp ; more&nbsp ; info&nbsp ; on&nbsp ; learn-address&nbsp ; script. \r \n ; learn-address&nbsp ; ./script \r \n \r \n # &nbsp ; if&nbsp ; enabled , &nbsp ; this&nbsp ; directive&nbsp ; will&nbsp ; configure \r \n # &nbsp ; all&nbsp ; clients&nbsp ; to&nbsp ; redirect&nbsp ; their&nbsp ; default \r \n # &nbsp ; network&nbsp ; gateway&nbsp ; through&nbsp ; the&nbsp ; vpn , &nbsp ; causing \r \n # &nbsp ; all&nbsp ; ip&nbsp ; traffic&nbsp ; such&nbsp ; as&nbsp ; web&nbsp ; browsing&nbsp ; and \r \n # &nbsp ; and&nbsp ; dns&nbsp ; lookups&nbsp ; to&nbsp ; go&nbsp ; through&nbsp ; the&nbsp ; vpn \r \n # &nbsp ; ( the&nbsp ; openvpn&nbsp ; server&nbsp ; machine&nbsp ; may&nbsp ; need&nbsp ; to&nbsp ; nat \r \n # &nbsp ; or&nbsp ; bridge&nbsp ; the&nbsp ; tun/tap&nbsp ; interface&nbsp ; to&nbsp ; the&nbsp ; internet \r \n # &nbsp ; in&nbsp ; order&nbsp ; for&nbsp ; this&nbsp ; to&nbsp ; work&nbsp ; properly ) . \r \n push&nbsp ; &quot ; redirect-gateway&nbsp ; def1&nbsp ; bypass-dhcp&quot ; \r \n \r \n # &nbsp ; certain&nbsp ; windows-specific&nbsp ; network&nbsp ; settings \r \n # &nbsp ; can&nbsp ; be&nbsp ; pushed&nbsp ; to&nbsp ; clients , &nbsp ; such&nbsp ; as&nbsp ; dns \r \n # &nbsp ; or&nbsp ; wins&nbsp ; server&nbsp ; addresses.&nbsp ; &nbsp ; caveat: \r \n # &nbsp ; http://openvpn.net/faq.html # dhcpcaveats \r \n # &nbsp ; the&nbsp ; addresses&nbsp ; below&nbsp ; refer&nbsp ; to&nbsp ; the&nbsp ; public \r \n # &nbsp ; dns&nbsp ; servers&nbsp ; provided&nbsp ; by&nbsp ; opendns.com. \r \n push&nbsp ; &quot ; dhcp-option&nbsp ; dns&nbsp ; 8.8.8.8&quot ; \r \n push&nbsp ; &quot ; dhcp-option&nbsp ; dns&nbsp ; 8.8.8.4&quot ; \r \n \r \n # &nbsp ; uncomment&nbsp ; this&nbsp ; directive&nbsp ; to&nbsp ; allow&nbsp ; different \r \n # &nbsp ; clients&nbsp ; to&nbsp ; be&nbsp ; able&nbsp ; to&nbsp ; &quot ; see&quot ; &nbsp ; each&nbsp ; other. \r \n # &nbsp ; by&nbsp ; default , &nbsp ; clients&nbsp ; will&nbsp ; only&nbsp ; see&nbsp ; the&nbsp ; server. \r \n # &nbsp ; to&nbsp ; force&nbsp ; clients&nbsp ; to&nbsp ; only&nbsp ; see&nbsp ; the&nbsp ; server , &nbsp ; you \r \n # &nbsp ; will&nbsp ; also&nbsp ; need&nbsp ; to&nbsp ; appropriately&nbsp ; firewall&nbsp ; the \r \n # &nbsp ; server& # 39 ; s&nbsp ; tun/tap&nbsp ; interface. \r \n client-to-client \r \n \r \n # &nbsp ; uncomment&nbsp ; this&nbsp ; directive&nbsp ; if&nbsp ; multiple&nbsp ; clients \r \n # &nbsp ; might&nbsp ; connect&nbsp ; with&nbsp ; the&nbsp ; same&nbsp ; certificate/key \r \n # &nbsp ; files&nbsp ; or&nbsp ; common&nbsp ; names.&nbsp ; &nbsp ; this&nbsp ; is&nbsp ; recommended \r \n # &nbsp ; only&nbsp ; for&nbsp ; testing&nbsp ; purposes.&nbsp ; &nbsp ; for&nbsp ; production&nbsp ; use , \r \n # &nbsp ; each&nbsp ; client&nbsp ; should&nbsp ; have&nbsp ; its&nbsp ; own&nbsp ; certificate/key \r \n # &nbsp ; pair. \r \n # \r \n # &nbsp ; if&nbsp ; you&nbsp ; have&nbsp ; not&nbsp ; generated&nbsp ; individual \r \n # &nbsp ; certificate/key&nbsp ; pairs&nbsp ; for&nbsp ; each&nbsp ; client , \r \n # &nbsp ; each&nbsp ; having&nbsp ; its&nbsp ; own&nbsp ; unique&nbsp ; &quot ; common&nbsp ; name&quot ; , \r \n # &nbsp ; uncomment&nbsp ; this&nbsp ; line&nbsp ; out. \r \n duplicate-cn \r \n \r \n # &nbsp ; the&nbsp ; keepalive&nbsp ; directive&nbsp ; causes&nbsp ; ping-like \r \n # &nbsp ; messages&nbsp ; to&nbsp ; be&nbsp ; sent&nbsp ; back&nbsp ; and&nbsp ; forth&nbsp ; over \r \n # &nbsp ; the&nbsp ; link&nbsp ; so&nbsp ; that&nbsp ; each&nbsp ; side&nbsp ; knows&nbsp ; when \r \n # &nbsp ; the&nbsp ; other&nbsp ; side&nbsp ; has&nbsp ; gone&nbsp ; down. \r \n # &nbsp ; ping&nbsp ; every&nbsp ; 10&nbsp ; seconds , &nbsp ; assume&nbsp ; that&nbsp ; remote \r \n # &nbsp ; peer&nbsp ; is&nbsp ; down&nbsp ; if&nbsp ; no&nbsp ; ping&nbsp ; received&nbsp ; during \r \n # &nbsp ; a&nbsp ; 120&nbsp ; second&nbsp ; time&nbsp ; period. \r \n keepalive&nbsp ; 10&nbsp ; 120 \r \n \r \n # &nbsp ; for&nbsp ; extra&nbsp ; security&nbsp ; beyond&nbsp ; that&nbsp ; provided \r \n # &nbsp ; by&nbsp ; ssl/tls , &nbsp ; create&nbsp ; an&nbsp ; &quot ; hmac&nbsp ; firewall&quot ; \r \n # &nbsp ; to&nbsp ; help&nbsp ; block&nbsp ; dos&nbsp ; attacks&nbsp ; and&nbsp ; udp&nbsp ; port&nbsp ; flooding. \r \n # \r \n # &nbsp ; generate&nbsp ; with: \r \n # &nbsp ; &nbsp ; &nbsp ; openvpn&nbsp ; --genkey&nbsp ; --secret&nbsp ; ta.key \r \n # \r \n # &nbsp ; the&nbsp ; server&nbsp ; and&nbsp ; each&nbsp ; client&nbsp ; must&nbsp ; have \r \n # &nbsp ; a&nbsp ; copy&nbsp ; of&nbsp ; this&nbsp ; key. \r \n # &nbsp ; the&nbsp ; second&nbsp ; parameter&nbsp ; should&nbsp ; be&nbsp ; & # 39 ; 0& # 39 ; \r \n # &nbsp ; on&nbsp ; the&nbsp ; server&nbsp ; and&nbsp ; & # 39 ; 1& # 39 ; &nbsp ; on&nbsp ; the&nbsp ; clients. \r \n ; tls-auth&nbsp ; ta.key&nbsp ; 0&nbsp ; # &nbsp ; this&nbsp ; file&nbsp ; is&nbsp ; secret \r \n \r \n # &nbsp ; select&nbsp ; a&nbsp ; cryptographic&nbsp ; cipher. \r \n # &nbsp ; this&nbsp ; config&nbsp ; item&nbsp ; must&nbsp ; be&nbsp ; copied&nbsp ; to \r \n # &nbsp ; the&nbsp ; client&nbsp ; config&nbsp ; file&nbsp ; as&nbsp ; well. \r \n ; cipher&nbsp ; bf-cbc&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; # &nbsp ; blowfish&nbsp ; ( default ) \r \n ; cipher&nbsp ; aes-128-cbc&nbsp ; &nbsp ; &nbsp ; # &nbsp ; aes \r \n ; cipher&nbsp ; des-ede3-cbc&nbsp ; &nbsp ; # &nbsp ; triple-des \r \n \r \n # &nbsp ; enable&nbsp ; compression&nbsp ; on&nbsp ; the&nbsp ; vpn&nbsp ; link. \r \n # &nbsp ; if&nbsp ; you&nbsp ; enable&nbsp ; it&nbsp ; here , &nbsp ; you&nbsp ; must&nbsp ; also \r \n # &nbsp ; enable&nbsp ; it&nbsp ; in&nbsp ; the&nbsp ; client&nbsp ; config&nbsp ; file. \r \n comp-lzo \r \n \r \n # &nbsp ; the&nbsp ; maximum&nbsp ; number&nbsp ; of&nbsp ; concurrently&nbsp ; connected \r \n # &nbsp ; clients&nbsp ; we&nbsp ; want&nbsp ; to&nbsp ; allow. \r \n ; max-clients&nbsp ; 100 \r \n \r \n # &nbsp ; it& # 39 ; s&nbsp ; a&nbsp ; good&nbsp ; idea&nbsp ; to&nbsp ; reduce&nbsp ; the&nbsp ; openvpn \r \n # &nbsp ; daemon& # 39 ; s&nbsp ; privileges&nbsp ; after&nbsp ; initialization. \r \n # \r \n # &nbsp ; you&nbsp ; can&nbsp ; uncomment&nbsp ; this&nbsp ; out&nbsp ; on \r \n # &nbsp ; non-windows&nbsp ; systems. \r \n ; user&nbsp ; nobody \r \n ; group&nbsp ; nobody \r \n \r \n # &nbsp ; the&nbsp ; persist&nbsp ; options&nbsp ; will&nbsp ; try&nbsp ; to&nbsp ; avoid \r \n # &nbsp ; accessing&nbsp ; certain&nbsp ; resources&nbsp ; on&nbsp ; restart \r \n # &nbsp ; that&nbsp ; may&nbsp ; no&nbsp ; longer&nbsp ; be&nbsp ; accessible&nbsp ; because \r \n # &nbsp ; of&nbsp ; the&nbsp ; privilege&nbsp ; downgrade. \r \n persist-key \r \n persist-tun \r \n \r \n # &nbsp ; output&nbsp ; a&nbsp ; short&nbsp ; status&nbsp ; file&nbsp ; showing \r \n # &nbsp ; current&nbsp ; connections , &nbsp ; truncated \r \n # &nbsp ; and&nbsp ; rewritten&nbsp ; every&nbsp ; minute. \r \n status&nbsp ; openvpn-status.log \r \n \r \n # &nbsp ; by&nbsp ; default , &nbsp ; log&nbsp ; messages&nbsp ; will&nbsp ; go&nbsp ; to&nbsp ; the&nbsp ; syslog&nbsp ; ( or \r \n # &nbsp ; on&nbsp ; windows , &nbsp ; if&nbsp ; running&nbsp ; as&nbsp ; a&nbsp ; service , &nbsp ; they&nbsp ; will&nbsp ; go&nbsp ; to \r \n # &nbsp ; the&nbsp ; &quot ; \\ program&nbsp ; files \\ openvpn \\ log&quot ; &nbsp ; directory ) . \r \n # &nbsp ; use&nbsp ; log&nbsp ; or&nbsp ; log-append&nbsp ; to&nbsp ; override&nbsp ; this&nbsp ; default. \r \n # &nbsp ; &quot ; log&quot ; &nbsp ; will&nbsp ; truncate&nbsp ; the&nbsp ; log&nbsp ; file&nbsp ; on&nbsp ; openvpn&nbsp ; startup , \r \n # &nbsp ; while&nbsp ; &quot ; log-append&quot ; &nbsp ; will&nbsp ; append&nbsp ; to&nbsp ; it.&nbsp ; &nbsp ; use&nbsp ; one \r \n # &nbsp ; or&nbsp ; the&nbsp ; other&nbsp ; ( but&nbsp ; not&nbsp ; both ) . \r \n ; log&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; openvpn.log \r \n ; log-append&nbsp ; &nbsp ; openvpn.log \r \n \r \n # &nbsp ; set&nbsp ; the&nbsp ; appropriate&nbsp ; level&nbsp ; of&nbsp ; log \r \n # &nbsp ; file&nbsp ; verbosity. \r \n # \r \n # &nbsp ; 0&nbsp ; is&nbsp ; silent , &nbsp ; except&nbsp ; for&nbsp ; fatal&nbsp ; errors \r \n # &nbsp ; 4&nbsp ; is&nbsp ; reasonable&nbsp ; for&nbsp ; general&nbsp ; usage \r \n # &nbsp ; 5&nbsp ; and&nbsp ; 6&nbsp ; can&nbsp ; help&nbsp ; to&nbsp ; debug&nbsp ; connection&nbsp ; problems \r \n # &nbsp ; 9&nbsp ; is&nbsp ; extremely&nbsp ; verbose \r \n verb&nbsp ; 3 \r \n \r \n # &nbsp ; silence&nbsp ; repeating&nbsp ; messages.&nbsp ; &nbsp ; at&nbsp ; most&nbsp ; 20 \r \n # &nbsp ; sequential&nbsp ; messages&nbsp ; of&nbsp ; the&nbsp ; same&nbsp ; message \r \n # &nbsp ; category&nbsp ; will&nbsp ; be&nbsp ; output&nbsp ; to&nbsp ; the&nbsp ; log. \r \n ; mute&nbsp ; 2012 12289 35774 32622 20195 29702 13 12289 21551 21160 openvpn/usr/local/openvpn/sbin/openvpn&nbsp ; /usr/local/openvpn/conf/server.conf14 12289 windows 35774 32622 1 ) 23433 35013 23458 25143 31471 65306 http://swupdate.openvpn.org/community/releases/openvpn-install-2.3.6-i603-x86_64.exe2 ) 25335 36125 21018 25165 25171 21253 19979 26469 30340 26381 21153 31471 ca.crt&nbsp ; 29992 25143 31192 38053 client1.crt client1.key 21040 openvpn 23458 25143 31471 23433 35013 26681 30446 24405 19979 19979 30340 config 30446 24405 20869 3 ) 22686 21152 37197 32622 client.ovpn 65292 22914 26524 27809 26377 37027 20040 20808 24314 31435 65292 36755 20837 20197 19979 30340 20869 23481 # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # \r \n # &nbsp ; sample&nbsp ; client-side&nbsp ; openvpn&nbsp ; 2.0&nbsp ; config&nbsp ; file&nbsp ; # \r \n # &nbsp ; for&nbsp ; connecting&nbsp ; to&nbsp ; multi-client&nbsp ; server.&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; # \r \n # &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; # \r \n # &nbsp ; this&nbsp ; configuration&nbsp ; can&nbsp ; be&nbsp ; used&nbsp ; by&nbsp ; multiple&nbsp ; # \r \n # &nbsp ; clients , &nbsp ; however&nbsp ; each&nbsp ; client&nbsp ; should&nbsp ; have&nbsp ; &nbsp ; &nbsp ; # \r \n # &nbsp ; its&nbsp ; own&nbsp ; cert&nbsp ; and&nbsp ; key&nbsp ; files.&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; # \r \n # &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; # \r \n # &nbsp ; on&nbsp ; windows , &nbsp ; you&nbsp ; might&nbsp ; want&nbsp ; to&nbsp ; rename&nbsp ; this&nbsp ; &nbsp ; # \r \n # &nbsp ; file&nbsp ; so&nbsp ; it&nbsp ; has&nbsp ; a&nbsp ; .ovpn&nbsp ; extension&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; # \r \n # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # \r \n \r \n # &nbsp ; specify&nbsp ; that&nbsp ; we&nbsp ; are&nbsp ; a&nbsp ; client&nbsp ; and&nbsp ; that&nbsp ; we \r \n # &nbsp ; will&nbsp ; be&nbsp ; pulling&nbsp ; certain&nbsp ; config&nbsp ; file&nbsp ; directives \r \n # &nbsp ; from&nbsp ; the&nbsp ; server. \r \n client \r \n \r \n # &nbsp ; use&nbsp ; the&nbsp ; same&nbsp ; setting&nbsp ; as&nbsp ; you&nbsp ; are&nbsp ; using&nbsp ; on \r \n # &nbsp ; the&nbsp ; server. \r \n # &nbsp ; on&nbsp ; most&nbsp ; systems , &nbsp ; the&nbsp ; vpn&nbsp ; will&nbsp ; not&nbsp ; function \r \n # &nbsp ; unless&nbsp ; you&nbsp ; partially&nbsp ; or&nbsp ; fully&nbsp ; disable \r \n # &nbsp ; the&nbsp ; firewall&nbsp ; for&nbsp ; the&nbsp ; tun/tap&nbsp ; interface. \r \n ; dev&nbsp ; tap \r \n dev&nbsp ; tun \r \n \r \n # &nbsp ; windows&nbsp ; needs&nbsp ; the&nbsp ; tap-win32&nbsp ; adapter&nbsp ; name \r \n # &nbsp ; from&nbsp ; the&nbsp ; network&nbsp ; connections&nbsp ; panel \r \n # &nbsp ; if&nbsp ; you&nbsp ; have&nbsp ; more&nbsp ; than&nbsp ; one.&nbsp ; &nbsp ; on&nbsp ; xp&nbsp ; sp2 , \r \n # &nbsp ; you&nbsp ; may&nbsp ; need&nbsp ; to&nbsp ; disable&nbsp ; the&nbsp ; firewall \r \n # &nbsp ; for&nbsp ; the&nbsp ; tap&nbsp ; adapter. \r \n ; dev-node&nbsp ; mytap \r \n \r \n # &nbsp ; are&nbsp ; we&nbsp ; connecting&nbsp ; to&nbsp ; a&nbsp ; tcp&nbsp ; or \r \n # &nbsp ; udp&nbsp ; server?&nbsp ; &nbsp ; use&nbsp ; the&nbsp ; same&nbsp ; setting&nbsp ; as \r \n # &nbsp ; on&nbsp ; the&nbsp ; server. \r \n ; proto&nbsp ; tcp \r \n proto&nbsp ; udp \r \n \r \n # &nbsp ; the&nbsp ; hostname/ip&nbsp ; and&nbsp ; port&nbsp ; of&nbsp ; the&nbsp ; server. \r \n # &nbsp ; you&nbsp ; can&nbsp ; have&nbsp ; multiple&nbsp ; remote&nbsp ; entries \r \n # &nbsp ; to&nbsp ; load&nbsp ; balance&nbsp ; between&nbsp ; the&nbsp ; servers. \r \n remote&nbsp ; 207.226.141.212&nbsp ; 1194 \r \n ; remote&nbsp ; my-server-2&nbsp ; 1194 \r \n \r \n # &nbsp ; choose&nbsp ; a&nbsp ; random&nbsp ; host&nbsp ; from&nbsp ; the&nbsp ; remote \r \n # &nbsp ; list&nbsp ; for&nbsp ; load-balancing.&nbsp ; &nbsp ; otherwise \r \n # &nbsp ; try&nbsp ; hosts&nbsp ; in&nbsp ; the&nbsp ; order&nbsp ; specified. \r \n ; remote-random \r \n \r \n # &nbsp ; keep&nbsp ; trying&nbsp ; indefinitely&nbsp ; to&nbsp ; resolve&nbsp ; the \r \n # &nbsp ; host&nbsp ; name&nbsp ; of&nbsp ; the&nbsp ; openvpn&nbsp ; server.&nbsp ; &nbsp ; very&nbsp ; useful \r \n # &nbsp ; on&nbsp ; machines&nbsp ; which&nbsp ; are&nbsp ; not&nbsp ; permanently&nbsp ; connected \r \n # &nbsp ; to&nbsp ; the&nbsp ; internet&nbsp ; such&nbsp ; as&nbsp ; laptops. \r \n resolv-retry&nbsp ; infinite \r \n \r \n # &nbsp ; most&nbsp ; clients&nbsp ; don& # 39 ; t&nbsp ; need&nbsp ; to&nbsp ; bind&nbsp ; to \r \n # &nbsp ; a&nbsp ; specific&nbsp ; local&nbsp ; port&nbsp ; number. \r \n nobind \r \n \r \n # &nbsp ; downgrade&nbsp ; privileges&nbsp ; after&nbsp ; initialization&nbsp ; ( non-windows&nbsp ; only ) \r \n ; user&nbsp ; nobody \r \n ; group&nbsp ; nobody \r \n \r \n # &nbsp ; try&nbsp ; to&nbsp ; preserve&nbsp ; some&nbsp ; state&nbsp ; across&nbsp ; restarts. \r \n persist-key \r \n persist-tun \r \n \r \n # &nbsp ; if&nbsp ; you&nbsp ; are&nbsp ; connecting&nbsp ; through&nbsp ; an \r \n # &nbsp ; http&nbsp ; proxy&nbsp ; to&nbsp ; reach&nbsp ; the&nbsp ; actual&nbsp ; openvpn \r \n # &nbsp ; server , &nbsp ; put&nbsp ; the&nbsp ; proxy&nbsp ; server/ip&nbsp ; and \r \n # &nbsp ; port&nbsp ; number&nbsp ; here.&nbsp ; &nbsp ; see&nbsp ; the&nbsp ; man&nbsp ; page \r \n # &nbsp ; if&nbsp ; your&nbsp ; proxy&nbsp ; server&nbsp ; requires \r \n # &nbsp ; authentication. \r \n ; http-proxy-retry&nbsp ; # &nbsp ; retry&nbsp ; on&nbsp ; connection&nbsp ; failures \r \n ; http-proxy&nbsp ; [ proxy&nbsp ; server ] &nbsp ; [ proxy&nbsp ; port&nbsp ; # ] \r \n \r \n # &nbsp ; wireless&nbsp ; networks&nbsp ; often&nbsp ; produce&nbsp ; a&nbsp ; lot \r \n # &nbsp ; of&nbsp ; duplicate&nbsp ; packets.&nbsp ; &nbsp ; set&nbsp ; this&nbsp ; flag \r \n # &nbsp ; to&nbsp ; silence&nbsp ; duplicate&nbsp ; packet&nbsp ; warnings. \r \n ; mute-replay-warnings \r \n \r \n # &nbsp ; ssl/tls&nbsp ; parms. \r \n # &nbsp ; see&nbsp ; the&nbsp ; server&nbsp ; config&nbsp ; file&nbsp ; for&nbsp ; more \r \n # &nbsp ; description.&nbsp ; &nbsp ; it& # 39 ; s&nbsp ; best&nbsp ; to&nbsp ; use \r \n # &nbsp ; a&nbsp ; separate&nbsp ; .crt/.key&nbsp ; file&nbsp ; pair \r \n # &nbsp ; for&nbsp ; each&nbsp ; client.&nbsp ; &nbsp ; a&nbsp ; single&nbsp ; ca \r \n # &nbsp ; file&nbsp ; can&nbsp ; be&nbsp ; used&nbsp ; for&nbsp ; all&nbsp ; clients. \r \n ca&nbsp ; ca.crt \r \n cert&nbsp ; client1.crt \r \n key&nbsp ; client1.key \r \n \r \n # &nbsp ; verify&nbsp ; server&nbsp ; certificate&nbsp ; by&nbsp ; checking&nbsp ; that&nbsp ; the \r \n # &nbsp ; certicate&nbsp ; has&nbsp ; the&nbsp ; correct&nbsp ; key&nbsp ; usage&nbsp ; set. \r \n # &nbsp ; this&nbsp ; is&nbsp ; an&nbsp ; important&nbsp ; precaution&nbsp ; to&nbsp ; protect&nbsp ; against \r \n # &nbsp ; a&nbsp ; potential&nbsp ; attack&nbsp ; discussed&nbsp ; here: \r \n # &nbsp ; &nbsp ; http://openvpn.net/howto.html # mitm \r \n # \r \n # &nbsp ; to&nbsp ; use&nbsp ; this&nbsp ; feature , &nbsp ; you&nbsp ; will&nbsp ; need&nbsp ; to&nbsp ; generate \r \n # &nbsp ; your&nbsp ; server&nbsp ; certificates&nbsp ; with&nbsp ; the&nbsp ; keyusage&nbsp ; set&nbsp ; to \r \n # &nbsp ; &nbsp ; &nbsp ; digitalsignature , &nbsp ; keyencipherment \r \n # &nbsp ; and&nbsp ; the&nbsp ; extendedkeyusage&nbsp ; to \r \n # &nbsp ; &nbsp ; &nbsp ; serverauth \r \n # &nbsp ; easyrsa&nbsp ; can&nbsp ; do&nbsp ; this&nbsp ; for&nbsp ; you. \r \n remote-cert-tls&nbsp ; server \r \n \r \n # &nbsp ; if&nbsp ; a&nbsp ; tls-auth&nbsp ; key&nbsp ; is&nbsp ; used&nbsp ; on&nbsp ; the&nbsp ; server \r \n # &nbsp ; then&nbsp ; every&nbsp ; client&nbsp ; must&nbsp ; also&nbsp ; have&nbsp ; the&nbsp ; key. \r \n ; tls-auth&nbsp ; ta.key&nbsp ; 1 \r \n \r \n # &nbsp ; select&nbsp ; a&nbsp ; cryptographic&nbsp ; cipher. \r \n # &nbsp ; if&nbsp ; the&nbsp ; cipher&nbsp ; option&nbsp ; is&nbsp ; used&nbsp ; on&nbsp ; the&nbsp ; server \r \n # &nbsp ; then&nbsp ; you&nbsp ; must&nbsp ; also&nbsp ; specify&nbsp ; it&nbsp ; here. \r \n ; cipher&nbsp ; x \r \n \r \n # &nbsp ; enable&nbsp ; compression&nbsp ; on&nbsp ; the&nbsp ; vpn&nbsp ; link. \r \n # &nbsp ; don& # 39 ; t&nbsp ; enable&nbsp ; this&nbsp ; unless&nbsp ; it&nbsp ; is&nbsp ; also \r \n # &nbsp ; enabled&nbsp ; in&nbsp ; the&nbsp ; server&nbsp ; config&nbsp ; file. \r \n comp-lzo \r \n \r \n # &nbsp ; set&nbsp ; log&nbsp ; file&nbsp ; verbosity. \r \n verb&nbsp ; 3 \r \n \r \n # &nbsp ; silence&nbsp ; repeating&nbsp ; messages \r \n ; mute&nbsp ; 2015 12289 35774 32622 ip 36716 21457 65292 22240 20026 25105 30340 26159 centos7 , 25152 20197 65288 from:http://www.tuicool.com/articles/v3aif3v&nbsp ; 65289 65306 27880 65306 20197 19979 21629 20196 37325 21551 21518 21487 33021 35201 37325 26032 25191 34892 12290 22247 65281 65281 yum&nbsp ; install&nbsp ; iptables-servicessystemctl&nbsp ; mask&nbsp ; firewalldsystemctl&nbsp ; enable&nbsp ; iptablessystemctl&nbsp ; stop&nbsp ; firewalldsystemctl&nbsp ; start&nbsp ; iptablesiptables&nbsp ; --flushiptables&nbsp ; -t&nbsp ; nat&nbsp ; -a&nbsp ; postrouting&nbsp ; -s&nbsp ; 10.8.0.0/24&nbsp ; -o&nbsp ; eth0&nbsp ; -j&nbsp ; masqueradeiptables-save&nbsp ; &gt ; &nbsp ; /etc/sysconfig/iptablesvi&nbsp ; /etc/sysctl.confnet.ipv4.ip_forward&nbsp ; = &nbsp ; 1systemctl&nbsp ; restart&nbsp ; network.service ', '1427870851', '1427968979');
INSERT INTO `bk_search_index` VALUES ('46', '77', ' how to install openvpn on centos 7 ', ' how to install openvpn on centos 7 ', ' security is most important aspect in internet. outsiders can monitor \r \n internet traffic between your computer and the web. here the importance \r \n of &nbsp ; &nbsp ; vpncomes. vpn , or virtual private network , is a secure method of connecting \r \n remote internet resources together as if they were under the same lan. \r \n &nbsp ; openvpnis a popular open source application that implements a virtual private \r \n network. works on linux , windows , and mac operating systems. it can be \r \n utilized to create a secure connection between physically distributed \r \n servers.this article explains how to install and configure openvpn in centos 7 server.prerequisitescentos 7 server.root&nbsp ; access to the server.domain or sub-domain that resolves to your server that you can use for the certificatesopenvpn isn 8217 t available in the default centos repositories. so we \r \n need to install enterprise linux ( epel ) repository. use the following \r \n command to install epel repository.yum&nbsp ; install&nbsp ; epel-release&nbsp ; step 1 8212 installing openvpnfirst , we are going to install in the server by issuing the following command.yum&nbsp ; install&nbsp ; openvpn&nbsp ; -y&nbsp ; step&nbsp ; 2 8212 &nbsp ; install easy rsafor generating our ssl key pairs , which will secure our vpn connections. execute the following command:yum&nbsp ; install&nbsp ; easy-rsa&nbsp ; -y&nbsp ; step 3 8212 configuring openvpnwe can find an example configuration file in its documentation directory &nbsp ; &nbsp ; .we need to copy the &nbsp ; &nbsp ; sampleserver.confby the following command.cp&nbsp ; /usr/share/doc/openvpn- * /sample/sample-config-files/server.conf&nbsp ; &nbsp ; /etc/openvpn&nbsp ; open the file in your favorite editor , i 8217 m using&nbsp ; editor , vi&nbsp ; /etc/openvpn/server.conf&nbsp ; most of the lines just need to be uncommented ( remove the&nbsp ; ; ) and some of there are to be changed.do the following changes.we need to change the&nbsp ; dh&nbsp ; file name to &nbsp ; &nbsp ; dh2048.pem. because the default diffie-hellman encryption length for easy rsa will \r \n be 2048 bytes. we will do the key generation in next step.dh&nbsp ; dh2048.pem&nbsp ; next , uncomment the &nbsp ; &nbsp ; push 8220 redirect-gateway def1 bypass-dhcp 8221 line , which tells the client to redirect all traffic through our openvpn.push&nbsp ; &quot ; redirect-gateway&nbsp ; def1&nbsp ; bypass-dhcp&quot ; &nbsp ; next we need to provide dns servers to the client , as it will not \r \n be able to use the default dns servers provided by your internet service \r \n provider. we 8217 re going to use google 8217 s public dns \r \n servers , &nbsp ; 8.8.8.8&nbsp ; and8.8.4.4.for this , uncomment the &nbsp ; &nbsp ; push 8220 dhcp-option dnslines and updating the ip addresses.push&nbsp ; &quot ; dhcp-option&nbsp ; dns&nbsp ; 8.8.8.8&quot ; push&nbsp ; &quot ; dhcp-option&nbsp ; dns&nbsp ; 8.8.4.4&quot ; &nbsp ; change user and group to nobodyuser&nbsp ; nobodygroup&nbsp ; nobody&nbsp ; save and exit the openvpn server configuration file.step 4 8212 generating keys and certificatesnow &nbsp ; &nbsp ; , we 8217 ll need to generate our keys and certificates. easy rsa installs some scripts to generate these keys and certificates.create a directory for the keys by the following commandmkdir&nbsp ; -p&nbsp ; /etc/openvpn/easy-rsa/keys&nbsp ; we also need to copy the key and certificate generation scripts into the directory.cp&nbsp ; -rf&nbsp ; /usr/share/easy-rsa/2.0/ * &nbsp ; /etc/openvpn/easy-rsa&nbsp ; now , we 8217 re going to edit the default values in the script. so we \r \n don 8217 t have to type our information in each time. open the file in vi \r \n editor.vi&nbsp ; /etc/openvpn/easy-rsa/vars&nbsp ; change values that start with &nbsp ; &nbsp ; key_. update the following values to be accurate for your organization.some of the important value that should be change carefully are , key_name: you should enter&nbsp ; server&nbsp ; here ; you could enter \r \n something else , but then you would also have to update the configuration \r \n files that reference&nbsp ; &nbsp ; andkey_cn: enter the domain or subdomain that resolves to your serverrefer the sample file below , .&nbsp ; .&nbsp ; . # &nbsp ; these&nbsp ; are&nbsp ; the&nbsp ; default&nbsp ; values&nbsp ; for&nbsp ; fields # &nbsp ; which&nbsp ; will&nbsp ; be&nbsp ; placed&nbsp ; in&nbsp ; the&nbsp ; certificate. # &nbsp ; don& # 39 ; t&nbsp ; leave&nbsp ; any&nbsp ; of&nbsp ; these&nbsp ; fields&nbsp ; blank.export&nbsp ; key_country = &quot ; us&quot ; export&nbsp ; key_province = &quot ; ny&quot ; export&nbsp ; key_city = &quot ; new&nbsp ; york&quot ; export&nbsp ; key_org = &quot ; unixmen&quot ; export&nbsp ; key_email = &quot ; jijojamestj @ gmail.com&quot ; export&nbsp ; key_ou = &quot ; community&quot ; # &nbsp ; x509&nbsp ; subject&nbsp ; fieldexport&nbsp ; key_name = &quot ; server&quot ; .&nbsp ; .&nbsp ; .export&nbsp ; key_cn = openvpn.unixmen.com \r \n .&nbsp ; .&nbsp ; .&nbsp ; openssl configuration may not load due to the version being \r \n undetectable. to avoid this remove the version number from the openssl \r \n file name.cp&nbsp ; /etc/openvpn/easy-rsa/openssl-1.0.0.cnf&nbsp ; /etc/openvpn/easy-rsa/openssl.cnf&nbsp ; next , we are going to generate the keys and certificates. move to easy-rsa&nbsp ; directory and &nbsp ; &nbsp ; \r \n &nbsp ; &nbsp ; &nbsp ; source \r \n &nbsp ; &nbsp ; in our new variables.cd&nbsp ; /etc/openvpn/easy-rsa&nbsp ; source&nbsp ; ./vars&nbsp ; then , we will clean up any keys and certificates which may already be in this folder and generate our certificate authority../clean-all&nbsp ; when you build the certificate authority , you will be asked to \r \n enter all the information we put into the vars&nbsp ; file , but you will see \r \n that your options are already set as the defaults. so , you can just \r \n press enter for each one../build-ca&nbsp ; next , we will generate the key and certificate for the server. please press enter for each question as for the above step./build-key-server&nbsp ; server&nbsp ; now we will generate diffie-hellman key exchange file. this command will take few to complete:./build-dh&nbsp ; so , we completed the server keys and certificates generation process. copy them all into our openvpn directory.cd&nbsp ; /etc/openvpn/easy-rsa/keys&nbsp ; cp&nbsp ; dh2048.pem&nbsp ; ca.crt&nbsp ; server.crt&nbsp ; server.key&nbsp ; /etc/openvpn&nbsp ; for authenticate our clients will also need certificates. these \r \n keys and certificates will be shared with your clients , and it 8217 s best to \r \n generate separate keys and certificates for each client you intend on \r \n connecting.make sure that if you do this you give them descriptive names , but \r \n for now we 8217 re going to have one client so we 8217 ll just call it&nbsp ; client.cd&nbsp ; /etc/openvpn/easy-rsa&nbsp ; ./build-key&nbsp ; client&nbsp ; &nbsp ; that& # 39 ; s&nbsp ; it&nbsp ; for&nbsp ; keys&nbsp ; and&nbsp ; certificates.&nbsp ; step 5 8212 routinginstall the iptables and disablefirewalld by execute the following commandsyum&nbsp ; install&nbsp ; iptables-services&nbsp ; -y&nbsp ; systemctl&nbsp ; mask&nbsp ; firewalld&nbsp ; systemctl&nbsp ; enable&nbsp ; iptables&nbsp ; systemctl&nbsp ; stop&nbsp ; firewalld&nbsp ; systemctl&nbsp ; start&nbsp ; iptables&nbsp ; iptables&nbsp ; --flush&nbsp ; next , we need to add a rule to iptables to forward our routing to our openvpn subnet , and save this rule.iptables&nbsp ; -t&nbsp ; nat&nbsp ; -a&nbsp ; postrouting&nbsp ; -s&nbsp ; 10.8.0.0/24&nbsp ; -o&nbsp ; eth0&nbsp ; -j&nbsp ; masquerade&nbsp ; iptables-save&nbsp ; &gt ; &nbsp ; /etc/sysconfig/iptables&nbsp ; next , enable &nbsp ; ip forwarding in&nbsp ; sysctl. open&nbsp ; sysctl.conf&nbsp ; in vi editor.vi&nbsp ; /etc/sysctl.conf&nbsp ; add the following line at the top of the file:net.ipv4.ip_forward&nbsp ; = &nbsp ; 1&nbsp ; for the ip forwarding will take effect. we need to restart the network service. issue the following commandsystemctl&nbsp ; restart&nbsp ; network.service&nbsp ; step 6 8212 starting openvpnnow , we completed the installation and ready start the openvpn service. add it to&nbsp ; systemctl using the commandsystemctl&nbsp ; -f&nbsp ; enable&nbsp ; openvpn @ server.service&nbsp ; start openvpn:systemctl&nbsp ; start&nbsp ; openvpn @ server.service&nbsp ; so we have successfully completed all the server-side configuration done for openvpn.next let 8217 s see how to connect a client to the server.step 6 8212 configuring a clientto connectyou will definitely need a copy of the ca certificate from the server , along with the client key and certificate.locate the following files on the &nbsp ; &nbsp ; server. in this article we used&nbsp ; 8216 client 8217 as the descriptive name for the client keys./etc/openvpn/easy-rsa/keys/ca.crt&nbsp ; /etc/openvpn/easy-rsa/keys/client.crt&nbsp ; /etc/openvpn/easy-rsa/keys/client.key&nbsp ; copy these three files to your&nbsp ; client machine. for this , open the file \r \n in the server and copy the content of the file into a new file in the \r \n client system an save , or use &nbsp ; &nbsp ; sftp.we 8217 re going to create a file called&nbsp ; client.ovpn. this is a \r \n configuration file for an openvpn client , telling it how to connect to \r \n the server.you 8217 ll need to change the first line to reflect the name you \r \n gave the client in your key and certificate ; in our case , this is \r \n just&nbsp ; clientyou also need to update the ip address from&nbsp ; your_server_ip&nbsp ; to the ip address of your server ; port1194&nbsp ; can stay the samemake sure the paths to your key and certificate files are correctclient \r \n dev&nbsp ; tun \r \n proto&nbsp ; udp \r \n remote&nbsp ; your_server_ip&nbsp ; 1194resolv-retry&nbsp ; infinite \r \n nobind \r \n persist-key \r \n persist-tun \r \n comp-lzo \r \n verb&nbsp ; 3ca&nbsp ; /path/to/ca.crt \r \n cert&nbsp ; /path/to/client.crt \r \n key&nbsp ; /path/to/client.key&nbsp ; this file can now be used by any openvpn client to connect to your server.assume the client machine has windows os.you will need the official &nbsp ; &nbsp ; openvpn community edition binarieswhich come with a gui. then , place your&nbsp ; .ovpn&nbsp ; configuration file into the proper directory , &nbsp ; &nbsp ; ex. c: \\ program files \\ openvpn \\ config , and click&nbsp ; &nbsp ; &nbsp ; connectin the gui. openvpn gui on windows must be executed with administrative privileges. ', '1427894136', '1427894136');
INSERT INTO `bk_search_index` VALUES ('47', '78', ' openvpn server 31471 37197 32622 25991 20214 35814 32454 35828 26126 ', ' 31616 21333 30340 20171 32461 20102 openvpn server 31471 37197 32622 25991 20214 37324 30340 21508 39033 25152 20195 34920 30340 24847 24605 12290 ', ' 36716 33258 65306 http://www.woyaohuijia.cn/show/121.html 26412 25991 23558 20171 32461 22914 20309 37197 32622 openvpn 26381 21153 22120 31471 30340 37197 32622 25991 20214 12290 22312 windows 31995 32479 20013 65292 35813 37197 32622 25991 20214 19968 33324 21483 20570 server.ovpn 65307 22312 linux/bsd 31995 32479 20013 65292 35813 37197 32622 25991 20214 19968 33324 21483 20570 server.conf 12290 34429 28982 37197 32622 25991 20214 21517 31216 19981 21516 65292 20294 20854 20013 30340 37197 32622 20869 23481 19982 37197 32622 26041 27861 21364 26159 30456 21516 30340 12290 26412 25991 26681 25454 23448 26041 25552 20379 30340 server.ovpn 31034 20363 25991 20214 30452 25509 32763 35793 24471 20986 12290 windows 12289 linux 12289 bsd 31561 31995 32479 30340 26381 21153 22120 31471 37197 32622 25991 20214 22343 21487 21442 32771 26412 25991 12290 # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 38024 23545 22810 23458 25143 31471 30340 openvpn 2.0 30340 26381 21153 22120 31471 37197 32622 25991 20214 31034 20363 # # 26412 25991 20214 29992 20110 22810 23458 25143 31471 &lt ; -&gt ; 21333 26381 21153 22120 31471 30340 openvpn 26381 21153 22120 31471 37197 32622 # # openvpn 20063 25903 25345 21333 26426 &lt ; -&gt ; 21333 26426 30340 37197 32622 ( 26356 22810 20449 24687 35831 26597 30475 32593 31449 19978 30340 31034 20363 39029 38754 ) # # 35813 37197 32622 25903 25345 windows 25110 32773 linux/bsd 31995 32479 12290 27492 22806 65292 22312 windows 19978 65292 35760 24471 23558 36335 24452 21152 19978 21452 24341 21495 65292 # 24182 19988 20351 29992 20004 20010 21453 26012 26464 65292 20363 22914 65306 &quot ; c: \\ \\ program files \\ \\ openvpn \\ \\ config \\ \\ foo.key&quot ; # # & # 39 ; # & # 39 ; or & # 39 ; ; & # 39 ; 24320 22836 30340 22343 20026 27880 37322 20869 23481 # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # openvpn 24212 35813 30417 21548 26412 26426 30340 21738 20123 ip 22320 22336 65311 # 35813 21629 20196 26159 21487 36873 30340 65292 22914 26524 19981 35774 32622 65292 21017 40664 35748 30417 21548 26412 26426 30340 25152 26377 ip 22320 22336 12290 ; local a.b.c.d # openvpn 24212 35813 30417 21548 21738 20010 tcp/udp 31471 21475 65311 # 22914 26524 20320 24819 22312 21516 19968 21488 35745 31639 26426 19978 36816 34892 22810 20010 openvpn 23454 20363 65292 20320 21487 20197 20351 29992 19981 21516 30340 31471 21475 21495 26469 21306 20998 23427 20204 12290 # 27492 22806 65292 20320 38656 35201 22312 38450 28779 22681 19978 24320 25918 36825 20123 31471 21475 12290 port 1194 # openvpn 20351 29992 tcp 36824 26159 udp 21327 35758 ? ; proto tcpproto udp # 25351 23450 openvpn 21019 24314 30340 36890 20449 38567 36947 31867 22411 12290 # &quot ; dev tun&quot ; 23558 20250 21019 24314 19968 20010 36335 30001 ip 38567 36947 65292 # &quot ; dev tap&quot ; 23558 20250 21019 24314 19968 20010 20197 22826 32593 38567 36947 12290 # # 22914 26524 20320 26159 20197 22826 32593 26725 25509 27169 24335 65292 24182 19988 25552 21069 21019 24314 20102 19968 20010 21517 20026 &quot ; tap0&quot ; 30340 19982 20197 22826 32593 25509 21475 36827 34892 26725 25509 30340 34394 25311 25509 21475 65292 21017 20320 21487 20197 20351 29992 &quot ; dev tap0&quot ; # # 22914 26524 20320 24819 25511 21046 vpn 30340 35775 38382 31574 30053 65292 20320 24517 39035 20026 tun/tap 25509 21475 21019 24314 38450 28779 22681 35268 21017 12290 # # 22312 38750 windows 31995 32479 20013 65292 20320 21487 20197 32473 20986 26126 30830 30340 21333 20301 32534 21495 ( unit number ) 65292 20363 22914 &quot ; tun0&quot ; 12290 # 22312 windows 20013 65292 20320 20063 21487 20197 20351 29992 &quot ; dev-node&quot ; 12290 # 22312 22810 25968 31995 32479 20013 65292 38500 38750 20320 37096 20998 31105 29992 25110 32773 23436 20840 31105 29992 20102 tun/tap 25509 21475 30340 38450 28779 22681 65292 21542 21017 vpn 23558 19981 36215 20316 29992 12290 ; dev tapdev tun # 22914 26524 20320 24819 37197 32622 22810 20010 38567 36947 65292 20320 38656 35201 29992 21040 32593 32476 36830 25509 38754 26495 20013 tap-win32 36866 37197 22120 30340 21517 31216 ( 20363 22914 &quot ; mytap&quot ; ) 12290 # 22312 xp sp2 25110 26356 39640 29256 26412 30340 31995 32479 20013 65292 20320 21487 33021 38656 35201 26377 36873 25321 22320 31105 29992 25481 38024 23545 tap 36866 37197 22120 30340 38450 28779 22681 # 36890 24120 24773 20917 19979 65292 38750 windows 31995 32479 21017 19981 38656 35201 35813 25351 20196 12290 ; dev-node mytap # 35774 32622 ssl/tls 26681 35777 20070 ( ca ) 12289 35777 20070 ( cert ) 21644 31169 38053 ( key ) 12290 # 27599 20010 23458 25143 31471 21644 26381 21153 22120 31471 37117 38656 35201 23427 20204 21508 33258 30340 35777 20070 21644 31169 38053 25991 20214 12290 # 26381 21153 22120 31471 21644 25152 26377 30340 23458 25143 31471 37117 23558 20351 29992 30456 21516 30340 ca 35777 20070 25991 20214 12290 # # 36890 36807 easy-rsa 30446 24405 19979 30340 19968 31995 21015 33050 26412 21487 20197 29983 25104 25152 38656 30340 35777 20070 21644 31169 38053 12290 # 35760 20303 65292 26381 21153 22120 31471 21644 27599 20010 23458 25143 31471 30340 35777 20070 24517 39035 20351 29992 21807 19968 30340 common name 12290 # # 20320 20063 21487 20197 20351 29992 36981 24490 x509 26631 20934 30340 20219 20309 23494 38053 31649 29702 31995 32479 26469 29983 25104 35777 20070 21644 31169 38053 12290 # openvpn 20063 25903 25345 20351 29992 19968 20010 pkcs # 12 26684 24335 30340 23494 38053 25991 20214 ( 35814 24773 26597 30475 31449 28857 25163 20876 39029 38754 30340 &quot ; pkcs12&quot ; 25351 20196 ) ca ca.crtcert server.crtkey server.key&nbsp ; # 35813 25991 20214 24212 35813 20445 23494 # 25351 23450 36842 33778 183 36203 23572 26364 21442 25968 12290 # 20320 21487 20197 20351 29992 22914 19979 21517 31216 21629 20196 29983 25104 20320 30340 21442 25968 65306 # &nbsp ; &nbsp ; openssl dhparam -out dh1024.pem 1024 # 22914 26524 20320 20351 29992 30340 26159 2048 20301 23494 38053 65292 20351 29992 2048 26367 25442 20854 20013 30340 1024 12290 dh dh1024.pem # 35774 32622 26381 21153 22120 31471 27169 24335 65292 24182 25552 20379 19968 20010 vpn 23376 32593 65292 20197 20415 20110 20174 20013 20026 23458 25143 31471 20998 37197 ip 22320 22336 12290 # 22312 27492 22788 30340 31034 20363 20013 65292 26381 21153 22120 31471 33258 36523 23558 21344 29992 10.8.0.1 65292 20854 20182 30340 23558 25552 20379 23458 25143 31471 20351 29992 12290 # 22914 26524 20320 20351 29992 30340 26159 20197 22826 32593 26725 25509 27169 24335 65292 35831 27880 37322 25481 35813 34892 12290 26356 22810 20449 24687 35831 26597 30475 23448 26041 25163 20876 39029 38754 12290 server 10.8.0.0 255.255.255.0 # 25351 23450 29992 20110 35760 24405 23458 25143 31471 21644 34394 25311 ip 22320 22336 30340 20851 32852 20851 31995 30340 25991 20214 12290 # 24403 37325 21551 openvpn 26102 65292 20877 27425 36830 25509 30340 23458 25143 31471 23558 20998 37197 21040 19982 19978 19968 27425 20998 37197 30456 21516 30340 34394 25311 ip 22320 22336 ifconfig-pool-persist ipp.txt # 35813 25351 20196 20165 38024 23545 20197 22826 32593 26725 25509 27169 24335 12290 # 39318 20808 65292 20320 24517 39035 20351 29992 25805 20316 31995 32479 30340 26725 25509 33021 21147 23558 20197 22826 32593 32593 21345 25509 21475 21644 tap 25509 21475 36827 34892 26725 25509 12290 # 28982 21518 65292 20320 38656 35201 25163 21160 35774 32622 26725 25509 25509 21475 30340 ip 22320 22336 12289 23376 32593 25513 30721 65307 # 22312 36825 37324 65292 25105 20204 20551 35774 20026 10.8.0.4 21644 255.255.255.0 12290 # 26368 21518 65292 25105 20204 24517 39035 25351 23450 23376 32593 30340 19968 20010 ip 33539 22260 ( 20363 22914 20174 10.8.0.50 24320 22987 65292 21040 10.8.0.100 32467 26463 ) 65292 20197 20415 20110 20998 37197 32473 36830 25509 30340 23458 25143 31471 12290 # 22914 26524 20320 19981 26159 20197 22826 32593 26725 25509 27169 24335 65292 30452 25509 27880 37322 25481 36825 34892 25351 20196 21363 21487 12290 ; server-bridge 10.8.0.4 255.255.255.0 10.8.0.50 10.8.0.100 # 35813 25351 20196 20165 38024 23545 20351 29992 dhcp 20195 29702 30340 20197 22826 32593 26725 25509 27169 24335 65292 # 27492 26102 23458 25143 31471 23558 35831 27714 26381 21153 22120 31471 30340 dhcp 26381 21153 22120 65292 20174 32780 33719 24471 20998 37197 32473 23427 30340 ip 22320 22336 21644 dns 26381 21153 22120 22320 22336 12290 # # 22312 27492 20043 21069 65292 20320 20063 38656 35201 20808 23558 20197 22826 32593 32593 21345 25509 21475 21644 tap 25509 21475 36827 34892 26725 25509 12290 # 27880 24847 65306 35813 25351 20196 20165 29992 20110 openvpn 23458 25143 31471 65292 24182 19988 35813 23458 25143 31471 30340 tap 36866 37197 22120 38656 35201 32465 23450 21040 19968 20010 dhcp 23458 25143 31471 19978 12290 ; server-bridge # 25512 36865 36335 30001 20449 24687 21040 23458 25143 31471 65292 20197 20801 35768 23458 25143 31471 33021 22815 36830 25509 21040 26381 21153 22120 32972 21518 30340 20854 20182 31169 26377 23376 32593 12290 # ( 31616 32780 35328 20043 65292 23601 26159 20801 35768 23458 25143 31471 35775 38382 vpn 26381 21153 22120 33258 36523 25152 22312 30340 20854 20182 23616 22495 32593 ) # 35760 20303 65292 36825 20123 31169 26377 23376 32593 20063 35201 23558 openvpn 23458 25143 31471 30340 22320 22336 27744 ( 10.8.0.0/255.255.255.0 ) 21453 39304 22238 openvpn 26381 21153 22120 12290 ; push &quot ; route 192.168.10.0 255.255.255.0&quot ; ; push &quot ; route 192.168.20.0 255.255.255.0&quot ; # 20026 25351 23450 30340 23458 25143 31471 20998 37197 25351 23450 30340 ip 22320 22336 65292 25110 32773 23458 25143 31471 32972 21518 20063 26377 19968 20010 31169 26377 23376 32593 24819 35201 35775 38382 vpn 65292 # 37027 20040 20320 21487 20197 38024 23545 35813 23458 25143 31471 30340 37197 32622 25991 20214 20351 29992 ccd 23376 30446 24405 12290 # ( 31616 32780 35328 20043 65292 23601 26159 20801 35768 23458 25143 31471 25152 22312 30340 23616 22495 32593 25104 21592 20063 33021 22815 35775 38382 vpn ) # 20030 20010 20363 23376 65306 20551 35774 26377 20010 common name 20026 &quot ; thelonious&quot ; 30340 23458 25143 31471 32972 21518 20063 26377 19968 20010 23567 22411 23376 32593 24819 35201 36830 25509 21040 vpn 65292 35813 23376 32593 20026 192.168.40.128/255.255.255.248 12290 # 39318 20808 65292 20320 38656 35201 21435 25481 19979 38754 20004 34892 25351 20196 30340 27880 37322 65306 ; client-config-dir ccd ; route 192.168.40.128 255.255.255.248 # 28982 21518 21019 24314 19968 20010 25991 20214 ccd/thelonious 65292 35813 25991 20214 30340 20869 23481 20026 65306 # &nbsp ; &nbsp ; &nbsp ; &nbsp ; iroute 192.168.40.128 255.255.255.248 # 36825 26679 23458 25143 31471 25152 22312 30340 23616 22495 32593 23601 21487 20197 35775 38382 vpn 20102 12290 # 27880 24847 65292 36825 20010 25351 20196 21482 33021 22312 20320 26159 22522 20110 36335 30001 12289 32780 19981 26159 22522 20110 26725 25509 30340 27169 24335 19979 25165 33021 29983 25928 12290 # 27604 22914 65292 20320 20351 29992 20102 &quot ; dev tun&quot ; 21644 &quot ; server&quot ; 25351 20196 12290 # 20877 20030 20010 20363 23376 65306 20551 35774 20320 24819 32473 thelonious 20998 37197 19968 20010 22266 23450 30340 ip 22320 22336 10.9.0.1 12290 # 39318 20808 65292 20320 38656 35201 21435 25481 19979 38754 20004 34892 25351 20196 30340 27880 37322 65306 ; client-config-dir ccd ; route 10.9.0.0 255.255.255.252 # 28982 21518 22312 25991 20214 ccd/thelonious 20013 28155 21152 22914 19979 25351 20196 65306 # &nbsp ; &nbsp ; ifconfig-push 10.9.0.1 10.9.0.2 # 22914 26524 20320 24819 35201 20026 19981 21516 32676 32452 30340 23458 25143 31471 21551 29992 19981 21516 30340 38450 28779 22681 35775 38382 31574 30053 65292 20320 21487 20197 20351 29992 22914 19979 20004 31181 26041 27861 65306 # ( 1 ) 36816 34892 22810 20010 openvpn 23432 25252 36827 31243 65292 27599 20010 36827 31243 23545 24212 19968 20010 32676 32452 65292 24182 20026 27599 20010 36827 31243 ( 32676 32452 ) 21551 29992 36866 24403 30340 38450 28779 22681 35268 21017 12290 # ( 2 ) ( 36827 38454 ) 21019 24314 19968 20010 33050 26412 26469 21160 24577 22320 20462 25913 21709 24212 20110 26469 33258 19981 21516 23458 25143 30340 38450 28779 22681 35268 21017 12290 # 20851 20110 learn-address 33050 26412 30340 26356 22810 20449 24687 35831 21442 32771 23448 26041 25163 20876 39029 38754 12290 ; learn-address ./script # 22914 26524 21551 29992 35813 25351 20196 65292 25152 26377 23458 25143 31471 30340 40664 35748 32593 20851 37117 23558 37325 23450 21521 21040 vpn 65292 36825 23558 23548 33268 35832 22914 web 27983 35272 22120 12289 dns 26597 35810 31561 25152 26377 23458 25143 31471 27969 37327 37117 32463 36807 vpn 12290 # ( 20026 30830 20445 33021 27491 24120 24037 20316 65292 openvpn 26381 21153 22120 25152 22312 35745 31639 26426 21487 33021 38656 35201 22312 tun/tap 25509 21475 19982 20197 22826 32593 20043 38388 20351 29992 nat 25110 26725 25509 25216 26415 36827 34892 36830 25509 ) ; push &quot ; redirect-gateway def1 bypass-dhcp&quot ; # 26576 20123 20855 20307 30340 windows 32593 32476 35774 32622 21487 20197 34987 25512 36865 21040 23458 25143 31471 65292 20363 22914 dns 25110 wins 26381 21153 22120 22320 22336 12290 # 19979 21015 22320 22336 26469 33258 opendns.com 25552 20379 30340 public dns 26381 21153 22120 12290 ; push &quot ; dhcp-option dns 208.67.222.222&quot ; ; push &quot ; dhcp-option dns 208.67.220.220&quot ; # 21435 25481 35813 25351 20196 30340 27880 37322 23558 20801 35768 19981 21516 30340 23458 25143 31471 20043 38388 30456 20114 &quot ; 21487 35265 &quot ; ( 20801 35768 23458 25143 31471 20043 38388 20114 30456 35775 38382 ) 12290 # 40664 35748 24773 20917 19979 65292 23458 25143 31471 21482 33021 &quot ; 30475 35265 &quot ; 26381 21153 22120 12290 20026 20102 30830 20445 23458 25143 31471 21482 33021 30475 35265 26381 21153 22120 65292 20320 36824 21487 20197 22312 26381 21153 22120 31471 30340 tun/tap 25509 21475 19978 35774 32622 36866 24403 30340 38450 28779 22681 35268 21017 12290 ; client-to-client # 22914 26524 22810 20010 23458 25143 31471 21487 33021 20351 29992 30456 21516 30340 35777 20070 / 31169 38053 25991 20214 25110 common name 36827 34892 36830 25509 65292 37027 20040 20320 21487 20197 21462 28040 35813 25351 20196 30340 27880 37322 12290 # 24314 35758 35813 25351 20196 20165 29992 20110 27979 35797 30446 30340 12290 23545 20110 29983 20135 20351 29992 29615 22659 32780 35328 65292 27599 20010 23458 25143 31471 37117 24212 35813 25317 26377 33258 24049 30340 35777 20070 21644 31169 38053 12290 # 22914 26524 20320 27809 26377 20026 27599 20010 23458 25143 31471 20998 21035 29983 25104 common name 21807 19968 30340 35777 20070 / 31169 38053 65292 20320 21487 20197 21462 28040 35813 34892 30340 27880 37322 ( 20294 19981 25512 33616 36825 26679 20570 ) 12290 ; duplicate-cn # keepalive 25351 20196 23558 23548 33268 31867 20284 20110 ping 21629 20196 30340 28040 24687 34987 26469 22238 21457 36865 65292 20197 20415 20110 26381 21153 22120 31471 21644 23458 25143 31471 30693 36947 23545 26041 20309 26102 34987 20851 38381 12290 # 27599 10 31186 38047 ping 19968 27425 65292 22914 26524 120 31186 20869 37117 27809 26377 25910 21040 23545 26041 30340 22238 22797 65292 21017 34920 31034 36828 31243 36830 25509 24050 32463 20851 38381 12290 keepalive 10 120 # 20986 20110 ssl/tls 20043 22806 26356 22810 30340 23433 20840 32771 34385 65292 21019 24314 19968 20010 &quot ; hmac 38450 28779 22681 &quot ; 21487 20197 24110 21161 25269 24481 dos 25915 20987 21644 udp 31471 21475 28153 27809 25915 20987 12290 # 20320 21487 20197 20351 29992 20197 19979 21629 20196 26469 29983 25104 65306 # &nbsp ; &nbsp ; openvpn --genkey --secret ta.key # # 26381 21153 22120 21644 27599 20010 23458 25143 31471 37117 38656 35201 25317 26377 35813 23494 38053 30340 19968 20010 25335 36125 12290 # 31532 20108 20010 21442 25968 22312 26381 21153 22120 31471 24212 35813 20026 & # 39 ; 0& # 39 ; 65292 22312 23458 25143 31471 24212 35813 20026 & # 39 ; 1& # 39 ; 12290 ; tls-auth ta.key 0 # 35813 25991 20214 24212 35813 20445 23494 # 36873 25321 19968 20010 23494 30721 21152 23494 31639 27861 12290 # 35813 37197 32622 39033 20063 24517 39035 22797 21046 21040 27599 20010 23458 25143 31471 37197 32622 25991 20214 20013 12290 ; cipher bf-cbc&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; # blowfish ( 40664 35748 ) ; cipher aes-128-cbc&nbsp ; &nbsp ; # aes ; cipher des-ede3-cbc&nbsp ; # triple-des # 22312 vpn 36830 25509 19978 21551 29992 21387 32553 12290 # 22914 26524 20320 22312 27492 22788 21551 29992 20102 35813 25351 20196 65292 37027 20040 20063 24212 35813 22312 27599 20010 23458 25143 31471 37197 32622 25991 20214 20013 21551 29992 23427 12290 comp-lzo # 20801 35768 24182 21457 36830 25509 30340 23458 25143 31471 30340 26368 22823 25968 37327 ; max-clients 100 # 22312 23436 25104 21021 22987 21270 24037 20316 20043 21518 65292 38477 20302 openvpn 23432 25252 36827 31243 30340 26435 38480 26159 20010 19981 38169 30340 20027 24847 12290 # 35813 25351 20196 20165 38480 20110 38750 windows 31995 32479 20013 20351 29992 12290 ; user nobody ; group nobody # 25345 20037 21270 36873 39033 21487 20197 23613 37327 36991 20813 35775 38382 37027 20123 22312 37325 21551 20043 21518 30001 20110 29992 25143 26435 38480 38477 20302 32780 26080 27861 35775 38382 30340 26576 20123 36164 28304 12290 persist-keypersist-tun # 36755 20986 19968 20010 31616 30701 30340 29366 24577 25991 20214 65292 29992 20110 26174 31034 24403 21069 30340 36830 25509 29366 24577 65292 35813 25991 20214 27599 20998 38047 37117 20250 28165 31354 24182 37325 20889 19968 27425 12290 status openvpn-status.log # 40664 35748 24773 20917 19979 65292 26085 24535 28040 24687 23558 20889 20837 syslog ( 22312 windows 31995 32479 20013 65292 22914 26524 20197 26381 21153 26041 24335 36816 34892 65292 26085 24535 28040 24687 23558 20889 20837 openvpn 23433 35013 30446 24405 30340 log 25991 20214 22841 20013 ) 12290 # 20320 21487 20197 20351 29992 log 25110 32773 log-append 26469 25913 21464 36825 31181 40664 35748 24773 20917 12290 # &quot ; log&quot ; 26041 24335 22312 27599 27425 21551 21160 26102 37117 20250 28165 31354 20043 21069 30340 26085 24535 25991 20214 12290 # &quot ; log-append&quot ; 36825 26159 22312 20043 21069 30340 26085 24535 20869 23481 21518 36827 34892 36861 21152 12290 # 20320 21487 20197 20351 29992 20004 31181 26041 24335 20043 19968 ( 20294 19981 35201 21516 26102 20351 29992 ) 12290 ; log&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; openvpn.log ; log-append&nbsp ; openvpn.log # 20026 26085 24535 25991 20214 35774 32622 36866 24403 30340 20887 20313 32423 21035 ( 0 ~ 9 ) 12290 20887 20313 32423 21035 36234 39640 65292 36755 20986 30340 20449 24687 36234 35814 32454 12290 # # 0 34920 31034 38745 40664 36816 34892 65292 21482 35760 24405 33268 21629 38169 35823 12290 # 4 34920 31034 21512 29702 30340 24120 35268 29992 27861 12290 # 5 21644 6 21487 20197 24110 21161 35843 35797 36830 25509 38169 35823 12290 # 9 34920 31034 26497 24230 20887 20313 65292 36755 20986 38750 24120 35814 32454 30340 26085 24535 20449 24687 12290 verb 3 # 37325 22797 20449 24687 30340 27785 40664 24230 12290 # 30456 21516 31867 21035 30340 20449 24687 21482 26377 21069 20 26465 20250 36755 20986 21040 26085 24535 25991 20214 20013 12290 ; mute 20 ', '1427939462', '1427939462');
INSERT INTO `bk_search_index` VALUES ('48', '79', ' openvpn 20351 29992 38382 39064 24635 32467 12290 ', ' 26412 25991 20171 32461 20102 openvpn 30340 19968 20123 20351 29992 12290 ', ' 1 12289 openvpn 36830 25509 25104 21151 21518 26080 27861 ping 36890 26381 21153 22120 30340 21407 22240 20043 19968 12290 21407 22240 65306 23458 25143 31471 30340 26102 38388 19981 33021 22823 20110 26381 21153 22120 30340 65292 35831 20462 25913 33258 24049 30005 33041 30340 26102 38388 12290 2 12289 22914 20309 23433 35013 22312 65306 http://www.opcache.net/index/detail.html?id = 76 3 12289 37197 32622 25991 20214 30340 35828 26126 22312 65306 http://www.opcache.net/index/detail.html?id = 78 ', '1427942466', '1427944600');
INSERT INTO `bk_search_index` VALUES ('49', '80', ' centos 20351 29992 36807 31243 20013 36935 21040 30340 38382 39064 31508 35760 ', ' centos 20351 29992 36807 31243 20013 36935 21040 30340 38382 39064 31508 35760 ', ' 1 12289 22914 20309 25235 32593 21345 30340 21253 tcpdump&nbsp ; -i&nbsp ; eth0&nbsp ; # 20195 34920 20390 21548 32593 21345 eth0 30340 27969 37327 21253 12290 2 12289 ', '1427960404', '1427960404');
INSERT INTO `bk_search_index` VALUES ('50', '81', ' 33258 21160 22791 20221 mysql 25968 25454 24211 33050 26412 ', ' 22312 29992 30340 mysql 25968 25454 24211 22791 20221 33050 26412 65292 36866 21512 23567 37327 30340 12290 ', ' # ! /bin/bash \r \n path = /bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin: ~ /bin \r \n export&nbsp ; path \r \n dbuser = & # 39 ; root& # 39 ; \r \n dbpasswd = & # 39 ; xx& # 39 ; \r \n dbname = & # 39 ; db1&nbsp ; db2& # 39 ; \r \n backtime = ` date&nbsp ; + % y % m % d % h % m % s ` \r \n logpath = & # 39 ; /root/mysql_backup/log& # 39 ; \r \n datapath = & # 39 ; /root/mysql_backup& # 39 ; \r \n echo&nbsp ; &quot ; backup&nbsp ; time: $ { backtime } , database: $ { dbname } &nbsp ; touching...&quot ; &nbsp ; &gt ; &gt ; &nbsp ; $ { logpath } /mysqllog.log \r \n for&nbsp ; table&nbsp ; in&nbsp ; $ dbname ; &nbsp ; do \r \n source = ` /usr/local/mysql/bin/mysqldump&nbsp ; -u $ { dbuser } &nbsp ; -p $ { dbpasswd } &nbsp ; $ { table } &gt ; &nbsp ; $ { datapath } / $ { table } $ { backtime } .sql ` &nbsp ; 2&gt ; &gt ; &nbsp ; $ { logpath } /mysqllog.log ; \r \n if&nbsp ; [ &nbsp ; &quot ; $ ?&quot ; &nbsp ; = = &nbsp ; 0&nbsp ; ] ; then \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; cd&nbsp ; $ { datapath } \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; tar&nbsp ; czf&nbsp ; $ { table } $ { backtime } .tar.gz&nbsp ; $ { table } $ { backtime } .sql&nbsp ; &gt ; &nbsp ; /dev/null \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; mv&nbsp ; $ { table } $ { backtime } .tar.gz&nbsp ; backup/ \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; cd&nbsp ; $ { datapath } /backup \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; svn&nbsp ; add&nbsp ; $ { table } $ { backtime } .tar.gz \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; echo&nbsp ; &quot ; database&nbsp ; $ { dbname } &nbsp ; backup&nbsp ; success ! ! &quot ; &nbsp ; &gt ; &gt ; &nbsp ; $ { logpath } /mysqllog.log \r \n else \r \n &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; echo&nbsp ; &quot ; database&nbsp ; $ { dbname } &nbsp ; backup&nbsp ; error ! ! &quot ; &nbsp ; &gt ; &gt ; &nbsp ; $ { logpath } /mysqllog.log \r \n fi \r \n done \r \n cd&nbsp ; $ { datapath } /backup \r \n svn&nbsp ; commit&nbsp ; -m&nbsp ; &quot ; mysql&nbsp ; auto&nbsp ; backup&quot ; ', '1427961483', '1427961629');
INSERT INTO `bk_search_index` VALUES ('51', '82', ' subversion 30340 32534 35793 23433 35013 ', ' subversion 30340 32534 35793 23433 35013 subversion-1.8.13 ', ' 1 12289 23433 35013 apr apr-util # 23433 35013 apr \r \n cd&nbsp ; ./apr-1.5.1 \r \n ./configure&nbsp ; --prefix = /usr/local/apr \r \n make&nbsp ; &amp ; &amp ; &nbsp ; make&nbsp ; install \r \n \r \n # 23433 35013 apr-util \r \n cd&nbsp ; ../apr-util-1.5.3 \r \n ./configure&nbsp ; --prefix = /usr/local/apr-util&nbsp ; --with-apr = /usr/local/apr/ \r \n make&nbsp ; &amp ; &amp ; &nbsp ; make&nbsp ; install2.1 23433 35013 sqlite-autoconfwget&nbsp ; &nbsp ; \r \n tar&nbsp ; xzf&nbsp ; sqlite-autoconf-xxx.tar.gz \r \n ./configure&nbsp ; --prefix = /usr/local/sqlite_autoconf \r \n make&nbsp ; &amp ; &amp ; &nbsp ; make&nbsp ; install2.2 22914 26524 27809 26377 expatyum&nbsp ; install&nbsp ; expat2.3 23433 35013 zlib/configure&nbsp ; --prefix = /usr/local/zlib \r \n make&nbsp ; &amp ; &amp ; &nbsp ; make&nbsp ; install3 12289 ./configure&nbsp ; --prefix = /usr/local/subversion&nbsp ; --with-apr = /usr/local/apr&nbsp ; \\ \r \n --with-apr-util = /usr/local/apr-util&nbsp ; --with-zlib&nbsp ; --with-openssl&nbsp ; \\ \r \n --enable-maintainer-mode&nbsp ; --with-sqlite = /usr/local/sqlite_autoconfmake&nbsp ; &amp ; &amp ; &nbsp ; make&nbsp ; install4 12289 check/usr/local/subversion/bin/svn&nbsp ; --version5 12289 22914 26524 26377 38382 39064 30340 35805 65292 19979 36733 rpm 23433 35013 21253 , 20197 rpm 30340 26041 24335 23433 35013 http://www.collab.net/downloads/subversion # tab-1 19979 36733 collabnetsubversion-client-1.8.11-1.x86_64.rpm 23433 35013 rpm -ivh collabnetsubversion-client-1.8.11-1.x86_64.rpm 40664 35748 23433 35013 22312 /opt/ 19979 65292 19981 36807 20320 21487 20197 22797 21046 21040 20219 20309 22320 26041 12290 ', '1427964450', '1427981466');
INSERT INTO `bk_search_index` VALUES ('52', '83', ' 123 ', ' 123 ', ' 123 ', '1433904916', '1433904944');
-- ----------------------------
-- Table structure for `bk_users`
-- ----------------------------
DROP TABLE IF EXISTS `bk_users`;
CREATE TABLE `bk_users` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(50) NOT NULL COMMENT '用户名',
`password` varchar(255) NOT NULL COMMENT '用户密码',
`group_id` int(11) NOT NULL,
`realname` varchar(255) NOT NULL DEFAULT '' COMMENT '真实性名',
`token` varchar(255) NOT NULL COMMENT '用户注册时的密钥',
`add_time` bigint(20) NOT NULL COMMENT '用户注册的时间',
`modify_time` bigint(20) NOT NULL COMMENT '用户信息所修改的时间',
`mobile` varchar(11) NOT NULL COMMENT '手机',
`status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '用户禁用0正常的1',
`mark` varchar(255) NOT NULL DEFAULT '' COMMENT '备注',
`last_login_ip` varchar(255) NOT NULL COMMENT '最后登录ip',
`last_login_time` bigint(20) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `name` (`name`) USING BTREE,
KEY `password` (`password`) USING BTREE,
KEY `group_id` (`group_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COMMENT='用户表_by_jiang';
-- ----------------------------
-- Records of bk_users
-- ----------------------------
INSERT INTO `bk_users` VALUES ('1', 'admin', '6512bd43d9caa6e02c990b0a82652dca', '1', '管理员', 'oyzzO7YxmgJHlAfdK5HaZMscegJPcTrw5drPQRS6bjlfAkTB6NELPvqpc12q', '0', '0', '12', '1', '超级用户组', '127.0.0.1', '1436241533');
INSERT INTO `bk_users` VALUES ('2', 'test', 'c4ca4238a0b923820dcc509a6f75849b', '2', 'test', '', '1436169648', '0', '11', '1', '1', '127.0.0.1', '1436241545');
INSERT INTO `bk_users` VALUES ('3', 'test2', 'c4ca4238a0b923820dcc509a6f75849b', '3', '1', '', '1436170910', '0', '1', '1', '1', '', '0');
-- ----------------------------
-- Table structure for `bk_workflow`
-- ----------------------------
DROP TABLE IF EXISTS `bk_workflow`;
CREATE TABLE `bk_workflow` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL COMMENT '工作流的名字',
`description` text NOT NULL COMMENT '描述',
`addtime` int(11) NOT NULL DEFAULT '0' COMMENT '数据插入的时间',
`code` varchar(20) NOT NULL COMMENT '调用字符串,用于与程序结合',
PRIMARY KEY (`id`),
UNIQUE KEY `code` (`code`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 COMMENT='工作流表';
-- ----------------------------
-- Records of bk_workflow
-- ----------------------------
INSERT INTO `bk_workflow` VALUES ('2', '工作流1', '工作流1', '1434335050', 'W_sdfg1');
INSERT INTO `bk_workflow` VALUES ('8', '测试工作流', '测试工作流2', '1434508916', 'W_sdfg');
-- ----------------------------
-- Table structure for `bk_workflow_step`
-- ----------------------------
DROP TABLE IF EXISTS `bk_workflow_step`;
CREATE TABLE `bk_workflow_step` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`workflow_id` int(11) NOT NULL COMMENT '所属的工作流',
`name` varchar(255) NOT NULL COMMENT '工作流步骤的名称',
`description` text NOT NULL COMMENT '工作流步骤的描述',
`step_level` tinyint(4) NOT NULL DEFAULT '0' COMMENT '该工作流步骤所处的第几步,如果为99代表已经审核完成',
`addtime` int(11) NOT NULL COMMENT '数据增加的日期',
PRIMARY KEY (`id`),
KEY `workflow_id` (`workflow_id`) USING BTREE,
KEY `step_level` (`step_level`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8 COMMENT='工作流的详细步骤';
-- ----------------------------
-- Records of bk_workflow_step
-- ----------------------------
INSERT INTO `bk_workflow_step` VALUES ('1', '2', '财务审核', '财务审核', '1', '1434352029');
INSERT INTO `bk_workflow_step` VALUES ('2', '2', '财务总监审核', '财务总监审核', '2', '1434352541');
INSERT INTO `bk_workflow_step` VALUES ('3', '2', '公司负责人审核', '公司负责人审核', '3', '1434352641');
INSERT INTO `bk_workflow_step` VALUES ('9', '8', '测试1', '1', '1', '1434516742');
INSERT INTO `bk_workflow_step` VALUES ('10', '8', '测试2', '2', '2', '1434516769');
-- ----------------------------
-- Table structure for `bk_workflow_user`
-- ----------------------------
DROP TABLE IF EXISTS `bk_workflow_user`;
CREATE TABLE `bk_workflow_user` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`workflow_step_id` int(11) NOT NULL COMMENT '工作流步骤的ID',
`user_id` int(11) NOT NULL COMMENT '后台管理员的ID',
`workflow_id` int(11) NOT NULL COMMENT '工作流ID',
PRIMARY KEY (`id`),
KEY `user_id` (`user_id`) USING BTREE,
KEY `workflow_step_id` (`workflow_step_id`) USING BTREE,
KEY `workflow_id` (`workflow_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of bk_workflow_user
-- ----------------------------
INSERT INTO `bk_workflow_user` VALUES ('6', '1', '2', '2');
INSERT INTO `bk_workflow_user` VALUES ('9', '2', '2', '2');
INSERT INTO `bk_workflow_user` VALUES ('10', '2', '1', '2');
INSERT INTO `bk_workflow_user` VALUES ('11', '3', '1', '2');
INSERT INTO `bk_workflow_user` VALUES ('18', '10', '1', '8');
INSERT INTO `bk_workflow_user` VALUES ('19', '9', '1', '8');
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/newpant/laravel5_backend.git
git@gitee.com:newpant/laravel5_backend.git
newpant
laravel5_backend
laravel5_backend
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385