PHP: Difference between revisions
From Leo's Notes
This page was last edited on 29 April 2013, at 07:45.
No edit summary |
|||
| Line 3: | Line 3: | ||
== Installation == | == Installation == | ||
The instructions here will enable you to compile (the latest version of) PHP for a prepackaged apache install. The trick is to have <code>httpd-devel</code> installed which will have the <code>apxs2</code> binaries necessary to build PHP for apache. This is useful as PHP is not updated as frequently as desired for CentOS. | |||
On CentOS (or any other RHEL based distro), run: | On CentOS (or any other RHEL based distro), run: | ||
Revision as of 07:45, 29 April 2013
PHP is a crappy server side scripting "language". My love affair with it is definitely long gone.
Installation
The instructions here will enable you to compile (the latest version of) PHP for a prepackaged apache install. The trick is to have httpd-devel installed which will have the apxs2 binaries necessary to build PHP for apache. This is useful as PHP is not updated as frequently as desired for CentOS.
On CentOS (or any other RHEL based distro), run:
# Install rpmforge repo wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt rpm -K rpmforge-release-0.5.2-2.el6.rf.*.rpm rpm -i rpmforge-release-0.5.2-2.el6.rf.*.rpm # Install all prerequisites. yum -y install make autoconf g++ gcc-c++ libtermcap-devel libgcc-c++ libtool gcc libpng-devel libjpeg-devel libxml1-devel libxml2-devel curl curl-devel libmcrypt libmcrypt-devel libtool-ltdl-devel libxml2.x86_64 libxml2-devel.x86_64 curl-devel.x86_64 openssl-devel httpd-devel # Compile PHP # Go to the PHP source directory, then run: ./configure --prefix=/opt/php5 --with-apxs2 --with-config-file-path=/etc/ --with-gd --enable-shmop --enable-ftp --enable-sockets --enable-exif --enable-zip --enable-sysvsem --with-zlib --enable-sysvshm --with-jpeg-dir --with-png-dir --enable-mbstring --enable-embedded-mysqli=shared --with-curl --with-mcrypt --with-mysql --with-mysqli