Known is a social publishing platform that allows users to create and share content on their own website. In this tutorial, we will guide you on how to install Known on FreeBSD Latest.
We will begin by installing the necessary dependencies for Known. Run the command below to install PHP and its dependencies:
sudo pkg install php74 php74-pear php74-bcmath php74-bz2 php74-ctype php74-date php74-dom php74-exif php74-filter php74-gd php74-gettext php74-hash php74-iconv php74-intl php74-json php74-ldap php74-mbstring php74-mysqli php74-openssl php74-pdo php74-pdo_mysql php74-session php74-simplexml php74-soap php74-sockets php74-xml php74-xmlreader php74-xmlrpc php74-zip php74-zlib php74-zstd
Install Git using the following command:
sudo pkg install git-lite
Create a directory where you will install Known. We will use /var/www/known
for this tutorial. Change to that directory:
cd /var/www
Clone the Known repository using Git:
sudo git clone https://github.com/idno/Known.git known
Change to the Known directory and copy the configuration file:
cd known
sudo cp config.ini.default config.ini
Edit the configuration file using your preferred text editor:
sudo nano config.ini
Update the following settings based on your environment:
[Paths]
Known_Path = "/var/www/known"
[Database]
dsn = "mysql:host=localhost;dbname=known"
user = "root"
password = "your_password"
Run the following command to install Known:
sudo php known.php install
Create a new virtual host configuration file for your web server. For Nginx users, run the following command:
sudo nano /usr/local/etc/nginx/sites-available/known.conf
Add the following configuration:
server {
listen 80;
server_name your_domain.com;
root /var/www/known;
index index.php;
location / {
try_files $uri $uri/ /index.php$args;
}
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;
fastcgi_param PHP_VALUE "upload_max_filesize = 32M \n post_max_size= 32M";
include fastcgi_params;
}
}
Save and close the file. Once done, create a symbolic link to enable the virtual host:
sudo ln -s /usr/local/etc/nginx/sites-available/known.conf /usr/local/etc/nginx/sites-enabled/
For Apache users, create a virtual host configuration file:
sudo nano /usr/local/etc/apache24/Includes/known.conf
Add the following configuration:
<VirtualHost *:80>
ServerName your_domain.com
DocumentRoot "/var/www/known"
<Directory "/var/www/known">
AllowOverride All
Require all granted
</Directory>
<Files ".ht*">
Require all denied
</Files>
ErrorLog "/var/log/httpd/known-error_log"
CustomLog "/var/log/httpd/known-access_log" common
</VirtualHost>
Save and close the file. Once done, restart your web server:
sudo service nginx restart
or
sudo service apache24 restart
Once everything is set up, you can access your Known site by visiting your domain in a web browser:
http://your_domain.com/
You should now have successfully installed and configured Known on your FreeBSD Latest server. Enjoy using your new social publishing platform!
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!