How to Install AngularJS on AlmaLinux 9

Angular is a popular, open-source web application framework for building mobile and desktop apps. It was developed in 2009 by Google to help developers design complex applications from scratch without having expert knowledge of coding languages like C# or Java. It can take up valuable time when you want something simple with little functionality at first but grow as your project develops over the years.

In the following tutorial, you will learn how to install Angularjs on AlmaLinux 9 using the command line terminal using the NodeSource repositories as the source for NodeJS and NPM.

Update AlmaLinux

First, before anything, update your system to ensure all existing packages are up to date to avoid any conflicts.

sudo dnf upgrade --refresh

Install Required Dependencies

Next, to ensure the installation goes smoothly following our tutorial, run the following command, which will install any missing packages that may be required.

sudo dnf install curl gnupg2 gnupg git wget gcc-c++ make -y

Install Node.js

Currently, Angular is only supported on LTS versions of Node.js, but for the tutorial, you will install the NodeSource repository and the latest LTS version available on your system.

Import the repository self-set up the script using the following command, which will also execute it.

curl -fsSL | sudo bash -

Now that you have installed the repository install Node.js as follows.

sudo dnf install nodejs

Confirm the version and build of Node.js that was installed.

node --version

Lastly, ensure your NPM is up-to-date using the following command; this is critical; do not skip for users that are incredibly new to using NPM.

sudo npm install npm@latest -g

Install AngularJS

Use the following command to install the AngularJS CLI tool.

sudo npm install -g @angular/cli

Once installed, verify the version using the following command.

ng version

Example output:

angularjs output check almalinux 9
angularjs output check almalinux 9

Create AngularJS Project

Once you have successfully installed Angular, you will create a quick project.

First, create a new AngularCLI project; remember to change {project-name} to something else.

ng new test-project

Second, access the folder created with the name of the project.

cd test-project

Next, create and serve the project with the following command.

ng serve

Or you can change the host and port running your Angular application by providing the host and port as the example below.

ng serve --host your-server-ip --port 8088

For local environments, use localhost or for domains, use the domain name.

Example output:

angularjs serve example output almalinux 9
angularjs serve example output almalinux 9

Access AngularJS Web Interface

Once the test project you created is delayed and listening on port 8088, you can now access it on the URL from your browser.

### Domain Access ###

### IP Address ###

### Local Environments ###

Once you arrive, you should see the following screen.

angularjs webui almalinux 9
angularjs WebUI almalinux 9

Comments and Conclusion

Angular is the right choice if you are looking for a robust, feature-rich framework that will allow you to build high-quality mobile and web applications. With its large community of contributors, ongoing development, and growing popularity, you can be sure that Angular will be around for years.

Not what you were looking for? Try searching for additional tutorials.

Leave a Comment