Web-Portal is an open-source web-based management portal that enables users to visualize and manage various services, applications, and resources. In this tutorial, we will guide you through the process of installing Web-Portal on FreeBSD Latest using the source code on GitHub.
Before we begin, ensure that you have the following prerequisites:
First, we need to install some required packages on the FreeBSD instance. Run the following command to install the required packages:
pkg install git php74-php-cli php74-php-xml php74-php-pdo php74-php-mysqli
This command will install Git, PHP, and its extensions - PDO and MySQLi, which are required for Web-Portal to run.
Now, we need to clone the Web-Portal repository from GitHub. Run the following command to create a new directory and clone the repository:
mkdir /usr/local/www/web-portal
cd /usr/local/www/web-portal
git clone https://github.com/enchant97/web-portal.git .
This command will clone the Web-Portal repository in the /usr/local/www/web-portal
directory on your FreeBSD instance.
Next, we need to configure Web-Portal. Run the following command to create a new configuration file:
cp config.example.php config.php
After creating a new configuration file, open it using your favorite text editor and modify the following options according to your requirements:
Once you're done with the configuration, save and close the file.
Next, we need to create a MySQL database for Web-Portal. Run the following command to log in to the MySQL server:
mysql -u root -p
Enter your MySQL root password, and then run the following commands to create a new database, create a new user, and grant privileges to the user:
CREATE DATABASE webportal;
CREATE USER 'webportal_user'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON webportal.* TO 'webportal_user'@'localhost';
FLUSH PRIVILEGES;
Replace "webportal_user" and "password" with the MySQL username and password you specified in the Web-Portal configuration file.
Now, we can run the Web-Portal installation script using the following command:
php install.php
This command will install the necessary tables in the MySQL database and generate a default user account. Follow the prompts to complete the installation process.
To make sure Apache or Nginx has mod_rewrite enabled, we need to create rewrite rules. In Apache, run the following commands:
echo "LoadModule rewrite_module /usr/local/libexec/apache24/mod_rewrite.so" >> /usr/local/etc/apache24/httpd.conf
echo "DirectoryIndex index.php" >> /usr/local/etc/apache24/httpd.conf
echo "<Directory /usr/local/www/web-portal>" >> /usr/local/etc/apache24/httpd.conf
echo "AllowOverride All" >> /usr/local/etc/apache24/httpd.conf
echo "</Directory>" >> /usr/local/etc/apache24/httpd.conf
In Nginx, create a new file /usr/local/etc/nginx/conf.d/webportal.conf
and add the following configuration:
server {
listen 80;
server_name your_domain.com;
root /usr/local/www/web-portal;
index index.php;
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
location ~ \.php$ {
include fastcgi.conf;
fastcgi_pass unix:/var/run/php74-php-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}
Replace "your_domain.com" with your server's domain name.
Finally, start your web server to access the Web-Portal. If you are using Apache, execute the following command:
service apache24 start
If you are using Nginx, execute the following command:
service nginx start
Congratulations! You have successfully installed Web-Portal on FreeBSD Latest. You can now login to the Web-Portal using the default credentials (username: admin, password: admin) and start managing your resources. Don't forget to change the password after logging in for the first time!
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!