Created
September 12, 2012 11:12
-
-
Save zuckercode/3705990 to your computer and use it in GitHub Desktop.
phalcon installer
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
#!/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