CentOS/RHEL Installation
This guide will help you install Poweradmin on CentOS, RHEL, and other RHEL-based distributions like Rocky Linux or AlmaLinux.
Prerequisites
Ensure you have the following PHP extensions installed:
dnf install -y php php-intl php-gettext php-pdo php-fpm
Database Support
Install the appropriate PHP database driver based on your preferred database:
# For MySQL/MariaDB
dnf install -y php-mysqlnd
# For PostgreSQL
dnf install -y php-pgsql
# For SQLite (if available in your repositories)
dnf install -y php-sqlite3
Web Server Configuration
Apache
-
Install Apache if not already installed:
bash dnf install -y httpd
-
Enable and start the Apache service:
bash systemctl enable httpd systemctl start httpd
-
Configure SELinux if it's enabled: ```bash # Allow Apache to connect to the database setsebool -P httpd_can_network_connect_db 1
# If using a non-standard directory, set the correct context semanage fcontext -a -t httpd_sys_content_t "/path/to/poweradmin(/.*)?" restorecon -Rv /path/to/poweradmin ```
- Configure your firewall:
bash firewall-cmd --permanent --add-service=http firewall-cmd --permanent --add-service=https # If using HTTPS firewall-cmd --reload
Nginx Configuration
If you prefer Nginx:
-
Install Nginx:
bash dnf install -y nginx
-
Create a configuration file for Poweradmin:
server {
listen 80;
server_name localhost; # Replace with your domain
root /var/www/html; # Path to Poweradmin files
index index.php index.html index.htm;
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
fastcgi_pass unix:/var/run/php-fpm/www.sock; # RHEL/CentOS path
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
fastcgi_index index.php;
}
# Deny access to .htaccess and .htpasswd files for security reasons
location ~ /\.ht {
deny all;
}
}
-
Save this file to
/etc/nginx/conf.d/poweradmin.conf
-
Enable and start Nginx and PHP-FPM:
bash systemctl enable nginx php-fpm systemctl start nginx php-fpm
-
Configure SELinux and firewall as with Apache.
Installing Poweradmin
Obtain Poweradmin Source Code
Download the latest release (v3.9.2) from GitHub Releases:
curl -Lo v3.9.2.zip https://github.com/poweradmin/poweradmin/archive/refs/tags/v3.9.2.zip
unzip v3.9.2.zip
If you don't have curl or unzip installed:
dnf install -y curl unzip
Deploy to Web Server
Move the Poweradmin files to your web server's document root:
# For Apache (default directory)
cp -r poweradmin-3.9.2/* /var/www/html/
chown -R apache:apache /var/www/html/
# For Nginx (if using a different directory)
cp -r poweradmin-3.9.2/* /usr/share/nginx/html/
chown -R nginx:nginx /usr/share/nginx/html/
Complete the Installation
- Visit http://your-server/install/ in your browser
- Follow the installation steps
- Once installation is complete, remove the
install
directory for security - Log in with the admin username and password created during installation
Troubleshooting
If you encounter issues:
- Check PHP error logs:
/var/log/php-fpm/www-error.log
- Check web server logs:
/var/log/httpd/error_log
or/var/log/nginx/error.log
- Ensure SELinux permissions are properly set if SELinux is enabled
- Verify all required PHP extensions are installed and enabled
- Check that file permissions are correct for your web server user