# Manual

Last updated: August 21st, 2024

## Prerequisites

The following are the dependecies, you can follow the steps to get them done, or skip if you have them already setup.

- VPS
- Web Server & SSL
- PHP >= 8.1
- MySQL
- NodeJS >= 16
- Python 3.9

## First Step

Log into your server as root and make sure your server is entirely up-to-date. Use sudo if permission denied error occurs.

`apt update`

`apt full-upgrade`

## Python

### Ubuntu

`add-apt-repository ppa:deadsnakes/ppa`

`apt update`

`apt install python3.9`

`python3.9 --version`

### CentOS

#### PIP

`yum install epel-release`

`yum install python-pip`

`pip --version`

`source /opt/rh/devtoolset-8/enable`

#### Python

`yum install gcc openssl-devel bzip2-devel libffi-devel zlib-devel`

`wget https://www.python.org/ftp/python/3.9.6/Python-3.9.6.tgz`

`tar -xvf Python-3.9.6.tgz`

`cd Python-3.9.6`

`./configure --enable-optimizations`

`make`

`make altinstall`

`python3.9 --version`

## Web Server & SSL

You can use any web server, we will use Apache in this document.

### Apache

Follow this section if you have a paid SSL

`apt install -y apache2`

### [Or] Apache with Certbot

Follow this section if you want to use a free SSL

`apt install -y software-properties-common`

`add-apt-repository ppa:certbot/certbot`

`apt install -y python-certbot-apache`

### Configure Apache

Add "ServerName yourdomain.in;" to below file and reload Apache.

`vim /etc/apache2/sites-available/yourdomain.in.conf`

`apache2ctl configtest`

`systemctl reload apache2`

### SSL Certificates

Install SSL certificates with certbot.

`certbot --apache -d yourdomain.in`

Open the below file and append jupitermeet/public at the end of DocumentRoot.

`vim /etc/apache2/sites-available/000-default-le-ssl.conf`

For ex: DocumentRoot /var/www/html/jupitermeet/public

In the same file add the following block after DocumentRoot

`<Directory /var/www/html>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
`

Enable the rewrite module

`a2enmod rewrite`

Restart the server

`systemctl restart apache2`

## PHP

`apt install software-properties-common`

`add-apt-repository ppa:ondrej/php`

`apt update`

`apt install php8.1 -y`

Install required extensions

`apt install php8.1-mbstring php8.1-mysqli php8.1-curl php8.1-dom php8.1-xml php8.1-xmlwriter php8.1-common php8.1-zip php8.1-bcmath php8.1-gettext -y`

### Verify

`php -v`

## MySQL

Install MySQL and phpMyAdmin.

## NodeJS

Download and install NodeJS and NPM.

`apt install -y curl`

`curl -sL https://deb.nodesource.com/setup_16.x | bash -`

`apt install -y nodejs`

Install a process manager tool

`npm i -g pm2`

### Verify

`node -v`

`npm -v`

## Permission

Unzip the jupitermeet_pro folder into the web folder (/var/www/html).

`cd /var/www/html/jupitermeet_pro`

`chmod -R 775 .`

`chown -R $USER:www-data .`

## Installation

- Create an empty database from phpMyAdmin

Now, you can continue to the Application setup step.