:~$ sudo aptitude update && sudo aptitude safe-upgrade
/* mulai dgn apache */
:~$ sudo apt-get install apache2
/* install libapache2-mod-fastcgi dari multiverse */
:~$ wget http://mirror.informatik.uni-mannheim.de/pub/linux/distributions/ubuntu/pool/multiverse/liba/libapache-mod-fastcgi/libapache2-mod-fastcgi_2.4.7~0910052141-1_amd64.deb
:~$ sudo dpkg -i libapache2-mod-fastcgi_2.4.7~0910052141-1_amd64.deb
/* install komponen yang diperlukan */
:~$ sudo apt-get install php5-fpm php5-mcrypt php5-cli php5-curl php5-gd php5-mysql mysql-server
/* setup handler di /etc/apache2/conf.d/00fastcgi */
<ifmodule mod_fastcgi.c> Alias /php5 /var/www/fastcgi/php5 AddHandler php-script .php FastCGIExternalServer /var/www/fastcgi/php5 -socket /var/run/php5-fpm.sock Action php-script /php5 virtual </ifmodule>
/* enabled apache modul actions & rewrite */
:~$ sudo a2dismod cgid
:~$ sudo a2enmod actions rewrite
/* buat folder /fastcgi di /var/www */
:~$ sudo mkdir /var/www/fastcgi
/* edit /etc/php5/fpm/pool.d/www.conf */
/* comment-out baris 'listen = 127.0.0.1:9000', tambahkan di bawahnya: */
;listen = 127.0.0.1:9000 listen = /var/run/php5-fpm.sock
/* restart apache + php-fpm */
:~$ sudo /etc/init.d/apache2 restart
:~$ sudo /etc/init.d/php5-fpm restart
/* panggil fungsi phpinfo() di /var/www/info.php */
/* buka http://{ip-server}/info.php, cek 'Server API' - 'FPM/FastCGI' */
Tidak ada komentar:
Posting Komentar