Web Development 701 ~ Frameworks and VirtualBox
Today in web701 we covered the frameworks and softwares that are going to be used for the assessment. The frameworks are laravel (an open-source PHP web framework) and meteor (an open-source NodeJS web framework). The softwares are XAMPP (an open-source web server) and composer (a dependancy manager for PHP). I am going to be installing these on a ubuntu virtual machine, so the first thing I need to do is install virtualbox on my manjaro partition.
The first thing to do is to check what version of manjaro I am using, since the virtualbox dependanceies are different for the different versions. This is done by the simple command uname -r. This gave me 4.19.24-1-MANJARO, so I need to choose linux419. I asked my good friend Nick what the required modules are and he gave me the following list …
virtualbox
virtualbox-guest-modules-arch
virtualbox-guest-utils
virtualbox-guest-iso
virtualbox-host-modules-arch
virtualbox-ext-vnc
The next thing to do is to run the command modprobe vboxdrv.
With all of the dependancies installed, time to reboot.
Now that virtualbox is running, its time to create a new virtual machine and load ubuntu (16.04) onto it. If you’ve never used virtualbox before, its pretty straight-forward. Click new -> type a name for the virtual machine and an os type -> select create a virtual hard disk -> select virtualbox disk image -> select dynamically allocated -> finally create (I leave all options as their defaults except for the virtual hard disk size which I made 12GB). Now with the virtual machine created its time to add the ubuntu image. To do this click on the virtual machine -> settings -> select the storage tab -> click the CD image under controller: IDE -> click the CD icon on the right side and select choose virtual optical disk file -> find/choose the desired iso -> finally click ok.
With the ubuntu image mounted on our virtual machine, next we have to start the machine and begin the installation process for ubuntu. I won’t cover this process as I am assuming that you have completed this process before, if not it’s pretty straight-forward.
Now with the ubuntu virtual machine fully up and running its time to install the softwares and frameworks. Before I can install anything I need to do the classic sudo apt update && sudo apt upgrade. The first software I am going to install is XAMPP. After a quick duckduckgo search, I found a post on askubuntu. The steps are as follows…
wget https://www.apachefriends.org/xampp-files/5.6.20/xampp-linux-x64-5.6.20-0-installer.run
sudo su
chmod +x xampp-linux-x64-5.6.20-0-installer.run
./xampp-linux-x64-5.6.20-0-installer.run
Easy and done.
Next is the frameworks; laravel and meteor.
First is laravel. A quick ddg resulted in a post on askubuntu. The steps are as follows…
sudo apt install tasksel
tasksel install lamp-server
sudo apt install curl php-curl php-mcrypt php-mbstring php-gettext
phpenmod mcrypt
phpenmod mbstring
a2enmod rewrite
systemctl restart apache2
curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer
sudo apt install phpmyadmin
cd /var/www/html
composer create-project laravel/laravel <project_name> --prefer-dist
chmod -R 777 <project_name>
To serve the website on localhost change to the project directory then enter php artisan serve.
Now for meteor… Again a quick ddg search resulted in a post on askubuntu. The steps are as follows…
curl -o new_meteor https://install.meteor.com/
bash ./new_meteor
I’m liking meteor more already. Easy and done.
To create a new meteor project via the cli, simply enter the command meteor create <project_name>. Then to serve the website, change into the project directory and enter the command meteor.