Serverless vs. FaaS: A Beginner’s Guide

Reading Time: 5 minutes

In this guide, we will compare Serverless Computing versus Function As A Service (FaaS). We will be discussing some of the similarities as well as some of the differences between the two options.

In the early 2000s, when building a web application or service, a full team was needed to develop, deploy, configure, and maintain the software. Many companies performed all of these tasks in house. The decisions they often faced included: 

  • Determining the development language to use
  • Deciding on the platform for the software
  • Identifying the timeline involved in the deployment
  • Configuring the scalability of the software
  • Determining the server type 
  • Selecting the server’s configurations
  • Deploying the server and correcting any conflicts

These were just a few of the factors that were involved in how the application was going to perform. As time went on, new companies grew to help alleviate many of these concerns. Still, other needs were not met and needed to be addressed to ensure a stable and robust application.

Service Platforms
Various Service Platforms

Over the last decade, Cloud Computing has emerged to help alleviate many of the previous issues seen in development, deployment, and maintaining applications. Because Cloud Servers are virtualized, they are created, managed, and disposed of in a more efficient manner. This also eliminated the need to wait for physical hardware to be deployed. Unfortunately, even if a traditional dedicated server is exchanged for a cloud server or a service like an AWS EC2 instance, the same tasks of server management and configuration still apply. 

This is where serverless computing comes in. Serverless is the next step in Cloud Computing. This means that servers are simply hidden from the picture. In serverless computing, this separation of server and application is managed by using a platform. The responsibility of the platform or serverless provider is to manage all the needs and configurations for your application. These platforms manage the configuration of your server behind the scenes. This is how in serverless computing, one is able to just focus on the application or code itself being built or deployed.

Consider Liquid Web’s Managed WordPress platform. When a WordPress application is deployed, instead of spinning up a server, downloading WordPress, or setting up a database, all you do is pick a name for your site, fill out a few other details such as the username and password for the application and hit the create button.  In the background, all of the services that are needed to run WordPress are installed automatically by the platform. Now that you have a working WordPress install that’s ready to go, there is no need to do anything else but start working within the application.

Serverless
Serverless:: https://lqwb.us/2muyY96

Microservices are a modern architecture for building and deploying a complex application using serverless computing. Most cloud platforms that practice serverless computing are focused more on the developer and development teams, but the focus with serverless architecture is on the application itself. 

Because we can run an entire web application on a serverless platform, we can have the core application, along with the database and any other needed services attached to our app, and all running on the same distributed environment. FaaS (functions as a service) take the abstraction of servers one step further. FaaS allows you the ability to deploy software much easier as it concentrates on the services themselves as opposed to the server platform. Unlike serverless computing, FaaS provides the ability to skip the worry of server setup and configuration. FaaS (Functions as a Service) also affords us the ability to forego the application installation and configuration as well!

If we start building an application, we still have to use some type of programming language as well as a suitable framework that goes with that language. For example, if we are building a front-end application using JavaScript and Angular JS or Vue JS as the framework to develop all of the components, with functions as a service, the concept here is to be able to write code without having to build out the foundation using a framework that would be part of an application. Since there is no cohesive application with a start or run point, any FaaS function must have a trigger. This trigger can be anything from saving a file to a job that runs every day.

faas1
FaaS

With FaaS, you concentrate on just a single function or piece of code that would run a larger application that would be triggered by an outside prompt. These functions need to be small and do one thing, like the microservices mentioned earlier. In a microservice methodology, every service is in charge or responsible for doing only one thing. The same is true for functions as a service; each function is in charge of a single task. 

A good example of a FaaS service is Amazon’s lambda. A simple use for a FaaS function may be resizing an image in your AWS S3 bucket. All that would be needed is set up a few permissions, identify a trigger, and write the code that resizes the image. If we didn’t use lambda’s FaaS functionality, a full application would be needed to complete this same task.

Now that we have discussed the technology a bit, let’s look at some advantages and disadvantages of each. Let’s start with serverless computing.

Advantages

  • There is no server configuration needed when deploying an application.
  • Most serverless computing services or systems are easy to scale. Thus they can offer more flexibility if an application needs to expand or contract.
  • Serverless is typically less costly than using a traditional server-based hosting method. This is due to the flexibility of the platform management behind the scenes.

Disadvantages

  • A disadvantage of using serverless computing is the loss of server control. When using this option, some providers will not allow access to the server or allow server specifications to be altered.
  • In some cases, serverless can be more expensive depending on the type and number of calls being made. The API pricing can be much higher if using the API gateway extensively.

