Step 1 – Dependencies Installation
Prerequisite: Working version of Ubuntu 20.04.
First, you should install Apache, PHP, its dependencies, and the database.
Update the system
- Typically, you log in as a user "root". If not, become "root" with
sudo -s
- Load new system updates:
apt-get update
- Update the system with
apt-get upgrade
These packages may be missing. So try to install them:
apt install ubuntu-server
apt install language-pack-en
apt install sudo
apt install lsb-core
apt install rsyslog
Install needed apt packages.
Apache2
apt-get install apache2 apache2-doc libapache2-mod-xsendfile
Activate some Apache modules:
a2enmod rewrite dav_fs dav expires headers proxy socache_shmcb ssl vhost_alias dav ssl http2 mod_authnz_ldap ldap
PHP 7.4
apt install php7.4 php7.4-gd php7.4-xsl php7.4-ldap php7.4-xmlrpc php7.4-dev php7.4-curl php7.4-cli php7.4-common php7.4-soap php7.4-mbstring php7.4-intl php7.4-xml libapache2-mod-php7.4 php7.4-zip php-apcu php7.4-imagick php7.4-bcmath php7.4-gmp
phpenmod opcache
apt install php7.4-curl php7.4-json php7.4-mysql php7.4-opcache php7.4-readline libapache2-mod-php7.4
MariaDB
To install the database, we will use the instructions here: https://mariadb.com/kb/en/installing-mariadb-deb-files/
Here are the steps:
curl -sS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup | sudo bash
apt-get install mariadb-server galera-4 mariadb-client libmariadb3 mariadb-backup mariadb-common
mysql_secure_installation
- Switch to unix_socket authentication [Y/n] Y
- Change the root password? [Y/n] Y
- Remove anonymous users? [Y/n] Y
- Disallow root login remotely? [Y/n] Y
- Remove the test database and access it? [Y/n] Y
- Reload privilege tables now? [Y/n] Y
Other tools and stuff
apt install zip git htop wget curl htmldoc mailutils imagemagick ffmpeg openjdk-11-jre python phantomjs abiword libreoffice mailutils davfs2 nano memcached php-memcached composer nmon clamav ghostscript-x wkhtmltopdf php-tcpdf xvfb
- Answer for webdav-question: yes
Node
The first step is to check if node or npm is already installed.
node --version
nodejs --version
npm --version
To install it, run the following commands:
curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
(Please do not go higher than node version 14 because the chat does not support it)
apt-get install -y nodejs
export NODE_ENV=production
After the installation, check the versions:
- Check Node:
node --version
- Check NPM:
npm --version
- Check the nodeapath and keep the result in mind:
whereis node
– this could give the green nodepath: node: /home/ilias/local/bin/node or /usr/local/bin/node