Cenos7 + Lychee

1.Lychee is a free photo-management tool
2.Installation
https://lycheeorg.github.io/docs/installation.html
Install Lychee
0.Install php7.4 + apache + MariaDB
yum -y install php php-fpm php-mysqli php-exif php-mbstring php-json php-zip php-gd php-imagick mariadb-server mariadb-client
1.vi /etc/httpd/conf/httpd.conf
<Directory /var/www/html/Lychee>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
2.download
yum install git
git clone https://www.github.com/LycheeOrg/Lychee /var/www/html/Lychee
cd /var/www/html/Lychee
yum install -y composer php-bcmath
composer install --no-dev
cp .env.example .env
3.vi .env
...
DB_CONNECTION=mysql
DB_HOST=localhost
DB_PORT=
DB_DATABASE=Lychee
DB_USERNAME=hello
DB_PASSWORD=hello123
DB_LOG_SQL=false
...
chown -R apache:apache /var/www/html/Lychee
chcon -t httpd_sys_rw_content_t /var/www/html/Lychee -R
php artisan key:generate
4.MariaDB [(none)]> create database Lychee;
Query OK, 1 row affected (0.000 sec)
MariaDB [(none)]> show databases;
+--------------------+
| Database |
+--------------------+
| Lychee |
| Lychee2 |
| Lychee3 |
| information_schema |
| mysql |
| performance_schema |
+--------------------+
6 rows in set (0.001 sec)
5.http://localhost/Lychee2/
setsebool -P httpd_read_user_content 1







復原單一資料庫
# mysql -u root -p database_name < backup.sql