Now let’s look at some advantages and disadvantages for FaaS (functions as a service).

Advantages

  • Efficiency: There is no need to write an entire application if you are looking to accomplish one small task.
  • Low Cost: In a FaaS system, the small piece of code only runs when it is triggered, so you only pay for what you use.
  • Speed: As demand increases, it is easier to build out and replicate a single function versus replicating an entire application. 
  • Scalability: Again as demand increases, it is easier to scale a single function as opposed to an entire app.

Disadvantages

  • The functions need to be small and only complete one task.
  • Managing a large number of functions can be tricky.

Synopsis

Let’s go over some scenarios when serverless computing would be a good choice to use instead of FaaS.

Say you need to deploy an extensive eCommerce application. It would be easier to build and deploy just one application that did all of the work of laying out products, managing the cart, and configuring the payment system. When you deploy a system as complex as this with so many moving parts, it becomes much more manageable to keep all the logic within a single deployable application.

In this case serverless would be the way to go. Even if your eCommerce store grows, the serverless computing service will scale your application to accommodate the need. Additionally, your application will always be running and ready to take on new orders. Other examples would be if you need to run a large blog or a mission-critical database. So any application that is complex in nature and large it’s best to choose this option.

https://lqwb.us/2lt3OhU

So when would it be a good choice to use a FaaS approach?

Functions as a service are good for data processing and real-time actions. Let’s say daily sales data is needed to help manage inventory. Every time a customer buys an item, it gets added to a database table. A FaaS function would be a good candidate to trigger a function within that database table, process the data of what was bought and either display it to a manager or even trigger another function to order more of that product. FaaS is a good choice for anything that requires real-time processing that can be packaged into a single code function.

Both serverless and FaaS are excellent cloud computing tools that can be used together or separately to fulfill the need for a given task or product.

More FaaS info coming soon and how it can benefit you!

Join Us!

Care to find out more about FaaS or Serverless computing?

Our Solutions and Support Teams are standing by with intimate knowledge of these and other web hosting technologies that can be utilized to improve your business processes especially those discussed in this article. If you would like to learn more about the information outlined above, give us a call today at 800.580.4985, or open a chat or ticket with us right now!

Update: Migrating to Liquid Web with Managed WordPress Portal

Reading Time: 4 minutes

Note:
The instructions in this tutorial are for the Managed WordPress portal clients. These instructions do not apply if you have a Liquid Web WordPress Server Optimized Template account.

Migrations to Liquid Web’s Managed WordPress and Managed WooCommerce portals are made easy using a custom plugin called Migrate To Liquid Web created specifically for Liquid Web by BlogVault. With this plugin, you can migrate any WordPress site into your portal in just a few easy steps. Continue reading “Update: Migrating to Liquid Web with Managed WordPress Portal”

Configuring WSGI on Ubuntu/Centos

Reading Time: 3 minutes

This article outlines the process of configuring a server for Python 3 web applications with Apache 2.4 using mod_wsgi. 

What is mod_wsgi?

Mod_wsgi is an Apache module that allows Python web applications to function on a server. This module provides a web framework for Flask, Django, and other Python based frameworks to operate within a production environment on a server.

Prerequisites

  • A CentOS or Ubuntu server
  • Apache 2.4, apache-dev/httpd-devel and python3-dev installed
  • Python 3, pip3, and virtualenv installed
  • Access to a terminal

If you do not have the above prerequisites installed, this build will not work as expected. The following commands can be used to install the prerequisites

apt install apache2 apache2-dev python3 python3-dev python3-pip

pip3 install virtualenv

Step 1

Begin by downloading the source files for mod_wsgi.i

root@host [~]# wget https://github.com/GrahamDumpleton/mod_wsgi/archive/4.6.5.tar.gz

Next, unpack the archive

root@host [~]# tar -xzvf 4.6.5.tar.gz

Enter the source files directory

root@host [~]# cd mod_wsgi-4.6.5

Next, determine the path to the Python interpreter.

root@host [~]# which python3
/usr/bin/python3
root@host [~]# 

Configure the installation and define the Python interpreter for mod_wsgi.

root@host [~]# ./configure --with-python=/usr/bin/python3
checking for apxs2... no
checking for apxs... no
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/usr/src/mod_wsgi-4.6.5':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details

