HomeTutorialsHow To Install Monica Personal Relationship Management on Ubuntu

How To Install Monica Personal Relationship Management on Ubuntu

The Monica personal CRM is an organized and personalized customer relationship management system for those who maintain a busy life and can’t remember the small life events. The Monica personal relationship management tool can remember the events on your behalf and remind you when the date arrives. You can install the Monica personal relationship management tool on your Ubuntu Linux system to organize your thoughts, notes, to-do list, and other activities.

I must mention, if you’re a fan of the TV show, you probably already guessed that the name Monica might be taken from the tv show F.R.I.E.N.D.S., where we all liked Monica, and we all know how clean and organized she was.

Monica Personal Relationship Management On Ubuntu Linux


Installing the Monica personal relationship management tool on a Ubuntu Linux is easy and straightforward. You need to have a PHP server and a database installed on your Linux machine to install the Monica CRM on your system. It also has an API that you can use to run the application’s plugin on other platforms. However, the Monica personal relationship management tool also requires a hosting service to live the application.

Here, we will use the PHP server and MySQL database to set up the environment. This post will see how to install and get started with the Monica personal relationship management tool on Ubuntu.

Step 1: Download and Install Monica Personal Relationship Management Tool


Here, we will download the Monica personal relationship management tool on our Linux filesystem and configure it with the PHP server. First, run the following mkdir command to create a directory for the Monica CRM.

sudo mkdir -p /var/www/monica
cd /var/www/monica

Now, run the following change ownership command to grand the directory root permission. Don’t forget to change the username ubuntupit to your username.

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

Now, the following git command to clone the Monica CRM files on your system.

download Monica Personal Relationship Management On Ubuntu

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

To make the Monica personal relationship management tool’s environment, you can run the following .env command and set up the configuration. First, rename the example variable name, then configure the .env file.

mv .env.example .env
nano .env

Inside the configuration script, you can put your DB info, localhost address, port, and other user details.

# Database information
# To keep this information secure, we urge you to change the default password
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
# You can use mysql unix socket if available, it overrides DB_HOST and DB_PORT values.
#DB_UNIX_SOCKET=/var/run/mysqld/mysqld.sock
DB_DATABASE=monica
DB_USERNAME=monica 
DB_PASSWORD=**************

Monica Personal Relationship Management On Ubuntu config

Now, run the following composer command to install, configure, and integrate the Monica personal CRM configurations with the PHP server.

composer install --no-interaction --no-suggest --no-dev --ignore-platform-reqs

After finishing the composer, run the following NPM commands to install the NPM modules and run the javascript files.

npm install
npm run production

Finally, run the following artisan commands on your terminal shell to generate a PHP artisan(Laravel) key and finish the configuration.

php artisan key:generate
php artisan setup:production

Don’t forget to allow the root permission to the Monica personal CRM directory.

chown -R www-data:www-data /var/www/monica

Step 2: Install Apache Server On Ubuntu


While you need to work on a PHP server, you must choose the best PHP server for your application. You can either choose the Apache server or the Nginx server. Here, I will install the Apache PHP server on my Linux machine. Installing and configuring the Apache server on Linux quick and hassle-free. You can run the following command-line on your terminal shell to install the Apache PHP server on your machine.

sudo apt install apache2 libapache2-mod-php

Once the PHP server’s installation is done, you can check your server’s status by running the following system control command on your terminal shell.

sudo a2enmod rewrite 
sudo systemctl restart apache2

Step 3: Install PHP Modules on Ubuntu


After installing the Apache PHP server and MySQL database engine, we now need to install a few PHP modules to manage the PHP dependency packages. You can run the following command on your terminal shell to install PHP composer on your Ubuntu Linux.

sudo apt install -y git php php-intl php-json php-cli php-fpm php-mysql php-zip php-gd php-mbstring php-curl php-xml php-pear php-bcmath

Now, run the following command-line on your terminal shell to install PHP-XML, PHP-Json, PHP-MySQL, and other modules on your system.

Install PHP modules on Linux

php --version

Step 4: Install MariaDB Client On Ubuntu


This post will use the MariaDB engine to create a database for Monica personal relationship management tool. You can run the following aptitude command on your terminal shell to install the MySQL server client.

sudo apt install -y mariadb-server

You can check the version of the MySQL database on your machine.

mysql --version

After installing the MySQL database, we can now create a database for the Monica personal relationship management tool. If you are using a new MySQL database engine, you can run the following command to secure your database.

