Server Setup Introduction This document describes the needed setup of the server for PNEK. The software installed is called the Archive Tool. The definition is split in the different programs that should be installed, the rights the different users/ programs should have on the filesystem, the access to the outside world and which information should be returned by the person setting the server. For monitoring purpose the (virtual) server should only run the Archive Tool. The machine should have daily backup and which should be controlled. Outside world access The machine is expected to be behind a firewall. Therefor external access to the installed software is restricted. There are different groups of users that use the system • developer access • deployment access • open access Location on the machine We can identify different location on the machine. The location should be documented and return after the setup has been done. The location should be full qualify path. 1. The document root of the Apache server. This location is called apacheDocuments 2. The location the FTP stores the file uploaded by the general public. This location is called​
publicAccess 1 3. The location of the filestore. This where the VKA interface and ResourceSpace will look for the video files after the have been processed. This location is call​
fileStore 4. A location where FFMPEG can store its temp files. This should be on the same machine/drive as the FFMPEG is installed and the same drive as the general public upload their files. This should be extremely fast drive and large enough to do the temporary storage and processing of those files. This location is call​
Archive Tool have a setup of 500GB on current Virtual server 5. Temp storage used by the apache and the PHP cron job. These location are called​
. These are subdirectories from the apacheDocuments​
. Installed software This is the list of the minimal installed programs. Excepted is a full Linux install with all security enabled and with direct internet access and access of the network to the remote storage (​
). Archive Tool makes use of: • Apache • mySQL • PHP • FTP server • CRON jobs • FFMPEG • Terminal access Apache The standard version of Apache does not need to be changed. The document root will be​
(see locations). The ftp server should have access to the document root. The ip range for this access is deployment access. The structure will be: document root/ 2 /site /config/users /assets /runtime directories set by the deployment server /resourcespace /filestore directories set by the resources space setup The apache process should have read / write access to the​
runtime directories (including creating new directories). These are the​
. The filestore​
is virtual directory that is mapped to the network share where the files are stored. Location is​
fileStorage mySQL Version: 5.5. • Encoding: UTF­8 unicode • Access through phpmyadmin (restricted by developer access) • External access to the mySQL database by developer access. A full backup of the database (rsvideokunstutf8) should be restored on the machine. •
PHP Standard is PHP 5.5. A higher version is allowed. • Curl installed. •
FTP server This is probably the most complex part of the setup. There are three accounts/ groups needed. 1. External users can store files on the ftp server. The users we call​
. For this there is one account, password protected, through which they can upload to one directory. This account is not ip restricted.​
can create subdirectories. The location of the directory should be​
For the location see Locations 3 2. For the deployment there is a user (​
) which has access to the root document directory of the Apache server. This account is ip restricted to developer access​
. This user can read / write. The location is apacheDocuments 3. For checking the files there is a user which has access to the filestore. This user is ip restricted to​
developer access​
. The location is​
. Cron Cron is used to process the files. It will run PHP scripts. The process needs read / write access to​
. The process will move the files around to recompress the video file by FFMPEG. FFMPEG FFMPEG is used to re­compress the huge video files. All access may never be done across the network. All compression to be done on a local, very fast, disk. FFMPEG only needs read / write access to the​
. The FFMPEG installation is part of the ResourceSpace installation and is not documented in this documention Terminal access For maintenance sudo access to the machine is needed from ip adress range developer access. Installing VKA interface 4 The interface is best installed on the /site directory. This directory will hold all files needed to run the VKA interface except the files used by ResourceSpace. These files are stored into the /resourcespace directory. The default url would then be​ Installing using GIT The entire software is stored in a GIT repository. This repository can be found at To get the site the repository should be cloned: #clone the repo git clone ​​
site # install submodues git submodule init; git submodule update; The interface can also be installed with a push ftp from the beanstalk server. This will keep the installation automatic in sync with the latest release. To make use of this feature please contact ​​
. Setting up directory access cd site # create missing dirs mkdir site/assets chmod a+w !$ mkdir site/protected/runtime chmod a+w !$ mkdir site/protected/config/users chmod a+w !$ #install subsubmodules cd site/protected/vendors/toxus git submodule init; git submodule update; 5 More information about the access to the directory structure can be found in the chapter “Directory access”. General setup The general setup of the system can be reached in a browser through the url /site/index.php/setup The default password is​
. This can be changed in the setup. The basic setup (versions) is defined in the Setup of the system part. The version of Resource Space is important because the migration is different. This value ​
should be set before running the migration. A 6 Setup of the database The database should be created first. This can be done on the command prompt. See the mysql documentation about creating a sql database. An empty database should be created and a unique user that has full access except GRANT should be created. The default database name is​
with the user​
and a self chosen password. In the system setup (/site/index.php/setup) the access to the database should also be defined in the setup. 7 The connection string is the connection to the database: host and db name. Username​
is the self chosen name (default vka_db) and the password is the chosen password. After saving the information the connection to the database has been made. If there is an error during the saving (access denied) one should check the write access to the​
directory. Creating tables and import The structure of the database can be upgraded through the terminal cd /site/protected # the database will be migrate to the latest version php yiic migrate The first time a setup must run to define the fields needed by ResourceSpace and the VKA interface. This my sql script will create the field definition needed to run the interface. The script is in :​
/sql/setup.sql Meta tags This values define the header of every HTML page send to the user. 8 Fixed values The system uses a number of constant values which can be customized through the setup interface. There are more options, but these are controlled by the ResourceSpace setup (like kind of compression, location of files, etc) 9 Type id art:​
this defines the id of the record that ResourceSpace accepts as Art. Default is 8. Type id Artist​
: this defines the id of a resource that ResourceSpace uses for an Artist. Administrator Group​
: The group that is defined as being an administrator. Moderator Group​
: The group that are the moderators of the system: See moderation. Application name​
: The default name in the header if not changed by the group. Upload Path​
: the path where the FTP server upload the files. Temp storage Path​
: the path where temporary files are placed. Needed is read/write access (see access). Process Url​
: the url called by the processing queue when running a new job. Alt file min size​
: the size of file in bytes to be accepted as Alternate file. Artist General​
: The id of the group that holds the view rights for the artist. 10 Artist Group​
: The id of the group that holds the edit rights for the artist. Transfer The transfer setting is used for showing the files to the outside world. Expire in days: the number of days the download is valid. After this period the files can not be downloaded anymore. Allow Masterfile: default the artist is not allowed to send the master file to anyone. This is because these files are huge and most of the time, of very limited use. Allowing this would cause the system to use extreme amount of resources. Mail subject: the default subject for the mail message. Mail header: the header text used in the mail. Mail footer: the footer text used in the mail. Mail system The system can send mail message. The configuration is defined by the mail system settings. 11 Allowed mail domains: If using a local mail server, one can restrict the domains where to mail to. If an email adress is outside this list (; separation), the mail will not be sent, but it will be logged in the mySQL mail table. Mail collector adr: All mails will be sent to this email adress if the Mail call is local Mail class: Which type of mail server to use. There are two systems implemented: A local mail server and the Postmark server. The best result is with the Postmark server. Bounce Api Key: this is the bounce key needed in by Postmark. Postmark The VKA interface has the possibility to use the Postmark (​​
). This is an email service that handles transactional mail. The advantage is that we can track any errors when sending / receiving mails, and that there is no need to install an email server on the server. Api key​
: this is the key that is generated by Postmark and identifies the connector Debug the connection​
: For testing purpose a full log can be generated. The information is stored in the mySQL table​
All the communication between the VKA server and the Postmark server is logged From Person​
: the name of the person sending the mail 12 From Email​
: the email adress used to send the email. This email adress should be known in Postmark or an error will occur. Meta tags The Meta tags and names used in the interface can be set in the setup. The fields are self­explanatory. Help system The system has a flexible help system in which the users can add new topics to the help options. If this option is turned on, the master help file is updated, otherwise the help file is stored in the /site/config/users directory. System debug information Depending on the state of the system, extra information can be sent to the client or stored in the database. 13 Is develop​
: This turns on most debug flags in the system. The /site/protected/runtime directory will be used to store the log and dump files. Full error message​
: If there is a problem a full stack trace is shown to the user. User Firebug​
: The debug information is included in the returned header and can be shown in Firebug. Log Error​
: The full log is written to the /site/protected/runtime directory. Show all jobs​
: Jobs that are deleted can be shown by turning on this flag. 14 System check within the Archive Tool In the Archive Tool the Administrator has the option to check the current settings of the system. This can be found under the menu System / System Info. The information should the parameters that configure the current state of the system. These are settings defined in the setup. It is important that the character set is utf8. This is the information about the current request. It is the splits of the path. 15 These are the settings that are defined in the .htaccess file. The parameter to set are: • post_max_size • upload_max_file_size Setting these parameters define the maximum size of post and files. Making the values very high can slow down the entire system. Large files should be uploaded through FTP. 16 These values are defined in the ResourceSpace setup. The VKA interface needs to copy these so it can access the files and other resources. Config filename​
: which configuration file has been read. resourceSpaceBaseUrl​
: the url to ResourceSpace. resourceSpacePath​
: the fysical path to ResourceSpace. 17 resourceSpace​
: the directory ResourceSpace has been installed in. resourceSpaceRoot​
: same as base url. resourceSpaceImageRoot​
: the root of the file store where the files are stored. This is the full path / alias to the filestore. imageTrashBin​
: the location where the delete files are moved to. resourceSpaceImageUrl​
: the url through ResourceSpace to get access to the filestorage. filestore access​
: the read / write access to the file store. This​
always be write access – read access. If not the system can not access the files! ResourceSpaceApi​
: the full path to where the importApi should be installed. scrambleKey​
: the key used to scramble the filenames. uploadPath​
: the fysical path to the ftp directory. useCurl​
: the system can use curl or direct access. Allowed video extension​
: the extension allowed for the video (set in ResourceSpace). Allowed doc extension​
: the extensions allowed for the documentation (set in ResourceSpace). Allowed image extension​
:the extensions allowed for the images (set in ResourceSpace). image Magic Path​
: the path in the system to image magic. Alternate file folders​
: the folder names for the alternate files. processUrl​
: the url to call when a file should be processed. 18 Refresh Assets cache All javascript, css, images are cached on the server. These cache can be cleared so the new version of the software is retrieved. When there are errors that the old preview image remain visible while a new video has been uploaded, this should be clicked. Test ftp access The system runs a test to check if all rights are proper set Refresh Field Information The field information is cached by the VKA interface. When there are new fields or values that have changed in the definition through the ResourceSpace interface, this option should be clicked. The option will generate the needed files in the /site/protected/runtime directory. 19 Rebuild Art to artist relation If artist are renamed, this option can be clicked so that the system will refresh all the links. ResourceSpace links ResourceSpace ­ ​ Resource Space setup on Wiki: ​ Resource Space knowledge Base: ​­base/ 20 
Download PDF
Similar pages