1
0
Fork 0
mirror of https://github.com/ThomasGsp/HyperProxmox.git synced 2025-02-13 19:52:11 +00:00
HyperProxmox/doc/md/02-backend.md
2018-04-30 19:43:26 +01:00

1.4 KiB

Backend

Databases

The backend need two database servers: MongoDB and Redis.
MongoDB is the main data storage and redis is used like a cache system.
HyperProxmox can run with default configuration, but you should setup redis to work in full memory, and the same for the MongoDB indexes.

apt-get install mongodb nginx redis-server

Setup Redis

Redis-server can work with a small memory-cache dedicated.

vi /etc/redis/redis.conf

# Networking
bind 127.0.0.1
port 6379
tcp-keepalive 60
 
# Maximum memory
maxmemory 256mb
maxmemory-policy allkeys-lru
 
# Disable disk persistence
appendonly no
save ""

Setup MongoDB

vi /etc/mongodb.conf

bind_ip = 127.0.0.1
port = 27017

Install python

apt-get install python3-redis python3-netaddr python3-pip python3-webpy python3-requests
pip3 install pymongo

 Install sources files

apt-get install git

useradd hyperproxmox
cd /opt/ && git clone https://github.com/ThomasGsp/HyperProxmox.git

# Set hyperproxmox
chown hyperproxmox: -R /opt/HyperProxmox
chmod 760 -R /opt/HyperProxmox

# Log dir (you can change it)
mkdir /var/log/hyperproxmox/
chown hyperproxmox: /var/log/hyperproxmox/

#Rm demo keys
rm /opt/HyperProxmox/code/scripts/main/private/keys/Ragnarok.p*

Prerequisites <-- Previous | Next --> Setup - Backend