0847.html 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. <!DOCTYPE html>
  2. <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <title>Install Lychee - Photo Management System - On Linux</title>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  6. <meta charset="UTF-8">
  7. <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">
  8. <meta name="author" content="i12bretro">
  9. <meta name="description" content="Install Lychee - Photo Management System - On Linux">
  10. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  11. <meta name="revised" content="08/11/2024 09:45:49 PM" />
  12. <link rel="icon" type="image/x-icon" href="includes/favicon.ico">
  13. <script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
  14. <script type="text/javascript" src="includes/js/steps.js"></script>
  15. <link href="css/steps.css" rel="stylesheet" type="text/css" />
  16. </head>
  17. <body>
  18. <div id="gridContainer">
  19. <div class="topMargin"></div>
  20. <div id="listName" class="topMargin">
  21. <h1>Install Lychee - Photo Management System - On Linux</h1>
  22. </div>
  23. <div></div>
  24. <div id="content">
  25. <h2>What is Lychee?</h2>
  26. <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>
  27. <h2>Installation</h2>
  28. <ol>
  29. <li>Log into the Linux device</li>
  30. <li>Run the following commands in a terminal window:
  31. <div class="codeBlock"># update software repositories<br />
  32. sudo apt update<br />
  33. # install available software updates<br />
  34. sudo apt upgrade -y<br />
  35. # install prerequisites<br />
  36. sudo apt install curl wget zip -y<br />
  37. # install Apache HTTPD and MySQL<br />
  38. sudo apt install apache2 mariadb-server mariadb-client -y<br />
  39. # install PHP components<br />
  40. 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 />
  41. # configure the MySQL database<br />
  42. sudo su<br />
  43. mysql_secure_installation</div>
  44. </li>
  45. <li>Press Enter to login as root</li>
  46. <li>Type N and press Enter to not switch to unix socket authentication</li>
  47. <li>Type Y and press Enter to set a root password, type the password twice to confirm</li>
  48. <li>Type Y and press Enter to remove anonymous users</li>
  49. <li>Type Y and press Enter to disallow root login remotely</li>
  50. <li>Type Y and press Enter to remove the test database</li>
  51. <li>Type Y and press Enter to reload privilege tables</li>
  52. <li>Run the following command to login into MySQL:
  53. <div class="codeBlock">mysql -u root -p</div>
  54. </li>
  55. <li>Authenticate with the root password set earlier</li>
  56. <li>Run the following commands to create the Lychee database and database user
  57. <div class="codeBlock">CREATE DATABASE lychee;<br />
  58. GRANT ALL ON lychee.* to &#39;lychee_rw&#39;@&#39;localhost&#39; IDENTIFIED BY &#39;Lych33!&#39;;<br />
  59. FLUSH PRIVILEGES;<br />
  60. EXIT;<br />
  61. exit</div>
  62. </li>
  63. <li>Continue with the following commands:
  64. <div class="codeBlock"># fetch the latest download URL<br />
  65. 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 />
  66. # download the latest release<br />
  67. wget -O /tmp/lychee.zip $downloadURL<br />
  68. # extract the downloaded zip to /var/www<br />
  69. sudo unzip /tmp/lychee.zip -d /var/www<br />
  70. # rename the extracted folder<br />
  71. sudo mv /var/www/Lychee* /var/www/lychee<br />
  72. # set the owner of the lychee directory<br />
  73. sudo chown -R www-data:www-data /var/www/lychee<br />
  74. # create lychee apache configuration<br />
  75. sudo nano /etc/apache2/sites-available/lychee.conf</div>
  76. </li>
  77. <li>Paste the following configuration into lychee.conf
  78. <p>Alias /lychee &quot;/var/www/lychee/public&quot;<br />
  79. &lt;Directory /var/www/lychee/public&gt;<br />
  80. # enable the .htaccess rewrites<br />
  81. AllowOverride All<br />
  82. Order allow,deny<br />
  83. Allow from All<br />
  84. &lt;/Directory&gt;</p>
  85. </li>
  86. <li>Press CTRL+O, Enter, CTRL+X to write the changes</li>
  87. <li>Run the following command to enable the lychee site
  88. <div class="codeBlock"># enable rewrite module<br />
  89. sudo a2enmod rewrite<br />
  90. # enable the lychee site<br />
  91. sudo a2ensite lychee<br />
  92. # restart the apache2 service<br />
  93. sudo systemctl restart apache2</div>
  94. </li>
  95. </ol>
  96. <h2>Lychee Web Installer</h2>
  97. <ol>
  98. <li>Open a web browser and navigate to http://DNSorIP/lychee</li>
  99. <li>Click Next at the Lychee welcome screen</li>
  100. <li>Click Next at the Requirements Check</li>
  101. <li>Click Next at the Permissions Check</li>
  102. <li>Update at least the following values in the
  103. <p>APP_URL=http://DNSorIP<br />
  104. APP_DIR=/lychee<br />
  105. <br />
  106. DB_CONNECTION=mysql<br />
  107. DB_HOST=localhost<br />
  108. DB_PORT=3306<br />
  109. DB_DATABASE=lychee<br />
  110. DB_USERNAME=lychee_rw<br />
  111. DB_PASSWORD=Lych33!</p>
  112. </li>
  113. <li>Click Save &gt; Click Install</li>
  114. <li>Once the installation completes click Set up admin account</li>
  115. <li>Enter a Username &gt; Enter and confirm a Password &gt; Click Create admin account</li>
  116. <li>Click Open Lychee</li>
  117. <li>Welcome to Lychee</li>
  118. </ol>
  119. <p>Documentation: <a href="https://lycheeorg.github.io/docs/#installation" target="_blank">https://lycheeorg.github.io/docs/#installation</a></p> </div>
  120. </div>
  121. </body>
  122. </html>