Install react on centOS 8; Through this tutorial, we will learn how to install and use react on CentOS 8.
And as well as learn how to create first application in react js on centOS 8 machine.
How to Install React on CentOS 8
Follow the following steps to install and use react on centOS 8:
- Step 1 – Install Required NodeJs Packages
- Step 2 – Install Required Tools
- Step 3 – Install NodeJS
- Step 4 – Install ReactJS package
Step 1 – Install Required NodeJs Packages
First of all, open terminal and execute the following command on terminal to install required node js packages in centOS machine:
curl -fsSL https://rpm.nodesource.com/setup_current.x | bash -
Step 2 – Install Required Tools
Execute the following command on the terminal to install build tools:
dnf install gcc-c++ make -y
Step 3 – Install NodeJS
Execute the following command on the terminal to install NodeJS on CentOS:
dnf install nodejs -y
Now verify NodeJS and NPM installation.
node -v
npm -v
Step 4 – Install ReactJS package
Execute the following command on the terminal to install react js packages in centOS 8:
npm install -g create-react-app
Then execute the following command on the terminal to start to react js app:
create-react-app abc1
Use the following command on the terminal to switch to the project directory
cd abc1
Finally, start react app by executing the follwing command on the terminal;
npm start
Now, open web browser and run react js app.
Conclusion
Through this tutorial, we have learned how to install and use react on CentOS 8.