PHPUnit のインストール続き
PHPのバージョンが低いので、それに合わせたインストールをしなければならない。
php-5.1.6 に
PHPUnit-3.x.x を入れるには・・・
Manual :: マネージャの取得によると・・・
とする。
# yum install lynx (lynx が入っていな場合)
# lynx -source http://pear.php.net/go-pear | php
Instead use http://pear.php.net/go-pear.phar for a more stable and current
version of go-pear, more suited to your PHP version.
・・・だめじゃんw
延々と待ち続ける・・・
# wget http://pear.php.net/go-pear.phar
# php go-pear.phar
Below is a suggested file layout for your new PEAR installation. To
change individual locations, type the number in front of the
directory. Type 'all' to change all of them or simply press Enter to
accept these locations.1. Installation base ($prefix) : /usr
2. Temporary directory for processing : /tmp/pear/install
3. Temporary directory for downloads : /tmp/pear/install
4. Binaries directory : /usr/bin
5. PHP code directory ($php_dir) : /usr/share/pear
6. Documentation directory : /usr/docs
7. Data directory : /usr/data
8. User-modifiable configuration files directory : /usr/cfg
9. Public Web Files directory : /usr/www
10. Tests directory : /usr/tests
11. Name of configuration file : /etc/pear.conf1-11, 'all' or Enter to continue:
:
:
:
なんか変だ?
とすると
# locate pear
というのが見つかる。
/var/www/bin/pear
う、だめじゃん。
# /var/www/bin/pear install phpunit/PHPUnit
Unknown remote channel: pear.symfony-project.com
Did not download optional dependencies: pear/Image_GraphViz, channel://pear.symfony-project.com/YAML, use --alldeps to download automatically
phpunit/PHPUnit requires PHP extension "dom"
phpunit/PHPUnit can optionally use package "pear/Image_GraphViz" (version >= 1.2.1)
phpunit/PHPUnit can optionally use package "channel://pear.symfony-project.com/YAML" (version >= 1.0.2)
phpunit/PHPUnit can optionally use PHP extension "soap"
phpunit/PHPUnit can optionally use PHP extension "xdebug" (version >= 2.0.5)
No valid packages found
install failed
手でインストールすると、
うまくいった。
# pear channel-discover pear.symfony-project.com
Adding Channel "pear.symfony-project.com" succeeded
Discovery of channel "pear.symfony-project.com" succeeded
You have new mail in /var/spool/mail/root
いざインストール。
入らない・・・
# /var/www/bin/pear install --alldeps phpunit/PHPUnit
phpunit/PHPUnit requires PHP extension "dom"
phpunit/PHPUnit can optionally use PHP extension "soap"
phpunit/PHPUnit can optionally use PHP extension "xdebug" (version >= 2.0.5)
dom がオフなのか・・・
php を再構築
# ./configure --build=i686-redhat-linux-gnu --host=i686-redhat-linux-gnu --target=i386-redhat-linux-gnu --program-prefix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man --infodir=/usr/share/info --cache-file=../config.cache --with-libdir=lib --with-config-file-path=/etc --with-config-file-scan-dir=/etc/php.d --disable-debug --with-pic --disable-rpath --without-pear --with-bz2 --with-curl --with-exec-dir=/usr/bin --with-freetype-dir=/usr --with-png-dir=/usr --enable-gd-native-ttf --without-gdbm --with-gettext --with-gmp --with-iconv=/usr/local --with-jpeg-dir=/usr --with-openssl --with-png --with-pspell --with-expat-dir=/usr --with-pcre-regex=/usr --with-zlib --with-layout=GNU --enable-exif --enable-ftp --enable-magic-quotes --enable-sockets --enable-sysvsem --enable-sysvshm--enable-sysvmsg --enable-track-vars --enable-trans-sid --enable-yp --enable-wddx --with-kerberos --enable-ucd-snmp-hack --with-unixODBC=shared,/usr --enable-memory-limit --enable-shmop --enable-calendar --enable-dbx --enable-dio --with-mime-magic=/usr/share/file/magic.mime --without-sqlite --with-libxml-dir=/usr --with-xml --with-system-tzdata --with-apxs2=/usr/sbin/apxs --without-mysql --with-gd --without-odbc --enable-dom --disable-dba --without-unixODBC --disable-pdo --enable-xmlreader --enable-xmlwriter --with-pgsq
(なんか色々オフになってる・・・)
# make && make install
もっかいインストール。
うまく行ったみたい。
# /var/www/bin/pear install --alldeps phpunit/PHPUnitDid not download optional dependencies: symfony/YAML, use --alldeps to download automatically
phpunit/PHPUnit can optionally use package "symfony/YAML" (version >= 1.0.2)
phpunit/PHPUnit can optionally use PHP extension "soap"
phpunit/PHPUnit can optionally use PHP extension "xdebug" (version >= 2.0.5)
downloading PHPUnit-3.4.15.tgz ...
Starting to download PHPUnit-3.4.15.tgz (255,036 bytes)
.....................................................done: 255,036 bytes
install ok: channel://pear.phpunit.de/PHPUnit-3.4.15