インストール・更新

  • adiaryを展開したいディレクトリに移動し、Githubからソースを取得
    # git clone https://github.com/nabe-abk/adiary
  • adiary のディレクトリの実行権限を変更
    # chmod 777 __cache data pub
  • アップデートする場合は「adiary」を展開したディレクトリに移動して以下のコマンドを実行
    # git pull

nginx + diary

起動スクリプト

  • /etc/rc.d/init.d/adiary
#!/bin/bash
#
# chkconfig: - 86 14
# description: adiary is Japanese CMS\
#
NAME=adiary
DAEMON=/path/to/adiary.fcgi
DAEMON_ARGS=127.0.0.1:8998
PIDFILE=/var/run/$NAME.pid

start() {
	start-stop-daemon --start --background --make-pidfile --pidfile $PIDFILE --exec $DAEMON -- $DAEMON_ARGS
	result=$?
	if [ $result != "0" ]
	then
		pid=`cat $PIDFILE`
		echo "daemon is already running. (pid=${pid})"
		exit 1
	fi
	return $result
}

stop() {
	start-stop-daemon --stop --quiet --pidfile $PIDFILE
	result=$?
	if [ $result != "0" ]
	then
		echo "daemon is not running. (check $PIDFILE)."
		exit 1
	fi
	rm -f $PIDFILE
	return $result
}

restart() {
	stop
	start
}

case "$1" in
  start)
  	start
	;;
  stop)
  	stop
	;;
  restart)
  	restart
	;;
  *)
	echo $"Usage: $0 {start|stop|reload}"
	exit 1
esac
  • daemon起動に start-stop-daemon を使用している
  • 自動起動化
    # chkconfig --add adiary
    # chkconfig adiary on

トップ   編集 凍結 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2017-05-03 (水) 18:11:41 (2549d)