How to install Lychee on Ubuntu 16.04

To install Lychee on Ubuntu 16.04

Lychee is a free and open source photo management application which can be used for uploading, managing and sharing photos. Lychee is very secure as the photos uploaded in it are deemed to be secure. Lychee runs on a server and installing it takes only a few minutes. The installation of Lychee on Ubuntu 16.04 is covered in this article.

Pre-requirements

Install lamp (apache, php, mariadb-server)

In mariadb (create database, user and give privilages to user)

For php

add-apt-repository ppa:ondrej/php

apt-get update

modules(apt-get install php5.6 php5.6-mbstring php5.6-mcrypt php5.6-mysql php5.6-xml php5.6-gd php5.6-imap php5.6-ldap php5.6-odbc php-pear php5.6-xmlrpc php-xml-parser)

Installing Lychee

Before you begin the installation process, make sure you enter into your Apache document root location by making use of the following command.

root@linuxhelp12:~# cd /var/www/html/

And then, you need to download a stable and latest lychee package for the installation purpose.

root@linuxhelp12:/var/www/html# git clone https://github.com/electerious/Lychee.git
Cloning into ' Lychee' ...
remote: Counting objects: 10445, done.
remote: Total 10445 (delta 0), reused 0 (delta 0), pack-reused 10445
Receiving objects: 100% (10445/10445), 5.73 MiB | 387.00 KiB/s, done.
Resolving deltas: 100% (7137/7137), done.
Checking connectivity... done.

Once it is done, you need to change the ownership and permission for lychee directory which you have downloaded.

root@linuxhelp12:/var/www/html# chown &ndash R www-data:www-data Lychee/
root@linuxhelp12:/var/www/html# chmod -R 775 Lychee/

Later, you need to create a VirtualHost for Lychee, and for that, you need to open a new .conf file as follows.

root@linuxhelp12:/var/www/html# vim /etc /apache2/sites-available/lychee.conf

Once it is done, you shall add the followuing lines in it.

< VirtualHost *:80> 
ServerAdmin admin@linuxhelp12.com
DocumentRoot /var/www/html/Lychee/
ServerName linuxhelp12.com
ServerAlias www.linuxhelp12.com
< Directory /var/www/html/Lychee/> 
Options FollowSymLinks
AllowOverride All
Order allow,deny
allow from all
< /Directory> 
ErrorLog /var/log/apache2/linuxhelp12.com-error_log
CustomLog /var/log/apache2/linuxhelp12.com-access_log common
< /VirtualHost> 

After configuring the VirtualHost, you need to make an entry in hosts file. Open the hosts file by running the following.

root@linuxhelp12:/var/www/html# vim /etc/hosts

And in that file, you need to add the following line.

< ip addr>  yourdomain

Later, you need to enable the new .conf file as follows.

root@linuxhelp12:/var/www/html# a2ensite lychee.conf
Enabling site lychee.
To activate the new configuration, you need to run:
service apache2 reload

Once it is all done, you need to restart the Apache service by making use of the following command.

root@linuxhelp12:/var/www/html# systemctl restart apache2

You should open your browser now and navigate to your domain, the installation wizard of Lychee appears on your screen. You shall enter the necessary database details and click Connect.

In the next page, you need to enter the credentials and click login.

Once you login, you will be taken to the dashboard of Lychee.

With this, the installation of Lychee comes to an end.

Tag : Ubuntu
FAQ
Q
Why Lychee is not working?
A
If Lychee is not working properly, try to open plugins/Diagnostics/index.php. This script will display all errors it can find.
Q
What do I need to run Lychee on my server?
A
To run Lychee, everything you need is a web-server with PHP 5.5 or later and a MySQL-Database.
Q
Does it stream music from internet?
A
That feature has not been added in the current version
Q
Why I can't upload photos?
A
If you experience problems uploading large photos, you might want to change the PHP parameters in .htaccess (if you are using the PHP Apache module) or in .user.ini (if you are using PHP >= 5.5 with CGI or FastCGI).



If possible, change these settings directly in your php.ini. We recommend to increase the values of the following properties:



max_execution_time = 200

post_max_size = 100M

upload_max_size = 100M

upload_max_filesize = 20M

memory_limit = 256M
Q
Which browsers are supported?
A
Lychee supports the latest versions of Google Chrome, Apple Safari, Mozilla Firefox, Opera and Microsoft Internet Explorer. Make sure you are always running the newest version.