Now, run the following commands to compile the package.

root@host [~]# make && make install

The path to where the module was installed will be at the end of the output from the last command.

root@host [~]# /usr/lib/apache2/modules/mod_wsgi.so

Use the path noted above to load the module into Apache by adding the following snippet to the bottom of the apache.conf or httpd.conf

LoadModule wsgi_module /usr/lib/apache2/modules/mod_wsgi.so

Now test the syntax and restart Apache.

Debian/Ubuntu based systems:

root@host [~]# apache2 -t
root@host [~]# service apache2 restart

RHEL/CentOS based systems:

root@host [~]# httpd -t
root@host [~]# service httpd restart

Step 2

Now that mod_wsgi has been installed, let’s take a look at the configuration. We will begin by creating a basic Python web application to detail the steps to configure mod_wsgi.

First, let’s create a virtual environment using the Python version that mod_wsgi was configured for. For this article, the example application will be placed in /var/www/. Next, we will run this command to create the directory wsgi_test, which will contain the virtual environment.

root@host [~]# virtualenv --python=python3 wsgi_test

Next, enter this directory and activate the virtualenv.

root@host [~]# cd wsgi_test
root@host [~]# source bin/activate
root@host [~]# pip install flask
root@host [~]# touch wsgi_test.py
root@host [~]# vim wsgi_test.py

Place the following configuration inside of the wsgi_test.py file

from flask import Flask
 app = Flask(__name__)
 @app.route("/")
 def index():
     return "Hello, from WSGI"

Now, let’s create the wsgi file to load the application.

root@host [~]# touch wsgi.py
root@host [~]# vim wsgi.py

Next, add the following information to the file. This data will activate the virtual environment when a request is received and execute the application.

activate_this = '/var/www/wsgi_test/bin/activate_this.py'
 with open(activate_this) as file_:
         exec(file_.read(), dict(__file__=activate_this))
 import sys
 sys.path.insert(0, '/var/www/wsgi_test/')
 from wsgi_test import app as application

Now that the example application has been created, let’s configure Apache.

We will begin by creating a virtual host for this application. This file will be placed inside of either
/etc/httpd/conf.d/ for RHEL based systems, or
/etc/apache2/sites-enabled/ for Debian based.

Redhat

For RHEL based systems, write the file to the following path replacing domain.com with your domain.

/etc/httpd/conf.d/domain.com.conf

Debian

For Debian based systems, write the file to the following path, replacing domain.com with your domain.

/etc/apache2/sites-enabled/domain.com.conf

The contents of the file will be as follows, replacing domain.com with your domain.

<VirtualHost *:80>
     ServerName domain.com
     WSGIDaemonProcess wsgi_test user=www-data group=www-data threads=2
     WSGIScriptAlias / /var/www/wsgi_test/wsgi.py
     <Directory /var/www/wsgi_test>
         Require all granted
     </Directory
 </VirtualHost>

For RHEL based systems, replace the user and group with apache as follows:

WSGIDaemonProcess wsgi_test user=apache group=apache threads=2

Now test and restart Apache.

Debian based systems:

root@host [~]# apache2 -t
root@host [~]# service apache2 restart

RHEL based systems:

root@host [~]# httpd -t
root@host [~]#  Service httpd restart

You can also use the curl command via the CLI

root@host [~]# curl http://domain.com

or navigate directly to the domain in a browser to see your application. Any errors will be logged to Apache’s default error log file usually found in /var/log/apache2/error_log

Ready to get started?

Liquidweb offers multiple server options for setting up and configuring this type of environment to run your apps. Reach out to one of our Solutions Team members today and they can put together a hosting package that will definitely meet your specific needs.

You can also give us a call 24 hours a day 1.800.580.4985 or open a chat or ticket with us.

Installing Linux Software Via The Commandline

Reading Time: 7 minutes

Installing Linux software from the commandline can save you time, money, and make life easy – if you know what you’re doing! This article is a brief overview of how the commandline operates on Linux distributions.

Once we have learned how the commandline works, we will move on to installing, removing, and updating our software packages VIA the commandline with yum. To get started, let’s begin with making sure we understand what the commandline does.

What Is The Commandline?

