手順
-
Subversion、apache2およびlibapache2-svnの各パッケージをインストールします。
# apt-get install subversion apache2 libapache2-svn
-
svnディレクトリーを、システムのルートに作成します。
# mkdir /svn
-
Webserverユーザーへのディレクトリーの所有者、デフォルトではwww-data、を変更します。
# chown www-data:www-data /svn
-
www-dataユーザーに切り替えます。
# su -l www-data -s /bin/bash
-
新しいSVNリポジトリー、たとえばmy_repoを作成します。
$ svnadmin create /svn/my_repo
-
ユーザーとパスワードを作成します。
$ htpasswd -cmb /svn/passwd talend_admin secretpassword
-
SVN設定ファイルを開きます。
# vi /etc/apache2/mods-enabled/dav_svn.conf
-
次のように更新します。
<Location /my_repo> DAV svn SVNPath /svn/my_repo AuthUserFile /svn/passwd Require valid-user AuthType basic AuthName "Subversion" </Location>
-
Apache Subversionを再起動します。
# /etc/init.d/apache2 restart
-
システムでSELinux (Security-Enhanced Linux)が有効になっていて、エラーメッセージCan't open file 'db/txn-current-lock': Permission deniedが表示される場合は、以下のステップに従います。
ステップを実行しないとTalend Administration Centerでプロジェクトを作成できず、ログに以下のエラーが返されます。
警告:保存が失敗しました: org.talend.exception.BusinessException: SVN: E204900: ファイル'/var/www/svn/repository/db/txn-current-lock'を開けません: 許可は拒否されました。SVN: E175002:プロジェクト名'/svn/!svn/act/283c5381-5301-0010-9f7f-495961e572c2':500内部サーバーエラー(http://SVN-URL) --詳細については、ログファイルを参照してください
- ターミナルを開きます。
-
sestatusを使用してシステムでSELinuxが有効になっているかどうかを確認します。
システムでSELinuxが有効になっている場合、結果は次のようになります:
root@ip-172-31-9-208 ~]# sestatus SELinux status: enabled SELinuxfs mount: /sys/fs/selinux SELinux root directory: /etc/selinux Loaded policy name: targeted Current mode: enforcing Mode from config file: enforcing Policy MLS status: enabled Policy deny_unknown status: allowed Max kernel policy version: 28
-
次のコマンドで、インストールを完了します。
chcon -R -t httpd_sys_content_t /var/www/svn/repository chcon -R -t httpd_sys_rw_content_t /var/www/svn/repository