Install Adminer on Raspberry Pi
Install Adminer on Raspberry Pi
2023年11月29日(水)
Adminer is a lightweight web-based database management tool, similar to phpMyAdmin, written in a single PHP file. Utilizing Adminer on your Raspberry Pi offers an efficient solution for handling various databases, including PostgreSQL, MariaDB, SQLite, or MongoDB.
Running Adminer on Raspberry Pi through Docker provides the advantage of seamless operation irrespective of the web server in use. This also ensures that updates to PHP on the host system won’t disrupt Adminer.
Step 1: Prepare Your Raspberry Pi
Start by ensuring your operating system is up to date with the following commands:
sudo apt update
sudo apt upgrade -y
Install Docker on your Raspberry Pi by following our guide.
Create a directory to store Adminer compose files:
sudo mkdir -p /opt/stacks/adminer
Change to the new directory:
cd /opt/stacks/adminer
Step 2: Write Compose Files for Adminer on Raspberry Pi
Begin writing the Compose file for Adminer. This file instructs Docker on image download and container configuration:
sudo nano docker-compose.yaml
Add the following lines to the file, adjusting the port as needed:
version: ‘3.1’
services:
adminer:
image: adminer
restart: always
ports:
– 8080:8080
Save and exit by pressing CTRL+X, Y, then ENTER.
Step 3: Start the Adminer Container
Start the Adminer container with:
docker-compose up -d
Step 4: Access the Management Web Interface
Determine your Raspberry Pi’s IP address:
hostname -I
Access Adminer’s web interface using your Pi’s IP address in a web browser:
http://<IPADDRESS>:8080
Replace <IPADDRESS> with your Pi’s IP. Log in to the database by specifying database type, server IP, username, password, and optionally, the database name. Click “Login” to access the database.
This guide enables you to seamlessly run Adminer on your Raspberry Pi, offering a straightforward solution for managing databases.
If you want to know more about Raspberry Pi-related projects, click on the link below:
Raspberry Pi BME280 Environmental Sensor Project
Source: PR最新情報