The commandline is a text-based interface which can be used to input instructions on a computer. A program called the bash shell usually provides the Linux commandline. There have been multiple shells developed over time as Linux has grown. Red Hat Linux utilizes the GNU Bourne-Again Shell. This shell is also known as “bash.” Bash is an improved version of one of the most well-known shells used on UNIX like systems, the Bourne Shell (sh). When the bash shell is used to pass info between the user and the computer, it displays a symbol when it is awaiting a command from the user. This interface is called the shell prompt. When an average user starts a bash shell, the default prompt usually ends with a dollar sign $ character, but this can be modified to suit the user.

CLI1

The dollar sign $ is replaced by the pound sign # if the shell is running as the root user. This symbol makes it apparent that it is a superuser shell, which can help to avoid accidents and mistakes on the accounts with elevated privileges.

CLI2

Using bash to execute commands can be very robust. The bash shell also provides a useful scripting language that can support automation of tasks. The shell even has additional capabilities that can help simplify or make operations that seem difficult in a graphical user interface (GUI) as simple as a single command.

Users access the bash shell through a terminal. A terminal provides a keyboard for user input and a display for output. On text-based installations, this can be the Linux machines physical console, the hardware keyboard, and screen. Terminal access can also be configured through serial ports. Another way to access a shell is from a virtual console. A Linux machines physical console supports multiple virtual consoles which act as separate terminals. Each virtual console supports an independent login session. If a graphical environment is available, it will run on the first virtual console. With a GUI running, you may access a virtual console by pressing Ctrl+Alt+F1 to go to the first console. You may use this combination, changing the F1 key out for F2 through F6, each representing their console.

How To Use The Shell?

Commands entered at the shell prompt must have three basic parts:

  1. A command to run
  2. Options to adjust the behavior of the command
  3. Arguments, which are targets of the commands

The command is the name of the program to run. It is usually followed by one or more options, which adjust the behavior of the command. The command options will start with either one or two dashes (ex: -a or –all) to distinguish them from other arguments. Commands may also be followed by one or more arguments or flags, that often indicates a target that the command should affect. For example, the command

usermod -L ge 

has a command (usermod), an option (L), and argument flags (ge). The effect of this command is to lock the password on user Ge’s account.

To effectively use a command, you need to know what arguments, options, and flags it uses and in what order it expects them (the syntax of the command). Most commands have a –help option. This option causes the command to print a description of what it does, describes the command’s syntax, a list of the options it accepts, along with what they do. If you are unsure how to operate a program and –help option is not available, you may try the “man” page. A man page is also known as a manual page. This option provides an overview of the program, and it’s syntax. If we wanted to look at how the sudo command is used, we would type “man sudo” to get a manual page for the command sudo.

How To Access The Commandline In A Desktop Environment?

The desktop environment is the graphical user interface on a Linux system. The default desktop environment in RHEL is GNOME. It provides an integrated desktop for users and a unified development platform on top of a graphical framework provided by the X Window System. The GNOME Shell provides the core user interface functions for the GNOME desktop environment.

To get a shell prompt in GNOME, start a graphical terminal application.
We can select Applications → Utilities → Terminal
On the desktop, right-click or press the Menu key, and select “Open in Terminal” from the menu.
From the Activities Overview, select Terminal from the dash.

When a terminal window opens, a shell prompt displays for the user that started the graphical terminal program. The shell prompt and the terminal window’s title bar will indicate the current user name, hostname, and working directory.

RPM And Software Packages

Red Hat developed the RPM Package Manager software, which provides a standard way to package software for distribution. Managing software in the form of RPM packages is much simpler than working with software that is extracted into a file system from an archive. The RPM software allows administrators to track which files are, or have been installed. It also checks to ensure supporting packages are present when the software is installed. Lastly, it identifies which dependencies need to be removed if a software package is uninstalled.

Information about installed packages is stored in a local RPM database on each system. All of the software provided by Red Hat is implemented as an RPM package. RPM packages are usually named using a combination of the following info using this format: 

name-version-release.architecture

When installing software from repositories, only the software name is required. Additionally, the software with the highest version will be installed. If there are several files within the same version, the software with the highest release number will be installed.

Each RPM software package is an archive made up of three components:

  1. The files installed by the packages
  2. Information (metadata) about the package – name, version, release, architecture
  3. A script which usually runs when the package is installed, updated, or removed

RPM packages are generally signed digitally by the group that packaged them. All software packages that come from a specific source are all signed with the same private GPG key. This way, if the software package is altered or corrupted in some way, the signature will no longer be shown as valid. This key signing allows the system to verify the integrity of the package before the install begins.

The YUM Package Manager

