Tech エントリー[インストール・アップグレード]
Scuttle を複製して利用する際のちょっとした工夫
私の場合、Scuttle を複数箇所に配置して用途・目的に分けて利用しています。そうした場合、データベースが複数必要になる、同一のスクリプトを複数にコピーして配置するなど、アップグレードやカスタマイズなどの行う際の運用の手間が負担になってきます。
データベースが物理的に複数になってしまうのはソフトウェアの仕様上、回避が難しい問題ではありますが、スクリプトに関しては、共通のものを利用したいところ。
そこで、シンボリックリンクを利用し、僅かではありますが、手間が省けないかと考え、以下のような環境に最セットアップしました。先日エントリーした 0.7.2 へアップグレードする際に実施しました :-)
設置したいパスに移動し、以下のシンボリックを設定。
ln -s /app/path/of/scuttle/about.php about.php
ln -s /app/path/of/scuttle/ajaxDelete.php ajaxDelete.php
ln -s /app/path/of/scuttle/ajaxGetTitle.php ajaxGetTitle.php
ln -s /app/path/of/scuttle/ajaxIsAvailable.php ajaxIsAvailable.php
ln -s /app/path/of/scuttle/alltags.php alltags.php
ln -s /app/path/of/scuttle/api api
ln -s /app/path/of/scuttle/bg_bar.png bg_bar.png
ln -s /app/path/of/scuttle/bg_header.png bg_header.png
ln -s /app/path/of/scuttle/bg_sidebar.png bg_sidebar.png
ln -s /app/path/of/scuttle/bookmarks.php bookmarks.php
# ln -s /app/path/of/scuttle/cache cache
# ln -s /app/path/of/scuttle/config.inc.php.example config.inc.php.example
ln -s /app/path/of/scuttle/debug.inc.php debug.inc.php
ln -s /app/path/of/scuttle/edit.php edit.php
ln -s /app/path/of/scuttle/functions.inc.php functions.inc.php
# ln -s /app/path/of/scuttle/header.inc.php header.inc.php
ln -s /app/path/of/scuttle/history.php history.php
ln -s /app/path/of/scuttle/icon.png icon.png
ln -s /app/path/of/scuttle/import.php import.php
ln -s /app/path/of/scuttle/importNetscape.php importNetscape.php
ln -s /app/path/of/scuttle/includes includes
ln -s /app/path/of/scuttle/index.php index.php
ln -s /app/path/of/scuttle/jsScuttle.php jsScuttle.php
ln -s /app/path/of/scuttle/licence.txt licence.txt
ln -s /app/path/of/scuttle/loading.gif loading.gif
ln -s /app/path/of/scuttle/locales locales
ln -s /app/path/of/scuttle/login.php login.php
ln -s /app/path/of/scuttle/logo.png logo.png
ln -s /app/path/of/scuttle/logo_24.png logo_24.png
ln -s /app/path/of/scuttle/password.php password.php
ln -s /app/path/of/scuttle/populartags.php populartags.php
ln -s /app/path/of/scuttle/profile.php profile.php
ln -s /app/path/of/scuttle/readme.txt readme.txt
ln -s /app/path/of/scuttle/register.php register.php
ln -s /app/path/of/scuttle/rss.gif rss.gif
ln -s /app/path/of/scuttle/rss.php rss.php
ln -s /app/path/of/scuttle/scuttle.css scuttle.css
ln -s /app/path/of/scuttle/search.inc.php search.inc.php
ln -s /app/path/of/scuttle/search.php search.php
ln -s /app/path/of/scuttle/services services
ln -s /app/path/of/scuttle/tables.sql tables.sql
ln -s /app/path/of/scuttle/tagdelete.php tagdelete.php
ln -s /app/path/of/scuttle/tags.php tags.php
# ln -s /app/path/of/scuttle/templates templates
ln -s /app/path/of/scuttle/watch.php watch.php
ln -s /app/path/of/scuttle/watchlist.php watchlist.php
mkdir cache
mkdir templates
cp /app/path/of/scuttle/config.inc.php.example config.inc.php
cp /app/path/of/scuttle/header.inc.php ./
cp /app/path/of/scuttle/templates/* ./templates/
途中 "#" でコメント・アウトしている箇所がありますが、明示的にわかるよう敢えて記述を残してあります。
コメント・アウトしてある箇所の理由は以下の通りです。(かなり簡単に解説してあります。)
cache は設置された箇所 (アプリケーション) ごとに利用されるため手動で mkdir し、ディレクトリを作成しました。
templates も同様の理由でディレクトリを作成後、実ファイルをコピーしています。ちなみに、templates 以下のファイルはブラウザで見えているデザイン・レイアウトを制御しているファイルになります。
config.inc.php は、アプケーションの挙動を決める設定ファイルですので、共通ファイルとは別に用意する必要があります。
また、header.inc.php は config.inc.php を実際に呼び出しているファイルで __FILE__ というシステム関数を利用して config.inc.php のファイルのパスを取得していることから、こちらも同様に共通のファイルとは分けて用意する必要があります。
Scuttle 0.7.2 から作成したものですので、アップグレードされた場合はそのまま適用できない可能があります。マイナーなアップグレード時などは比較的簡単にアップグレードできるようになるかもしれません。
/app/path/of/scuttle/ 配下のファイルのみアップグレードすれば良い...かもしれないので。
コメント (0) トラックバック (0) Atom/RSS
投稿: 2006年07月17日 01:10 / 最終更新: 2006年07月17日 01:42
» Movable Type 3.3 を導入する際に見ておきたいページ
« Dokuwiki を新規でインストール



コメント (投稿する)