Browse Source

0847: Install Lychee - Photo Management System - On Linux

i12bretro 10 months ago
parent
commit
ae8aae3485
1 changed files with 129 additions and 0 deletions
  1. 129 0
      0847.html

+ 129 - 0
0847.html

@@ -0,0 +1,129 @@
+    <!DOCTYPE html>
+    <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
+      <head>
+        <title>Install Lychee - Photo Management System - On Linux</title>
+        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+        <meta charset="UTF-8">
+        <meta name="keywords" content="Browser Based,Install Guide,Self-Hosted,Web Based,Web Based Tools,Google Photos Alternative,Linux,Photo Management,Photo Manager,Photo Organizer,Lychee,Lychee Photo Management,Debian,Ubuntu,MariaDB,MySQL,PHP,PHP Based Application,Home Lab Ideas,Home Lab,How To,Tutorial,i12bretro">
+        <meta name="author" content="i12bretro">
+        <meta name="description" content="Install Lychee - Photo Management System - On Linux">
+        <meta name="viewport" content="width=device-width, initial-scale=1.0">
+        <meta name="revised" content="08/11/2024 09:45:49 PM" />
+				          <link rel="icon" type="image/x-icon" href="includes/favicon.ico">
+				  <script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
+				        <script type="text/javascript" src="includes/js/steps.js"></script>
+        <link href="css/steps.css" rel="stylesheet" type="text/css" />
+      </head>
+      <body>
+        <div id="gridContainer">
+          <div class="topMargin"></div>
+          <div id="listName" class="topMargin">
+            <h1>Install Lychee - Photo Management System - On Linux</h1>
+          </div>
+          <div></div>
+          <div id="content">
+          <h2>What is Lychee?</h2>
+
+<blockquote><em>Lychee is a free photo-management tool, which runs on your server or web-space. Installing is a matter of seconds. Upload, manage and share photos like from a native application. Lychee comes with everything you need and all your photos are stored securely. -<a href="https://lycheeorg.github.io/" target="_blank">https://lycheeorg.github.io/</a></em></blockquote>
+
+<h2>Installation</h2>
+
+<ol>
+	<li>Log into the Linux device</li>
+	<li>Run the following commands in a terminal window:
+	<div class="codeBlock"># update software repositories<br />
+	sudo apt update<br />
+	# install available software updates<br />
+	sudo apt upgrade -y<br />
+	# install prerequisites<br />
+	sudo apt install curl wget zip -y<br />
+	# install Apache HTTPD and MySQL<br />
+	sudo apt install apache2 mariadb-server mariadb-client -y<br />
+	# install PHP components<br />
+	sudo apt install php php-common php-mysqli php-mysql php-pdo-mysql php-bcmath php-gd php-xsl php-mbstring php-dom php-imagick php-xml -y<br />
+	# configure the MySQL database<br />
+	sudo su<br />
+	mysql_secure_installation</div>
+	</li>
+	<li>Press Enter to login as root</li>
+	<li>Type N and press Enter to not switch to unix socket authentication</li>
+	<li>Type Y and press Enter to set a root password, type the password twice to confirm</li>
+	<li>Type Y and press Enter to remove anonymous users</li>
+	<li>Type Y and press Enter to disallow root login remotely</li>
+	<li>Type Y and press Enter to remove the test database</li>
+	<li>Type Y and press Enter to reload privilege tables</li>
+	<li>Run the following command to login into MySQL:
+	<div class="codeBlock">mysql -u root -p</div>
+	</li>
+	<li>Authenticate with the root password set earlier</li>
+	<li>Run the following commands to create the Lychee database and database user
+	<div class="codeBlock">CREATE DATABASE lychee;<br />
+	GRANT ALL ON lychee.* to &#39;lychee_rw&#39;@&#39;localhost&#39; IDENTIFIED BY &#39;Lych33!&#39;;<br />
+	FLUSH PRIVILEGES;<br />
+	EXIT;<br />
+	exit</div>
+	</li>
+	<li>Continue with the following commands:
+	<div class="codeBlock"># fetch the latest download URL<br />
+	regex='"browser_download_url": "(https:\/\/github.com\/LycheeOrg\/Lychee\/releases\/download\/[^/]*\/[^/]*\.zip)"' && response=$(curl -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/LycheeOrg/Lychee/releases/latest) && [[ $response =~ $regex ]] && downloadURL="${BASH_REMATCH[1]}"<br />
+	# download the latest release<br />
+	wget -O /tmp/lychee.zip $downloadURL<br />
+	# extract the downloaded zip to /var/www<br />
+	sudo unzip /tmp/lychee.zip -d /var/www<br />
+	# rename the extracted folder<br />
+	sudo mv /var/www/Lychee* /var/www/lychee<br />
+	# set the owner of the lychee directory<br />
+	sudo chown -R www-data:www-data /var/www/lychee<br />
+	# create lychee apache configuration<br />
+	sudo nano /etc/apache2/sites-available/lychee.conf</div>
+	</li>
+	<li>Paste the following configuration into lychee.conf
+	<p>Alias /lychee &quot;/var/www/lychee/public&quot;<br />
+	&lt;Directory /var/www/lychee/public&gt;<br />
+	# enable the .htaccess rewrites<br />
+	AllowOverride All<br />
+	Order allow,deny<br />
+	Allow from All<br />
+	&lt;/Directory&gt;</p>
+	</li>
+	<li>Press CTRL+O, Enter, CTRL+X to write the changes</li>
+	<li>Run the following command to enable the lychee site
+	<div class="codeBlock"># enable rewrite module<br />
+	sudo a2enmod rewrite<br />
+	# enable the lychee site<br />
+	sudo a2ensite lychee<br />
+	# restart the apache2 service<br />
+	sudo systemctl restart apache2</div>
+	</li>
+</ol>
+
+<h2>Lychee Web Installer</h2>
+
+<ol>
+	<li>Open a web browser and navigate to http://DNSorIP/lychee</li>
+	<li>Click Next at the Lychee welcome screen</li>
+	<li>Click Next at the Requirements Check</li>
+	<li>Click Next at the Permissions Check</li>
+	<li>Update at least the following values in the
+	<p>APP_URL=http://DNSorIP<br />
+	APP_DIR=/lychee<br />
+	<br />
+	DB_CONNECTION=mysql<br />
+	DB_HOST=localhost<br />
+	DB_PORT=3306<br />
+	DB_DATABASE=lychee<br />
+	DB_USERNAME=lychee_rw<br />
+	DB_PASSWORD=Lych33!</p>
+	</li>
+	<li>Click Save &gt; Click Install</li>
+	<li>Once the installation completes click Set up admin account</li>
+	<li>Enter a Username &gt; Enter and confirm a Password &gt; Click Create admin account</li>
+	<li>Click Open Lychee</li>
+	<li>Welcome to Lychee</li>
+</ol>
+
+<p>Documentation: <a href="https://lycheeorg.github.io/docs/#installation" target="_blank">https://lycheeorg.github.io/docs/#installation</a></p>          </div>
+        </div>
+      </body>
+    </html>
+