In this tutorial you will learn how to install PHP on Ubuntu Server.
Code used during this tutorial:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# Install PHP on Ubuntu Server # Include some helper packages sudo apt-get install php5 libapache2-mod-php5 php5-mcrypt # Tell our web server to prefer PHP files sudo vi /etc/apache2/mods-enabled/dir.conf # Modify <IfModule mod_dir.c> DirectoryIndex index.html index.cgi index.pl index.php index.xhtml index.htm </IfModule> # to <IfModule mod_dir.c> DirectoryIndex index.php index.html index.cgi index.pl index.xhtml index.htm </IfModule> # Restart Apache sudo service apache2 restart # Available options for PHP modules and libraries apt-cache search php5- # More information about what a module does apt-cache show php5-memcached # Test PHP installation vi /var/www/http.liviubalan.com/index.php <?php phpinfo(); # Browser http://http.liviubalan.com/ Useful links: https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu-14-04 |
Useful links:
https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu-14-04