PHP Install

1. Install PHP

  1. Install a specifc version of PHP required for Nextcloud:

    sudo dnf module install php:7.4
  2. Install PHP and related modules:

    sudo dnf install php php-fpm php-zip php-mysqlnd php-opcache php-gd php-xml php-mbstring php-json -y
  3. Start PHP-FPM:

    sudo systemctl start php-fpm
  4. Enable PHP-FPM to start when the system starts:

    sudo systemctl enable php-fpm
  5. Check PHP-FPM status:

    sudo systemctl status php-fpm
  6. Restart the Apache web server in order to run PHP code.:

    sudo systemctl restart httpd
  7. Allow SELinux to execute PHP code via PHP-FPM:

    sudo setsebool -P httpd_execmem 1
  8. Test PHP-FPM:

    1. Create an info.php page:

      sudo vi /var/www/html/info.php

      Enter the following text:

      <?php phpinfo(); ?>
    2. Launch your browser and browse to the new PHP page:

      PHP-URL

    3. Confirm the PHP Page looks similar to the following:

      PHP-Details

    4. After confirming the PHP install, you can now remove the info.php page:

      sudo rm /var/www/html/info.php

2. Install phpMyAdmin PHP Administrative Interface for MariaDB (MySQL)

This is an optional MariaDB administrative interface.

  1. Install prerequisites:

    1. Install Apache

    2. Install MariaDB

      Refer to MariaDB Install

  2. Orginal instructions are here.

  3. Go to the /tmp dir:

    cd /tmp
  4. Identify the lastest .xz version of the phpMyAdmin package from here.

    phpMyAdmin-Latest

  5. Download the latest version via curl:

    curl --remote-name-all https://files.phpmyadmin.net/phpMyAdmin/5.1.1/phpMyAdmin-5.1.1-english.tar.xz
  6. Extract the .xz file into the Apache html folder:

    sudo tar -C /var/www/html -xvpJf /tmp/phpMyAdmin-5.1.1-english.tar.xz
  7. Rename the folder:

    sudo mv /var/www/html/phpMyAdmin-5.1.1-english /var/www/html/phpmyadmin
  8. Launch the phpMyAdmin interface:

    http://v-RedHat00/phpmyadmin
  9. Confirm that the Log in prompt appears:

    phpMyAdmin-Latest