There are many ways to set up a web-server. This recipe tells how to do it for an Ubuntu 22.04 Linux server running NGINX and using PHP 7.4 and the MariaDB Mysql database manager.
- Install NGINX
sudo apt install nginx
- Install PHP (you may need to add an apt repository first (
sudo add-apt-repository ppa:ondrej/php
)sudo apt install php7.4
- Install PHP extensions (php7.4-fpm php7.4-common php7.4-curl php7.4-gd php7.4-imagick php7.4-mcrypt php7.4-memcache php7.4-mysql php7.4-xmlrpc php7.4-xsl php7.4-json php7.4-opcache php7.4-mbstring php7.4-xml php-pear php7.4-yaml):
sudo apt install php7.4-fpm php7.4-common php7.4-curl php7.4-gd php7.4-imagick php7.4-mcrypt php7.4-memcache php7.4-mysql php7.4-xmlrpc php7.4-xsl php7.4-json php7.4-opcache php7.4-mbstring php7.4-xml php-pear php7.4-yaml
- Install MariaDB
sudo apt install mariadb-server
- Configure your server in NGINX
- Create a new database in MySQL
echo "CREATE USER 'dbuser'@'localhost' IDENTIFIED BY 'dbpassword';" | mysql -urootname -prootpassword
echo "CREATE DATABASE IF NOT EXISTS yad7db;" | mysql -urootname -prootpassword
echo "GRANT ALL PRIVILEGES ON yad7db.* TO 'dbuser'@'localhost' IDENTIFIED BY 'dbpassword';" | mysql -urootname -prootpassword
- Access Drupal and initialize your site.
4 / 2019