This tutorial will guide you through the process of installing PictShare on Debian Latest. PictShare is a self-hosted, open-source image and video sharing platform that allows you to easily share your media files with others.
Before you begin the installation process, ensure that you have the following:
To download the PictShare package, use the wget command to download the package from the official website:
wget https://www.pictshare.net/download/pictshare_latest.zip
After downloading the package, we need to extract it using the unzip command:
unzip pictshare_latest.zip -d pictshare
In this step, we need to configure PictShare by editing the pictshare/config.php file. Open the configuration file using your favorite text editor:
nano pictshare/config.php
In the configuration file, find the following lines:
define('URL', 'https://example.com');
define('BASEPATH', '/var/www/html');
define('DATAFOLDER', '/var/www/html/data');
define('INCLUDEPATH', '/var/www/html/include');
define('WATSONUSERNAME', '');
define('WATSONAPIKEY', '');
define('ADMINAPIKEY', 'f3ec779fe2595376ba0e6d45e6baca2c');
Update the following parameters according to your requirements:
define('URL', 'https://example.com');
: Replace example.com
with your domain name or IP address.define('BASEPATH', '/var/www/html');
: Replace /var/www/html
with the path to your web directory.define('DATAFOLDER', '/var/www/html/data');
: Replace /var/www/html/data
with the path to your data directory.define('INCLUDEPATH', '/var/www/html/include');
: Replace /var/www/html/include
with the path to your PictShare include directory.define('WATSONUSERNAME', '');
and define('WATSONAPIKEY', '');
: Uncomment these lines and replace the values with your Watson API username and API key if you wish to use the Watson AI image analysis features.define('ADMINAPIKEY', 'f3ec779fe2595376ba0e6d45e6baca2c');
: Replace the default f3ec779fe2595376ba0e6d45e6baca2c
value with a secure API key of your own.In this step, we'll create a MySQL database for PictShare. Log in to your MySQL server using the following command:
mysql -u root -p
Enter your MySQL root password when prompted. Then, create a new database:
CREATE DATABASE pictshare;
Create a new MySQL user and grant it all privileges on the new database:
GRANT ALL PRIVILEGES ON pictshare.* TO 'pictshare_user'@'localhost' IDENTIFIED BY 'pictshare_passwd';
Replace pictshare_user
with the desired username, and pictshare_passwd
with the desired password.
Flush the privileges and exit the MySQL prompt:
FLUSH PRIVILEGES;
exit
In this step, we'll install PictShare by running the installation script located in the pictshare directory:
cd pictshare
./install.sh
Follow the on-screen instructions to complete the installation process. When prompted, enter the database details you created in Step 3.
In this step, we need to configure the web server to serve the PictShare files. If you're using Apache, create a new virtual host configuration file:
nano /etc/apache2/sites-available/pictshare.conf
Add the following configuration to the file:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html/pictshare
<Directory /var/www/html/pictshare>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/pictshare_error.log
CustomLog ${APACHE_LOG_DIR}/pictshare_access.log combined
</VirtualHost>
Save and close the file. Then, enable the new virtual host and reload the Apache web server:
a2ensite pictshare.conf
systemctl reload apache2
If you're using Nginx, create a new server block configuration file:
nano /etc/nginx/sites-available/pictshare.conf
Add the following configuration to the file:
server {
listen 80;
root /var/www/html/pictshare;
index index.php;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
include fastcgi.conf;
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
}
error_log /var/log/nginx/pictshare_error.log;
access_log /var/log/nginx/pictshare_access.log;
}
Save and close the file. Then, enable the new server block and reload the Nginx web server:
ln -s /etc/nginx/sites-available/pictshare.conf /etc/nginx/sites-enabled/
systemctl reload nginx
To test if the installation was successful, open your web browser and visit your PictShare installation at http://your-domain.com
. If everything is working correctly, you should be able to upload and view images and videos.
Congratulations, you have successfully installed PictShare on Debian 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!