Hi andjohn,
Indeed lychee is a nice feature and handy. About memory resource, only when you upload or import new files requires to use much RAM. So set 256MB may be done if there are not many uploads and when you do it users do not request via other servers like resilio; samba exchanges...
With 256MB, you should be able to load pic files with a resolution 20MB pixels (and you need 384MB if resolution is 80MB pixels)
How to install it :
Note: I assume you stores all attached files in fvdw share
Before installing, I advice to select the "High" level of the option "Memory size allocated to the Web server" (from the setup menu, Web server tab).
Indeed this option allows to the apache server to have a better behaviour. If you select it later, some custom php init options will be overwritten !
- install mysqli php extension
Open a shell terminal, and do the command :
- Code: Select all
tar -xf /direct-usb/fvdw/fvdw-sl-17-0_PHP-5-6-6_mysqli.tar.gz -C /
Important: You need to repeat this task at each time you upgrade the firmware. But if later we update php version you will need an another mysqli version
- install mysqli addons
Follow the howto of the topic
https://plugout.net/viewtopic.php?f=15&t=1324
Some additionnal information, to make a clean start of myspl daemon, use this command
- Code: Select all
nohup /usr/local/libexec/mysqld --user=root > /dev/null 2>&1 &
Like this, the daemon is not stopped when you close the terminal.
later I will explain how to start it on nas booting
If you want to set a password for the root mysql user (please to note root mysql user is NOT the root linux account), do this command
- Code: Select all
/usr/local/bin/mysqladmin -u root password 'YOUR-PASSWORD'
- install Lychee file
Create a new share (eg. Lychee), I assume on the addons volume (where you have fvdw share), and do this command
- Code: Select all
tar -xf /direct-usb/fvdw/Lychee_3.1.6_15apr2018.tar.gz -C /direct-usb/Lychee
Create a share is required because Lychee stores the uploaded files in a subfolder. So you can not install its files on a system partition (no enough space). But also because at each firmware upgrade, you would lose your uploaded files!
Note:
do not change Linux permissions and owner on these files.
Note2: if you have set a password on the mysql root account, you need to edit the file data/config.php and to declare the password in this line
- Code: Select all
$dbPassword = ''; // Password of the database
. You should not change any other lines.
- define the required php options
IMPORTANT: I assume you did not try to edit php.ini file previously and set these options! If you do it you need to removes them.
on a shell terminal, do
- Code: Select all
echo -e "extension=mysqli.so\nmax_file_uploads = 1\n" >>/etc/php.ini
(Be careful uses double '>'!)
And update some existing options
- Code: Select all
sed -ie '/max_execution_time.*=/c max_execution_time = 300' /etc/php.ini
sed -ie '/memory_limit.*=/c memory_limit = 256M' /etc/php.ini
Then restart gracefully apache server to load the new values
- Code: Select all
/usr/bin/httpd -f httpd.conf -d /etc -k graceful
Note:
1) I did not set the recommanded value for the option "max_file_uploads", 20 simultaneous uploads will overload the NAS, upload files one by one is enough
2) I did not set upload_max_filesize as web-explorer requires to load bigger file size than 20MB! (with web-explorer you can upload upto 1GB file size !)
3) I did not set post_max_size for the same issue
4) upload_max_size is not a init php option ! (so an error of the Lychee developers!)
- last step, link the lychee files in the web root directory
- Code: Select all
ln -s /direct-usb/Lychee /usr/htdocs/lychee
Then Lychee app will be available on the url
http://nasname/lychee, you can set easily another url by changing the symlink name on the previous command (/usr/htdocs/yourlycheeword)
Now you need to ensure all changes will be restored on NAS rebooting.
- Go to Bootjobs menu, and Set up the feature
- unzip start-lychee file in the folder direct-usb/fvdw/cron-boot (then you should have a file start-lychee.sh)
- Go again to Bootjobs menu (or reload it), select the shell script ("at Next booting" column) and save your change
- Then enable Boot Jobs feature
Note : update these lines if you use other values
- Code: Select all
# url word used to load Lychee app
LINK_LYCH=/usr/htdocs/lychee
# lychee share path
SHR_LYCH=/direct-usb/Lychee
# php RAM limit
MEM_LIMIT=256
Then in boot.log file, you will be able to check if Lychee environment is restored at each booting