Dieses Blog durchsuchen
Sonntag, 14. August 2016
LAMP: install on ubuntu 16.04 with PHP 7
On ubuntu 16.04 it is very easy to setup a basic lamp.
We will install php 7.0.8, Mysql 5.6 and apache 2.4
basic install process
$ apt-get install apache2
$ apt-get install mysql-server
- During MySql install you will be asked for your database password. Note it down, if you want.
$ apt-get install php7.0
Tell apache to interprete *.php with the zend engine.
- We will use the apache php module to interprete php files.
$ apt-get install libapache2-mod-php
Test if php is enabled in apache
$ a2enmod php7.0
If you get a successmessage everything went fine. Otherwise you can enable it manualy with:
$ a2enmod php7.0
Create a testpage to see if php is running on your apache.
$ nano /var/www/html/info.php
Place follwing line into the info.php
<?php phpinfo();
If you see your phpsettings, you where successful.
Install further php extensions
On that point you LAMP Stack is running. But in most of the cases, you will need some extensions more on the server to get applications like wordpress, joomla or magento up and running.
To see which php extensions are available, you can type:
$ apt-cache search php7.0
Now you can choose your extensions to install. I always install follwing extensions by typing:
$ apt-get install php7.0-intl php7.0-mcrypt php7.0-soap php7.0-xsl php7.0-xmlrpc php7.0-gd
This will install extensions to communicate via Soap, use xml , use encryption and decryption and use image processing.
At the end you have to restart your apache server with:
$ service apache2 restart
Thats it.
Abonnieren
Kommentare zum Post (Atom)
Keine Kommentare:
Kommentar veröffentlichen