LowEndBox - Cheap VPS, Hosting and Dedicated Server Deals

Updating A Free Udemy Bootstrap Course On Oracle Cloud Free Tier

UdemyLow End Box recently published A Beginner’s Quick Glance At Two Of Udemy’s Free Courses! The second of the two Udemy courses discussed in that post was Create a Members Only Blog using PHP, MySQL, & AJAX

The previous post mentioned the Udemy Members Only Blog course’s prerequisite to have a LAMP stack installed. Many people like to run LAMP or another stack locally on their development machine. However, many others, prefer working in the cloud.

The Udemy course is based on a Bootstrap theme called Business Casual. The Business Casual theme originates from StartBootstrap. The current version of StartBootstrap ‘s Business Casual theme is available on Github under the free MIT license.

As we also noticed in the previous Udemy course post, some years have passed since the course was put together. Could we update the course? Could we spin up a new, current LAMP stack and then install the current version of Business Casual from Github?

Let’s give ourselves a homework assignment! Let’s try installing up to date LAMP and Business Casual on an Oracle Cloud Free Tier Ubuntu instance. Thanks again, Oracle, for the nifty free accounts that so many of us are enjoying!

LAMP Tutorials

There are an amazing number of LAMP install tutorials all over the web. I looked at quite a few of them. I found these two especially helpful:

An Easier LAMP Install?

Github has Teddysun’s LAMP install script. After a quick read, the script seems pretty neat! It has 2.6K stars.

Homework Steps And Results

Below are listed the command steps used here to try installing LAMP and Business Casual. Additionally, there is available a line numbered transcript of both the commands and their outputs.

The process was partly successful in that LAMP was installed, that Business Casual was installed, and that Apache successfully serves Business Casual over http. Known glitches include at least non-issuance of the Let’s Encrypt Certificate for the configured subdomain and failure to set the MySQL password. As we continue on the Udemy class, maybe some insight will be gained into fixing these two install glitches.

Updating And Upgrading Ubuntu

$ sudo apt update
$ sudo apt upgrade
$ sudo reboot # Just to be sure it can reboot.

Installing Apache and Firewall Settings

$ sudo apt install apache2
$ sudo ufw app list
$ sudo ufw allow in "Apache"
$ sudo ufw status
Status: inactive
$ sudo ufw allow in "OpenSSH"
$ sudo ufw enable
$ sudo ufw status
Status: active

To Action From
— —— —-
Apache ALLOW Anywhere
OpenSSH ALLOW Anywhere
Apache (v6) ALLOW Anywhere (v6)
OpenSSH (v6) ALLOW Anywhere (v6)

$ curl $(curl icanhazip.com) # http://$Server_IP from local machine # Didn’t work. Why?
$ sudo reboot
$ curl $(icanhazip.com) # http://$Server_IP from local machine # Works after reboot. Why?

Installing MySQL

$ sudo apt install mysql-server
$ sudo mysql_secure_installation # MySQL root password doesn't work

Installing PHP

sudo apt install php libapache2-mod-php php-mysql
$ php -v
$ sudo mkdir /var/www/bcas.metalvps.com
$ sudo chown ubuntu:ubuntu /var/www/bcas.metalvps.com
$ cd /etc/apache2/sites-available
$ ed bcas.metalvps.com # ed editor facilitates making the transcript
bcas.metalvps.com.conf: No such file or directory
a
<VirtualHost>
ServerName bcas.metalvps.com
ServerAdmin webmaster@localhost
DocumentRoot /var/www/bcas.metalvps.com
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
.
w
260
q
$ sudo a2ensite bcas.metalvps.com
$ sudo systemctl reload apache2
$ sudo apache2ctl configtest
$ cd /var/www/bcas.metalvps.com/
$ ed index.html
index.html: No such file or directory
a
<html>
Hello from bcas.metalvps.com!
.
-1
<html>
a
<center>
.
w
46
q
$ curl bcas.metalvps.com # Also http://bcas.metalvps.com from Chrome on local machine
$

Installing Certbot and Getting Let’s Encrypt Certificate

$ sudo apt install certbot python3-certbot-apache
$ sudo ufw allow 'Apache Full'
$ sudo ufw delete allow 'Apache'
$ sudo ufw status
Status: active

To Action From
— —— —-
OpenSSH ALLOW Anywhere
Apache Full ALLOW Anywhere
OpenSSH (v6) ALLOW Anywhere (v6)
Apache Full (v6) ALLOW Anywhere (v6)
$ sudo certbot –apache # Fails. See transcript.

Installing Business Casual Bootstrap Theme

$ cd
$ git clone https://github.com/StartBootstrap/startbootstrap-business-casual.git
Cloning into 'startbootstrap-business-casual'...
remote: Enumerating objects: 920, done.
remote: Counting objects: 100% (273/273), done.
remote: Compressing objects: 100% (114/114), done.
remote: Total 920 (delta 141), reused 258 (delta 132), pack-reused 647
Receiving objects: 100% (920/920), 10.98 MiB | 12.71 MiB/s, done.
Resolving deltas: 100% (492/492), done.
$ cd /var/www/bcas.metalvps.com/
$ mv index.html index-original.html
$ cp -pr ~/startbootstrap-business-casual/dist/* .
$ ls
about.html assets css index-original.html index.html js products.html store.html
$

Business Casual Theme Viewed On Local Laptop

Business Casual Theme



No Comments

    Leave a Reply

    Some notes on commenting on LowEndBox:

    • Do not use LowEndBox for support issues. Go to your hosting provider and issue a ticket there. Coming here saying "my VPS is down, what do I do?!" will only have your comments removed.
    • Akismet is used for spam detection. Some comments may be held temporarily for manual approval.
    • Use <pre>...</pre> to quote the output from your terminal/console, or consider using a pastebin service.

    Your email address will not be published. Required fields are marked *