2-3.OMVの設定 のバックアップ(No.14)
- バックアップ一覧
- 差分 を表示
- 現在との差分 を表示
- 現在との差分 - Visual を表示
- ソース を表示
- 2-3.OMVの設定 へ行く。
- 0 (1970-01-01 (木) 09:00:00)
- 1 (2016-02-08 (月) 18:21:58)
- 2 (2016-02-20 (土) 22:52:23)
- 3 (2016-02-20 (土) 23:56:15)
- 4 (2016-02-22 (月) 18:56:55)
- 5 (2016-02-23 (火) 01:31:46)
- 6 (2016-02-23 (火) 09:54:37)
- 7 (2016-02-26 (金) 09:18:36)
- 8 (2016-02-26 (金) 11:13:49)
- 9 (2016-02-29 (月) 11:38:08)
- 10 (2016-02-29 (月) 18:02:48)
- 11 (2016-03-04 (金) 00:54:03)
- 12 (2016-03-07 (月) 15:53:39)
- 13 (2016-03-08 (火) 01:05:48)
- 14 (2016-03-09 (水) 14:37:27)
- 15 (2016-03-12 (土) 22:15:42)
- 16 (2016-03-19 (土) 21:42:27)
- 17 (2016-03-21 (月) 23:53:03)
- 18 (2016-03-27 (日) 21:43:53)
- 19 (2016-04-19 (火) 13:29:43)
- 20 (2016-04-28 (木) 10:55:46)
- 21 (2016-11-07 (月) 23:48:43)
- 22 (2016-11-29 (火) 00:12:58)
- 23 (2016-11-30 (水) 00:25:22)
extrasプラグイン
http://omv-extras.org/simple/index.php?id=how-to-install-omv-extras-plugin
にある"From OMV web interface"を使うと原因不明で進まず、はまる。
"From command line as root"を使えば分かるのだが、apt-transport-httpsが入っていないせいで
"dpkg -i openmediavault-omvextrasorg_latest_all.deb"が上手くいかない。
私は
apt-get install apt-transport-https
でインストール出来たと思うのだが、Webでぐぐると、
apt-get -f install apt-transport-https
でないとインストールできないとある。もはやどっちが正しいかを確かめる術なし。
nginx
設定はそれほど難しくない。基本OMVの中で設定できるが、設定できるルートはOMVで設定した共有フォルダに限られる。つまり/に余裕があるから/www作ってここを公開するっていうのはできない。
xcahce
PHP Version 5.4.45-0+deb7u2なので、OPCacheが入っていない。
apt-cache search OPCacheすると、PHP5-xcacheパッケージは入れられるようだ。
apt-get install php5-xcache cd 公開ディレクトリ mkdir xcache cd xcache cp -r /usr/share/xcache/admin .
その前に
vi /etc/php5/conf.d/20-xcache.ini
して、
[xcache.admin] ;xcache.admin.enable_auth = On xcache.admin.user = "xcache" ; xcache.admin.pass = md5($your_password) xcache.admin.pass = "asbdefghijklm"
して、ちゃんとuserとパスワード設定しないとweb interface出てこない。
パスワードのところは、
% echo -n "typeyourpassword" | md5sum % abcdefghijklm
して入れる文字を取得する。
http://forums.openmediavault.org/index.php/Thread/11579-Modify-the-80-threshold-filesystem-notification/
http://forums.openmediavault.org/index.php/Thread/12718-SOLVED-80-Resource-limit-warning-for-space-on-filesystem/
http://forums.openmediavault.org/index.php/Thread/12313-User-home-directory-filesystem-mounted-noexec-incorrectly/
nginx-cgi
phpはOMV-webuiから設定可能だが、その他のcgiはsshでターミナル開いて作業する必要あり。
apt-get install fcgiwrap spawn-fcgi
すると、/etc/init.d/fcgiwrapもsocket使うほうで準備してくれる。だからOMVのnginxのサーバタブの編集→追加オプションのエリアで、以下を加えれば良い。
location ~ \.cgi$ { include /etc/nginx/fastcgi_params; fastcgi_pass unix:/var/run/fcgiwrap.socket; fastcgi_index index.cgi; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; }
ただし、noexecの罠に注意。
noexecの罠
OMVで設定したディスク(パーティション)をfstabで確認するとnoexecが付いている。perlのcgiを置く場所にnoexecが付いていると動かない。最初に/etc/default/openmediavaultの下の
OMV_FSTAB_MNTOPS_EXT3
OMV_FSTAB_MNTOPS_EXT4
OMV_FSTAB_MNTOPS_JFS
OMV_FSTAB_MNTOPS_XFS
等を編集しておくと、OMVで設定したディスクでもnoexec付かないようにすることができる。しかしディスクフォーマットタイプ毎の設定になる。あまり頻繁にディスクの設定を変えないようなら、既/etc/openmediavault/config.xmlの/system/fstab/mntentの<opt>フィールドを変更し、かつ/etc/fstabも変えておけばいい。
bittorrent client
openmediavault-transmissionbtはあるのだが、ラベルが使えなかったりいろいろ不自由。替わりにXS35と同じようにutorrentをいれた方がいい。
http://www.utorrent.com/intl/ja/downloads/linux ここからDevian 7.0 32bitをダウンロード。 libssl0.9.8も入れる。(今回はdpkg -i libssl0.9.8_0.9.8o-4squeeze14_i386.debで入れたが、正しくはapt-get install libssl0.9.8:i386)
tar -xvzf utserver.tar.gz -C /root/opt chmod -R 755 /root/opt/utorrent-server-alpha-v3_3
そしてLinux Mintで使った以下のスクリプトを/root/binにでもおいておき、再起動時にスタートさせる。
以下file "/root/bin/utorrent"
#!/bin/sh # # uTorrent start stop service script # # copy to /etc/init.d # run "update-rc.d utorrent defaults" to install # run "update-rc.d utorrent remove" to remove # # @author FanFan Huang ([email protected]) # # # BEGIN CONFIGURATION SECTION #################################### # Path were you extracted utorrent server UTORRENT_PATH=/root/opt/utorrent-server-alpha-v3_3 # Path where you want store the log file # (default recommended) LOGFILE=$UTORRENT_PATH/utorrent.log # Path for the PID file where the process id is stored # (default is for debian and ubuntu systems) PIDFILE=$UTORRENT_PATH/utorrent.pid # Nice value NICE=15 # END CONFIGURATION SECTION ##################################### uTorrentServer() { nice -n $NICE $UTORRENT_PATH/utserver -settingspath $UTORRENT_PATH -daemon -logfile $1 -pidfile $2 } case "$1" in start) isAlive=`ps -ef | grep utserver | grep -v grep | wc -l` if [ $isAlive = 1 ]; then echo "uTorrent is already running please terminate first" else if [ -e "$PIDFILE" ]; then rm $PIDFILE rm $LOGFILE fi echo "uTorrent starting" uTorrentServer $LOGFILE $PIDFILE while [ ! -e $LOGFILE ]; do sleep 1 #Wait for file to be generated done while [ "" = "$(cat $LOGFILE|grep 'IPv6 is installed')" ]; do #wait until utorrent has finished bootup echo -n ".$(cat $LOGFILE|grep 'IPv6 is installed')" sleep 1 done RESULT=$(cat $LOGFILE|grep 'bind failed') if [ -n "$RESULT" ]; then echo "Port bind failure detected uTorrent may have limited functionality" else echo "uTorrent started successfully" fi fi ;; stop) if [ -e "$PIDFILE" ]; then echo -n "uTorrent is shutting down" PID=$(cat $PIDFILE) kill $PID while [ -n "$(pidof "utserver")" ]; do echo -n "." sleep 1 done echo "uTorrent Service Terminated" rm $PIDFILE rm $LOGFILE else echo "Service is not currently running!" fi ;; status) if [ -e "$PIDFILE" ]; then PID=$(cat $PIDFILE) echo "uTorrent running pid: $PID" else echo "uTorrent not running" fi ;; restart) $0 stop $0 start ;; log) if [ -e "$LOGFILE" ]; then LOG=$(cat $LOGFILE) echo "$LOG" else echo "uTorrent is not running no active log file" fi ;; *) echo "Usage {start|stop|restart|status|log}" exit esac exit 0