The YUM command searches multiple repositories for software packages and any associated dependencies, so they can be installed together to reduce or eliminate and dependency issues.

The main configuration file for yum is located at /etc/yum.conf with additional repository configuration files located in the etc/yum.repos.d directory. The yum command is used to list repositories, packages, and package groups:

Once a software package is installed, updates are checked against a repository during the daily update check. This allows for the RPM command to be used to query, update, install, and remove any outdated RPM packages.

Unfortunately, this check does not resolve dependencies automatically, and all software packages must be listed. Tools like YUM are essentially front-end applications for the RPM software and can be used to install an individual package or a collection of packages.

Managing Software Updates With YUM

Yum is a powerful commandline tool that can be used to flexibly manage software packages.

Finding Software with YUM

yum help – display usage information
yum list – display installed and available packages.

cli5

Yum search KEYWORD – list packages by keywords found in the name and summary fields. To search for packages that have “web server” in their name, we can use search all:

yum info PACKAGENAME – gives detailed information about a package.

Yum provides PATHNAME – displays packages that match the path name specified. To find packages that provide /var/www/html directory use:

Before we begin to install a package, let’s first make sure our system is up-to-date by issuing the command “yum update”.

Now that we know our system is updated, let’s install our package.

yum install PACKAGENAME

obtains and installs a software package, including all dependencies.

Next, we are asked if we want to install the package and dependencies. Type in ‘Y’ for yes, ‘N’ for NO

Yum now installs our package, fail2ban.

yum update PACKAGENAME 

obtains and installs the newest version of the software package, including all dependencies. With no PACKAGENAME specified, it will install all relevant updates for the system.

Yum remove PACKAGENAM

removes an installed software package, including any supported packages:

Enabling YUM Software Repositories

Registering a system to the subscription management service automatically configures access to the software repositories based on the attached subscriptions. To view all of the available repositories, we can use

yum repolist all

To enable a repository use yum-config-manager. This will enable or disable the parameters located in the /etc/yum.repos.d/redhat.repo file.

Enabling Third Party Software Repositories

Third-party repositories are directories of software package files provided by non-Red Hat source, which can be accessed by yum from a website, FTP server, or locally. Yum repositories are used by non-Red Hat distributors of software, or for small collections of local packages. To enable third-party support, you must put the file in the /etc/yum.repos.d/ directory. If the URL for a yum repository is known, a configuration file can be created via

yum-config-manager

This will create a file in the /etc/yum.repos.d directory with the output shown above. This file can now be modified to provide a customized name and the location of the GPG key. Administrators should download the key to a local file rather than allowing yum to retrieve the key from an external source.

RPM Configuration For The Repository:

Some repositories provide a configuration file and GPG public key as part of an RPM package that can be downloaded and installed using yum localinstall.

Using YUM To Install Local Package Files

The command

yum install PACKAGEFILE.rpm 

can be used to install package files directly. It automatically downloads any dependencies the package has from any configured yum repositories.

In this example, we downloaded an rpm file and then used

yum localinstall 

to begin installing the file from our machine.

Get Started Today!

Contact us today at 1.800.580.4985 to speak to a knowledgeable Solutions Provider who can get you the info you need, to make an informed decision right away.

Too busy to talk? Click HERE to open a quick chat with us to find out more.

Want more info in an email you can review at your leisure? Email us today to get handy advice on which product would best suit your needs.

We look forward to hearing from you!

How Do I Install Vue.JS 2019

Reading Time: 5 minutes

In this article, we review the history, use, installation, and implementation of Vue.JS in a web development environment. Vue.js is an open-source, JavaScript progressive framework that is primarily used for building user interfaces and single webpage applications.

What Exactly Is Vue.JS?
A Short History

Unlike other monolithic frameworks, Vue.JS is designed from the ground up to be incrementally adoptable. Its core library is focused on the view layer only and is easy to pick up and integrate with other libraries. Vue is also perfectly capable of powering sophisticated Single-Page Web Applications. 

Vue.js was created by Evan You, a Google developer, who after working on multiple Angular.js projects, concluded that:

“I figured, what if I could just extract the part that I really liked about Angular and build something really lightweight.”

“Between the Wires | Evan You”. Between the Wires. November 3, 2016. Archived from the original on June 3, 2017

The first appearance of Vue source code commits date back to July 2013, and the official release was in February of  2014.

