Installing software in archlinux is usually simple. You can just type this command sudo pacman -S software
and it will do the work. However, setting up phpmyadmin
is not that easy.
Just follow this shot step by step.
First! open your terminal and type:
sudo pacman -S phpmyadmin apache php php-apache mariadb gedit
Note: gedit is optional, but install it so that you can follow along with me.
Press Enter
Enter your password
Type Y
and wait for the installation to complete
Type this command in the terminal (or just copy paste):
sudo gedit /etc/php/php.ini
You will see something like this:
On your keyboard, press Ctrl+F
and search for extension=mysqli
Remove the semicolon ;
before extension=mysqli
and extension=pdo_mysql
, just like in the picture below
Ctrl+F
again, search for date.timezone
, and give it a value, for example :date.timezone = Europe/Berlin
date.timezone = Africa/Abidjan
You can find the capital of your country in this list
display_errors
by pressing Ctrl+F
and make its value:display_errors = On
open_basedir
and make its value:open_basedir = /srv/http/:/var/www/:/home/:/tmp/:/var/tmp/:/var/cache/:/usr/share/pear/:/usr/share/webapps/:/etc/webapps/
httpd.conf
:sudo gedit /etc/httpd/conf/httpd.conf
### PHP Configuration
Include `conf/extra/php7_module.conf`:
phpmyadmin.conf
by typing this command on the terminal:sudo touch /etc/httpd/conf/extra/phpmyadmin.conf
sudo gedit /etc/httpd/conf/extra/phpmyadmin.conf
Alias /phpmyadmin "/usr/share/webapps/phpMyAdmin"
<Directory "/usr/share/webapps/phpMyAdmin">
DirectoryIndex index.php
AllowOverride All
Options FollowSymlinks
Require all granted
</Directory>
httpd.conf
:sudo gedit /etc/httpd/conf/httpd.conf
Ctrl+F
and search for LoadModule mpm_event_module modules/mod_mpm_event.so
#
, like this :#LoadModule mpm_event_module modules/mod_mpm_event.so
Then, Ctrl+F
and search for LoadModule mpm_prefork_module modules/mod_mpm_prefork.so
Uncomment this line by removing the hashtag #
, like this :
LoadModule mpm_prefork_module modules/mod_mpm_prefork.so
Too much work? We will be done soon.
LoadModule php7_module modules/libphp7.so
AddHandler php7-script .php
# phpMyAdmin configuration
Include conf/extra/phpmyadmin.conf
Now, it’s almost done
sudo systemctl start httpd
sudo systemctl start mariadb
sudo mysql -u root -p
Note: enter any password you want or just leave it empty by pressing
Enter
.
SET PASSWORD FOR root@localhost=PASSWORD('2222');.
http://localhost/phpmyadmin/
username: root
password: 2222