普通にインストール
# yum install loggerhead
動かしてみる
$ serve-branches path-to-repo
なにやら不満げなログが出てきた
DEBUG:loggerhead.infopile:Couldn't load python-sqlite, continuing without using a cache INFO:paste.httpserver.ThreadPool:Cannot use kill_thread_limit as ctypes/killthread is not available
一応、こちらもインストールしてご機嫌を取る
# yum install python-sqlite2 # yum install python-ctypes
/etc/init.dから動かすように設定する
/usr/share/doc/loggerhead-1.17/loggerheadd を /etc/init.dにコピーし、必要な修正を加える
--- loggerheadd 2009-08-20 22:53:02.000000000 +0900 +++ /etc/init.d/loggerheadd 2010-11-02 17:29:36.000000000 +0900 @@ -14,7 +14,7 @@ # script might not be able to kill loggerhead) # -LHUSER=loggerhead +LHUSER=apache # <<< loggerheadのユーザを指定。めんどくさいからapacheでいいや if [ `whoami` = "$LHUSER" ]; then SUDO="" @@ -23,7 +23,7 @@ fi # If serve-branches is not in your path, you will need to specify the full path: -SERVE_BRANCHES_CMD=serve-branches +SERVE_BRANCHES_CMD=/usr/bin/serve-branches # <<< serve-branches をフルパスで指定 LOG_FOLDER=/var/log/loggerhead LOG_FILE=$LOG_FOLDER/loggerheadd.log @@ -31,7 +31,7 @@ PORT=8080 #please specify the base directory to serve: -BZRROOT=/bzrroot +BZRROOT=path-to-repos # <<< リポジトリのディレクトリを指定。リポジトリの親ディレクトリでも大丈夫 # You can add additional options to serve-branches here: START_CMD="$SERVE_BRANCHES_CMD --prefix=$URL_PREFIX --log-folder=$LOG_FOLDER --port=$PORT $BZRROOT"
サービスを登録
# chkconfig --add loggerheadd
ログディレクトリを作成
# mkdir /var/log/loggerhead # chown apache /var/log/loggerhead
システムを再起動してみると、なにやらエラーが出ている
sudo: sorry you must have a tty to run sudo
sudoはttyでやってねと。sudoersを見ると
# # "ssh hostname sudo <cmd>" は出来ないようにしちゃったよ! だってそれだとパスワードが読めちゃうからね! # You have to run "ssh -t hostname sudo <cmd>". # # Disable "ssh hostname sudo <cmd>", because it will show the password in clear. # You have to run "ssh -t hostname sudo <cmd>". # Defaults requiretty
知らん。visudo で sudoersを編集
Defaults requiretty
をコメントアウト。