Where to Discuss?

Local Group

Preface

Goal: Setting-up LAMP stack with Artix OpenRC. Manage database with PHPMyAdmin.

Finally what we need. A tools to manage our database.

This can also be used to test, whether the LAMP stack works well or not.


Install PHPMyAdmin Package

We only need one package:

  • phpmyadmin
❯ sudo pacman -S phpmyadmin
warning: phpmyadmin-5.2.1-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (1) phpmyadmin-5.2.1-1

Total Installed Size:  47.94 MiB
Net Upgrade Size:       0.00 MiB

:: Proceed with installation? [Y/n] y

LAMP OpenRC: PHPMyAdmin: Install PHPMyAdmin Package


HTTPD Configuration

If we open localhost/phpmyadmin. This is what we got.

LAMP OpenRC: PHPMyAdmin: HTTPD Configuration

We need to setup this file.

❯ sudo touch /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>

LAMP OpenRC: PHPMyAdmin: HTTPD Configuration

And add this line to httpd configuration.

# epsi!
# phpMyAdmin configuration
Include conf/extra/phpmyadmin.conf

LAMP OpenRC: PHPMyAdmin: HTTPD Configuration

And do not forget to restart the service

❯ sudo rc-service httpd restart
httpd             | * Stopping httpd ...                                                                [ ok ]
httpd             | * Starting httpd ...  

LAMP OpenRC: PHPMyAdmin: HTTPD Configuration


PHP Configuration

Again, if we open localhost/phpmyadmin. This is what we got.

LAMP OpenRC: PHPMyAdmin: PHP Configuration

All we need to do is to uncomment this line in PHP configuration.

extension=mysqli

LAMP OpenRC: PHPMyAdmin: PHP Configuration

Then restart the service


Browser

Now we can login into PHPMyAdmin. LAMP OpenRC: PHPMyAdmin: Browser

Our PHPMyAdmin should works well right now.

LAMP OpenRC: PHPMyAdmin: Browser


Tips

Playground

If you have time. You should also see the designer page in phpmyadmin for this mysql table.


What is Next 🤔?

After the sytstem, we can use SQL in practical way.

Consider continue reading [ Soccer - Overview ].

Thank you for reading.