Ionic framework is open source UI toolkit for building mobile and desktop applications using core web technologies like HTML, CSS, and JavaScript. Ionic is designed to work and display beautifully on all current mobile devices and platforms.
This article will help you to install Ionic framework CLI tool on your CentOS 8 and RHEL 8 systems.
Step 1 – Install Node.js
Ionic required Nodejs to be installed on your system. The systems don’t have installed Nodejs use following commands to install Node.js 12.x version on your system. You can visit our tutorial to install latest Node.js on CentOS and RHEL systems.
curl -sL https://rpm.nodesource.com/setup_12.x | sudo -E bash - sudo dnf install nodejs
Step 2 – Install Cordova
After installing nodejs, run the following command to install Cordova on your system using npm command. It will install all other required node modules on your system.
sudo npm install -g cordova
Step 3 – Install Ionic on CentOS
Ionic provides and commands line utility for creating packages, build and start applications. Use NPM command to install Ionic framework on your system.
sudo npm install -g @ionic/cli
After completing the installation of the Ionic framework, use following command to check installed version.
ionic -v 6.10.1
4. Create Ionic Application
Now, You need to create a new Ionic application on your computer by running the following command.
ionic start
Now follow the wizard:
- Select framework between React or Angular.
- Now, enter a name for your new application
- Select a starter template. The details of each template is listed on screen.
After completing the Wizard, you will get a message “Your Ionic app is ready!”. It will also show the next steps on screen.
Now, run the below command from your application directory.
cd ionic-app ionic serve --host 0.0.0.0 --port 8100
Then access your ionic application in web browser using system IP.
For more details visit http://ionicframework.com/docs/guide/installation.html