💽Dependencies

Solary Software System Requirements:

To ensure optimal performance and compatibility, Solary Software requires the following versions of dependencies:

  • PHP: Version 7.4 to 8.2 (inclusive). It is mandatory to have at least one PHP version within this range installed on your system.

  • MySQL: Version 8.0. If MySQL is being utilized, it must be version 8.0.

  • MongoDB: The latest available version of MongoDB must be installed.

  • cURL: The latest available version of cURL is required.

  • Apache2: The web server Apache2 is necessary for hosting the software.

Installation Location:

The Blackout License Software should be hosted in either /var/www/html or in a subfolder of /var/www/ (e.g., /var/www/your-sub-folder). If you choose to host it in a sub-folder, please follow these instructions for executing commands:

  • Ubuntu 18.04 to 22.04: After navigating to the desired sub-folder, execute commands as usual. For example:

    cd /var/www/your-sub-folder
  • CentOS, Linux: Similarly, navigate to the desired sub-folder and execute commands. For example:

    cd /var/www/your-sub-folder

Apache2 Setup:

To enable Apache2, follow these steps:

  1. Install Apache2 if it's not already installed:

    sudo apt update
    sudo apt install apache2
  2. Start the Apache2 service:

    sudo systemctl start apache2
  3. Enable Apache2 to start on boot:

    sudo systemctl enable apache2

Configuring .htaccess:

To enable .htaccess support in Apache2, you need to configure the site's VirtualHost file located in /etc/apache2/sites-available/.

  1. Open the VirtualHost file for your site in a text editor:

    sudo nano /etc/apache2/sites-available/your-site.conf
  2. Inside the <VirtualHost> block, add the following directives to allow .htaccess overrides:

    <Directory /var/www/html>
        AllowOverride All
    </Directory>
  3. Save and close the file.

  4. Enable the use of .htaccess files by activating the rewrite module:

    sudo a2enmod rewrite
  5. Restart Apache2 to apply the changes:

    sudo systemctl restart apache2

Database Setup:

No manual database creation is required. The software will handle database setup automatically. You only need to provide the correct database connection details during setup. The software will verify the connection and create any necessary data for functionality.

Ensure that the server environment meets these requirements before installing Solary License Software for seamless operation.

Installation Guide: PHP 7.4++ with Apache and Dependencies on Ubuntu 18.04++

This guide provides step-by-step instructions for setting up PHP 7.4 or a newer version along with Apache, and ensuring all required extensions and modules are installed on an Ubuntu 18.04++ VPS.


Prerequisites

  1. Root or Sudo Access: Ensure you have root access or a user with sudo privileges.

  2. Updated System: Update your system packages to the latest versions.

sudo apt update && sudo apt upgrade -y

Step 1: Add PHP Repository

Ubuntu's default repositories may not include the latest PHP versions. Add the Ondřej Surý PPA, which maintains updated PHP packages.

sudo apt install -y software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt update

Step 2: Install Apache

Install the Apache web server if it is not already installed.

sudo apt install -y apache2

Enable Apache to start at boot and ensure it's running:

sudo systemctl enable apache2
sudo systemctl start apache2

Step 3: Install PHP 7.4 or Newer

Install the desired PHP version and the required modules:

sudo apt install -y php7.4 php7.4-cli php7.4-common php7.4-fpm php7.4-mysql php7.4-mbstring php7.4-curl php7.4-gd php7.4-zip php7.4-xml php7.4-bcmath php7.4-intl

If you want PHP 8.0 or newer, replace php7.4 with the desired version, e.g., php8.1.


Step 4: Install Required PHP Extensions

Here are the commands to install each of the required extensions:

  1. PDO and MySQLi (already included in php7.4-mysql):

    sudo apt install -y php7.4-mysql
  2. MBString:

    sudo apt install -y php7.4-mbstring
  3. cURL:

    sudo apt install -y php7.4-curl
  4. GD:

    sudo apt install -y php7.4-gd
  5. SimpleXML (included in php7.4-xml):

    sudo apt install -y php7.4-xml
  6. Zlib:

    sudo apt install -y zlib1g-dev
  7. Mcrypt (optional for some applications; not included by default in PHP 7.4):

    sudo apt install -y php7.4-mcrypt
  8. Apache mod_php:

    sudo apt install -y libapache2-mod-php7.4

Step 5: Enable Apache Modules

Enable mod_php and other required Apache modules:

sudo a2enmod php7.4
sudo a2enmod rewrite
sudo systemctl restart apache2

Step 6: Verify Installation

Check the PHP version to ensure it’s correctly installed:

php -v

Create a phpinfo() file to verify Apache and PHP integration:

echo "<?php phpinfo(); ?>" | sudo tee /var/www/html/info.php

Access the file in your browser at http://<your-server-ip>/info.php. Verify that all required extensions are enabled.


Step 7: Additional Configuration (IPv6 Support)

Ensure IPv6 is enabled by editing the Apache configuration:

sudo nano /etc/apache2/ports.conf

Uncomment or add the following lines:

Listen [::]:80
Listen 80

Restart Apache:

sudo systemctl restart apache2

Step 8: Install Zip Utilities (Optional)

Some applications require the zip utility for compression:

sudo apt install -y zip unzip

Step 9: Securing Your Server

  1. Enable Firewall:

    sudo ufw allow 'Apache Full'
    sudo ufw enable
  2. Harden PHP: Edit php.ini to disable unnecessary features:

    sudo nano /etc/php/7.4/apache2/php.ini

    Recommended settings:

    • expose_php = Off

    • display_errors = Off

  3. Restart Services:

    sudo systemctl restart apache2
    sudo systemctl restart php7.4-fpm

Conclusion

You have successfully installed Apache, PHP 7.4++, and the required extensions on your Ubuntu VPS. Verify your setup by running a test application and checking your dependencies.

For further customization, consult the official PHP documentation and Apache documentation.


Done.

Last updated