ViMbAdmin is a web-based application used for administering multiple virtual domains, email accounts and aliases. In this tutorial, we will walk you through the steps to install ViMbAdmin on Void Linux.
Before you start installing ViMbAdmin on Void Linux, make sure you have the following prerequisites:
fpm
, pdo
, mysqlnd
, openssl
, mbstring
, xml
, gd
, zip
, imap
, intl
, json
, ldap
, posix
, and sockets
.First, you need to install all the packages required for the installation of ViMbAdmin. You can install them using the following command:
sudo xbps-install -S nginx mysql php php-fpm php-json php-gd php-pdo php-mysqli php-mbstring php-xml php-imap php-intl php-ldap php-posix php-sockets php-zip composer git
Next, you need to configure the Nginx virtual host for ViMbAdmin. You can create a new configuration file using the following command:
sudo nano /etc/nginx/conf.d/vimbadmin.conf
Then update the file with the following configuration:
server {
listen 80;
server_name your-domain.com;
root /var/www/vimbadmin/public;
# Logging
access_log /var/log/nginx/vimbadmin.access.log;
error_log /var/log/nginx/vimbadmin.error.log;
# Add index.php to the list if you are using PHP
index index.php;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
# Pass the PHP scripts to FastCGI server
location ~ \.php$ {
try_files $uri /index.php =404;
fastcgi_pass unix:/var/run/php-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
# Block access to sensitive files
location ~ /(\.env|\.git|\.svn) {
deny all;
return 404;
}
}
Save and close the file when you're done.
Next, you need to download and install ViMbAdmin. You can do this by following the steps below:
Change to the /var/www
directory:
cd /var/www
Download ViMbAdmin using the git command:
git clone https://github.com/opensolutions/ViMbAdmin.git vimbadmin
Change to the ViMbAdmin directory:
cd vimbadmin
Install the required PHP dependencies using Composer:
composer install --no-dev --optimize-autoloader
Copy the sample configuration file:
cp app/config/parameters.yml.dist app/config/parameters.yml
Edit the configuration file:
nano app/config/parameters.yml
Then update the database connection settings with your MySQL credentials.
Next, you need to create a new MySQL database and user for ViMbAdmin to use. You can do this by following the steps below:
Login to MySQL as the root user:
mysql -u root -p
Create a new database:
CREATE DATABASE vimbadmin;
Create a new user:
CREATE USER 'vimbadmin'@'localhost' IDENTIFIED BY 'password';
Grant privileges to the new user:
GRANT ALL PRIVILEGES ON vimbadmin.* TO 'vimbadmin'@'localhost';
Exit MySQL:
EXIT;
Now, you need to update the ViMbAdmin configuration to use the database credentials you just created. You can do this by following the steps below:
Open the app/config/parameters.yml
configuration file:
nano app/config/parameters.yml
Update the MySQL settings in the file:
database_driver: pdo_mysql
database_host: 127.0.0.1
database_port: null
database_name: vimbadmin
database_user: vimbadmin
database_password: password
Save and close the file.
After updating the configuration file, you need to create the ViMbAdmin database schema. You can do this by running the command below:
php bin/console doctrine:database:create --if-not-exists && php bin/console doctrine:schema:update --force
Now, you need to configure the admin account for ViMbAdmin. You can do this by running the command below:
php bin/console vimbadmin:setup-admin
Then follow the on-screen prompts to create an admin account.
Finally, you need to make some permissions changes to the ViMbAdmin installation directory. You can do this by running the commands below:
chmod -R 777 var/ public/
chmod -R 777 app/config/
Then restart Nginx and PHP:
sudo systemctl restart nginx
sudo systemctl restart php-fpm
Congratulations, you have successfully installed ViMbAdmin on Void Linux. You can now log in and start administering your domains and email accounts.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!