Knowledge Base
MilesWeb / How-Tos

How to Install Angular CLI on CentOS/RHEL Versions: 8/7/6?

Approx. read time : 2 min

Angular is a framework used to build single-page client applications with the help of HTML and TypeScript. It monitors all the components and ensures that they are updated by checking for their updates regularly. In this tutorial, you will learn to install the Angular CLI tool on CentOS 8/7/6 and RHEL 8/7/6 Linux operating systems.

1. Installing Node.js

At first, install node.js on your system. Configure node.js yum repository in your CentOS system and install it using the below commands:

Ensure that node.js and NPM are successfully installed on your system with the below commands:

2. Installing Angular/CLI

Once you install node.js and npm on your system, install the Angular CLI tool on your system by executing the below command:

With this, the latest available Angular CLI version will be installed on your system. For installing specific Angular version run command as below with version number.

3. Creating New Angular Application

You can also create a new application for example, hello-angular4 with the help of the Angular CLI tools. Run the following command for this:


With this, a directory named hello-angular4 will be created in your current directory along with an application.

4. Serving Angular Application

The basic Angular application is ready to serve. Now change the directory to hello-angular4 and run your Angular application with the ng serve command:

Your angular application is now accessible on localhost port 4200, the default host and port used by Angular application.

It is possible to change host and port for running Angular application by providing –host and –port command line arguments.

In this way, you can install Angular CLI on CentOS/RHEL versions 8/7/6.

Pallavi Godse
Pallavi is a Digital Marketing Executive at MilesWeb and has an experience of over 4 years in content development. She is interested in writing engaging content on business, technology, web hosting and other topics related to information technology.