You are on page 1of 4

Ensure the server has internet access

The mediadrop install (and the python dependency below) need to download further packages, and
the preferred (but slower) method is to get a proxy exclusion approved for this server. The
alternative is to run commands that need internet access through the proxy using your credentials.
Set the environment variables (make your own assessment on the security of this..)
export http_proxy="http://username:password@proxyURL:port"
export https_proxy="http://username:password@proxyURL:port"
By default, sudo commands will not consider these environment variables (and will therefore not
have internet access). Use the -E flag for sudo to use these env vars, e.g.
sudo E <command>
When done, reset the environment variables so your login isnt stored (and optionally change your
password.. security is up to you)
export http_proxy=""
export https_proxy=""
Dependencies

Check python is installed
which python
Install packages:
sudo yum install python-setuptools (named as setuptools in the
install doco and CentOS)
sudo yum install python-paver (named as virtualenv in the install
doco and CentOS)
sudo yum install mysql
sudo yum install mysql-server
sudo yum install mysql-devel
sudo yum install gcc
sudo yum install python-devel
sudo yum install libjpeg-devel
sudo yum install zlib-devel
sudo yum install freetype-devel

Download additional python module and install manually (required on RHEL not on CentOS)
sudo -E wget --no-check-certificate
https://pypi.python.org/packages/source/s/simplejson/simplejson-
3.3.3.tar.gz
sudo tar xzvf simplejson-3.3.3.tar.gz
cd simplejson-3.3.3.tar.gz
sudo -E python setup.py install
Configure MySQL

Start the service and set to auto start upon reboot:
sudo service mysqld start
sudo chkconfig --levels 235 mysqld on

Set root password:
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('r00t');
SET PASSWORD FOR 'root'@'127.0.0.1' = PASSWORD('r00t');

i.e. mysql root user login is now:
username: root
password: r00t

Create database:

CREATE DATABASE mediadrop;

Install Mediadrop

Download the mediadrop package to the install location (e.g. /opt)
cd /opt
sudo -E wget http://mediadrop.net/releases/MediaCore-0.10.3.tar.gz

Extract package
sudo tar xzvf MediaCore-0.10.3.tar.gz
cd MediaCore-0.10.3

Run the install script
sudo -E python setup.py develop
cd..

Configure Mediadrop

Create the .ini file
sudo paster make-config MediaCore deployment.ini

Edit mysql details in config
sudo nano development.ini
Change the line to the below:
sqlalchemy.url =
mysql://root:r00t@localhost/mediadrop?charset=utf8&use_unicode=0

Load initial data
cp -a MediaCore-0.10.0/data .
sudo paster setup-app deployment.ini
mysql -u root -p mediadrop < MediaCore-0.10.3/setup_triggers.sql
(enter mysql root password)

Run the Mediadrop server

It is preferable to setup Apache, Nginx etc but this is good for testing:
sudo paster serve --reload deployment.ini

To run this as a background task (so it keeps running when you exit the SSH server) append an
ampersand to the above:
sudo paster serve --reload deployment.ini &

You might also like