Home / How To / How to install Monica Personal Relationship Manager on CentOS 8

How to install Monica Personal Relationship Manager on CentOS 8

Monica is an open-source Personal Relationship Management (PRM) web application designed to organize interactions with your loved ones. Think of it as a CRM (a popular tool used by sales teams in the corporate world) for your friends or family. Monica allows people to keep track of everything that is important about their friends and family. Like the activities done with them. When you last called someone. What you talked about. It helps you remember the child's name and age. It can also remind you to call someone you haven't talked to in a while. This tutorial will go over the Monica installation on CentOS 8.


  • Add and manage contacts
  • Define relationship between contacts
  • Reminders
  • Auto birthday reminders
  • Keep in touch with a contact of sending reminders at a certain interval
  • Debt management
  • Ability to add notes to a contact
  • Ability to specify how you met someone
  • Handling activities done with a contact
  • Handling of tasks
  • Handling of gifts
  • Handling of addresses and all different ways of contacting someone
  • Handling of contact field types
  • Handling of contact animals
  • Basic journal
  • Ability to specify how the day went
  • Upload documents and photos
  • Exporting and importing data
  • Exporting contact as vCard
  • Ability to specify custom genders [1
    9659004] Ability to define custom activity types
  • Ability to favorite contacts
  • Tra ck conversations made on social media or SMS
  • Multiple users
  • Labels to organize contacts
  • Ability to define which section to display on Contact Sheet
  • Multiple Currencies
  • Multilingual
  • An API that covers most data


  • CentOS 8
  • Git
  • NPM (Node Package Manager)
  • PHP version 7.1 or newer
  • MySQL
  • HTTP server with PHP support (e.g. Apache, Nginx, Caddy …)
  • Composer
  • Optional: Redis or Beanstalk


  • A CentOS 8 operating system.
  • A non-root user with sudo privileges.

Initial steps

Check your CentOS version:

  cat / etc / centos release 
# CentOS Linux release 8.0.1905 (Core)

Set time zone: [19659046] timedatectl list- timezones
sudo timedatectl set-timezone & # 39; Region / City & # 39;

Update your operating system packages (software). This is an important first step as it ensures that you have the latest updates and security fixes for your operating system's standard software packages:

  sudo yum update -y 

Install some important packages necessary for basic CentOS operating system administration: [19659046] sudo yum install -y curl wget vim git unzip socat bash-complete epel-release gcc-c ++ make libpng-devel

Step 1 – Install PHP

Install PHP as well as required PHP- extensions:

  sudo yum install -y php php-cli php-fpm php-common php-mbstring php-xml php-mysqlnd php-curl php-zip php-intl php-bcmath php-gd php-json php-gmp 

To display PHP compiled in modules, you can run:

   php -m 

. . .
. . .

Check PHP version:

  php --version 

# PHP 7.2.11-1- (cli) (built: October 26, 2019 14:14:18 AM) (NTS)
# Copyright (c) 1997-2018 PHP Group
# Zend Engine v3.3.11, Copyright (c) 1998-2018 Zend Technologies
# with Zend OPcache v7.3.11-1 ~ deb10u1, Copyright (c ) 1999-2018, by Zend Technologies

Starting and activating PHP-FPM service:

  sudo systemctl start php-fpm.service 
sudo systemctl enable php-fpm.service

Step 2 – Installing the acme.sh client and obtaining Let & # 39; s Encrypt certificate (optional)

Securing your website with HTTPS is not necessary, but it is a good practice to secure your website traffic. To get a TLS certificate from Let & # 39; s Encrypt, we will use the acme.sh client. Acme.sh is a simple UNIX shell software to get TLS certificates from Let & # 39; s Encrypt with zero dependencies.

Download and install acme.sh:vud19659046?sudo su – root
git clone https://github.com/ Neilpang / acme.sh.git
cd acme.sh
./ acme.sh – install –accountemail [email¬†protected] source ~ / .bashrc
cd ~

Check acme.sh version:

  acme.sh - version 
# v2.8.2

Get RSA and ECC / ECDSA certificate for your domain / host name:

  # RSA 2048 
acme.sh - emission - standalone - d example.com --keylength 2048
acme.sh --issue - standalone -d example .com - key length ec-256

If you want fake certificates for testing, you can add - staging flag for the commands above.

After running the above commands, certificate and keys will be in:

  • For [1 9459023] RSA : / home / usname / example.com directory.
  • For ECC / ECDSA : /home/username/example.com_ecc directory.

To list your issued certificates, you can run:

  acme.sh --list 

Create a directory to store your certificates. We will use the directory / etc / letsencrypt .

  mkdir -p /etc/letsecnrypt/example.com Chapter19659079vardsudo mkdir -p /etc/letsencrypt/example.com_eccebrit19659047 Ch an19459027] Install / Copy Certificate to    / etc / letsencrypt     .        

  # RSA 
acme.sh --install-cert -d example.com --cert-file / etc / letsencrypt / example.com / cert.pem --key-file /etc/letsencrypt/example.com/private.key --fullchain-file /etc/letsencrypt/example.com/fullchain.pem --reloadcmd "sudo systemctl reload nginx.service "
acme.sh --install-cert -d example. com --ecc --cert-file /etc/letsencrypt/example.com_ecc/cert.pem --key-file /etc/letsencrypt/example.com_ecc/private.key --fullchain-file / etc / letsencrypt / example. com_ecc / fullchain.pem --reloadcmd "sudo systemctl reload nginx.service"

All certificates are automatically renewed every 60 days.

After obtaining certificate output from root users and return to normal sudo users:


