User Tools

Site Tools


Sidebar

devices:mybookworld:php

Install PHP

<note>First consider fallowing all the previous steps the WD MyBook World Edition Hacks tutorial</note> <note tip>Please read the official PHP documentation before proceeding. PHP Installation and Configuration</note>

  • Choose a directory to unpack the distribution.
# cd /tmp
# wget http://ro.php.net/get/php-5.2.5.tar.gz/from/this/mirror
  • Rename downloaded file.
# mv mirror php-5.2.5.tar.gz
  • Uncompress source archive.
# gunzip php-5.2.5.tar.gz
# tar -xvf php-5.2.5.tar
  • Change the location in unpacked distribution directory.
# cd php-5.2.5
  • Compile or install some optional shared libraries.
# /opt/bin/ipkg install libxml2
# /opt/bin/ipkg install libxslt
# /opt/bin/ipkg install zlib
# /opt/bin/ipkg install bzip2
# /opt/bin/ipkg install openssl
# /opt/bin/ipkg install openssl-dev
# /opt/bin/ipkg install php-curl
# /opt/bin/ipkg install php-gd
# /opt/bin/ipkg install php-imap
# /opt/bin/ipkg install php-ldap
# /opt/bin/ipkg install php-mbstring
# /opt/bin/ipkg install php-mysql
# /opt/bin/ipkg install php-pear
# /opt/bin/ipkg install libpng
# /opt/bin/ipkg install gettext
  • Configure the release.
# ./configure --prefix=/usr/local/php5 --with-config-file-path=/etc
--with-config-file-scan-dir=/etc/php.d --enable-cgi --enable-fastcgi
--enable-force-cgi-redirect --with-curl=shared,/opt --enable-discard-path
--with-openssl=shared,/opt --enable-ftp --with-gd=/opt --enable-gd-native-ttf
--with-freetype-dir=/opt --with-jpeg-dir=/opt --with-png-dir=/opt
--enable-exif=shared --enable-xml=shared --enable-xmlreader=shared
--with-libxml-dir=/opt --with-xpm-dir=/opt --with-xsl=shared,/opt
--with-zlib=shared,/opt --enable-mbstring --enable-mbregex --with-iconv
--with-regex=php --with-gettext=/opt --with-bz2=shared,/opt
--with-mysql=/usr/local/mysql --with-mysqli --with-mysql-sock=/tmp/mysql.sock
--with-pdo-mysql=/usr/local/mysql --with-pdo-sqlite=shared --with-sqlite=shared
--enable-calendar
  • Compile and install everything.
# make
# make test
# make install
  • Set up php.ini file.
# cp php.ini-dist /usr/local/php5/lib/php.ini
devices/mybookworld/php.txt · Last modified: 2008/04/29 12:00 (external edit)