Why Use Vue.JS

  1. Because Vue uses an HTML based template pattern which allows for the rendering of webpage DOM elements to be attached to the underlying Vue instance’s data.
  2. All of the Vue templates use valid HTML that can be interpreted by a normal browsers.
  3. Lastly, because Vue is open-source, the support community is extensive. Because the user community is large, there exists a quick way to find solutions for bugs that may be encountered in your Vue application.

In the picture below, you can see how “Standard Web Sites” work.

standard

A request is made from a browser to a server, and the server sends back the data to the browser. But what happens if you click on another link on that site? 

The cycle is repeating, so each time you click on a link: a new request is sent to the server, which then sends the data back to the browser and shows the updated content. 

Can this be bypassed? 

Yes, it can !!

The way that data travels when using Vue is the same as on the image above but, with one significant improvement. Once the site is loaded in a browser, all of the other requests that are made on the page are done in DOM. This means each request using Vue, can reach all of the other elements easily.

Vue compiles the templates into a virtual Document Object Model or shortened “DOM”, which allows Vue to render page components in its memory before updating the browser. Combined with the ability to react to a platform (mobile, tablet or desktop), Vue is able to calculate the minimal number of components that need to be rendered and then applies the minimal amount of manipulation needed when the app changes it state. This way Vue makes sites feel smoother without additional complexity. 

Getting Started with Vue JS on Liquid Web Servers

Requirements or Dependencies?

You can utilize Vue.JS on any type of server but, this tutorial focuses mainly on using a Centos 7 server with cPanel. Officially there are no external dependencies needed for VueJS to work. 

How Do I Use Vue? 

Direct <script> Include
It’s simple as importing a bootstrap css into your HTML template. 

<html>
  <head>
    <title>Vue.js Basics</title>
    <script src="https://cdn.jsdelivr.net/npm/vue@2.5.16/dist/vue.js"></script>
  </head>
  <body>

    <h1>Vue Basics</h1>
    <div id="app"> </div>

    <script src="app.js"></script>
  </body>
</html>

Cpanel installation via Softaculous

Login to your cPanel account via example.com/cpanel

Scroll down to the Softaculous Apps Installer and click on it.

softac
cPanel Main Screen

Once the Softaculous page loads, click on the search field in the upper left-hand corner and type “Vue”

softac2
Softaculous Main Screen

Next, click the “Install Now” button.

softac2
Click Install

After clicking the Install Now button, follow the steps on the next page by filling in the needed information. 

  • Choose the Protocol from the dropdown menu which you want to use.
  • Choose the domain from the dropdown menu on which you want to install – Choose the latest stable version of Vue.js (2.6.10)
  • Choose the directory in which you want to install Vue.js libraries 
  • Click Install

Finish – If all went well and there were no errors during the installation, you can visit example.com and image should show like the one below which means that the Vue.JS is installed correctly. 

Commandline Installation

Requirements For Centos 7.X

To be able to install Vue via the command line, there are some requirements. 

  1. Node.js (6.x – 8.x preferred)
  2. npm version 3.x+
  3. Git ( it should be installed by default on new Cpanel servers )
    1. If it’s not by any chance you can follow this tutorial  https://www.staging.liquidweb.com/kb/how-to-install-and-configure-git-on-centos-7/

If Node is not installed, let’s start by installing it.  First SSH to your server as the root user

Warning:
Always trust and verify the commands you are installing from an external bash source. Running a bash command from a malicious external source (especially as root) can cause undesirable effects up to and including data loss!

Next, type the command : 

[root@host ~]# curl  -sL https://rpm.nodesource.com/setup_12.x | bash -

The setup_12.x section in the above URL indicates the version of the Node JS package we will be installing. A complete list of the versions can be found at https://rpm.nodesource.com 

After we download the repository we can install the NodeJS with the following command:

[root@host ~]# yum install -y nodejs gcc-c++ make 

If there were no errors we can check the version of the NodeJS installed with the following command: 

[root@host ~]# node --version 

Also, we need to check NPM version 

[root@host ~]# npm --version 

If all of the prerequisites comply with the requirements, we can now move to the actual Vue CLI install.

To install the Vue 2 CLI the command is following. 

[root@host ~]# npm install -g vue-cli 

The output should be similar to this one :

cli1

Now that we have installed Vue globally, we can start creating our project. 

Creating a Vue 2 Project

After we have installed Vue.JS 2, we can now start building a project. 

Since we are already SSH’d into our server as the root user, we can start building our project by su’ing back to the local cpanel account/user we originally installed vue on. Let’s login to that user with the following command : 

