Installing Cenit IO step by step
The best way to install Cenit IO on your server is by using docker-compose. However there is an issue we need to solve in order to enable the installation using docker, so you can use this alternative way in the meantime.
Guide for Cenit installation on-premise​
Pre-condition​
As a pre-condition, RabbitMQ must be installed. If you need to install RabbitMQ you can follow these steps: https://www.rabbitmq.com/install-debian.html
1- Install MongoDB​
You need to install MongoDB
sudo apt update
sudo apt install -y mongodb
Check the service and the database: sudo systemctl status mongodb
2- Install the Cenit UI Frontend​
Then you need to install the frontend
Clone the repository at https://github.com/cenit-io/ui
Install it using yarn (You may use npm but we recommend to use yarn instead)
You need to create a config file named .env.local in the root directory in order to config a local backend. The file content is:
REACT_APP_LOCALHOST="http://127.0.0.1:3000"
REACT_APP_APP_ID="admin"
REACT_APP_CENIT_HOST="http://127.0.0.1:3001"
- Start the frontend ui:Â yarn start
2- Install the Cenit UI Backend​
Clone the repository at https://github.com/cenit-io/cenit
Install Ruby 2.5.5 by using rvm (You may use rpm but we recommend to use rvm instead)
Install the rvm https://rvm.io/rvm/install
Install ruby version 2.5.5: rvm install 2.5.5
Create a cenit gemset to install all the gems: rvm gemset create cenit
Select cenit gemset created: rvm use 2.5.5@cenit
Install the gem bundler needed to install the gems: gem install bundler
Install the gems: bundle install
- Start the backend server: rails s
3- Access Cenit locally​
- If you enter in the browser to localhost:3000 you will see a page like the one below
- If you click Admin you will see a page like the one below
- If you click https://cenit-ui.io the browser will try to access that URL in the cloud.
So you need to create a config file named application.yml in the cenit/config directory in order to tell Cenit to use a local environment, not the cloud one. The file content is:
'HOMEPAGE': http://127.0.0.1:3001
'Cenit::Admin:default_uri': http://127.0.0.1:3000
Start the backend server again: rails s -p 3001
Start the frontend ui again:Â yarn start
Access localhost:3000 again and you will be redirected to 127.0.01:3001, then enter Admin and select http://127.0.0.1:3000
then you will see the Cenit UI running locally: