バージョン管理 Archive
さくらインターネットでCVSを利用する
- 2009-07-02 (木)
- バージョン管理
レンタルスペース(さくらインターネット)でCVSリポジトリを作成してみようと思い立った。
筆者は基本的に、WEBサイトの開発環境はローカル(windows xp + eclipse)で行っている。
普段は外付けHDDにvmwareの仮想OS(CentOS)を入れていて、そこでsubversionを利用してバージョン管理している。
vmwareはさすがに動作が重いので、普段はvmware関連のサービスは切っておいて、必要に迫られた時以外は起動しない。
それ故、いちいち起動したり停止したり面倒なのだ。
調べたところ、どうやらさくらインターネットではcvsが利用可能とのことなので早速試してみた。
■前提
1)RSA暗号とは、桁数が大きい合成数の素因数分解問題が困難であることを安全性の根拠とした公開鍵暗号の一つである
2)公開鍵暗号とは、暗号化と復号に別個の鍵(手順)を使い、暗号化の為の鍵を公開できるようにした暗号方式である。
3)鍵生成アルゴリズムは事前準備にあたるアルゴリズムで、(将来暗号文を受け取りたいと思う)全てのユーザは事前に鍵生成アルゴリズムを実行しておく必要がある。ユーザが鍵生成アルゴリズムを実行すると、アルゴリズムはそのユーザの公開鍵および秘密鍵(と呼ばれるデータ)を出力する。
4)公開鍵は暗号文を作成するのに使い、秘密鍵はその暗号文からメッセージを復元するのに使う。
5)ユーザは鍵生成アルゴリズムを実行する際、セキュリティ・パラメータ(パスフレーズ)という値をこのアルゴリズムに入力する。セキュリティ・パラメータ(パスフレーズ)は、秘密鍵なしで暗号文の解読がどれだけ困難かの尺度である。さらに鍵生成アルゴリズムには乱数も入力される。
6)鍵生成アルゴリズムは実行ごとに異なる乱数を選ぶので、ユーザ毎に異なる公開鍵・秘密鍵ペアが割りふられる。各ユーザは秘密鍵を秘密裏に保管し、公開鍵を皆に公開する。よってユーザの秘密鍵を知っているのはそのユーザ自身だけであるが、それに対しユーザの公開鍵を知っているのは全てのユーザである。公開鍵、秘密鍵をそれぞれ暗号化鍵、復号鍵ともいう。
– 以上、wikipediaより引用
1.サーバにログイン
2.$HOMEでcvsrootディレクトリを作成
$ mkdir cvsroot
3.リポジトリの作成
cvs -d $HOME/cvsroot init
4.鍵の生成(eclipse編)
eclipseのバージョン:
1)ウィンドウ>設定>一般>ネットワーク接続>SSH2を選択
2)「鍵管理タブ」を選択し、「RSA鍵の生成」を押下
3)「パスフレーズ」及び「パスフレーズの確認」に任意の値を設定する
4)「秘密鍵の保管」ボタンを押下
保管場所は「一般」タブの「SSH2ホーム」に設定されているディレクトリになる。
5)「OK」を押下
5.サーバ側の設定
1)$HOMEに.sshディレクトリを作成
$ mkdir .ssh
2)4で作成した公開鍵(id_rsa.pub)を1)で作成した.sshディレクトリにアップロード
3)公開鍵の名前変更
$ cd $HOME/.ssh
$ mv id_rsa.pub authorized_keys
6.再びeclipseの設定
1)ウィンドウ>パースペクティブを開く>その他でCVSリポジトリー・エクスプローラーを選択
2)現れたCVSリポジトリービュー内で右クリック>新規>リポジトリ・ロケーションを選択
3)必要事項の記入
ホスト:ホスト名またはIP
リポジトリー・パス:3で作成したリポジトリパス(今回のケースは「/home/[アカウント名]/cvsroot」)
ユーザ:レンタルサーバのアカウント名
パスワード:レンタルサーバのパスワード
接続タイプ:extssh
んで試しにeclipse上の既存プロジェクトをチェックインしてみる。
ちゃんとでけた。
- コメント: 0
- Trackbacks: 0
eclipseからSubversionのリポジトリに接続(subclipse)
- 2009-06-25 (木)
- バージョン管理
LinuxへのSubversionのインストールが終了したので、クライアント(Windows eclipse)からsvn接続してみる。
【サーバ(Subversion)環境】
バージョン:1.6.2
リポジトリルート:/home/svn
テストリポジトリ:/home/svn/test
【クライアント(Eclipse)環境】
バージョン:3.4.2
■subclipseのインストール
ヘルプ>ソフトウェア更新>使用可能なソフトウェア に以下のサイトを追加。
http://subclipse.tigris.org/update_1.6.x
■リポジトリ・ロケーションの作成
svn://xxx.xxx.xxx.xxx(サーバのIP)/test
エラーが出た。
Unsupported FS format
svn: Expected FS format ‘2′; found format ‘4′
ちょっと調べたけどよく分からん。
FS(ファイルシステム?)のバージョンが違うって感じのエラーかな・・・。
サーバ側でリポジトリを作成する時に以下のようにしたところ繋がった。
svnadmin create /home/svn/test –pre-1.5-compatible
※)たぶんデフォルトだと–pre-1.6-compatibleだと思う
subclipseが1.6.2に対応していないのかな・・・。
でも一応1.6.xのサイトからダウンロードしてるのになぁ・・・。
まぁ仕方ないから1.5のフォーマットで良いことにしよう。
どうせ仕事で自分がSubversionサーバの管理者になることは無いだろうし。
気楽にいこーっと。
- コメント: 0
- Trackbacks: 0
linuxへのSubversionのインストール
- 2009-06-25 (木)
- バージョン管理
subversionのインストール
# wget http://subversion.tigris.org/downloads/subversion-1.6.2.tar.gz
# tar zxvf subversion-1.6.2.tar.gz
# cd subversion-1.6.2
# ./configure –with-apr=/usr/local/apache2 –with-apr-util=/usr/local/apache2 –with-apxs=/usr/local/apache2/bin/apxs –with-ssl
ここでエラー発生
–ここから
configure: Configuring Subversion 1.6.2
configure: creating config.nice
checking for gcc… gcc
checking for C compiler default output file name… a.out
checking whether the C compiler works… yes
checking whether we are cross compiling… no
checking for suffix of executables…
checking for suffix of object files… o
checking whether we are using the GNU C compiler… yes
checking whether gcc accepts -g… yes
checking for gcc option to accept ISO C89… none needed
checking for g++… g++
checking whether we are using the GNU C++ compiler… yes
checking whether g++ accepts -g… yes
checking how to run the C preprocessor… gcc -E
checking build system type… i686-pc-linux-gnu
checking host system type… i686-pc-linux-gnu
checking target system type… i686-pc-linux-gnu
checking for grep that handles long lines and -e… /bin/grep
checking for egrep… /bin/grep -E
checking whether ln -s works… yes
checking for a BSD-compatible install… /usr/bin/install -c
configure: Apache Portable Runtime (APR) library configuration
checking for APR… yes
checking APR version… 1.3.3
configure: Apache Portable Runtime Utility (APRUTIL) library configuration
checking for APR-util… yes
checking APR-UTIL version… 1.3.4
checking for pkg-config… /usr/bin/pkg-config
configure: checking neon library
checking for neon-config… no
An appropriate version of neon could not be found, so libsvn_ra_neon
will not be built. If you want to build libsvn_ra_neon, please either
install neon 0.28.4 on this system
or
get neon 0.28.4 from:
http://www.webdav.org/neon/neon-0.28.4.tar.gz
unpack the archive using tar/gunzip and rename the resulting
directory from ./neon-0.28.4/ to ./neon/
no suitable neon found
checking for ANSI C header files… yes
checking for sys/types.h… yes
checking for sys/stat.h… yes
checking for stdlib.h… yes
checking for string.h… yes
checking for memory.h… yes
checking for strings.h… yes
checking for inttypes.h… yes
checking for stdint.h… yes
checking for unistd.h… yes
configure: looking for apr_memcache as part of apr-util
checking apr_memcache.h usability… yes
checking apr_memcache.h presence… yes
checking for apr_memcache.h… yes
checking for apr_memcache_create in -laprutil-1… yes
checking for Apache module support via DSO through APXS… found at /usr/local/apache2/bin/apxs
checking httpd version… recent enough
checking whether Apache version is compatible with APR version… yes
configure: checking sqlite library
amalgamation not found at /usr/local/src/subversion-1.6.2/sqlite-amalgamation/sqlite3.c
checking sqlite3.h usability… yes
checking sqlite3.h presence… yes
checking for sqlite3.h… yes
checking sqlite library version (via header)… unsupported SQLite version
checking sqlite library version (via pkg-config)… none or unsupported 3.3
no
An appropriate version of sqlite could not be found. We recommmend
3.6.13, but require at least 3.4.0.
Please either install a newer sqlite on this system
or
get the sqlite 3.6.13 amalgamation from:
http://www.sqlite.org/sqlite-amalgamation-3.6.13.tar.gz
unpack the archive using tar/gunzip and copy sqlite3.c from the
resulting directory to:
/usr/local/src/subversion-1.6.2/sqlite-amalgamation/sqlite3.c
This file also ships as part of the subversion-deps distribution.
configure: error: Subversion requires SQLite
–ここまで
依存するファイルのダウンロード
# cd /usr/local/src
# wget http://subversion.tigris.org/downloads/subversion-deps-1.6.2.tar.gz
# tar zxvf subversion-deps-1.6.2.tar.gz
# ./configure –with-apr=/usr/local/apache2 –with-apr-util=/usr/local/apache2 –with-apxs=/usr/local/apache2/bin/apxs –with-ssl
★トラックバック:http://ueblog.natural-wave.com/2009/03/30/subversion-install/
今度は成功。makeする
# make
なげぇ・・・
# make install
で、インストール終了らしい。
★設定いろいろ
1.svnグループ・svnユーザの作成
2.リポジトリを格納するディレクトリを作成
/home/svn
3.xinetdの設定
/etc/xinetd.d/svnserve
service svnserve
{
disable = no
socket_type = stream
wait = no
user = svn
server = /usr/bin/svnserve
server_args = -i -r /home/svn
log_on_failure += USERID
}
4./etc/servicesの編集
svnserve 3690/tcp # Subversion
svnserve 3690/udp # Subversion
※)すでにsvnがある場合は上記に書き換える
5.サービスに登録
chkconfig –add svnserve
6.xinetdの再起動
service xinetd restart
7.リポジトリの作成
svnadmin create /home/svn/test
8.svnserve.confの設定
/home/svn/test/conf/svnserve.conf
anon-access = none # Anonymous(匿名)ユーザ
auth-access = write # 認証済みユーザ
password-db = passwd # パスワードファイル名
9.パスワードの設定
/home/svn/test/conf/passwd
harry = harryssecret
※)アクセス権を変更しておく
chmod 600 passwd
chown svn:svn passwd
10.ディレクトリの作成
svn mkdir -m ’setup trunk’ file:///home/svn/test/trunk
svn mkdir -m ’setup trunk’ file:///home/svn/test/tags
svn mkdir -m ’setup trunk’ file:///home/svn/test/branches
- コメント: 0
- Trackbacks: 0
Subversionをインストールした後のApacheの挙動
- 2009-06-24 (水)
- バージョン管理
linux(CentOS)にSubversionをインストールした後、Apacheが起動しなくなっていることに気づいた。
こんなエラーがでる。
httpd: Syntax error on line 54 of /usr/local/apache2/conf/httpd.conf: Cannot load /usr/local/apache2/modules/mod_dav_svn.so into server: /usr/local/apache2/modules/mod_dav_svn.so: undefined symbol: dav_register_provider
そういやSubversionってhttpでやり取りできるんだっけ。
取りあえずWEBベースでバージョン管理を行う気はないので、httpd.confから該当箇所をコメントアウトすることで対処することにした。
#LoadModule dav_svn_module modules/mod_dav_svn.so
#LoadModule authz_svn_module modules/mod_authz_svn.so
SubversionとApacheの連携を保持したままこの問題を解決する為には、以下のサイトを見ると良いかも。
といっても詳しく読んでないのでこれで直るかは未検証。
http://www.battlefield.jp/modules/xeblog/?action_xeblog_details=1&blog_id=14
- コメント: 0
- Trackbacks: 0
- カウンター
-
- 今日 : 29
- 累計 : 26,778
- 現在の閲覧者数: 2
- ランキング
-
- RSSフィード
- ブログ内検索
- おすすめレンタルサーバ
-
おすすめ度:★★★
当ブログのposifeel.comドメインはさくらインターネットのサーバで運営しています。OSはUNIX互換FreeBSD。SSHでリモート操作ができるので自由度が高く、ましぇたん一押し。Root権限がいらないソフトならインストールし放題です。CSVなどのバージョン管理ソフトもインストール可能。UNIX、Linux系のサーバーのお勉強には持ってこいです。
おすすめ度:★★
毎度おなじみのナウでヤングなロリポップ。僕も以前は使っていました。おすすめ度は高いです・・・が。リモート接続でOSを直に操作することが出来ないため、ある程度、知識のある人にとっては物足りないかもしれません。とにかく安く簡単なレンタルサーバをお探しでしたら一押しです。初心者向き。
おすすめ度:???
ロリポップの対抗馬!?最近、注目しているレンサバです。価格もサービスもロリポップと近いかも。ナウでヤングじゃない方はこちらを(ry 初心者向き
- Link
-
他に運営しているブログです。僕の日常的な事はめもりーにょで書いています。
-
相互リンク募集中!
- アーカイブ
- アクセスアップツール
-
BLOGOOLE BLOG情報
SEO対策
windows
Linux
apache
eclipse
プログラミング
- エディタ
-
- ログール
- メタ