CentOS 5 で既存 Subversion リポジトリを Git から使えるようにする

Git 参考にしたもの git-svnを使って既存のSVNリポジトリでGitを使う方法のメモ - Hello, world! - s21g git-svnメモ - I sort my thought… インストール 標準パッケージに Git はないので、RPMForge を yum で使う設定が必要 CentOS 5.2 で yum の対象リポジトリに RPMforge を追加するには - Tosshi Note # yum install –enablerepo=rpmforge (省略) Dependencies Resolved Package Arch Version Repository Size Installing for dependencies: git i386 1.5.2.1-1.el5.rf rpmforge 27 M perl-Compress-Zlib i386 1.42-1.fc6 base 52 k perl-Error noarch 0.17015-1.el5.rf rpmforge 27 k perl-Git i386 1.5.2.1-1.el5.rf rpmforge 18 k perl-HTML-Parser i386 3.55-1.fc6 base 92 k perl-HTML-Tagset noarch 3.10-2.1.1 base 15 k perl-libwww-perl noarch 5.805-1.1.1 base 376 k subversion-perl i386 1.4.2-2.el5 base 748 k Transaction Summary Install 8 Package(s) Update 0 Package(s) Remove 0 Package(s) Total download size: 28 M (省略) Running Transaction Installing: perl-Error ######################### [1/8] Installing: subversion-perl ######################### [2/8] Installing: perl-HTML-Tagset ######################### [3/8] Installing: perl-HTML-Parser ######################### [4/8] Installing: perl-Compress-Zlib ######################### [5/8] Installing: perl-libwww-perl ######################### [6/8] Installing: perl-Git ######################### [7/8] Installing: git ######################### [8/8] Dependency Installed: git.i386 0:1.5.2.1-1.el5.rf perl-Compress-Zlib.i386 0:1.42-1.fc6 perl-Error.noarch 0:0.17015-1.el5.rf perl-Git.i386 0:1.5.2.1-1.el5.rf perl-HTML-Parser.i386 0:3.55-1.fc6 perl-HTML-Tagset.noarch 0:3.10-2.1.1 perl-libwww-perl.noarch 0:5.805-1.1.1 subversion-perl.i386 0:1.4.2-2.el5 Complete! ...

2009年1月16日 · Toshimitsu Takahashi

CentOS 5 に Plone 3.1 をインストールしたのでその手順

