$ sudo add-apt-repository ppa:ondrej/php & sudo apt update $ sudo apt install software-properties-common Nginx uses PHP-FPM and for convenient, we use Ondrej Sury's PPA, so we can install multiple versions of PHP. Restart MariaDB service $ sudo service mariadb restart In order to create a password, first we have to hash the string first: SELECT PASSWORD('verysecretchangeit') įor example we get this hashed string: *54958E764CE10E50764C2EECBB71D01F08549980 ALTER USER IDENTIFIED BY PASSWORD '*54958E764CE10E50764C2EECBB71D01F08549980' After it ends, try to login: $ sudo mysql -u root -pĪnd if you can not login with error message like Access denied for user let's log in to mysql using sudo first $ sudo mysql -u root -p MariaDB $ sudo apt install mariadb-server -yįollow the instruction to what you need. Please do not use these instructions to setup on a public server environment. NOTE: This has been prepared for ease of use in mind, not security, mostly in development machine. This is a way to install and set up Nginx, MariaDB and PHP-FPM on Ubuntu 20.04. Now you need to run the following commands in order: CREATE DATABASE eldernode CREATE USER IDENTIFIED BY 'Pa$$w0rd' GRANT ALL ON eldernode.How to Install Nginx, MariaDB, PHP-FPM on Ubuntu 20.04 To Create a MySQL Database and User, run the mysql command: mysql Reload the firewall to apply the changes: sudo firewall-cmd -reload So you need to run the following command to allow access to the HTTP service from the firewall: sudo firewall-cmd -permanent -add-service=http The next part related to configuring PHPMyAdmin is FirewallD settings. Start the Apache service with the help of the following commands to reload the settings: sudo a2enconf phpmyadmin sudo systemctl restart apache2 In the first step, open the configuration file with the help of your desired text editor: sudo nano /etc/apache2/conf-available/nfĪdd the following commands to the configuration file, then save and exit: Alias /phpmyadmin /usr/share/phpmyadmin Alias /phpMyAdmin /usr/share/phpmyadmin AddDefaultCharset UTF-8 Require all granted Require all granted You can easily follow the steps below to configure PHPMyAdmin. You can set the appropriate and required permissions with the help of the following commands: sudo chown -R www-data:www-data /usr/share/phpmyadmin sudo chmod 777 /usr/share/phpmyadmin/tmp 3) Configure and Access Run the tmp directory using the following command: sudo mkdir /usr/share/phpmyadmin/tmp Now you can move the PHPMyAdmin file to the desired path with the help of the following command: sudo mv phpMyAdmin-5.2.0-all-languages /usr/share/phpmyadmin In the first step, it is necessary to download PHPMyAdmin using the following command: wget Īfter you download the file, you must unzip it by running the following command: unzip phpMyAdmin-5.2.0-all-languages.zip It is also necessary to enable Apache: sudo systemctl enable apache2Īfter installing the required prerequisites in this section, in the next section we will teach you how to install PHPMyAdmin. Then you need to install PHP using the following command: sudo apt install php php-zip php-json php-mbstring php-mysqlĪfter completing the mentioned steps, you can start Apache by running the following command: sudo systemctl start apache2 Now you can install Apache by running the following command: sudo apt install apache2 wget unzip In the first step, it is necessary to install MySQL on Linux Ubuntu. Recommended Article: Tutorial Install Plesk on Ubuntu 22.04 1) Installing Apache and PHP
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |