Linuxで
Debian GNU/Linux 5.0に導入する
javaインストール (apt-lineにnon-freeを含めておく) $ aptitude install sun-java6-jre unzipインストール $ aptitude install unzip NicoCache_uをダウンロードして展開 $ unzip NicoCache_u-xxx.zip シェルスクリプトに実行権限を与える $ cd NicoCache_u $ chmod u+x startup.sh shutdown.sh NicoCache_uを起動 $ ./startup.sh NicoCache_uを終了 $ ./shutdown.sh ログを確認 $ view log/info.log ログを追跡表示(Ctrl + c で終了) $ tail -fn 20 log/info.log
[補足]
Ubuntuの端末からでも、同様のコマンドで導入できます。
ただしsudoが必要な場合があります。
Ubuntuの端末からでも、同様のコマンドで導入できます。
ただしsudoが必要な場合があります。
起動時にNicoCache_uも起動させる
1. 以下の起動スクリプトを修正 USERをNicoCache_uを起動するユーザに変更(通常はログインしているユーザ) NICOCACHEU_HOMEをNicoCache_uを配置したディレクトリパスに変更 2. 修正した起動スクリプトを/etc/init.d/に配置 ファイル名はnicocache_uとする 3. 起動スクリプトに実行権限を付与 $ chmod a+x /etc/init.d/nicocache_u 4. 起動スクリプトのシンボリックリンクを作成 $ update-rc.d nicocache_u defaults 99 1
[補足]
Debian GNU/Linux、又はUbuntuのみ
Debian GNU/Linux、又はUbuntuのみ
起動スクリプト
#!/bin/sh
### BEGIN INIT INFO
# Provides: nicocache_u
# Required-Start: $remote_fs
# Required-Stop: $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: NicoCache_u initscript
# Description: This file should be used to construct scripts to be
# placed in /etc/init.d.
### END INIT INFO
USER=test
NICOCACHEU_HOME=/home/test/NicoCache_u
case "$1" in
start)
su $USER -c "$NICOCACHEU_HOME/startup.sh"
;;
stop)
su $USER -c "$NICOCACHEU_HOME/shutdown.sh"
;;
restart|force-reload)
su $USER -c "$NICOCACHEU_HOME/shutdown.sh"
sleep 3
su $USER -c "$NICOCACHEU_HOME/startup.sh"
;;
*)
;;
esac
:
このwikiの更新情報RSS