Configure MySQL and PHP for OwnCloud - KeegMitch/Operations-Engineering-group-c GitHub Wiki
RT Ticket: #840
Configure MySQL remote login and install MySQL server
The following commands are being used in the database server:
sudo apt update
sudo apt install mysql-client
Create an owncloud database:
sudo mysql -u root -p
CREATE DATABASE owncloud;
GRANT ALL ON owncloud.* to 'owncloud'@'app-c.internal.cloudapp.net' IDENTIFIED BY 'your_password'; # the "your password" part is not our actual password
FLUSH PRIVILEGES;
exit;
Login using the app server:
sudo mysql -u owncloud -h db-c -p
> your_password
> status;
Install php7.4
Note: You have to upgrade to Ubuntu 20.04 before you do this step, Guide here
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt install php7.4
-
Check if php7.4 is the default
php -v -
If php7.4 is not the default, set it to default by choosing the correct option:
sudo update-alternatives --config php -
Confirm if php7.4 is the default
php -v
Install the php extensions we need (Note that we had issues with some dependencies not installing properly):
Link that helped us figure out how to do this step
sudo apt install -y apache2 libapache2-mod-php7.4
sudo apt-get install -y php7.4-cli php7.4-json php7.4-common php7.4-mysql php7.4-zip php7.4-gd php7.4-mbstring php7.4-curl php7.4-xml php7.4-bcmath php7.4-intl
Configure Apache Firewall