[root@host ~]# su $user 

Next, we’ll navigate to our domain’s document root folder; home/$user/public_html

[root@host ~]#cd /home/nnewell/public_html 

Now that we are inside the document root, we can type the command:

[root@host ~]# vue init webpack lwvue-project

After we type the command we will be asked the following Questions:

Project name: lwvue-project
(press enter after all questions to move ahead)

Project description: A new Vue.js project

Author? add your name (if you so choose as the owner)

Vue build standalone? Runtime + Compiler: recommended for most users

Install vue-router? Yes

Use ESLint to lint your code? Yes

Set up unit tests? Yes

Pick a test runner? karma

Setup e2e tests with Nightwatch? Yes
S
hould we run npm install for you after the project has been created? (recommended) npm

Completed Setup

Now that we have started our project we will need to spin the server for development so we can test it out. 

[root@host ~]# npm run dev 

That will start the server on http://localhost:8081 by default 

For making a production build of our app we would need to run the following command from inside our project folder

[root@host ~]# npm run build 

If everything goes well the /dist folder should be created and you can basically move all the files from there to our /public_html folder since the Vue apps can be served via any HTTP server. 

And that’s it!

We know that there is already a Vue 3 version, but we will cover that version in an upcoming article for our knowledgebase. In that article, we will touch on the basics and a little bit more development with Vue.JS 3. 

Documentation and other useful Articles : 
https://vuejs.org/
https://vuejs.org/v2/guide/
http://demo.softaculous.com/enduser/index.php?act=js&soft=580
https://github.com/vuejs/vue-cli/tree/v2#vue-cli–
How to Install and Configure Git on CentOS 7

Aditional Video
https://youtu.be/5LYrN_cAJoA?list=PL4cUxeGkcC9gQcYgjhBoeQH7wiAyZNrYa

Need More Help?

Our Support and Solutions Teams are filled with talented systems administrators with an intimate knowledge of this and other web hosting technologies. If you are uncomfortable walking through the steps outlined here or are just looking for further feedback, we are just a phone call, chat or ticket away from providing you info you need.
Call us at 1.800.580.4985 

How to Install Node Version Manager on Ubuntu

Reading Time: 2 minutes

The Node Version Manager (NVM) is a command-line utility used to manage and switch between multiple active versions of Node.js on a single system. Whether you’re an admin or a developer, being able to change the javascript runtime environment on your system simplifies testing applications across different versions.

Continue reading “How to Install Node Version Manager on Ubuntu”

cPanel Pricing

Reading Time: 1 minute

Here is a monthly cost analysis of utilizing a cPanel server based on management platform (Cloud or Dedicated) and up to the number of accounts per server

Note:
If you purchase a prepaid VPS plan, the base price of the VPS will include up to 30 cPanel accounts.

If you need more information about how this change will affect you, our Liquid Web Solutions or Support teams can provide further information to help aid in making the right decision. Open a chat with us today or, give us a call at 1-800-580-4985 to find out more!

How Do I Setup W3 Total Cache In WordPress 2019?

Reading Time: 8 minutes

Do You Need W3TC?

The short answer is an overwhelming Yes!

W3 Total Cache is currently the best WordPress plugin for cache-based, performance optimization. W3 Total Cache improves the overall speed of your site by caching multiple elements on your pages which improves the overall responsiveness of your webserver.

What is Caching?

Caching is simply the storage of website data for later usage by your clients. Caching can be accomplished via multiple methods, with W3TC (W3 Total Cache) being one of the primary means to achieve this task. W3 Total Cache is rated as one of the best WordPress plugins for performance optimization on Virtual, Dedicated and Managed servers and, is used by millions of sites to increase their overall site performance. 

The W3TC plugin site itself lists multiple other benefits of this software as well, and I quote: 

Continue reading “How Do I Setup W3 Total Cache In WordPress 2019?”

How To Remove PostgreSQL

Reading Time: 2 minutes

Sometimes during a software install, things go sideways and you realize that not all of the program downloaded or the install was interrupted for some reason leaving you with incomplete files and empty directories. Honestly, this is an rare occurance but it can happen from time to time. This then begs the question; So how do I completely uninstall recently installed software? In this tutorial, we’ll be safely removing PostgreSQL from our Liquid Web Ubuntu 16.04 server.  

Continue reading “How To Remove PostgreSQL”