In this tutorial, we will show you how to install AngularJS on Debian 11. For those of you who didn’t know, Angular is an open-source, popular, and highly-extensible front-end application development framework, used for building mobile and web applications using TypeScript and other common languages. It was developed by Google on October 20, 2010, and is currently maintained by Google and other individuals and corporations.
This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo
‘ to the commands to get root privileges. I will show you the step-by-step installation of the AngularJS on a Debian 11 (Bullseye).
Prerequisites
- A server running one of the following operating systems: Debian 11 (Bullseye).
- It’s recommended that you use a fresh OS install to prevent any potential issues.
- A
non-root sudo user
or access to theroot user
. We recommend acting as anon-root sudo user
, however, as you can harm your system if you’re not careful when acting as the root.
Install AngularJS on Debian 11 Bullseye
Step 1. Before we install any software, it’s important to make sure your system is up to date by running the following apt
commands in the terminal:
sudo apt update sudo apt upgrade
Step 2. Installing Node.js.
Now we add the official Node.js repository manually on Debian Bullseye:
curl -fsSL https://deb.nodesource.com/setup_current.x | sudo -E bash -
Once the repository is added successfully, you can now install Node.js using the following command below:
sudo apt install nodejs
Verify the Node.js and NPM version:
$ node -v v14.18.4 $ npm --version 6.14.16
Step 3. Installing AngularJS on Debian 11.
Now we run the following command below to install AngularCLI:
sudo npm install -g @angular/cli
Verify the AngularJS installation:
ng --version
Output:
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _| / △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | | / ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | | /_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___| |___/ Angular CLI: 12.2.22 Node: 14.8.0 OS: linux x64 Angular: ... Package Version ------------------------------------------------------ @angular-devkit/architect 0.801.7 @angular-devkit/core 12.2.22 @angular-devkit/schematics 12.2.22 @schematics/angular 12.2.22 @schematics/update 0.801.3 rxjs 6.4.0
Step 4. Create Angular Application.
Now create a new AngularCLI project using the following command:
ng new [new-project-name]
Next, access the folder created with the name of the project:
cd [new-project-name]
To test everything, run:
ng serve
You can change host and port for running Angular applications by providing –host and –port command-line arguments:
ng serve – host [host_ip] – port [port]
Step 5. Accessing Angular Application.
Once successfully create the project, open a web browser and navigate the URL http://your-IP-address:4200
, you will see the following:
Congratulations! You have successfully installed AngularJS. Thanks for using this tutorial for installing the latest version of AngularJS on Debian 11 Bullseye. For additional help or useful information, we recommend you check the official AngularJS website.