Last active
August 29, 2015 14:02
-
-
Save HugoPresents/71b07e7e6d6934c5a94a to your computer and use it in GitHub Desktop.
install & configure php5 nginx on ubuntu
This file contains hidden or 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 | |
# install depends | |
apt-get update && apt-get install -y aria2 libxml2 libxml2-dev libssl-dev pkg-config curl libcurl4-nss-dev enchant libenchant-dev libjpeg8 libjpeg8-dev libpng12-0 libpng12-dev libvpx1 libvpx-dev libfreetype6 libfreetype6-dev libt1-5 libt1-dev libgmp10 libgmp-dev libicu-dev mcrypt libmcrypt4 libmcrypt-dev libpspell-dev libedit2 libedit-dev libsnmp-dev libxslt1.1 libxslt1-dev autoconf make g++ python-software-properties git redis-server | |
# download php & install | |
aria2c http://jp1.php.net/distributions/php-5.5.13.tar.gz | |
aria2c http://jaist.dl.sourceforge.net/project/phpmyadmin/phpMyAdmin/4.2.2/phpMyAdmin-4.2.2-all-languages.tar.gz | |
tar -xf phpMyAdmin-4.2.2-all-languages.tar.gz | |
mkdir /var/htdocs | |
mv phpMyAdmin-4.2.2-all-languages /var/htdocs/pma | |
tar -xf php-5.5.13.tar.gz | |
cd php-5.5.13 | |
./configure --enable-maintainer-zts --prefix=/usr/local/php --enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data --with-config-file-path=/usr/local/php/conf --with-config-file-scan-dir=/usr/local/php/conf.d --with-openssl --with-kerberos --with-zlib --enable-calendar --with-curl --with-enchant --enable-exif --enable-ftp --with-gd --with-jpeg-dir=/usr --with-png-dir=/usr --with-vpx-dir=/usr --with-freetype-dir=/usr --with-t1lib --enable-exif --enable-gd-native-ttf --enable-gd-jis-conv --with-gettext --with-gmp --with-mhash --enable-intl --enable-mbstring --with-mcrypt --with-mysql --with-mysqli --enable-pcntl --with-pdo-mysql --with-pspell --with-libedit --with-readline --enable-shmop --with-snmp --enable-soap --enable-sockets --enable-sysvmsg --enable-sysvshm --with-xsl --enable-zip --with-pear --enable-zend-signals | |
make | |
make install | |
mkdir /usr/local/php/conf | |
mkdir /usr/local/php/conf.d | |
cp php.ini-production /usr/local/php/conf/php.ini | |
cp sapi/fpm/php-fpm.conf /usr/local/php/etc/php-fpm.conf | |
cp sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm | |
chmod +x /etc/init.d/php-fpm | |
update-rc.d php-fpm defaults | |
cd /usr/local/bin | |
cp /usr/local/php/bin/phpize phpize | |
cp /usr/local/php/bin/php-config php-config | |
cp /usr/local/php/bin/pecl pecl | |
cp /usr/local/php/bin/php php | |
pecl install pthreads yaf redis | |
add-apt-repository -y ppa:nginx/stable | |
apt-get update && apt-get install -y nginx mysql-server |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment