Deploy a Laravel app on Oracle Cloud with database

Assumptions:

  • Ubuntu 22
  • PHP 7.3
  • Laravel 5.5
  • Apache 2
  • PHP-Redis
  • Download the public and private keys on your local machine.
  • You have created your VM instance!
  • Create an always free Autonomous Database [if your application uses a database]
  • Select your desired database
  • After creating your database, go to “DB Connection” tab
  • Download the Oracle Wallet on your local machine to connect to your database

Read more

Share

Install PHP 7.4 / 7.3 / 7.2 / 7.1 on Debian 10 / Debian 9

Add PHP Repository

SURY, a third-party repository which offers PHP 7.4 / 7.3 / 7.2 / 7.1 for Debian operating system.

By default, Debian 10 ships PHP v7.3. So, you can either install PHP v7.3 from Debian repository or SURY repository. Skip this section if you want to install PHP 7.3 from the Debian repository. However, if you want to install PHP 7.4 / 7.2 / 7.1 on Debian 10, you must set up SURY repository.

Update the repository cache.

sudo apt update
sudo apt install -y curl wget gnupg2 ca-certificates lsb-release apt-transport-https

Import the public using the below commands.

wget https://packages.sury.org/php/apt.gpg
sudo apt-key add apt.gpg

Add the SURY repository to your system.

echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/php7.list

Update the repository index.

Read more

Share

Install LAMP on CentOS 7 with PHP 5.4/7.0/7.1/7.2/7.3/7.4

Preliminary Note

In this tutorial, I use the hostname server1.example.com with the IP p 192.168.0.100. These settings might differ for you, so you have to replace them where appropriate.

I will add the EPEL repo here to install latest phpMyAdmin as follows:

rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY*
yum -y install epel-release

To edit files on the shell, I’ll install the nano editor. If you prefer vi for file editing, then skip this step.

yum -y install nano

Installing MySQL / MariaDB

MariaDB is a MySQL fork of the original MySQL developer Monty Widenius. MariaDB is compatible with MySQL and I’ve chosen to use MariaDB here instead of MySQL. Run this command to install MariaDB with yum:

yum -y install mariadb-server mariadb

Then we create the system startup links for MySQL (so that MySQL starts automatically whenever the system boots) and start the MySQL server:

Read more

Share

Install PHP 7 on CentOS 7

Enabling Remi repository

PHP 7.x packages are available in several different repositories. We’ll use the Remi repository which provides newer versions of various software packages including PHP.

The Remi repository depends on the EPEL repository. Run the following commands to enable both EPEL and Remi repositories:

sudo yum install epel-release yum-utils
sudo yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm

Yum may prompt you to import the repository GPG key. Type y and hit Enter.

In the following sections, we will be covering how to install PHP 7.x by enabling the appropriate Remi repository. If you already have PHP 5.4 installed on your system yum will update the PHP packages.

Installing PHP 7.3 on CentOS 7

PHP 7.3 is the latest stable release of PHP. Most modern PHP frameworks and applications including WordPress, Drupal, Joomla, and Laravel are fully supporting PHP 7.3.

Perform the steps below to install PHP 7.3 on CentOS 7.

Start by enabling the PHP 7.3 Remi repository:

sudo yum-config-manager --enable remi-php73

Install PHP 7.3 and some of the most common PHP modules:

sudo yum install php php-common php-opcache php-mcrypt php-cli php-gd php-curl php-mysqlnd

Verify the PHP installation, by typing the following command which will print the PHP version:

Read more

Share