Installing Angular on a Linux VPS/Cloud Print

  • 0

Angular is a framework and you may use typescript or javascript or dart programming language to program using Angular. Angular does not need node.js directly. Node js is used for all the build and development tools. However considering that you will likely want to develop and build your application on the server, you will need to intall NODE.js as part of the Angular instlalation.

1. Login to your server via shell (SSH).

2. Install the pre-requisites.

Node.js gets installed from the NodeSource repository which requires the EPEL repository:

sudo yum -y install epel-release

As we’ll be using npm to install angular CLI, it requires few build tools to compile and install packages:

sudo yum -y install gcc c++ make
curl -sL | sudo -E bash -

3. Install Node.JS.

yum -y install nodejs

Check the version to insure that everything went correctly:

node -v
npm -v

NOTE: Please note that Angular requires Node 8.9 or higher, together with NPM 5.5.1 or higher. Otherwise the installation in the next step will not proceed.

4. Install Angular.

npm install -g @angular/cli

Verify your Angular installation with the following command:

ng -v

5. Start an Angular project.

The following command generates the project structure, with pre-configured files for unit tests and bundling with the powerful Webpack bundler:

ng new <project-name>

6. Staring the development server.

cd <project-name>
ng serve

Note: The angular application should now be accessible at https://localhost:8005 (or your domain instead of localhost depending on where you deployed the application).

Was this answer helpful?

« Back