2009-12-12
文件最近一次更新於 thu jan 12 15:57:18 utc 2012
文件出處:
netkiller architect 手札
netkiller linux 手札
netkiller developer 手札
netkiller database 手札
netkiller debian 手札
netkiller centos 手札
netkiller freebsd 手札
netkiller shell 手札
netkiller web 手札
netkiller monitoring 手札
netkiller storage 手札
netkiller mail 手札
netkiller security 手札
netkiller ********** 手札
netkiller writer 手札
netkiller version 手札
netkiller postgresql 手札
netkiller mysql 手札
netkiller cryptography 手札
netkiller cisco ios 手札
netkiller ldap 手札
netkiller intranet 手札
$ sudo apt-get install git-daemon-run安裝後會建立下面兩個使用者
$ cat /etc/passwd | grep gitgit-daemon-run 包攜帶的檔案gitlog:x:117:65534::/nonexistent:/bin/false
gitdaemon:x:118:65534::/nonexistent:/bin/false
$ dpkg -l git-daemon-run同時建立下面配置檔案/./etc
/etc/sv
/etc/sv/git-daemon
/etc/sv/git-daemon/run
/etc/sv/git-daemon/log
/etc/sv/git-daemon/log/run
/usr
/usr/share
/usr/share/doc
/usr/share/doc/git-daemon-run
/usr/share/doc/git-daemon-run/changelog.gz
/usr/share/doc/git-daemon-run/changelog.debian.gz
/usr/share/doc/git-daemon-run/readme.debian
$ find /etc/sv/git-daemon//etc/sv/git-daemon/
/etc/sv/git-daemon/run
/etc/sv/git-daemon/supervise
/etc/sv/git-daemon/log
/etc/sv/git-daemon/log/run
/etc/sv/git-daemon/log/supervise
$ sudo vim /etc/sv/git-daemon/run#!/bin/sh
exec 2>&1
echo 'git-daemon starting.'
exec chpst -ugitdaemon \
"$(git --exec-path)"/git-daemon --verbose --reuseaddr \
--base-path=/var/cache /var/cache/git
git-daemon --verbose --reuseaddr \* 我加上了乙個--export-all 使用該選項後,在git倉庫中就不必建立git-daemon-export-ok檔案。--base-path=/var/cache /var/cache/git
改為git-daemon --verbose --reuseaddr \
--export-all --base-path=/opt/git
/etc/services 檔案中加入
# local services確認已經加入git 9418/tcp # git version control system
$ grep 9418 /etc/services啟動git-daemon
$ sudo sv stop git-daemon掃瞄git埠,確認git-daemon已經啟動or
$ sudo runsv git-daemon
runsv git-daemon: fatal: unable to change to directory: file does not exist
.git/config 檔案應該是下面這樣
$ cat example.git/.git/configgit-clone git://localhost/example.git[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[receive]
denycurrentbranch = ignore
neo@deployment:/tmp$ git clone git://localhost/example.git example.git我們新增了一些檔案,然後再git clone,可以看到檔案數目cloning into example.git...
neo@deployment:/tmp$ cd example.git/
neo@deployment:/tmp/example.git$ echo helloworld > hello.txt
neo@deployment:/tmp/example.git$ git add hello.txt
neo@deployment:/tmp/example.git$ git commit -m 'initial commit'
[master (root-commit) 65a0f83] initial commit
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 hello.txt
$ git-clone git://localhost/example.gitinitialized empty git repository in /tmp/example/.git/
remote: counting objects: 3, done.
remote: total 3 (delta 0), reused 0 (delta 0)
sphinx分布式配置
單機配置請參考 搭建coreseek sphinx mmseg3 詳細安裝配置 php之sphinx擴充套件安裝 php呼叫示例 分布式配置很簡單,只需要將區域網內的機器連線即可。vi usr local coreseek etc csft.conf php view plain copy prin...
RabbitMQ分布式配置
通過增加更多的節點來擴充套件訊息通訊的吞吐量 1 集群配置方式 federation 應用於廣域網,允許單台伺服器上的交換機或佇列接收發布到另一台伺服器上交換機或佇列的訊息,可以是單獨機器或集群。federation佇列類似於單向點對點連線,訊息會在聯盟佇列之間 任意次,直到被消費者接受。通常使用f...
SpringCloud 分布式配置
我們一般把配置檔案寫在專案中直接獲取相關引數 spring cloud config實現的配置中心預設採用git來儲存配置資訊,所以使用spring cloud config構建的配置伺服器,天然就支援對微服務應用配置資訊的版本管理,並且可以通過git客戶端工具來方便的管理和訪問配置內容。1.配置倉...