| Version 5 (modified by MC-arjen, 3 years ago) |
|---|
FTP Batch Installation
In order to use the MediaMosa bulkupload facility your system should run a FTP Server to allow users to upload their data to your server using FTP.
A watcher-program (watcher) monitors the upload directory and invokes xml-parser, the program responsible for the actual processing of the uploaded data.
These instructions assume that you are using Debian Linux, ProFTPD and a MySQL database to store the relevant user-data.
ProFTPD
To install the required packages issue the following command (with root privileges):
apt-get install proftpd proftpd-mod-mysql
During the ProFTPd configuration, choose 'standalone' is acceptable for most installations.
Create a new file called /etc/proftpd/mediamosa_proftpd.conf (with root) and add the following text;
ServerName "Batchupload MediaMosa" DebugLevel 0 DefaultRoot ~ # Users require a valid shell listed in /etc/shells to login. # Use this directive to release that constrain. RequireValidShell off # Set the user and group that the server normally runs at. User www-data Group www-data LoadModule mod_sql.c LoadModule mod_sql_mysql.c SQLBackend mysql # userid van www-data SQLMinID 33 SQLDefaultUID 33 SQLAuthenticate users SQLAuthTypes OpenSSL ## databasename@host database_user user_password SQLConnectInfo <database>@<host> <db_username> <db_password> SQLUserInfo mediamosa_ftp_user userid passwd uid gid homedir shell SQLUserWhereClause "active=1" ## create a user's home directory on demand if it doesn't exist CreateHome on 777 SQLLog PASS updatecount SQLNamedQuery updatecount UPDATE "count=count+1, accessed=now() WHERE userid='%u'" mediamosa_ftp_user SQLLog STOR,DELE modified SQLNamedQuery modified UPDATE "modified=now() WHERE userid='%u'" mediamosa_ftp_user
Make sure you change the SQLConnectInfo with the correct MySQL user connection.
Now edit /etc/proftpd/proftpd.conf and add the following line at the end of the file;
Include /etc/proftpd/mediamosa_proftpd.conf
To make your changes to take effect, you need to restart the FTP server;
/etc/init.d/proftpd restart
XML-parser
The next step is to install xml-parser by running (with root privileges):
dpkg -i vpx-xp_1.0.3_i386.deb
and apply the following changes to /user/local/xml-parser/settings.php:
define("VPX_HOST", "localhost");
define("VPX_URL_PREFIX", "");
define("SAN_NAS_BASE_PATH", "__HOMEDIR__");
Also replace __HOMEDIR__ with the path to the previously defined upload-directory.
Watcher software
Finally you need to install and run the watcher software. This software will detect any changes in the ftp-upload directory and control the the processing of the uploaded files.
As the watcher-software uses gaminlib0 you will have to install this library first. Using root-privileges run:
apt-get install gamin gaminlib0
after that you can install the watcher-software itself:
dpkg -i vpx-dw_1.0.1_i386.deb
Finally you will have to the following changes to /opt/local/etc/watcher/watcher.conf
# The user and group id of the daemon ServerId = 33:60001 # The script that will handle created files Handler = /var/opt/local/xml-parser/process.php # Base directory under which user subdirectories will be added. BaseDir = __HOMEDIR__
Attachments
-
xml_parser.tgz
(17.7 KB) - added by MC-arjen
3 years ago.
