LINUX, FOSS AND LIBRARY TECHNOLOGY ENTHUSIAST

Saturday, July 27, 2024

Install Easy!Appointments on Debian/Ubuntu

0 comments
Easy!Appointments is an open-source appointment scheduling system that's user-friendly and straightforward to install. In this blog post, I'll guide you through the process of setting up Easy!Appointments on Debian 12. Let's get started!

Step 1: Update and Upgrade Your System

First, update your system packages to the latest versions:

sudo apt update
sudo apt upgrade -y

Step 2: Install Required Packages

Install Apache, MariaDB, and unzip:

sudo apt install -y apache2 mariadb-server unzip

Next, install PHP and the required PHP extensions:

sudo apt install -y php php-mysql php-curl php-json php-mbstring php-xml php-zip

Restart Apache to apply the changes:

sudo systemctl restart apache2

Step 3: Secure MariaDB

Secure your MariaDB installation by running:

sudo mysql_secure_installation

Follow the prompts to set the root password and secure the database server.

Step 4: Create the Database and User

Log in to the MariaDB server:

sudo mysql -u root -p

Create a new database and user for Easy!Appointments:

CREATE DATABASE easyappointments;
CREATE USER 'eappuser'@'localhost' IDENTIFIED BY 'eappuser@123';
GRANT ALL PRIVILEGES ON easyappointments.* TO 'eappuser'@'localhost';
FLUSH PRIVILEGES;
EXIT;

Step 5: Download and Configure Easy!Appointments

Navigate to the web root directory and download Easy!Appointments:

cd /var/www/html
sudo wget https://github.com/alextselegidis/easyappointments/releases/download/1.4.3/easyappointments-1.4.3.zip
sudo unzip easyappointments-1.4.3.zip -d easyappointments

Set the correct permissions:

sudo chown -R www-data:www-data /var/www/html/easyappointments
sudo chmod -R 755 /var/www/html/easyappointments

Step 6: Configure Apache

Create a new virtual host configuration file for Easy!Appointments:

sudo nano /etc/apache2/sites-available/easyappointments.conf

Add the following content:

<VirtualHost *:80>
    ServerAdmin admin@example.com
    DocumentRoot /var/www/html/easyappointments
    ServerName appointments.example.com
    <Directory /var/www/html/easyappointments/>
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
    </Directory>
    ErrorLog ${APACHE_LOG_DIR}/easyappointments_error.log
    CustomLog ${APACHE_LOG_DIR}/easyappointments_access.log combined
</VirtualHost>

Enable the new site and the rewrite module:

sudo a2ensite easyappointments.conf
sudo a2enmod rewrite
sudo systemctl restart apache2

Step 7: Configure Easy!Appointments

Navigate to the Easy!Appointments directory and copy the sample configuration file:

cd /var/www/html/easyappointments
sudo cp config-sample.php config.php

Edit the config.php file to update the URL and database configuration:

sudo vim config.php

Update the configuration section as follows:

// ------------------------------------------------------------------------
// GENERAL SETTINGS
// ------------------------------------------------------------------------

const BASE_URL      = 'https://appointments.example.com';
const LANGUAGE      = 'english';
const DEBUG_MODE    = FALSE;

// ------------------------------------------------------------------------
// DATABASE SETTINGS
// ------------------------------------------------------------------------

const DB_HOST       = 'localhost';
const DB_NAME       = 'easyappointments';
const DB_USERNAME   = 'eappuser';
const DB_PASSWORD   = 'eappuser@123';

Step 8: Enable HTTPS with Let's Encrypt

Install Certbot and configure SSL for your domain:

sudo apt install certbot python3-certbot-apache -y
sudo certbot --apache -d appointments.example.com

Follow the prompts to complete the SSL configuration.

Step 9: Access Easy!Appointments

Open your browser and navigate to:

http://appointments.example.com (if SSL is not configured)
https://appointments.example.com (if SSL is configured)

You should now see the Easy!Appointments setup screen. Follow the on-screen instructions to complete the setup.




No comments:

Post a Comment