To use the phpMyAdmin install wizard, we first need to set up the config.inc file. Sudo chown -R phpmyadmin.phpmyadmin /var/www/html/phpmyadmin Step 5: Update phpMyAdmin config.inc With Install Wizard Ĭreating home directory `/home/phpmyadmin'. $ sudo adduser phpmyadminĪdding new user `phpmyadmin' (1001) with group `phpmyadmin'. We want to set up a specific user for our phpMyAdmin install. Remove the phpMyAdmin files: sudo rm phpMyAdmin-4.3.11. Step 4: Secure /phpmyadmin Directory Now rename the phpMyAdmin-4.3.11.1-english directory: sudo mv phpMyAdmin-4.3.11.1-english phpmyadmin Index.html phpMyAdmin-4.3.11. Step 3: Unpack phpMyAdmin Files sudo tar xvzf phpMyAdmin-4.3.11. I ended up with a phpMyAdmin-4.3.11. file in my /var/www/html directory. Visit the phpMyAdmin download page to grab the latest version of phpMyAdmin. The stable version of phpMyAdmin at the time this article was written: phpMyAdmin 4.3.11.1 (released ). Step 2: Download Latest Version of phpMyAdmin In this case, we’ll need to put the phpMyAdmin files in /var/www/html. We need to find Apache’s DocumentRoot so we know where to place our phpMyAdmin files: $ grep DocumentRoot /etc/apache2/sites-available/nf While it’s not recommended for production servers, because you have to manually ensure your install of phpMyAdmin is kept up-to-date, you can also install phpMyAdmin from source. Now if you try to access the phpMyAdmin login, you’ll get the. htaccess credentials, you can create additional secure users with: sudo htpasswd /etc/phpmyadmin/.htpasswd anotheruser If for some reason you wanted to give others access to the phpMyAdmin login screen but didn’t want them using your. Now we can create a secure user for our phpMyAdmin application with the command: $ sudo htpasswd -c /etc/phpmyadmin/.htpasswd phpmyadmin If you don’t already have this installed, use the following: sudo apt-get install apache2-utils htpasswd File for Authenticationįirst we need the htpasswd utility. Now that we’ve enabled overrides for our phpMyAdmin application from Apache, we need to actually create an override with an. Restart Apache so our changes take affect: sudo service apache2 restart Step 3: Create an. Step 2: Restart Apache to Accept Config Changes We want to edit the phpMyAdmin Apache config that was created earlier: sudo vi /etc/apache2/conf-available/nfĪdd AllowOverride “ALL” directive below the DirectoryIndex: We can easily secure our phpMyAdmin installation by using Apache’s built-in. Note: enter any password you want or just leave it empty by pressing Enter.Naturally, because phpMyAdmin is such a common application installed on many web servers, it is a popular target for unauthorized access attempts. Then, type the following in your terminal:.Start apache with the following command:.Paste this at the end of the text file:.LoadModule php7_module modules/libphp7.so Paste this at the end of the LoadModule list, like what you see in the image below:.LoadModule mpm_prefork_module modules/mod_mpm_prefork.so Uncomment this line by removing the hashtag #, like this : Then, Ctrl+F and search for LoadModule mpm_prefork_module modules/mod_mpm_prefork.so #LoadModule mpm_event_module modules/mod_mpm_event.so Comment this line by adding a hashtag #, like this :.In your terminal, type the following to edit nf:Ĭtrl+F and search for LoadModule mpm_event_module modules/mod_mpm_event.so.Sudo gedit /etc/httpd/conf/extra/nfĪlias /phpmyadmin "/usr/share/webapps/phpMyAdmin" Now, we will create a file called nfby typing this command on the terminal:.In your terminal, type this to edit nf:.Open_basedir = /srv/http/:/var/www/:/home/:/tmp/:/var/tmp/:/var/cache/:/usr/share/pear/:/usr/share/webapps/:/etc/webapps/ Search for open_basedir and make its value:.Search for display_errors by pressing Ctrl+F and make its value:.You can find the capital of your country in this list Press Ctrl+F again, search for date.timezone, and give it a value, for example :. Remove the semicolon before extension=mysqli and extension=pdo_mysql, just like in the picture below On your keyboard, press Ctrl+F and search for extension=mysqli Type this command in the terminal (or just copy paste): sudo gedit /etc/php/php.ini Type Y and wait for the installation to complete Note: gedit is optional, but install it so that you can follow along with me. Installing packagesįirst! open your terminal and type: sudo pacman -S phpmyadmin apache php php-apache mariadb gedit However, setting up phpmyadmin is not that easy. You can just type this command sudo pacman -S software and it will do the work. Installing software in archlinux is usually simple.
0 Comments
Leave a Reply. |