Python の有名な CMS である Plone を入れてみることにしました。現在の最新リリースは 3.1.7 のようです。 Plone 4 : パワフルで高速なCMS — Plone - エンタープライズ・オープンソースCMS Plone Users Group Japan に日本語の情報があります。 ダウンロード http://plone.org/products/plone の Get Plone for Linux/BSD/Unix (33MB) Unified Installer - for Linux/BSD/OS X/UNIX/Solaris (compiles and installs) を使います。 % wget http://launchpad.net/plone/3.1/3.1.7/+download/Plone-3.1.7ex-UnifiedInstaller.tgz % tar zxvf Plone-3.1.7ex-UnifiedInstaller.tgz % cd Plone-3.1.7ex-UnifiedInstaller インストール README.txt によると、install.sh をたたくだけでインストールできるようです。 Python は /usr のものを使いたいので –with-Python オプションで指定しました。–target でインストールディレクトリを指定します。デフォルトは /opt/Plone-3.1 になるみたいです。私は、/proj に何か試すときはいつも入れているので、そちらを指定しました。サービスユーザーとしてデフォルトで plone が追加されます。これはそのままにしました。 % sudo ./install.sh --target=/proj/Plone-3.1 --with-python=/usr/bin/python standalone Stand-Alone Zope Instance selected Detailed installation log being written to /home/tosshi/plone/Plone-3.1.7ex-UnifiedInstaller/install.log \\nTesting /usr/bin/python for Zope/Plone requirements.... Warning: the Python Imaging Library is missing. We'll try to build it, but watch for problems. /usr/bin/python looks OK. We'll try to use it. Root install method chosen Installing Plone 3.1.6 at /proj/Plone-3.1 Creating python virtual environment... New python executable in /proj/Plone-3.1/Python-2.4/bin/python Installing setuptools.............done. Skipping zlib compile and install Skipping libjpeg compile/install Skipping readline compile/install Python found at /proj/Plone-3.1/Python-2.4/bin/python; Skipping Python install. Installing PIL Installing Cheetah template engine Unpacking buildout cache to /proj/Plone-3.1/buildout-cache Compiling .py files in egg cache id: plone: そのようなユーザは存在しません Adding user account 'plone' to system ... Generating random password ... Copying standalone buildout template Running buildout Creating directory '/proj/Plone-3.1/zinstance/parts'. Creating directory '/proj/Plone-3.1/zinstance/develop-eggs'. Installing plone. Installing zope2. running build_ext creating zope.proxy copying zope/proxy/proxy.h -> zope.proxy building 'AccessControl.cAccessControl' extension creating build creating build/temp.linux-i686-2.4 creating build/temp.linux-i686-2.4/AccessControl (省略) running build_ext Installing productdistros. Installing instance. Generated script '/proj/Plone-3.1/zinstance/bin/instance'. Generated script '/proj/Plone-3.1/zinstance/bin/repozo'. Installing zopepy. Generated interpreter '/proj/Plone-3.1/zinstance/bin/zopepy'. Installing zopeskel. Generated script '/proj/Plone-3.1/zinstance/bin/paster'. Installing chown. chown: Running chmod 600 .installed.cfg find /proj/Plone-3.1/zinstance -type d -name var -exec chown -R plone \\{\\} \\; find /proj/Plone-3.1/zinstance -type d -name LC_MESSAGES -exec chown -R plone \\{\\} \\; find /proj/Plone-3.1/zinstance -name runzope -exec chown plone \\{\\} \\; Unused options for chown: 'update-command'. Installing unifiedinstaller. Generated script '/proj/Plone-3.1/zinstance/bin/plonectl'. Installing precompile. precompiling python scripts in /proj/Plone-3.1/zinstance/products precompiling python scripts in /proj/Plone-3.1/zinstance/parts/productdistros precompiling python scripts in /proj/Plone-3.1/zinstance/parts/plone Creating Plone site... This is the first start of this instance. Creating Data.fs and a Plone site. We only need to do this once, but it takes some time. Creating Plone site at /Plone in ZODB... Installed Plone standard content Finished adding Plone site ##################################################################### ###################### Installation Complete ###################### Plone successfully installed at /proj/Plone-3.1 See /proj/Plone-3.1/zinstance/README.txt for startup instructions Use the account information below to log into the Zope Management Interface The account has full 'Manager' privileges. Username: admin Password: xxxxxxxxx This account is created when the object database is initialized. If you change the password later, you'll need to use the new password. Ask for help on plone-users list or #plone Submit feedback and report errors at http://dev.plone.org/plone . For install problems, specify component "Installer (Unified)." 上記のとおり、Zope の初期アカウントの Username と Password が表示されます。/proj/Plone-3.1/zinstance/adminPassword.txt にあるのでメモし忘れても平気です。 /proj/Plone-3.1/zinstance/README.txt を見ろとある。 ...

2009年1月12日 · Toshimitsu Takahashi

CentOS に慣れた人が Ubuntu を使うときの管理コマンドの対応メモ

Ubuntu の VMWare 版を使う機会があったので、メモを書いておく。 要するに Fedora (Redhat) と Debian の対応の話です。 パッケージ管理 Redhat の yum は、Debian では apt なお、Redhat 系でも apt を使うことはできる。http://ayo.freshrpms.net/ サービスのランレベルに応じた起動管理 Redhat の chkconfig は、Debian では sysv-rc-conf Ubuntu (VMWare) には sysv-rc-conf が入っていなかったのでインストール。 # apt-get install system-rc-conf sysv-rc-conf は chkconfig と異なり、コマンドベースではなく表を直接編集できる。 # sysv-rc-conf サービスの操作 もちろん、/etc/init.d/service で扱える。 Debian で Redhat の service を使うには、debian-helper-scripts をインストールすると使える。 # apt-get install debian-helper-scripts

