Linode を使用して、Ubuntu8.04LTS + dekiwiki + Trac を設定したときの手順メモ
例)FQDN : ubuntu.mydomain.com、IP : 123.123.123.123
vi /etc/hostname
で、変更したいホスト名を書き込んで
hostname -F /etc/hostname
で、設定を反映させる。ここで一旦 logout して、再度 login すると、プロンプトが
root@li57-77:~#
から
root@ubuntu:~ #
になり、変更結果が確認できる
例)FQDN : ubuntu.mydomain.com、IP : 123.123.123.123
vi /etc/hosts
cat /etc/hosts 127.0.0.1 ubuntu.mydomain.com fire 127.0.0.1 localhost localhost.mydomain.com 123.123.123.123 ubuntu.mydomain.com ubuntu ...
apt-get install wget
wget http://www.ubuntulinux.jp/sources.list.d/hardy.list -O /etc/apt/sources.list.d/ubuntu-ja.list
apt-get update
apt-get upgrade
Vortice
dell'evoluzione を参考にした
vi /etc/apt/sources.list
開いたファイルに以下を編集
# mindtouch
deb http://repo.mindtouch.com xUbuntu_8.04/
apt-get update
apt-get install html2ps poppler-utils wv gs tidy links
apt-get install dekiwiki
vi /etc/apache2/sites-available/dekiwiki
開いたファイルに以下を編集
NameVirtualHost * ... ServerName ubuntu.mydomain.com ServerAlias deki.mydomain.com ServerAdmin [email protected] ...
a2ensite dekiwiki
a2dissite default (defaultの方は一旦無効化)
/etc/init.d/apache2 restart
以下にアクセスしてブラウザからさらに設定する。
http://deki.mydomain.com/config/index.php
ブラウザからの設定終了後
cd /var/www/dekiwiki/config mkdir /etc/dekiwiki cp -p mindtouch.host.conf /etc/dekiwiki cp -p mindtouch.deki.startup.xml /etc/dekiwiki cp -p LocalSettings.php /var/www/dekiwiki/ /etc/init.d/dekiwiki start
http://deki.mydomain.com/
a2ensite default
/etc/init.d/apache2 restart
TracをLinuxにインストール,Tracの基本的な設定 を参考にした
apt-get install trac libapache2-mod-python libapache2-svn python-setuptools unzip wget
apt-get --purge remove trac
easy_install -Z Genshi==0.5.1
wget http://www.i-act.co.jp/project/products/downloads/Trac-0.11.2.1.ja1.zip
unzip Trac-0.11.2.1.ja1.zip
cd /Trac-0.11.2.1.ja1
python setup.py bdist_egg
easy_install dist/Trac-0.11.2.1.ja1-py2.5.egg
easy_install http://trac-hacks.org/svn/accountmanagerplugin/trunk
easy_install http://trac-hacks.org/svn/iniadminplugin/0.11
ファイル/ディレクトリ 役割 /var/trac Tracプロジェクト群を配置 /var/trac/htdigest Digest認証ファイル(TracとSubversionで使用) /var/svn Subversionリポジトリ群を配置 /var/cache/egg Tracプラグインの展開先
ディレクトリを作成
mkdir /var/trac /var/svn /var/cache/egg
chown -R www-data:www-data /var/trac /var/svn /var/cache/egg
vi /etc/apache2/sites-available/trac
以下の内容を追加します
<Location "/trac"> SetHandler mod_python PythonHandler trac.web.modpython_frontend PythonOption TracEnvParentDir "/var/trac/" PythonOption TracUriRoot /trac SetEnv PYTHON_EGG_CACHE "/var/cache/egg" </Location> <LocationMatch "/[^/]+/login"> AuthType Digest AuthName trac AuthUserFile "/var/trac/htdigest" Require valid-user </LocationMatch> <Location "/svn"> DAV svn SVNParentPath "/var/svn" SVNListParentPath on AuthType Digest AuthName trac AuthUserFile "/var/trac/htdigest" Require valid-user </Location>
-u www-data htdigest -c /var/trac/htdigest trac admin
Adding password for admin in realm trac.
New password: (パスワードを入力)
Re-type new password: (もう一度パスワードを入力)
a2enmod auth_digest
a2ensite trac
source /etc/apache2/envvars
source /etc/apache2/envvars
apache2 -t
Syntax OK
/etc/init.d/apache2 restart
Subversionリポジトリを作成
-u www-data svnadmin create /var/svn/sample
Tracプロジェクトを作成
-u www-data trac-admin /var/trac/sample initenv Creating a new Trac environment at /var/trac/sample Trac will first ask a few questions about your environment in order to initialize and prepare the project database. Please enter the name of your project. This name will be used in page titles and descriptions. Project Name [My Project]> (プロジェクト名を指定する。後から変更できるので何も入力せずにEnterを押す) Please specify the connection string for the database to use. By default, a local SQLite database is created in the environment directory. It is also possible to use an already existing PostgreSQL database (check the Trac documentation for the exact connection string syntax). Database connection string [sqlite:db/trac.db]> (データベースを指定する。通常はSQLiteを使うので何も入力せずにEnterを押す) Please specify the type of version control system, By default, it will be svn. If you don't want to use Trac with version control integration, choose the default here and don't specify a repository directory. in the next question. Repository type [svn]> (リポジトリの種別を指定する。今回はSubversionを使うので何も入力せずにEnterを押す) Please specify the absolute path to the version control repository, or leave it blank to use Trac without a repository. You can also set the repository location later. Path to repository [/path/to/repos]> /var/svn/sample (Subversionリポジトリを指定する。作成しておいたSubversionリポジトリの場所を指定する) Creating and Initializing Project : (略) --------------------------------------------------------------------- Project environment for 'My Project' created. You may now configure the environment by editing the file: /var/trac/sample/conf/trac.ini If you'd like to take this new project environment for a test drive, try running the Trac standalone web server `tracd`: tracd --port 8000 /var/trac/sample Then point your browser to http://localhost:8000/sample. There you can also browse the documentation for your installed version of Trac, including information on further setup (such as deploying Trac to a real web server). The latest documentation can also always be found on the project website: http://trac.edgewall.org/ Congratulations!
-u www-data trac-admin /var/trac/sample permission add admin TRAC_ADMIN
-u www-data nano /var/trac/sample/conf/trac.ini
以下の内容を追記
[account-manager] hash_method = HtDigestHashMethod htdigest_realm = trac password_file = /var/trac/htdigest password_store = HtDigestStore [components] acct_mgr.* = enabled iniadmin.* = enabled
/etc/init.d/apache2 reload
http://ホスト名/trac/ (Tracプロジェクトが一覧で表示)http://ホスト名/trac/sample(Tracプロジェクトが表示)http://ホスト名/svn (Digest認証のダイアログが表示)