Created
January 19, 2011 14:23
-
-
Save utkarshkukreti/786224 to your computer and use it in GitHub Desktop.
Nginx, PHP (with php-fpm) and MySQL setup on Ubuntu
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
apt-get install htop binutils cpp flex gcc libarchive-zip-perl libc6-dev libcompress-zlib-perl m4 libpcre3 libpcre3-dev libssl-dev libpopt-dev lynx make perl perl-modules openssl unzip zip autoconf2.13 gnu-standards automake libtool bison build-essential zlib1g-dev ntp ntpdate autotools-dev g++ bc subversion psmisc libmysqlclient-dev libcurl4-openssl-dev libjpeg62-dev libpng3-dev libxpm-dev libfreetype6-dev libt1-dev libmcrypt-dev libxslt1-dev libbz2-dev libxml2-dev libevent-dev libltdl-dev libmagickwand-dev imagemagick git-core | |
# server | |
apt-get install nginx | |
# mysql | |
apt-get install mysql-server | |
# php | |
cd /usr/src | |
wget http://us2.php.net/get/php-5.3.5.tar.gz/from/us.php.net/mirror | |
tar xzvf php-5.3.5.tar.gz | |
cd php-5.3.5 | |
./configure '--prefix=/etc/php' '--with-config-file-path=/etc/php' '--with-curl' '--with-pear' '--with-gd' '--with-jpeg-dir' '--with-png-dir' '--with-zlib' '--with-xpm-dir' '--with-freetype-dir' '--with-t1lib' '--with-mcrypt' '--with-mhash' '--with-mysql' '--with-mysqli' '--with-pdo-mysql' '--with-openssl' '--with-xmlrpc' '--with-xsl' '--with-bz2' '--with-gettext' '--with-fpm-user=www-data' '--with-fpm-group=www-data' '--enable-fpm' '--enable-exif' '--enable-wddx' '--enable-zip' '--enable-bcmath' '--enable-calendar' '--enable-ftp' '--enable-mbstring' '--enable-soap' '--enable-sockets' '--enable-sqlite-utf8' '--enable-shmop' '--enable-dba' '--enable-sysvmsg' '--enable-sysvsem' '--enable-sysvshm' | |
make && make install | |
mkdir /var/log/php-fpm | |
chown -R www-data:www-data /var/log/php-fpm | |
cp -f php.ini-production /etc/php/php.ini | |
chmod 644 /etc/php/php.ini | |
cp /etc/php/etc/php-fpm.conf.default /etc/php/etc/php-fpm.conf | |
cp -f sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm | |
chmod 755 /etc/init.d/php-fpm | |
update-rc.d -f php-fpm defaults | |
pecl install imagick | |
vim /etc/php/php.ini # add extension dir and the following text | |
extension = imagick.so | |
# memcached | |
apt-get install memcached | |
pecl install memcache | |
vim /etc/php/php.ini # add extension dir and the following text | |
extension = memcache.so |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment