Skip to content

Instantly share code, notes, and snippets.

@mano8
Last active September 8, 2022 16:44
Show Gist options
  • Save mano8/3c49d10f71be77fe5f0dc6780ab473cd to your computer and use it in GitHub Desktop.
Save mano8/3c49d10f71be77fe5f0dc6780ab473cd to your computer and use it in GitHub Desktop.

Installation guide for debian server running vemonitor.

For this, i use an old asus eee pc 1000H laptop, see here for more info.

Install of debian 11

Downlad debian from debian.org the latest stable version for 32 bits systems. Use balenaEtcher to create a bootable usb. To boot from external media you have to press Esc during the BIOS boot splash screen and select the right installation medium. Complete the installation and upgrade the system : Pass to root user : $ su - and :
# apt-get update # apt-get upgrade # apt-get autoremove

For all installation operation to run with root account use :
# su - and not $ su command. To avoid some lost packages.
See this page.

Setting Up a Basic Firewall

Install ufw :
# apt-get update # apt-get install ufw You list all available application profiles by typing:
# ufw app list We need to make sure that the firewall allows SSH connections so that we can log back in next time. We can allow these connections by typing:
# ufw allow MY_SSH_PORT Afterwards, we can enable the firewall by typing:
# ufw enable You can see that SSH connections are still allowed by typing:
# ufw status Or, to see rules numbers : # ufw status numbered Then we can delete the rule One by typing :
# ufw delete 1 UFW guides :

Install ssh server

Pass on root account :
# su - SSH server can be intalled on debian installation process. If not, you may install it manually :
# apt-get install openssh-server Create an user for ssh:
# adduser MY_USER_NAME Next, we’ll set up this new user with admin privileges.
# usermod -aG sudo MY_SSH_USER_NAME To see users on group sudo: # getent group sudo
Backup the ssh configuration :
# cp /etc/ssh/sshd_config /etc/ssh/sshd_config_backup Now we can configure the ssh server :
# nano /etc/ssh/sshd_config

Install redis server

 # sudo apt-get update
 # sudo apt-get redis-server
 # sudo nano /etc/redis/redis.conf

Redis Configuration :
Be sure redis listen only on localhost: bind 127.0.0.1 ::1
we can change default redis port : port 6379 change redis supervized to systemd : supervised systemd

Reload redis server # sudo systemctl restart redis-server

Get redis server status : # sudo systemctl status redis-server

Install nginx, php, mysql

 # sudo apt-get update
 # sudo apt-get install nginx
 # sudo apt-get install mariadb-server
 # sudo mysql_secure_installation
 # sudo apt install php-fpm php-mysql php-redis

Install emoncms

see here for emoncms installation guide.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment