Why Arch Linux? Because I’m comfortable using Arch, and with its package manager, we can easily install the latest and most up-to-date kernel and software.
Video (in Indonesian):
- First, we ensure that our system is up to date by running:
1pacman -Syu
- Next, we install the necessary packages using:
1pacman -S php apache php-mcrypt phpmyadmin mysql
- We then navigate to the
/etc/webapps/phpmyadmin
directory and copy thephpmyadmin
configuration file to/etc/httpd/conf/extra
:
1cp /etc/webapps/phpmyadmin/apache.example.conf /etc/httpd/conf/extra/httpd-phpmyadmin.conf
- We include the configuration in the main
httpd.conf
file located in the/etc/httpd/conf
directory by adding:
1# phpmyadmin configuration
2Include conf/extra/httpd-phpmyadmin.conf
Then, we can access localhost
and phpmyadmin
in the browser.
- If there is a forbidden message in phpmyadmin, we need to add the
DirectoryIndex index.html index.php
configuration to/etc/httpd/conf/extra/httpd-phpmyadmin.conf
, then restart the http server.
- If PhpMyAdmin can be accessed, but there is still an error message “The mysqli extension is missing.” or “The mcrypt extension is missing”; We need to enable the extension in
php.ini
by removing the semicolon (;
) from the required extension.
1extension=mcrypt.so
2extension=mysqli.so
3extension=mysql.so
Then, we can restart the http server again.
FYI: On Arch Linux, by default httpd
runs as user http
and group http
. To make it more comfortable and avoid error messages on certain CMS installations, we need to change the permissions and owner of the /srv/http
folder (where the public_html
folder is located) using:
1chown -R http:http /srv/http
The installation process for Apache, PHP, MySQL, and PhpMyAdmin is now complete.
For now, this concludes the basics.