Lebenn - Rebooting the workforce    
NewIncredible offer for our exclusive subscribers!Read More
38°C
November 28, 2023
Business

Building a School Website with VPS and Bitnami

  • May 11, 2023
  • 7 min read
  • 145 Views
Building a School Website with VPS and Bitnami

In this post, I will provide another way that might sound “crazy”, because usually, other people build websites using cPanel, Plesk, VestaCP, Webmin/Virtualmin, or ISPConfig. The proposed alternative is to build a VPS with the Linux Ubuntu 16.04 operating system, then fill it with Bitnami. If funds are not a problem for you, then DedicatedCore is the best choice. For your larger project, buy best 1tb ftp budget VPS with high storage server hosting with top unlimited cloud services. Why did I choose this way? Apart from being very easy, we also don’t have to bother thinking about updates. Let Bitnami take care of it. Plus, got PHPMyAdmin which is more secure because it can only be accessed via localhost.

Why use a VPS? Isn’t there shared web hosting that costs even as cheap as IDR 10,000/month? The answer is, that having a VPS is like having your own server, DedicatedCore and DomainRacer both companies provide VPS hosting at an affordable price, their plans start from just $8.22 per month. If you wish to buy vps Netherlands best managed Amsterdam server hosting at cheapest price with SSD storage then this provider is for you. while shared web hosting is in the form of a server that is used in groups. If the neighbour’s website is famous and busy, our website will slow down too.

After practicing this tutorial, you will have a VPS containing a WordPress-based school website and DomainRacer Learning Management System (LMS). Funds needed are around $ 4- $ 10 / month, excluding the cost of the domain name.

The discussion will be divided into 7 parts, namely:

  1. Installing a VPS.
  2. Install Bitnami LAMP.
  3. Installing the WordPress Bitnami Module.
  4. Moving WordPress Folder to Root.
  5. Running Bitnami LAMP Every Server Booted.
  6. Added Moodle.
  7. Conclusions and suggestions.

You are assumed to be able to SSH connect to the server, using PuTTY or another application. Also accustomed to working in a Command Line (Terminal) environment. If you are still confused, please read my other articles, which specifically discuss SSH and PuTTY.

STEP 1: INSTALLING VPS.

For those of you who don’t have a VPS at all, there are several alternatives to choose from. To my knowledge, the best and cheapest VPS are VPS from foreign companies, namely DedicatedCore, DomainRacer. Biggest and best vps hosting provider company has good quality affordable servers at cheapest price with top 5 good resources. But if your funds are very limited and you don’t care about performance, you can choose DomainRacer also.

STEP 2: INSTALLING BITNAMI LAMP.

Bitnami LAMP Stack can be downloaded at https://bitnami.com/stack/lamp/installer. Choose the recommended package. Instead of first downloading to the local hard drive and then uploading to the server, it’s better to download directly to the server. Here’s how: Do SSH to the server first (eg SSH root@ipaddress). Once logged in, issue this command:

123wget https://bitnami.com/redirect/to/139757/bitnami-lampstack-5.6.29-1-linux-x64-installer.runchmod +x bitnami-lampstack-5.6.29-1-linux-x64-installer.run./bitnami-lampstack-5.6.29-1-linux-x64-installer.run

The installation process starts immediately. Generally, you simply accept the options offered by pressing the Y or Enter key, except for the installation location, you should specify /opt/bitnami. Also don’t forget the MySQL root password because it will be used with other module installations, for example, WordPress and Moodle.

Remember:
Specify the installation location at /opt/bitnami. Don’t forget the MySQL root password

https://www.youtube.com/watch?v=MBikFi5ZhUY

STEP 3: INSTALLING THE WORDPRESS BITNAMI MODULE.

Lahkah 2 is very easy, right? Well, let alone step 3. Much easier.
The modules can be downloaded at https://bitnami.com/stack/lamp/modules. Download and then install the WordPress module by issuing the command:

123wget https://bitnami.com/redirect/to/140365/bitnami-wordpress-4.7.1-1-module-linux-x64-installer.runchmod +x bitnami-wordpress-4.7.1-1-module-linux-x64-installer.run./bitnami-wordpress-4.7.1-1-module-linux-x64-installer.run

