php-fpm重启
killall php-fpm
再执行(usr/local/php是php的安装目录)
/usr/local/php/sbin/php-fpm &
/usr/local/nginx/sbin/nginx -s stop //关闭服务器
/usr/local/nginx/sbin/nginx 开启服务器
三、扩展的使用
// 获取单条配置
$path = '/' . trim($path, '/');
$zookeeper = new \Zookeeper('address:2181');
if ($zookeeper->exists($path)) {
$value = $zookeeper->get($path);
}
//创建节点
if (!$zookeeper->exists($path)) {
$zookeeper->create($path, $value, array(array(
'perms' => 31,
'scheme' => 'world',
'id' => 'anyone'
)));
}
//更新节点
if ($zookeeper->exists($path)) {
$zookeeper->set($path, $value);
}
//删除一个节点
if ($zookeeper->exists($path)) {
$zookeeper->delete($path);
}
//获取所有子节点名称
if ($zookeeper->exists($path)) {
$value = $zookeeper->getChildren($path);
}
//获取acl
if ($zookeeper->exists($path)) {
$zookeeper->getAcl($path);
}
//设置acl
if ($zookeeper->exists($path)) {
$acl = $zookeeper->getAcl($path);
$version = isset($acl['0']['aversion']) ? $acl['0']['aversion'] : 0;
$zookeeper->setAcl($path, $version, array(array(
'perms' => 31,
'scheme' => 'world',
'id' => 'anyone'
)));
}
http://blog.csdn.net/likunlun1234/article/details/46637919