sudo mysql_secure_installation

Now, run the following SQL commands on your terminal shell to create a Monica personal relationship management tool database. Don’t forget to replace your database name and the password with yours.

Monica Personal Relationship Management On Ubuntu create a DB

$ mysql -uroot -p

CREATE DATABASE monica;
CREATE USER 'monica'@'localhost' IDENTIFIED BY 'StrongPassword';
GRANT ALL ON monica.* TO 'monica'@'localhost';
FLUSH PRIVILEGES;
exit

Step 5: Install PHP Composer And Node.js


In this step, you need to install the PHP composer and the Node.js JavaScript addon to set up the Monica personal CRM properly. Run the following command on your terminal shell to download the PHP composer setup file.

php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"

Now, run the following command to verify the hash encryption and make your localhost services secure.

HASH="$(wget -q -O - https://composer.github.io/installer.sig)"
php -r "if (hash_file('SHA384', 'composer-setup.php') === '$HASH') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"

PHP composer verified

Finally, run the command-line given below to install the PHP composer on your Ubuntu Linux.

php composer-setup.php --install-dir=/usr/local/bin --filename=composer

After installing the composer file, you can now run the following cURL command to download and install the Node.js application on your Ubuntu system.

curl -sL https://deb.nodesource.com/setup_10.x | bash -
apt-get install -y nodejs

Step 6: Configure Apache For Monica Personal Relationship Management


Configuring the Apache server for the Monica personal relationship management tool is requires the root privilege and some basic knowledge of server management. Here, we will edit the Apache configuration script, stored inside the /etc/Apache directory.

Run the following command-line on your terminal shell to edit the Apache configuration script. Here, I’m using the nano script editor; you can use your favorite script editor as well.

sudo nano /etc/apache2/sites-enabled/monica.conf

Now, you can add the following script lines inside your Apache server configuration to add your localhost for the Monica personal relationship management tool.

Apache server for Monica CRM

<VirtualHost *:80>
ServerName localhost

ServerAdmin ubuntupit
DocumentRoot /srv/monica/public

<Directory /srv/monica/public>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>

ErrorLog /var/log/apache2/monica_error.log
CustomLog /var/log/apache2/monica_access.log combined
</VirtualHost>

You can see that I’ve added my localhost address instead of an actual domain in the picture below. If you have an existing and active domain, you can use that domain to live your Monica personal relationship management tool web application.

Now run the following change ownership command on your terminal shell to give the Monica personal relationship management tool the root privileges.

sudo chown -R www-data:www-data /srv/monica
sudo chmod -R 775 /srv/monica/storage

You can now check your Apache server and restart the PHP server on your Ubuntu Linux.

$ sudo apachectl -t
Syntax OK
$ sudo systemctl restart apache2

Step 7: Get Started With Monica Personal Relationship Management


After installing the PHP server and configuring the Monica personal CRM, we can now run it through our favorite web browser. To load the Monica CRM on a web-browser, you need to know your localhost’s address (or domain URL if you used any custom domain). First, open your browser, type the localhost (127.0.0.1) address, and hit the Enter button.

localhost

Monica Personal Relationship Management On Ubuntu on web browser

Once the browser interface opens up, you can now put your user credentials and finish up Monica CRM’s installation process on your Ubuntu Linux.

Final Words


The developers of the Monica personal relationship management tool have made the UX better and smooth than previous. They have also introduced the CalDav and cardDAV services with the Monica personal relationship management tool. You can get the experience of using it as a journal or an address book.

However, if you are looking for a Monica mobile application, I’m afraid you would not get that. There is no portable Android or iOS version of Monica CRM currently available. If you are interested in more about the Monica CRM, you can try the Chandler: The Monica mobile application.

In the entire post, I have demonstrated installing and configuring the Monica personal relationship management tool on a Ubuntu Linux system. You can also install and integrate it with Docker containers and other Linux-based systems. It has both free and premium versions available; you can choose your version according to your need.

If you love this post, please share it with your friends and the Linux community. We also encourage you to write down your opinions in the comment section.

Mehedi Hasan
Mehedi Hasan
Mehedi Hasan is a passionate enthusiast for technology. He admires all things tech and loves to help others understand the fundamentals of Linux, servers, networking, and computer security in an understandable way without overwhelming beginners. His articles are carefully crafted with this goal in mind - making complex topics more accessible.

LEAVE A REPLY

Please enter your comment!
Please enter your name here


You May Like It!

Trending Now