{"id":8325,"date":"2020-10-01T11:11:36","date_gmt":"2020-10-01T11:11:36","guid":{"rendered":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/?p=8325"},"modified":"2020-10-01T11:11:36","modified_gmt":"2020-10-01T11:11:36","slug":"install-angular-cli-on-centos-rhel","status":"publish","type":"post","link":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/install-angular-cli-on-centos-rhel\/","title":{"rendered":"How to Install Angular CLI on CentOS\/RHEL Versions: 8\/7\/6?"},"content":{"rendered":"<p>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.<\/p>\n<h3>1. Installing Node.js<\/h3>\n<p>At first, install node.js on your system. Configure node.js yum repository in your CentOS system and install it using the below commands:<\/p>\n<pre class=\"lang:default decode:true \">curl -sL https:\/\/rpm.nodesource.com\/setup_12.x | sudo -E bash -\r\nsudo yum install nodejs<\/pre>\n<p>Ensure that node.js and NPM are successfully installed on your system with the below commands:<\/p>\n<pre class=\"lang:default decode:true \">node --version\r\nnpm --version<\/pre>\n<h3>2. Installing Angular\/CLI<\/h3>\n<p>Once you install node.js and npm on your system, install the Angular CLI tool on your system by executing the below command:<\/p>\n<pre class=\"lang:default decode:true \">npm install -g @angular\/cli<\/pre>\n<p>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.<\/p>\n<pre class=\"lang:default decode:true \">npm install -g @angular\/cli@6 #Angular 6\r\nnpm install -g @angular\/cli@7 #Angular 7\r\nnpm install -g @angular\/cli@8 #Angular 8\r\nnpm install -g @angular\/cli@9 #Angular 9\r\n\r\nThe -g above command helps to install the Angular CLI tool globally. This makes it accessible to all users and applications on the system. Angular CLI offers a command ng for command-line operations. With this command, you can check the installed version of ng on your system.\r\nng --version\r\n\r\n\/ \\ _ __ __ _ _ _| | __ _ _ __ \/ ___| | |_ _|\r\n\/ \u25b3 \\ | '_ \\ \/ _` | | | | |\/ _` | '__| | | | | | |\r\n\/ ___ \\| | | | (_| | |_| | | (_| | | | |___| |___ | |\r\n\/_\/ \\_\\_| |_|\\__, |\\__,_|_|\\__,_|_| \\____|_____|___|\r\n|___\/\r\n\r\nAngular CLI: 9.0.7\r\nNode: 12.16.1\r\nOS: linux x64\r\n\r\nAngular:\r\n...\r\nIvy Workspace:\r\n\r\nPackage Version\r\n------------------------------------------------------\r\n@angular-devkit\/architect 0.900.7\r\n@angular-devkit\/core 9.0.7\r\n@angular-devkit\/schematics 9.0.7\r\n@schematics\/angular 9.0.7\r\n@schematics\/update 0.900.7\r\nrxjs 6.5.3<\/pre>\n<h3>3. Creating New Angular Application<\/h3>\n<p>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:<\/p>\n<pre class=\"lang:default decode:true \">ng new hello-angular<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<pre class=\"lang:default decode:true\">...\r\n...\r\nadded 1011 packages from 1041 contributors and audited 19005 packages in 55.774s\r\nfound 0 vulnerabilities\r\n\r\nSuccessfully initialized git.<\/pre>\n<p>With this, a directory named hello-angular4 will be created in your current directory along with an application.<\/p>\n<h3>4. Serving Angular Application<\/h3>\n<p>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:<\/p>\n<pre class=\"lang:default decode:true \">cd hello-angular\r\nng serve<\/pre>\n<p>Your angular application is now accessible on localhost port 4200, the default host and port used by Angular application.<\/p>\n<pre class=\"lang:default decode:true \">http:\/\/localhost:4200<\/pre>\n<p>It is possible to change host and port for running Angular application by providing \u2013host and \u2013port command line arguments.<\/p>\n<pre class=\"lang:default decode:true \">ng serve --host --port<\/pre>\n<p>In this way, you can install Angular CLI on CentOS\/RHEL versions 8\/7\/6.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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. [&hellip;]<\/p>\n","protected":false},"author":16,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[41],"tags":[1642,1643,1644],"class_list":["post-8325","post","type-post","status-publish","format-standard","placeholder-for-hentry","category-howtos","tag-angular-cli","tag-install-angular-cli-on-centos","tag-install-angular-cli-on-rhel"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Install Angular CLI on CentOS\/RHEL Versions: 8\/7\/6?<\/title>\n<meta name=\"description\" content=\"The article reveals steps to install Angular CLI on CentOS \/ RHEL versions - 8\/7\/6.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/install-angular-cli-on-centos-rhel\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Install Angular CLI on CentOS\/RHEL Versions: 8\/7\/6?\" \/>\n<meta property=\"og:description\" content=\"The article reveals steps to install Angular CLI on CentOS \/ RHEL versions - 8\/7\/6.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/install-angular-cli-on-centos-rhel\/\" \/>\n<meta property=\"og:site_name\" content=\"Web Hosting FAQs by MilesWeb\" \/>\n<meta property=\"article:published_time\" content=\"2020-10-01T11:11:36+00:00\" \/>\n<meta name=\"author\" content=\"Pallavi Godse\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Pallavi Godse\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/install-angular-cli-on-centos-rhel\/\",\"url\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/install-angular-cli-on-centos-rhel\/\",\"name\":\"How to Install Angular CLI on CentOS\/RHEL Versions: 8\/7\/6?\",\"isPartOf\":{\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#website\"},\"datePublished\":\"2020-10-01T11:11:36+00:00\",\"author\":{\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/7e3952607fa9eb4e82fea9f7cad9c945\"},\"description\":\"The article reveals steps to install Angular CLI on CentOS \/ RHEL versions - 8\/7\/6.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/install-angular-cli-on-centos-rhel\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/install-angular-cli-on-centos-rhel\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/install-angular-cli-on-centos-rhel\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Install Angular CLI on CentOS\/RHEL Versions: 8\/7\/6?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#website\",\"url\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/\",\"name\":\"Web Hosting FAQs by MilesWeb\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/7e3952607fa9eb4e82fea9f7cad9c945\",\"name\":\"Pallavi Godse\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/eefc9695ea2b2c6e143c9c9919701aaa?s=96&d=blank&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/eefc9695ea2b2c6e143c9c9919701aaa?s=96&d=blank&r=g\",\"caption\":\"Pallavi Godse\"},\"description\":\"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.\",\"url\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/author\/pallavi\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Install Angular CLI on CentOS\/RHEL Versions: 8\/7\/6?","description":"The article reveals steps to install Angular CLI on CentOS \/ RHEL versions - 8\/7\/6.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/install-angular-cli-on-centos-rhel\/","og_locale":"en_GB","og_type":"article","og_title":"How to Install Angular CLI on CentOS\/RHEL Versions: 8\/7\/6?","og_description":"The article reveals steps to install Angular CLI on CentOS \/ RHEL versions - 8\/7\/6.","og_url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/install-angular-cli-on-centos-rhel\/","og_site_name":"Web Hosting FAQs by MilesWeb","article_published_time":"2020-10-01T11:11:36+00:00","author":"Pallavi Godse","twitter_misc":{"Written by":"Pallavi Godse","Estimated reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/install-angular-cli-on-centos-rhel\/","url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/install-angular-cli-on-centos-rhel\/","name":"How to Install Angular CLI on CentOS\/RHEL Versions: 8\/7\/6?","isPartOf":{"@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#website"},"datePublished":"2020-10-01T11:11:36+00:00","author":{"@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/7e3952607fa9eb4e82fea9f7cad9c945"},"description":"The article reveals steps to install Angular CLI on CentOS \/ RHEL versions - 8\/7\/6.","breadcrumb":{"@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/install-angular-cli-on-centos-rhel\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.milesweb.co.uk\/hosting-faqs\/install-angular-cli-on-centos-rhel\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/install-angular-cli-on-centos-rhel\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/"},{"@type":"ListItem","position":2,"name":"How to Install Angular CLI on CentOS\/RHEL Versions: 8\/7\/6?"}]},{"@type":"WebSite","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#website","url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/","name":"Web Hosting FAQs by MilesWeb","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":"Person","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/7e3952607fa9eb4e82fea9f7cad9c945","name":"Pallavi Godse","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/eefc9695ea2b2c6e143c9c9919701aaa?s=96&d=blank&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/eefc9695ea2b2c6e143c9c9919701aaa?s=96&d=blank&r=g","caption":"Pallavi Godse"},"description":"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.","url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/author\/pallavi\/"}]}},"views":469,"_links":{"self":[{"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/posts\/8325","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/users\/16"}],"replies":[{"embeddable":true,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/comments?post=8325"}],"version-history":[{"count":1,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/posts\/8325\/revisions"}],"predecessor-version":[{"id":8326,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/posts\/8325\/revisions\/8326"}],"wp:attachment":[{"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/media?parent=8325"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/categories?post=8325"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/tags?post=8325"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}