Now you can successfully log into the MySQL console with the following command: mysql -u rootĪs the last step, you just need to create a MySQL account (it would be important not to change "root", but to create a different username and a strong and secure password to have maximum security). Afterwards, create a temporary directory for PHPMyAdmin and grant the necessary permission: a2enconf phpmyadmin & systemctl reload apache2 & mkdir /usr/share/phpmyadmin/tmp/ & chown -R www-data:www-data /usr/share/phpmyadmin/tmp/ The content for nf: #PHPMyAdmin-Apache2-KonfigurationĪfter you have successfully created the nf, you only need to activate the configuration file and reload Apache2. Once you have successfully completed the installation and setup of PHPMyAdmin, you only need to create an Apache2 configuration file for PHPMyAdmin to link your PHPMyAdmin with Apache2: nano /etc/apache2/conf-available/nf The next queries can all be confirmed with "y", as only the deletion of the anonymous user, prohibiting the external root login (for security reasons), removing the test database, as well as updating the rights will be asked.Īfter successfully completing the MySQL setup process, you can now install and set up PHPMyAdmin: cd /usr/share & wget -O phpmyadmin.zip & unzip phpmyadmin.zip & rm phpmyadmin.zip & mv phpMyAdmin-*-all-languages phpmyadmin & chmod -R 0755 phpmyadmin #Then answer the queries simply with "y" (as well as set the root-MySQL password).Īdditional information on "mysql_secure_installation": The first query asks whether you would like to create a password for the root (MySQL) user, confirm this accordingly with "y" and enter your desired MySQL password for the root user (the normal root MySQL user will however run restricted, therefore a further account with "root" permission or with full "Grant-All" permission will be created in the further course). apt install mariadb-server mariadb-client -y & mysql_secure_installation After entering your desired MySQL password, you can freely decide whether to accept (y) or reject (n) the further steps. Please make sure that you use a secure MySQL password during setup. apt-get update & apt-get install php8.1 php8.1-cli php8.1-common php8.1-curl php8.1-gd php8.1-intl php8.1-mbstring php8.1-mysql php8.1-opcache php8.1-readline php8.1-xml php8.1-xsl php8.1-zip php8.1-bz2 libapache2-mod-php8.1 -yĪfterwards, MySQL (or MariaDB) will be installed on the server and the setup will be carried out. You can do this with the following command:Īpt-get install nano curl unzip ca-certificates apt-transport-https lsb-release gnupg apache2 -y & apt install software-properties-common -y & add-apt-repository ppa:ondrej/phpĪfter you have added the additional packages and the PHP8 package list, you must now update your package list again to be able to successfully install PHP8. We will also install Apache2 at the same time to save time in the process. You can do this with a simple command: apt update & apt upgrade -yĪfter the package list and the packages have been successfully updated, you still need to install the necessary packages for LAMP, as well as add the PHP package list to be able to install PHP8 later. It is important that you first update the package list of your Ubuntu operating system and install possible updates. When prompted to choose the web server, select apache2 and continue.Do you want to install Apache2, PHP8, MySQL (or MariaDB) and PHPMyAdmin (LAMP) on your Ubuntu 22.04 / Ubuntu 20.04 operating system? Then you are in the right place! Sudo apt install php7.4 php7.4-common php7.4-mysql php7.4-gmp php7.4-curl php7.4-intl php7.4-mbstring php7.4-xmlrpc php7.4-gd php7.4-xml php7.4-cli php7.4-zip If you've just installed MariaDB, and haven't set the root password yet, you should just press enter here.Įnter current password for root (enter for none): PRESS ENTER Install phpMyAdmin & Linux, Apache, MySQL/MariaDB & PHP on Ubuntu 20.04 desktop.īelow you will find the instructions that I myself have tried and successfully implemented on my system.Īfter that, run the commands below to secure the MariaDB server by creating a root password, disallowing remote root access removing anonymous, and more.
0 Comments
Leave a Reply. |