Skip to content

Instantly share code, notes, and snippets.

@zuckercode
Created September 12, 2012 11:12
Show Gist options
  • Save zuckercode/3705990 to your computer and use it in GitHub Desktop.
Save zuckercode/3705990 to your computer and use it in GitHub Desktop.
phalcon installer
#!/bin/bash
read -p "do you want to install release or development version of phalcon? [default=release] " typeq
if [ "$typeq" == "" ]; then
TYPE="release"
else
TYPE=$typeq
fi
if [[ "$typeq" != release && "$typeq" != dev ]]
then
echo "Only release or dev is possible"
exit;
fi
aptitude -y install php5-dev php5-mysql gcc
cd /tmp
git clone git://github.com/phalcon/cphalcon.git
cd cphalcon/$TYPE
export CFLAGS="-O2 -fno-delete-null-pointer-checks"
phpize
./configure --enable-phalcon
make && make install
echo "create phalcon ini"
touch /etc/php5/mods-available/phalcon.ini
echo "extension=/usr/lib/php5/20100525/phalcon.so" > /etc/php5/mods-available/phalcon.ini
ln -s /etc/php5/mods-available/phalcon.ini /etc/php5/conf.d/20-phalcon.ini
echo "reloading php5-cgi"
/etc/init.d/spawn-fcgi restart
rm -r /tmp/cphalcon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment