Vous êtes sur la page 1sur 2

# Install Mysql

# --------------sudo apt-get -y install mysql-server


sudo apt-get -y install mysql-client
#Verify mysql
sudo netstat -tap | grep mysql
# Installing Apache2
# -----------------sudo apt-get -y install apache2
# Installing PHP5
# --------------sudo apt-get install php5 libapache2-mod-php5
# Installing Apache Modules for FastCgi
# ------------------------------------First install the necessary packages (I leave out php5 as this assumes it's alre
ady installed, add it back in for a first time install). Also note from Apache 2
.4 up you can use the event-mpm instead of worker see http://www.vps.net/blog/20
13/04/08/apache-mpms-prefork-worker-and-event/. My example shows worker, but jus
t replace the word worker with event if you'd rather use that.
sudo apt-get install apache2-mpm-worker
sudo apt-get install libapache2-mod-fastcgi php5-fpm
Now enable mods you need, and disable those you don't.
sudo a2dismod php5 mpm_prefork
sudo a2enmod actions fastcgi alias mpm_worker
Create the php5.fcgi file and give the webserver permission to use it.
sudo touch /usr/lib/cgi-bin/php5.fcgi
sudo chown -R www-data:www-data /usr/lib/cgi-bin
Create a global config for php5-fpm
sudo nano /etc/apache2/conf-available/php5-fpm.conf
paste in the following (we'll use a socket instead of IP address)
<IfModule mod_fastcgi.c>
AddHandler php5.fcgi .php
Action php5.fcgi /php5.fcgi
Alias /php5.fcgi /usr/lib/cgi-bin/php5.fcgi
FastCgiExternalServer /usr/lib/cgi-bin/php5.fcgi -socket /var/run/php5-fpm.so
ck -pass-header Authorization -idle-timeout 3600
<Directory /usr/lib/cgi-bin>
Require all granted
</Directory>
</IfModule>
Enable the php5-fpm conf
sudo a2enconf php5-fpm
Restart apache and fpm
sudo service apache2 restart && sudo service php5-fpm restart

sudo service apache2 restart && sudo service php5-fpm restart


As per other instructions paste the following into a new browseable php file on
your webserver.
<?php phpinfo();
Open the file you just edited in a web browser, If you see "FPM/FastCGI" next to
Server API, you are now serving PHP with FastCGI!
# Mounting Folder in Ubuntu
sudo mount -t vboxsf Ubuntu_Share /media/Ubuntu_Share

Vous aimerez peut-être aussi