Photo Stream is a lightweight and easy to use web-based photo gallery application. In this tutorial, we will walk through the steps to install Photo Stream on OpenSUSE Latest.
Before we begin, ensure that you have the following:
Photo Stream requires a set of dependencies to function correctly. To install these dependencies, execute the following command:
zypper install nginx php7-fpm php7-pdo php7-gmp php7-mbstring php7-zip php7-zlib php7-exif php7-imagick composer nodejs12 npm12 mariadb
This command installs the following packages:
After installing Nginx, we need to configure it to serve the Photo Stream application. To do this, create a new configuration file for Nginx using the following command:
vi /etc/nginx/conf.d/photo-stream.conf
Add the following lines to the file:
server {
listen 80 default_server;
listen [::]:80 default_server;
root /var/www/photo-stream/public;
index index.html index.htm index.php;
server_name localhost;
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
location ~ \.php$ {
include fastcgi_params;
fastcgi_pass unix:/run/php-fpm7.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}
This configuration file sets Nginx to listen on port 80, sets the root directory of the application, and sets the index file to use. Additionally, it defines how Nginx should handle PHP files.
After defining the Nginx configuration, start the service using the following command:
systemctl start nginx
systemctl enable nginx
Photo Stream requires a MySQL database to store and manage photos. Create a new database instance using the following command:
mysql -u root -p
After entering the MySQL prompt, create a new database called "photo_stream" using the following command:
CREATE DATABASE photo_stream;
After creating the database, create a new user and grant them access to the database:
CREATE USER 'photo_stream_user'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON photo_stream.* TO 'photo_stream_user'@'localhost';
Replace "password" with a secure password.
After creating the database, we can now install Photo Stream using the following steps:
git clone https://github.com/waschinski/photo-stream.git /var/www/photo-stream
cd /var/www/photo-stream/
composer install --no-dev
npm install
cp .env.example .env
vim .env
Ensure that the following variables are set correctly:
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=photo_stream
DB_USERNAME=photo_stream_user
DB_PASSWORD=password
Replace "password" with the secure password that you created earlier.
php artisan key:generate
php artisan migrate
After executing these steps, you should see a message indicating that the migration was successful.
Finally, start the Photo Stream application using the following commands:
chmod -R 777 storage/
php artisan serve
The first command sets the correct permissions for the storage directory, and the second command starts the application on the default port of 8000.
Access the application using your web browser at "http://localhost:8000".
Congratulations! You have successfully installed Photo Stream on your OpenSUSE Latest instance. You can now use it to manage and share your photo collections in a web-based gallery.
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!