BreadCrumbs: PHP Install
PHP Install
From Luke Jackson
(Difference between revisions)
Revision as of 21:57, 11 July 2007 (edit) Ljackson (Talk | contribs) (→Satisfy Dependencies) ← Previous diff |
Revision as of 21:59, 11 July 2007 (edit) Ljackson (Talk | contribs) Next diff → |
||
Line 1: | Line 1: | ||
+ | == Install Script == | ||
+ | |||
+ | <pre> | ||
+ | VERSION="5.2.2" | ||
+ | |||
+ | echo "--> Installing PHP" | ||
+ | echo $VERSION | ||
+ | |||
+ | rm -rf php-$VERSION | ||
+ | tar xvzf php-$VERSION.tar.gz | ||
+ | |||
+ | cd php-$VERSION | ||
+ | |||
+ | ./configure \ | ||
+ | --prefix=/usr/local/php5 \ | ||
+ | --build=i387-redhat-linux \ | ||
+ | --host=i386-redhat-linux \ | ||
+ | --target=i386-redhat-linux-gnu \ | ||
+ | --with-config-file-path=/www \ | ||
+ | --enable-force-cgi-redirect \ | ||
+ | --disable-safe-mode \ | ||
+ | --enable-versioning \ | ||
+ | --with-mysql=/usr/local \ | ||
+ | --with-dbase \ | ||
+ | --enable-ftp \ | ||
+ | --enable-sysvsem \ | ||
+ | --enable-sysvshm \ | ||
+ | --enable-shmop \ | ||
+ | --with-gd \ | ||
+ | --enable-gd-native-ttf \ | ||
+ | --with-ttf \ | ||
+ | --with-freetype-dir \ | ||
+ | --with-jpeg-dir=/usr/local \ | ||
+ | --with-zlib \ | ||
+ | --enable-libgcc \ | ||
+ | --enable-mbstring \ | ||
+ | --enable-xslt \ | ||
+ | --with-xslt-sablot \ | ||
+ | --with-gettext \ | ||
+ | --with-zip \ | ||
+ | --with-bz2 \ | ||
+ | --with-iconv \ | ||
+ | --enable-exif \ | ||
+ | --enable-bcmath \ | ||
+ | --with-openssl \ | ||
+ | --enable-sockets \ | ||
+ | --with-xmlrpc \ | ||
+ | |||
+ | make | ||
+ | make install | ||
+ | mkdir /www/cgi-bin/php5 | ||
+ | install /usr/local/php5/bin/php /www/cgi-bin/php5 | ||
+ | </pre> | ||
+ | |||
== Common Errors == | == Common Errors == | ||
Revision as of 21:59, 11 July 2007
Install Script
VERSION="5.2.2" echo "--> Installing PHP" echo $VERSION rm -rf php-$VERSION tar xvzf php-$VERSION.tar.gz cd php-$VERSION ./configure \ --prefix=/usr/local/php5 \ --build=i387-redhat-linux \ --host=i386-redhat-linux \ --target=i386-redhat-linux-gnu \ --with-config-file-path=/www \ --enable-force-cgi-redirect \ --disable-safe-mode \ --enable-versioning \ --with-mysql=/usr/local \ --with-dbase \ --enable-ftp \ --enable-sysvsem \ --enable-sysvshm \ --enable-shmop \ --with-gd \ --enable-gd-native-ttf \ --with-ttf \ --with-freetype-dir \ --with-jpeg-dir=/usr/local \ --with-zlib \ --enable-libgcc \ --enable-mbstring \ --enable-xslt \ --with-xslt-sablot \ --with-gettext \ --with-zip \ --with-bz2 \ --with-iconv \ --enable-exif \ --enable-bcmath \ --with-openssl \ --enable-sockets \ --with-xmlrpc \ make make install mkdir /www/cgi-bin/php5 install /usr/local/php5/bin/php /www/cgi-bin/php5
Common Errors
If you do not have gcc installed you will receive the following error:
configure: error: no acceptable cc found in $PATH
If you do not have openssl, openssl-devel installed you will receive the following error:
configure: error: Cannot find OpenSSL's <evp.h>
If you do not have libpng, libpng-devel installed you will receive the following error:
configure: error: libpng.(a|so) not found.
If you do not have freetype, freetype-devel installed you will receive the following error:
configure: error: freetype2 not found!
Satisfy Dependencies
yum install gcc flex libxml2 libxml2-devel openssl openssl-devel bzip2 bzip2-devel libjpeg libjpeg-devel gd libpng libpng-devel freetype freetype-devel