Installing Angular on a Linux VPS/Cloud
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
3. Install Node.JS.
yum -y install nodejs
- Check the version to insure that everything went correctly:
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:
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.
Note: The angular application should now be accessible at http://localhost:8005 (or your domain instead of localhost depending on where you deployed the application).