Red Hat/Cent OS
If you notice any mistakes that need to be corrected, please reach out on Discord!
MongoDB
Petio supports two ways of connecting to a Mongo Database instance, locally or remote. We recommend the locally hosted MongoDB option.
MongoDB Locally
Configure the package management system (yum)
Create a /etc/yum.repos.d/mongodb-org-4.4.repo file so that you can install MongoDB directly using yum:
Paste in the nano / terminal window:
Press: "CTRL + O" to save and "CTRL+X" to exit.
To install the latest stable version of MongoDB, issue the following command:
Start MongoDB:
Verify that MongoDB has started successfully:
To make sure MongoDB starts after restart use:
MongoDB Locally - On A Different Host
By default, MongoDB doesn’t allow remote connections.
Locate your
mongod.conf
and edit it with your favorite editor. Include any local IP addresses you want to allow to connect to your MongoDB instance.
Restart the
mongod
service after making these changes
If there is a firewall, you might need to use iptables
to allow access to MongoDB. Example below:
Any connections can connect to MongoDB on port 27017
Only certain IPs can connect to MongoDB on port 27017
MongoDB Remotely
Register for Atlas here.
Create a free cluster.
Change the provider or region if you need to. It may take some time to create the cluster.
After the cluster is made, click on connect and select MongoDB Compass and follow the instructions on screen.
Move on to the next section to start installing Petio.
Installing Petio
Create a user for Petio:
Make a directory for Petio:
Download the latest version of Petio:
Extract Petio to the directory we just made:
Change ownership of the directory for Petio:
Create the petio service with systemd:
Reload systemd:
Start Petio:
Once you've completed theses steps, you can navigate to http://<hostname>:7777
to start configuring Petio.
Last updated