Configuring Laravel 5, FTP and MySQL on Bitnami LAMP Stack for Development

At the time of writing the Stack is running on Ubuntu 14.04 which can be downloaded from here. Since it is 64Bit make sure that Visualization is enabled in the bios settings.

Import the VM in VMware Player or Virtual box, make sure that the network settings are configured correctly so that the VM gets an IP accessible from the host machine. I personally configured it to Bridged Adapter for this exercise and have a habit of Regenerating the MAC Address.

VirtualBox Network Adapter Setup
VirtualBox Network Adapter Setup

If the VM does not get assigned an IP the configuration is wrong and I wouldn’t bother trying to fix it from inside the VM (you could) but I rather fix it from the hyper-visor settings because the stack is pre-configured to work.

Bitnami LAMP Stack with indication of IP
Bitnami LAMP Stack with indication of IP

Login and change password

 

Visit the IP in the browser to check if it is working in my case http://192.168.101.12

Bitnami Main Page
Bitnami Main Page

 

Enabling Laravel

Bitnami LAMP Stack comes with several pre-configured frameworks of which all are disabled by default. One must enable the framework that is required. ( I am nto sure if you can enable more than one at the same time)

Steps:

cd /opt/bitnami/apache2/conf/bitnami

sudo vi bitnami-apps-prefix.conf

Accessing LAMP PHP Framework Config
Accessing LAMP PHP Framework Config

 

Remove the hash from laravel’s line and save and close :wq

Enabling Laravel
Enabling Laravel

 

Restart Apache

sudo /opt/bitnami/ctlscript.sh restart apache

Restarting Apache
Restarting Apache

 

The location where Laravel apps Live is

/opt/bitnami/frameworks/laravel/app/http

Browser URL

http://192.168.101.12/laravel/ where 192.168.101.12 is your VM’s IP

 

Laravel Welcome Screen On Load
Laravel Welcome Screen On Load

 

Configuring FTP

Enabling FTP for easy editing/upload of files ( Note this is a development machine for experimentation so I will not go on explaining issues with FTP and security, but you should consider reading about the risks. )

 

sudo vi /etc/vsftpd.conf

go to the bottom of the file and change

listen_address=127.0.0.1

to

listen_address=0.0.0.0

:wq

Listen on every available network interface
Listen on every available network interface

Allow connections to port 21 (FTP port)

sudo ufw allow 21

Firewall Settings
Firewall Settings

Restart FTP

sudo service vsftpd restart

Restart vsftpd service
Restart vsftpd service

Change bitnamiftp password

sudo passwd bitnamiftp

Change Password for FTP user
Change Password for FTP user

Configure Filezilla

Filezilla FTP Settings
Filezilla FTP Settings

Connected

Connected to VM
Connected to VM

 

Now you may play around with Laravel through FTP 🙂

Let external connections to MySQL

1)

cd /opt/bitnami/mysql

sudo vi my.cnf

Comment out

bind-address = 127.0.0.1

by putting a # infront of it and Esc :wq

Modifying my.cnf to allow external connections
Modifying my.cnf to allow external connections

2)

 

mysql -u root -p
grant all privileges on *.* to 'root'@'%' identified by 'password' with grant option
Granting MySQL Permissions
Granting MySQL Permissions

 

restart mysql

cd /opt/bitnami

sudo ./ctlscript.sh restart mysql

Restart MySQL
Restart MySQL

 

Open Port in firewall

sudo ufw allow 3306

Open port 3306 in firewall
Open port 3306 in firewall

 

Connection Settings in SQLyog
Connection Settings in SQLyog

 

Connection Successful
Connection Successful
Please like & share:

Leave a Reply