###LAMP Stack (linux, apache, mysql, php) ###
We are currently using the following:
- Ubuntu 13.10
- Apache 2.4.6
- PHP 5.5.3
- MySQL 5.5.34
- SSL cert (if you decide to use https://)
Before installation, have a system administrator configure your server's php.ini file to make sure its PHP memory limit is at least 128 MB. We currently recommend 300 MB or more if you are looking to import and use more than 10,000 images or are importing audio and/or video media.
-
Modify php.ini file
- On Ubuntu, you can find this in /etc/php5/apache2/
- memory_limit - change from 128M to 300M or higher to large image sets, and audio/video media
- post_max_size - change from 8M to 220M to accommodate larger media
- upload_max_filesize - change from 2M to 256M to handle audio and video file uploads
-
If running PHP 5.5+
- Must define date.timezone (e.g., date.timezone # "America/New_York")
- Reload apache
In www/protected/data folder, copy fbvsettings_default.php and save it as fbvsettings.php.
In fbvsettings.php, edit the following line to reflect your current setup:
'mg-api-url' => 'http://LOCATION_OF_GAME_BUILD/www/index.php/ws/content/wsdl/',
In mg-content folder, go to tools and run fix-perms script.
cd tools
./fix-perms.sh
fix-perms.sh changes group ownership to www-data, which in Ubuntu systems allow the web server access
The following folders and files need www-data group ownership:
assets/
uploads/
protected/runtime/
protected/config/main.php
protected/data/fbvsettings.php
protected/commands/ffmpeg/ffmpeg
protected/commands/ffmpeg/ffprobe
Go to web browser and open URL that you have pointed towards your game build.
http://CONTENT_BUILD_LOCATION/www/
Click "Proceed with system requirement test" to run a test of server capabilities. This will ensure that your server can support the required Yii framework.
NOTE: Particular directories and files will need to be writable by the webserver user. On Debian/Ubuntu systems, this user is usually 'www-data' while RedHat and derivatives often use 'apache'. The fix-perms.sh script located in the tools/ directory may be of help. Please read the code carefully before use!
If your server passes the system requirement test, you may then click "Proceed with database installation", bring you to the Database Setup page.
You will need to fill out the Database Name, Database User Name, and Database Host Name fields for the database you wish to use. If the database has a password, enter this in the Database Password field as well. If you do not have this information, please contact your system administrator. Leave the Database Host Port field blank. If you have not already created a database for use with Metadata Games, please do so now.
After entering the required information, click "Submit".
On this page, you will register your Content Build with the Game build and create a Content Build admin account.
At the "Admin Account Setup" page, fill out the following fields:
-
Application Name - Your Institution or Organization's name.
-
Logo - Upload your Institution or Organization's logo. Although you can put in any size logo, a rectangular shaped graphic 120 pixels or less works best.
-
Application URL - URL for your Content Build. Don't forget to add www/ to the end of your URL!
-
Institution Website - URL for your institution. In certain games, this is the link players select to find more information about your institution and your collections.
-
Description - A short description (up to 255 characters) about your Institution.
-
Administrator Username - The name of the administrator's account.
-
Password - A password for the administrator's account.
-
Verify Password - Enter the same password, for confirmation.
-
Email - A valid email address for the administrator.
-
Ip - IP range at your organization. This is for restricting access to collections. For more details on restricting collection access, see Configuration.
Then click "Save".
Congratulations! You have successfully installed the Content Build for Metadata >Games! Now to configure and import media! and then __configure the Game Build
If running over https, check that your ServerProfile URL starts with https
Get Error: Internal Server Error when trying to upload media
- check application.log in protected/runtime/
- check apache log in /var/log/apache2/error.log ** if due to "PHP Fatal error: Call to undefined function json_encode()" *** need to install json extension (php 5.5+ issue). *** sudo apt-get install php5-json
After entering installation data, I'm taken back to the System Requirements page
- check that fbvsettings.php has group perms for www-data.
Trying to transcode audio/video media and I get a 'Invalid data found when processing input:' error
- make sure that ffmpeg and ffprobe in www/protected/commands/ffmpeg/ are executable by owner and group, ie, should have permissions 754.