Created
July 19, 2013 19:11
-
-
Save combatpoodle/6041617 to your computer and use it in GitHub Desktop.
Generate PHP RPM with apc, xdebug, memcache, imagick from PECL on RHEL/CentOS/Amazon Linux
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd ~ && | |
sudo yum -y install mysql libtiff libXpm t1lib libc-client libmcrypt libtool-ltdl libicu cyrus-sasl-ldap freetds unixODBC aspell recode net-snmp libtidy ImageMagick libxslt libxml2 && | |
sudo yum -y install libxml2-devel ImageMagick-c++-devel ImageMagick-devel aspell-devel freetds-devel libXpm-devel libc-client-devel libicu-devel libmcrypt-devel libtidy-devel libtiff-devel libtool-ltdl-devel libxslt-devel mysql-devel net-snmp-devel recode-devel t1lib-devel unixODBC-devel pcre-devel libcurl-devel libpng-devel libtiff-devel libjpeg-devel gmp-devel openldap-devel readline-devel libedit-devel && | |
sudo yum -y install rubygems gcc ruby-devel && | |
sudo gem install fpm && | |
wget http://www.php.net/distributions/php-5.4.17.tar.bz2 && | |
bunzip2 php-5.4.17.tar.bz2 && | |
tar -xvf php-5.4.17.tar && | |
cd php-5.4.17 && | |
./configure '--build=x86_64-redhat-linux-gnu' '--host=x86_64-redhat-linux-gnu' '--target=x86_64-amazon-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/lib64' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/var/lib' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--cache-file=../config.cache' '--with-libdir=lib64' '--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php.d' '--disable-debug' '--with-pic' '--disable-rpath' '--without-pear' '--with-bz2' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--with-xpm-dir=/usr' '--enable-gd-native-ttf' '--with-t1lib=/usr' '--without-gdbm' '--with-gettext' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' '--with-pcre-regex=/usr' '--with-zlib' '--with-layout=GNU' '--enable-exif' '--enable-ftp' '--enable-sockets' '--with-kerberos' '--enable-shmop' '--enable-calendar' '--with-libxml-dir=/usr' '--enable-xml' '--with-mhash' '--libdir=/usr/lib64/php' '--enable-pcntl' '--with-imap=shared' '--with-imap-ssl' '--enable-mbstring=shared' '--enable-mbregex' '--with-gd=shared' '--enable-bcmath=shared' '--without-db4' '--with-xmlrpc=shared' '--with-ldap=shared' '--with-ldap-sasl' '--enable-mysqlnd=shared' '--with-mysql=shared,mysqlnd' '--with-mysqli=shared,mysqlnd' '--enable-dom=shared' '--without-pgsql' '--enable-wddx=shared' '--with-snmp=shared,/usr' '--enable-soap=shared' '--with-xsl=shared,/usr' '--enable-xmlreader=shared' '--enable-xmlwriter=shared' '--with-curl=shared' '--enable-pdo=shared' '--without-pdo-odbc' '--with-pdo-mysql=shared,mysqlnd' '--without-pdo-dblib' '--enable-json=shared' '--enable-zip=shared,/usr' '--with-readline' '--with-libedit' '--with-pspell=shared' '--enable-phar=shared' '--with-mcrypt=shared,/usr' '--with-tidy=shared,/usr' '--with-mssql=shared,/usr' '--enable-sysvmsg=shared' '--enable-sysvshm=shared' '--enable-sysvsem=shared' '--enable-posix=shared' '--without-unixODBC' '--enable-fileinfo=shared' '--enable-intl=shared' '--with-icu-dir=/usr' '--with-enchant=no' '--without-recode' --without-pdo-sqlite --enable-fpm --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/libexec --sysconfdir=/etc --sharedstatedir=/usr/share --localstatedir=/var --libdir=/usr/lib64 --includedir=/usr/include --datarootdir=/usr/share --datadir=/usr/share --infodir=/usr/share/info --localedir=/usr/share/locale --mandir=/usr/share/man --docdir=/usr/share/doc --htmldir=/usr/share/doc/html --pdfdir=/usr/share/doc/pdf && | |
make && | |
sudo mkdir -p /tmp/installer && | |
sudo make install install-modules install-binaries install-build install-headers install-programs install-pharcmd && | |
sudo make INSTALL_ROOT=/tmp/installer install install-headers install-modules install-binaries install-build install-programs install-pharcmd && | |
cd ~/php-5.4.17/ext && | |
rm -rf imagick* xdebug* memcache* && | |
wget http://pecl.php.net/get/imagick && | |
tar -xvzf imagick* && | |
cd imagick-* && | |
phpize && | |
./configure && | |
make INSTALL_ROOT=/tmp/installer && | |
sudo make INSTALL_ROOT=/tmp/installer install && | |
cd ~/php-5.4.17/ext && | |
wget http://pecl.php.net/get/xdebug && | |
tar -xvzf xdebug* && | |
cd xdebug-* && | |
phpize && | |
./configure && | |
make INSTALL_ROOT=/tmp/installer && | |
sudo make INSTALL_ROOT=/tmp/installer install && | |
cd ~/php-5.4.17/ext && | |
wget http://pecl.php.net/get/memcache && | |
tar -xvzf memcache* && | |
cd memcache-* && | |
phpize && | |
./configure && | |
make INSTALL_ROOT=/tmp/installer && | |
sudo make INSTALL_ROOT=/tmp/installer install && | |
cd ~/php-5.4.17/ext && | |
wget http://pecl.php.net/get/apc && | |
tar -xvzf apc* && | |
cd APC-* && | |
phpize && | |
./configure && | |
make INSTALL_ROOT=/tmp/installer && | |
sudo make INSTALL_ROOT=/tmp/installer install && | |
sudo mkdir -p /tmp/installer/etc/rc.d/init.d/ && | |
sudo cp -a /etc/rc.d/init.d/php-fpm /tmp/installer/etc/rc.d/init.d/php-fpm && | |
cd ~ && | |
sudo fpm -s dir -t rpm -n php -v 5.4.17 -C /tmp/installer -d 'freetype' -d 'libxml2' -d 'readline' -d 'mysql' -d 'pcre' -d 'sqlite' -d 'bzip2' -d 'curl' -d 'gdbm' -d 'libjpeg' -d 'libpng' -d 'libtiff' -d 'libXpm' -d 't1lib' -d 'gmp' -d 'libc-client' -d 'libmcrypt' -d 'libtool-ltdl' -d 'zlib' -d 'libidn' -d 'libicu' -d 'cyrus-sasl' -d 'cyrus-sasl-ldap' -d 'openldap' -d 'freetds' -d 'unixODBC' -d 'aspell' -d 'libedit' -d 'recode' -d 'net-snmp' -d 'libtidy' -d 'ImageMagick' -d 'db4' -d 'db4' -d 'libxslt' -d 'zlib' -d 'libjpeg' -d 'libpng' -d 'libX11' -d 'bash' . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment