Updating the system:
$ sudo apt-get update
$ sudo apt-get upgrade
Installing the Apache:
$ sudo apt-get install apache2
Starting the apache:
$ systemctl restart apache2
Test the installation by calling localhost
in a browser.
Installing Mysql:
$ sudo apt-get install mysql-server php7-mysql
Installing the PHP7
$ sudo apt install php7.0 libapache2-mod-php7.0 php7.0-mcrypt php7.0-mbstring
Installing Composer (you’ll need zip and git):
$ sudo apt install zip
$ apt install git
$ cd ~
curl -sS https://getcomposer.org/installer | php
The last command must create a file called compser.phar in your home directory, which can be executed on the command line, to install it globally, move it to the directory /usr/local/bin/
with the command:
$ sudo mv composer.phar /usr/local/bin/composer
Try to see the commands of the Composer:
$ composer
Installing Lavarel, first let’s configure mysql, log in with the password you informed at the time of installation:
$ mysql -u root -p
After logging in, you will be at the mysql
, type the commands (the names to USER
. And DATABSE
, may be different from the example:
mysql> CREATE USER 'laravel'@'localhost' IDENTIFIED BY 'laravel';
mysql> GRANT ALL PRIVILEGES ON *.* TO 'laravel'@'localhost' WITH GRANT OPTION;
mysql> CREATE DATABASE laravel;
Okay, all installed, now clone a lavarel project to test, I suggest the one from the lavarel itself. The project also has, a good tutorial.
Final remark:
If Voce is in a hurry and machine to run a virtual, maybe it is better to install an appliance, has some free very good, for example:
Debian Bitnami.
Technologies: Mysql, PHP, Varnish, Apache, phpMyAdmin, Smarty, Zend Framework, Laravel, Codeigniter, Symfony, Cakephp
Install on the linux system itself that you are using (or in windows, if you prefer) and thus you have time to install calmly on the real machine, if you do not end up liking the virtual and staying with it definatively. :-)