In this tutorial, we will be installing File Sharing, which is a file-sharing web application, on FreeBSD Latest. File Sharing is available for download from https://github.com/axeloz/filesharing.
Before we begin, please make sure that you have the following:
Once you have these, follow the steps below to install File Sharing:
pkg update && pkg upgrade
pkg install apache24
service apache24 start
pkg install php74 php74-bcmath php74-bz2 php74-ctype php74-curl php74-dom php74-exif php74-fileinfo php74-filter php74-ftp php74-gd php74-gettext php74-hash php74-iconv php74-json php74-ldap php74-mbstring php74-mysqli php74-opcache php74-pdo php74-pdo_mysql php74-pear php74-pecl-igbinary php74-pecl-imagick php74-pecl-msgpack php74-pecl-redis php74-posix php74-session php74-simplexml php74-sockets php74-tokenizer php74-xml php74-xmlreader php74-xmlwriter php74-xsl php74-zip php74-zlib
pkg install mysql80-server
service mysql-server start
mysql_secure_installation
git clone https://github.com/axeloz/filesharing.git /usr/local/www/apache24/data/filesharing
mysql -u root -p
CREATE DATABASE filesharing;
CREATE USER 'filesharing'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON filesharing.* TO 'filesharing'@'localhost';
FLUSH PRIVILEGES;
exit
cp /usr/local/www/apache24/data/filesharing/config.inc.sample.php /usr/local/www/apache24/data/filesharing/config.inc.php
vi /usr/local/www/apache24/data/filesharing/config.inc.php
$db_name = "filesharing";
$db_user = "filesharing";
$db_pass = "password";
chown -R www:www /usr/local/www/apache24/data/filesharing/upload
service apache24 restart
Open your web browser and navigate to your server's IP address followed by /filesharing. For example, http://192.168.0.100/filesharing.
You should now be able to login to File Sharing using the default username and password:
Congratulations! You have successfully installed File Sharing on FreeBSD Latest.
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!