2009年1月9日 · Toshimitsu Takahashi

CentOS 5 で NFS デーモンのプロセス数を変えるには

VMWare で動かしている CentOS 上で NFS を起動しているが、たまに Mac から接続するときくらいしか使わない。 一般的にどの OS も NFS は起動スクリプトで 8 個のプロセス(インスタンス)を起動する。こんなにいらないので減らすことにした。 /etc/sysconfig/nfs の RPCNFSDCOUNT でスタート時のプロセス数を設定できる。とりあえず半分にしてみる。 /etc/sysconfig/nfs # Number of nfs server processes to be started. # The default is 8. RPCNFSDCOUNT=4 反映 # service nfs restart # ps -ef | grep nfs root 2422 7 0 16:43 ? 00:00:00 \[nfsd4\] root 2423 1 0 16:43 ? 00:00:00 \[nfsd\] root 2424 1 0 16:43 ? 00:00:00 \[nfsd\] root 2425 1 0 16:43 ? 00:00:00 \[nfsd\] root 2426 1 0 16:43 ? 00:00:00 \[nfsd\] ということで減りました。

2009年1月6日 · Toshimitsu Takahashi

CentOS 5 で増設したハードディスクをマウントするには

CentOS 5.2 において IDE 接続した二番目の HDD を /storage としてマウントするまでの手順をまとめた。 fdisk で領域作成 二番目の IDE 接続しているディスク /dev/hdb を指定する。 # fdisk /dev/hdb デバイスは正常な DOS 領域テーブルも、Sun, SGI や OSF ディスクラベルも 含んでいません 新たに DOS ディスクラベルを作成します。あなたが書き込みを決定するまで、変更は メモリ内だけに残します。その後はもちろん以前の内容は修復不可能になります。 このディスクのシリンダ数は 26630 に設定されています。 間違いではないのですが、1024 を超えているため、以下の場合 に問題を生じうる事を確認しましょう: ブート時に実行するソフトウェア (例. バージョンが古い LILO) 別の OS のブートやパーティション作成ソフト (例. DOS FDISK, OS/2 FDISK) 警告: 領域テーブル 4 の不正なフラグ 0x0000 は w(書き込み)によって 正常になります コマンド (m でヘルプ): p Disk /dev/hdb: 12.8 GB, 12884901888 bytes 15 heads, 63 sectors/track, 26630 cylinders Units = シリンダ数 of 945 * 512 = 483840 bytes デバイス Boot Start End Blocks Id System コマンド (m でヘルプ): n コマンドアクション e 拡張 p 基本領域 (1-4) p 領域番号 (1-4): 1 最初 シリンダ (1-26630, default 1): Using default value 1 終点 シリンダ または +サイズ または +サイズM または +サイズK (1-26630, default 26630): Using default value 26630 コマンド (m でヘルプ): p Disk /dev/hdb: 12.8 GB, 12884901888 bytes 15 heads, 63 sectors/track, 26630 cylinders Units = シリンダ数 of 945 * 512 = 483840 bytes デバイス Boot Start End Blocks Id System /dev/hdb1 1 26630 12582643+ 83 Linux コマンド (m でヘルプ): w 領域テーブルは交換されました! ioctl() を呼び出して領域テーブルを再読込みします。 ディスクを同期させます。 ext3 形式でファイルシステムの作成 mkfsを使用してext3形式で領域 /dev/hdb1 のファイルシステムを作成する。 ...

2008年11月22日 · Toshimitsu Takahashi

CentOS 5.2 で yum の対象リポジトリに RPMforge を追加するには

