Posts
gitolite 安裝
FreeBSD gitolite 安裝
安裝:
# cd /usr/ports/devel/gitolite ; make install clean;
安裝結束最後面會看到以下提示:
==============================================================================
Final gitolite installation instructions:
Any ssh user can be a gitolite provider. Simply run the following command as
the user:
/usr/local/bin/gl-setup /path/to/admin.ssh.key.pub
This will setup up the configuration files for gitolite, designating where the
repositories are located and other options.
The admin ssh key allows full access to the gitolite-admin repository where
additional users and repositories can be configured.
By default, the git user is created for use by gitolite.
==============================================================================
===> Correct pkg-plist sequence to create group(s) and user(s)
===> Registering installation for gitolite-2.1
===> Cleaning for gitolite-2.1
Posts
MongoDB Sharing
MongoDB Sharing[
]1
可以先看看官網介紹:Sharding Introduction
Shards 類似 Mysql 的Data nodes.
Config Servers 類似 Mysql 的Management node.
Routing Processes 類似 Mysql 的SQL node.
Posts
MongoDB VS Mysql 簡單測試.
廢話不多說.
MongoDB 使用 MongoDB Object Document Mapper測試.
Mysql 使用 Object Relational Mapper測試.
MongoDB部分:
config.php
register();
$classLoader = new ClassLoader('Doctrine\ODM\MongoDB', __DIR__ . '/../../lib');
$classLoader->register();
$classLoader = new ClassLoader('Doctrine\MongoDB', __DIR__ . '/../../lib/vendor/doctrine-mongodb/lib');
$classLoader->register();
$classLoader = new ClassLoader('Symfony', __DIR__ . '/../../lib/vendor');
$classLoader->register();
$classLoader = new ClassLoader('Documents', __DIR__);
$classLoader->register();
$config = new Configuration();
$config->setProxyDir(__DIR__ . '/Proxies');
$config->setProxyNamespace('Proxies');
$config->setHydratorDir(__DIR__ . '/Hydrators');
$config->setHydratorNamespace('Hydrators');
$config->setDefaultDB('doctrine_odm_sandbox');
//使用safe模式
$con = new Connection('localhost',array('safe'=>true, 'w' => 2,'wtimeoutMS' => 2000));
//使用一般模式
//$con = new Connection('localhost');
$reader = new AnnotationReader();
$reader->setDefaultAnnotationNamespace('Doctrine\ODM\MongoDB\Mapping\\');
$config->setMetadataDriverImpl(new AnnotationDriver($reader, __DIR__ . '/Documents'));
$dm = DocumentManager::create($con, $config);