How to Install Poweradmin on FreeBSD Latest
Poweradmin is an open-source web-based DNS administration tool that provides an easy-to-use graphical user interface for managing DNS servers. In this tutorial, we will learn how to install Poweradmin on FreeBSD Latest.
Prerequisites
Before we get started with the installation process, ensure that your system meets the following requirements:
- FreeBSD Latest installed
- Root access to the system
- Web server (such as Apache or Nginx) and PHP installed and configured
Step 1: Install Required Packages
Before we install Poweradmin, we need to install some packages required for the application to work correctly. Run the following command to install the required packages:
pkg install php74-bz2 php74-curl php74-filter php74-gd php74-mbstring php74-mysqli php74-session php74-xml php74-zlib mysql57-server mysql-client apache24
After the installation, start the MySQL server by running the following command:
service mysql-server start
Then secure the MySQL installation with:
mysql_secure_installation
Step 2: Download and Extract Poweradmin
The next step is to download and extract the Poweradmin source code. Run the following command to download the latest release of Poweradmin:
fetch https://github.com/poweradmin/poweradmin/archive/refs/tags/v2.1.8.tar.gz
Next, extract the downloaded archive using the following command:
tar -zxvf v2.1.8.tar.gz
Move the extracted directory to the Apache document root directory:
mv poweradmin-2.1.8 /usr/local/www/apache24/data/poweradmin
Step 3: Configure Poweradmin
To configure Poweradmin, we need to create a database and a database user. Run the following commands to create a database and a database user:
mysql -u root -p
Then execute the following SQL statements:
CREATE DATABASE poweradmin_db;
CREATE USER 'poweradmin'@'localhost' IDENTIFIED BY 'P@$$w0rd';
GRANT ALL PRIVILEGES ON poweradmin_db.* TO 'poweradmin'@'localhost';
FLUSH PRIVILEGES;
EXIT;
Next, rename the config.inc.php-sample file to config.inc.php using the following command:
cd /usr/local/www/apache24/data/poweradmin/inc/
mv config.inc.php-sample config.inc.php
Edit the config.inc.php file and modify the following lines:
$pdns_host = 'localhost';
$pdns_port = '3306';
$pdns_user = 'poweradmin';
$pdns_pass = 'P@$$w0rd';
$pdns_dbname = 'poweradmin_db';
Step 4: Configure Poweradmin in Apache
To access Poweradmin from a web browser, we need to configure Apache to serve the application. Create a new Apache configuration file using the following command:
nano /usr/local/etc/apache24/Includes/poweradmin.conf
Copy and paste the following content into the file:
Alias /poweradmin "/usr/local/www/apache24/data/poweradmin"
<Directory "/usr/local/www/apache24/data/poweradmin">
AllowOverride All
Require all granted
</Directory>
Then restart the Apache server:
service apache24 restart
Step 5: Access Poweradmin
Poweradmin is now ready to use! Open a web browser and visit http://your-server-ip/poweradmin. You should see the Poweradmin login page.
Use the default login credentials:
- Username:
admin - Password:
password
After logging in, you can start managing your DNS servers using Poweradmin.
Conclusion
In this tutorial, we have learned how to install Poweradmin on FreeBSD Latest. With the help of this tool, you can easily manage your DNS servers using a web-based graphical user interface.