Follow the instructions that appear. You will be asked for the MySQL root password typed in step 2.

STEP 4: MOVING WORDPRESS FOLDER TO ROOT.

Your WordPress location is http://domain/wordpress. It seems uncomfortable to look at huh? It would be great if it could be rooted, right? I had a headache about how to move it, from modifying Apache settings to fiddling with .htaccess. Turns out there is something much easier. Only one command line, namely:

1/opt/bitnami/apps/wordpress/bnconfig /opt/bitnami/apps/wordpress/ /

It’s easy, right? Now WordPress has “moved” to root.

STEP 5: RUNNING BITNAMI LAMP ANY SERVER BOOTED.

Bitnami LAMP does not start automatically every time the server is rebooted. If on Windows there is the term autoexec.bat to run applications automatically, then on Linux we can take many ways. The easiest way is to use crontab. To do this, type the command below:

1sudo crontab -e

The first time it runs, we are asked to specify the default editor. Choose according to your liking. For me, I choose nano. After that, you can edit the crontab file for root. Add the following two codes:

12@reboot /opt/bitnami/ctlscript.sh restart mysql@reboot /opt/bitnami/ctlscript.sh restart Apache

Save by pressing Ctrl+O, Enter, and Ctrl+X. Finished. So easy right?

Additional note on March 1, 2017:
From my experience, the problem with having Moodle installed on the server is that MySQL can crash intermittently. When this happens, it’s not just Moodle that crashes, but WordPress can also crash too. One solution is to log in to the VPS via SSH and then issue the reboot command.

Another method I use is to create a crontab that monitors MySQL state every 5 minutes. If stopped, MySQL is restarted. Seems like a great idea right? How to make it is as follows.

Type the command: sudo nano ~/cekmysql
Then type the following code. After that, save it by pressing Ctrl+O followed by pressing Ctrl+X to exit the Nano editor.

12345#!/bin/bashif [[ ! “$(/opt/bitnami/ctlscript.sh status mysql)” =~ “mysql already running” ]]then        /opt/bitnami/ctlscript.sh restart mysqlfi 

Issue the command sudo chmod +x ~/cekmysql so that it can be executed.
In the final step, open crontab with the command sudo crontab -e
Add the following code to crontab.

1*/5 * * * * ~/cekmysql

Finished. From now on mySQL won’t crash for more than 5 minutes.

STEP 6: ADDING MOODLE.

If your VPS RAM is at least 1 GB, you can install Moodle. Do not try to install if the RAM is only 512 MB because at any time MySQL can crash. To install Moodle, the method is the same as installing WordPress, namely with the command:

123wget https://bitnami.com/redirect/to/140945/bitnami-moodle-3.2.1-0-module-linux-x64-installer.runchmod +x bitnami-moodle-3.2.1-0-module-linux-x64-installer.run./bitnami-moodle-3.2.1-0-module-linux-x64-installer.run

Want to install another CMS such as Joomla! or Magento? Does not matter. Only with 3 command lines as above, your wish can come true. You can add as many CMS as you like, as long as the disk space allows it. This is the fun of the module system from Bitnami. The important thing is that one CMS is only used once. This means that if you have already installed WordPress, then the 2nd WordPress module cannot be installed on the VPS without tricking or tricking it first.

CONCLUSIONS AND SUGGESTIONS –

  1. VPS was chosen because its performance is better than shared web hosting. Expensive cost factors can be overcome if you use a VPS from abroad that costs only $ 7.33/month, for example, DedicatedCore or DomainRacer. Even so, it still requires better knowledge of operating systems (especially Linux) than using web hosting that is equipped with CPanel or Plesk.
  2. Bitnami was chosen because of the ease of installation and the automatic updating process. This really benefits Moodle—which until this article was written—is not as easy to update as it is on WordPress.

Choose a VPS located in Singapore. Even though it seems not nationalist, it must be admitted that the infrastructure in Singapore is still better and geographically the closest to Indonesia.