Installing and Configuring the Lamp Stack On Ubuntu [closed]

0

Hello, I'm new to linux, and I would like to install a PHP and Laravel development environment on my Ubuntu 16.04 to study both the language and the framework, and for that I need the following:

Apache Mysql PHP 7 Composer

I need the composer to install Laravel, preferably the newer version, or at least version 5.2, I intend to use Atom as Editor and Mysql Workbench as DBMS.

I have never had contact with Linux, I would also like to know how to start the services, if anyone can at least point me an article about it, I would be grateful.

    
asked by anonymous 22.08.2017 / 00:11

1 answer

1

Updating the system:

$ sudo apt-get update
$ sudo apt-get upgrade

Installing Apache:

$ sudo apt-get install apache2

Starting apache:

$ systemctl restart apache2 

Test the installation by calling localhost in a browser.

Installing MySQL:

$ sudo apt-get install mysql-server php7-mysql

Installing 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 should create a file called compser.phar in your home directory, which can be run on the command line, to install it globally, move it to the directory /usr/local/bin/ with the command:

/ p>

$ sudo mv composer.phar /usr/local/bin/composer

Try to view composer commands:

$ composer

Installing Lavarel, first let's configure mysql, log in with the password that you entered at the time of installation:

$ mysql -u root -p

After logging in, you will be at the prompt of mysql , enter the commands (the names for 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, everything installed, now I clone a lavage project to test, I suggest lavender itself. The project has, also, a good tutorial .

Final note:
If you're in a hurry and you're running a virtual machine, you might want to install a search appliance, you have some very free ones, for example:

Debian Bitnami.
Technologies: MySQL, PHP, Varnish, Apache, phpMyAdmin, Smarty, Zend Framework, Laravel, CodeIgniter, Symfony, CakePHP

Install on the linux system that you are using (or on windows, if you prefer), so you have time to install slowly on the real machine, if you do not end up liking the virtual one and getting it. : -)

    
22.08.2017 / 03:06