RPMforge (http://rpmrepo.org/RPMforge) はサードパーティ製のRPMパッケージ群のリポジトリである。lighttpd を試したかったので、yum で RPMforge を扱えるようにしたときのメモ。 http://wiki.centos.org/AdditionalResources/Repositories/RPMForge を見ると手順が書かれている。 Priorities のインストール これをインストールするのはリポジトリに優先度を付加して通常の update / upgrade 時には RPMforge などを含まないようにしておくためである。 # yum install yum-priorities cat /etc/yum/pluginconf.d/priorities.conf で確認するとデフォルトで次のようになっているはず、なっていなかったらこのとおりに修正する。 [main] enabled=1 RPMforge のパッケージをインストール 以下はテンポラリなディレクトリで行う。 パッケージをダウンロード アーキテクチャに合わせて i386 もしくは x86_64 のパッケージをダウンロードする。 $ wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.i386.rpm GPG key をインポート # rpm –import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt パッケージの認証 # rpm -K rpmforge-release-0.3.6-1.el5.rf.*.rpm パッケージをインストール # rpm -i rpmforge-release-0.3.6-1.el5.rf.*.rpm リポジトリファイルに優先度を付加 /etc/yum.repos.d/*.repo にマッチするファイルを開いて各セクションに priority=Nを定義していく。 CentOS-Base.repo # CentOS-Base.repo # This file uses a new mirrorlist system developed by Lance Davis for CentOS. # The mirror system uses the connecting IP address of the client and the # update status of each mirror to pick mirrors that are updated to and # geographically close to the client. You should use this for CentOS updates # unless you are manually picking other mirrors. ...

2008年10月9日 · Toshimitsu Takahashi

CentOS 5.2 に Dovecot で POP3 / IMAP サーバをセットアップする

昨日のエントリの続き、Dovecot を使って POP3 や IMAP でメールを読めるようにしたときのメモ。 パッケージのインストール # yum install dovecot.i386 設定 /etc/dovecot.conf プロトコルの設定 imaps pop3s は設定しているものの、SSLが未設定なので LISTEN されない。imap pop3 は多少セキュリティを高めるためにポート番号を通常から変更している。必要無ければ2行目以降は不要である。 protocols = imap imaps pop3 pop3s protocol imap { listen = *:10143 } protocol pop3 { listen = *:10110 } ログイン用の常駐プロセスの設定 メモリに余力もなく接続をどんどんするわけでもないので、キープするのは 3 から 1つに減らした。合わせてプロセスと接続の最大数も減らした。 login_processes_count = 1 login_max_processes_count = 16 login_max_connections = 32 Maildir を使用 mail_location = maildir:~/Maildir ファイアウォールの設定 /etc/sysconfig/iptables ※この例では POP は 10110番、IMAP は 10143番としている(普通は 110, 143)。 -A INPUT -p tcp -m tcp –dport 10110 -j ACCEPT -A INPUT -p tcp -m tcp –dport 10143 -j ACCEPT ...

2008年10月8日 · Toshimitsu Takahashi

CentOS 5.2 に Postfix を SMTP-AUTH 含めて外部レンタルサーバ仕様でセットアップする

VPSサーバに独自ドメインを用いてSMTPサーバをセットアップしたのでメモしておく。 スパムメール送信防止で Outbound Port 25 Blocking を行っているプロバイダーが多く、自分のところも該当している。そのため、Submission Port 587 でSMTP認証(SMTP AUTH)をサポートする必要があったのでその設定も行う。なお、SMTP 認証は PLAIN でセットアップした。 yum から必要なパッケージをインストール # yum install postfix.i386 # yum install cyrus-sasl-plain.i386 Postfix /etc/postfix/main.cf の設定 書き換え追加して設定した部分は下記のとおり。mailbox は Maildir にする。SASL の設定を追記した。 ※ホストのFQDNは mail.domain.tld で受け取るメールアドレスは user@domain.tld とする。 myhostname = mail.domain.tld mydomain = domain.tld myorigin = $mydomain mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain mynetworks_style = host home_mailbox = Maildir/ \# SMTP-Auth # smtpd\_sasl\_auth_enable = yes smtpd\_tls\_auth_only = no smtpd\_sasl\_local_domain = $myhostname smtp\_sasl\_security_options = noanonymous smtpd\_recipient\_restrictions = permit\_mynetworks, permit\_sasl\_authenticated, reject\_unau th_destination disable\_vrfy\_command = yes ※レンタルサーバは 1 ホストだけの構成として、mynetworks_style = host とホスト単体に設定した。 ...

2008年10月7日 · Toshimitsu Takahashi

Linux がインストールされている PC に Windows を上書きインストールするときの注意

普通に Windows XP のインストール CD 入れて起動したら、Hardware Inspecting みたいなテキストが出た後、ディスプレイが真っ黒状態になってしまった。 どうも Linux のパーティションを予め消しておかなければならないらしい。 一旦、Cent OS を再び起動して root でログインし、 # fdisk /dev/hda で fdisk からパーティションを削除して(d > 1 でOK)、やり直したら進んだ。最初、CD-ROM ドライブが逝ったかと思った。 ネットが無い(複数コンピュータがない)状態で OS インストールするのはかなり危険だと改めて実感した。

2008年7月5日 · Toshimitsu Takahashi

CentOS でカーネルをバージョンアップしたときに VMWare Server の再設定をするには

VMWare Server ではカーネルのバージョンを上げると再コンパイルが必要になる。 まずカーネルの確認。 $ uname -r 2.6.18-53.1.13.el5xen ノーマルもしくは xen の devel パッケージをインストール。 # yum install kernel-devel.i386 もしくは # yum install kernel-xen-devel.i386 vmware-config.pl を実行する。 $ sudo vmware-config.pl Making sure services for VMware Server are stopped. Stopping VMware services: Virtual machine monitor \[ OK \] Bridged networking on /dev/vmnet0 \[ OK \] Virtual ethernet \[ OK \] Configuring fallback GTK+ 2.4 libraries. In which directory do you want to install the mime type icons? \[/usr/share/icons\] What directory contains your desktop menu entry files? These files have a .desktop file extension. \[/usr/share/applications\] In which directory do you want to install the application's icon? \[/usr/share/pixmaps\] Trying to find a suitable vmmon module for your running kernel. None of the pre-built vmmon modules for VMware Server is suitable for your running kernel. Do you want this program to try to build the vmmon module for your system (you need to have a C compiler installed on your system)? \[yes\] Using compiler "/usr/bin/gcc". Use environment variable CC to override. What is the location of the directory of C header files that match your running kernel? \[/usr/src/linux/include\] /usr/src/kernels/2.6.18-53.1.13.el5-i686/include The directory of kernel headers (version 2.6.18-53.1.13.el5) does not match your running kernel (version 2.6.18-53.1.13.el5xen). Even if the module were to compile successfully, it would not load into the running kernel. What is the location of the directory of C header files that match your running kernel? \[/usr/src/linux/include\] /lib/modules/2.6.18-53.1.13.el5xen/build/include Extracting the sources of the vmmon module. Building the vmmon module. Using 2.6.x kernel build system. make: ディレクトリ `/tmp/vmware-config0/vmmon-only' に入ります ake -C /lib/modules/2.6.18-53.1.13.el5xen/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules make\[1\]: ディレクトリ `/usr/src/kernels/2.6.18-53.1.13.el5-xen-i686' に入ります C \[M\] /tmp/vmware-config0/vmmon-only/linux/driver.o CC \[M\] /tmp/vmware-config0/vmmon-only/linux/hostif.o CC \[M\] /tmp/vmware-config0/vmmon-only/common/cpuid.o CC \[M\] /tmp/vmware-config0/vmmon-only/common/hash.o CC \[M\] /tmp/vmware-config0/vmmon-only/common/memtrack.o CC \[M\] /tmp/vmware-config0/vmmon-only/common/phystrack.o CC \[M\] /tmp/vmware-config0/vmmon-only/common/task.o CC \[M\] /tmp/vmware-config0/vmmon-only/common/vmx86.o CC \[M\] /tmp/vmware-config0/vmmon-only/vmcore/moduleloop.o LD \[M\] /tmp/vmware-config0/vmmon-only/vmmon.o Building modules, stage 2. MODPOST CC /tmp/vmware-config0/vmmon-only/vmmon.mod.o LD \[M\] /tmp/vmware-config0/vmmon-only/vmmon.ko make\[1\]: ディレクトリ `/usr/src/kernels/2.6.18-53.1.13.el5-xen-i686' から出ます cp -f vmmon.ko ./../vmmon.o make: ディレクトリ `/tmp/vmware-config0/vmmon-only' から出ます The module loads perfectly in the running kernel. This program previously created the file /dev/vmmon, and was about to remove it. Somebody else apparently did it already. This program previously created the file /dev/vmnet0, and was about to remove it. Somebody else apparently did it already. You have already setup networking. Would you like to skip networking setup and keep your old settings as they are? (yes/no) \[no\] yes Extracting the sources of the vmnet module. Building the vmnet module. Using 2.6.x kernel build system. make: ディレクトリ `/tmp/vmware-config0/vmnet-only' に入ります make -C /lib/modules/2.6.18-53.1.13.el5xen/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules make\[1\]: ディレクトリ `/usr/src/kernels/2.6.18-53.1.13.el5-xen-i686' に入ります CC \[M\] /tmp/vmware-config0/vmnet-only/driver.o CC \[M\] /tmp/vmware-config0/vmnet-only/hub.o CC \[M\] /tmp/vmware-config0/vmnet-only/userif.o CC \[M\] /tmp/vmware-config0/vmnet-only/netif.o CC \[M\] /tmp/vmware-config0/vmnet-only/bridge.o CC \[M\] /tmp/vmware-config0/vmnet-only/procfs.o CC \[M\] /tmp/vmware-config0/vmnet-only/smac_compat.o SHIPPED /tmp/vmware-config0/vmnet-only/smac_linux.x386.o LD \[M\] /tmp/vmware-config0/vmnet-only/vmnet.o Building modules, stage 2. MODPOST WARNING: could not find /tmp/vmware-config0/vmnet-only/.smac\_linux.x386.o.cmd for /tmp/vmware-config0/vmnet-only/smac\_linux.x386.o CC /tmp/vmware-config0/vmnet-only/vmnet.mod.o LD \[M\] /tmp/vmware-config0/vmnet-only/vmnet.ko make\[1\]: ディレクトリ `/usr/src/kernels/2.6.18-53.1.13.el5-xen-i686' から出ます cp -f vmnet.ko ./../vmnet.o make: ディレクトリ `/tmp/vmware-config0/vmnet-only' から出ます The module loads perfectly in the running kernel. Shutting down http.vmware: \[ OK \] Starting httpd.vmware: \[ OK \] Please specify a port for remote console connections to use \[9002\] WARNING: VMware Server has been configured to run on a port different from the default port. Remember to use this port when connecting to this server. xinetd を停止中: \[ OK \] xinetd を起動中: \[ OK \] Configuring the VMware VmPerl Scripting API. Building the VMware VmPerl Scripting API. Using compiler "/usr/bin/gcc". Use environment variable CC to override. Installing the VMware VmPerl Scripting API. The installation of the VMware VmPerl Scripting API succeeded. Do you want this program to set up permissions for your registered virtual machines? This will be done by setting new permissions on all files found in the "/etc/vmware/vm-list" file. \[no\] Generating SSL Server Certificate In which directory do you want to keep your virtual machine files? \[/var/lib/vmware/Virtual Machines\] Do you want to enter a serial number now? (yes/no/help) \[no\] Starting VMware services: Virtual machine monitor \[ OK \] Virtual ethernet \[ OK \] Bridged networking on /dev/vmnet0 \[ OK \] Starting VMware virtual machines... \[ OK \] The configuration of VMware Server 1.0.4 build-56528 for Linux for this running kernel completed successfully. Setup found that the VMware Management Interface is installed on your machine. The VMware Management Interface configurator (/usr/bin/vmware-config-mui.pl) needs to be run. Do you want to run this program now? \[yes\] File /usr/lib/vmware-mui/apache/conf/httpd.conf is backed up to /usr/lib/vmware-mui/apache/conf/httpd.conf.old.0. Configuring httpd.conf to run Apache as: User: nobody and Group: nobody Set the number of minutes before a http session times out. (This is the length of time before someone connecting to VMware Management Interface will be logged out) \[60\] Generating SSL Server Certificate Starting httpd.vmware: \[ OK \] The configuration of VMware Management Interface completed successfully. と動かそうと思ったら、 ...

2008年2月25日 · Toshimitsu Takahashi