Step 3 - Install MariaDB and create a database for Monica

Install MariaDB database server:

  sudo yum install -y mariadb server 

Check version of MariaDB :

  mysql - version 
# mysql Ver 15.1 Distrib 10.3. 17-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2

Start and activate MariaDB service:

  sudo systemctl start mariadb.service 
sudo systemctl enable mariadb.service

Run mysql_secure installation script to improve MariaDB security and set the password for MariaDB root user: [19659000] sudo mysql_secure_installation

Reply to all questions:

  Want to set up VALIDAT PASSWORD plugin?  N 
New password: your_secure_password
Enter new password: your_secure_password
Remove anonymous users? [Y/n] Y
Removing root login remotely? [Y/n] Y
Delete the test database and access it? [Y/n] Y
Reload privilege tables now? [Y/n] Y

Connect to MariaDB shell as root user:

   sudo mysql -u root -p 
# Enter password

Create an empty MariaDB database and users for Monica and remember references:

  mariadb> CREATE DATABASE dbname; 
mariadb> GRANT ALL ON dbname. * TO & # 39; username & # 39; IDENTIFIED BY & # 39; password & # 39 ;;

Exit from MariaDB :

  mariadb> exit [19659047] Replace  dbname,   username  and  password  with your names . 

Step 4 - Install and configure NGINX

Monica works well with most large web server software with PHP support, but in this guide we will use NGINX. Use Apache if you prefer NGINX.

Install NGINX:

  sudo yum install -y nginx 

Check NGINX version:

  sudo nginx -v 
# nginx version: nginx / 1.14.2 Chapter19659047achteRun sudo vim / etc /nginx/conf.d/monica.confebrit19659128] command and configure NGINX for Monica.

  server {
listen 80;
listen 443 ssl;

server name example.com;
root / var / www / monica / public /; 
ssl_certificate /etc/letsencrypt/example.com/fullchain.pem; Chapter19459019vardssl_certificate_key /etc/letsencrypt/example.com/private.key;vud19459019??# ECC
ssl_certificate / etc reads example.com_ecc / fullchain.pem;
ssl_certificate_key /etc/letsencrypt/example.com_ecc/private.key;ebrit19459019] index index.php; charset utf-8; location ^ ~ / storage { deny everything; } location / { try_files $ uri $ uri //index.php?$query_string; } location ~ * .php $ { fastcgi_split_path_info ^ (. + . php) (/.+) $; include fastcgi_params; fastcgi_pass; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $ document_root $ fastcgi_script_name; fastcgi_buffer_size 16k; fastcgi_buffers 4 16k; } }

Test NGINX configuration:

  sudo nginx -t 

Reload NGINX:

  sudo systemctl reload nginx.service 

Step 5 - Install Node.js and npm

Install Node.js :

  curl - silent - location https://rpm.nodesource.com/setup_12.x | sudo bash - 
sudo yum install -y nodejs

Check Node.js and npm versions:

  node -v && npm -v 
# v12.13.1
# 6.12.1

Step 6 - Install Composer

Install Composer:

  php -r "copy (& # 39; https: //getcomposer.org/installer&#39 ;, & # 39; composer-setup.php & # 39;) ; " 
php -r "if (hash_file (& # 39; SHA384 ;, & # 39 & # 39; Composer setup.php & # 39;) === & # 39; a5c698ffe4b8e849a443b120cd5ba38043260d5c4023dbf93e1558871f1f07f58274fc6f4c93bcfd858c6bdcdcd-s7 echo PHP_EOL;"
php composer-setup.php
php -r "unlink (& # 39; composer-setup.php & # 39;);"
sudo mv composer.phar / usr / local / bin / composer [19659047] Check Composer version:

  composer --version 
# Composer version 1.9.1 2019-11-01 17:20:17

Step 7 - Install and configure Monica

Create an empty document root folder where Monica shall be installed:

  sudo mkdir -p / var / www / monica [19659047] Navigate to the document root directory: 

  cd / var / www / monica 

Change the ownership of / var / www / monica folder for user johndoe: [19659064] Don't forget to replace "johndoe" with your username.

  sudo chown -R johndoe: johndoe / var / www / monica 

clone Monica archive to it:

  git clone https: // github. com / monicahq / monica.git. 
git checkout tags / v2.15.2

NOTE: Check out a tagged version of Monica as the master branch may not always be stable. Find the latest official version on the release page on Github and update it to the above version number to the latest version.

How to create your version of all environment variables needed for the project to work :

  cp .env.example .env 

Update .env [19659092] to your specific needs. Don't forget to set DB_USERNAME and DB_PASSWORD with the settings used behind. You must configure a mail server for registration and reminders to function properly.

Run composite installation - no-interaction - no-suggest - no-dev to install all packages.

Run php craft button: generate to generate an application key. This will set APP_KEY to the correct value automatically.

Run php artisan setup: production -v to run the migrations, set the database and symlink folders.

Set appropriate ownership and permissions:

  sudo chown -R nginx: nginx / var / www / monica 
sudo chmod -R 775 / var / www / monica / storage

Run sudo vim /etc/php-fpm.d/www.confebrit19459015] and set user and group to nginx . Originally, it will be set to users and group apache .

  sudo vim /etc/php-fpm.d/www.confebrit19659047??Restart  php-fpm.service:  

  sudo systemctl restart php-fpm.service 

Step 8 - Finish the Monica installation

Now open your browser and type the URL http://example.com. You will be redirected to the following page:

  Create an account

Enter your e-mail address, name and password. Then click the Register button. You should see the Monica dashboard on the following page:

  Monica PRM login

Source link