This is a step by step how i get mediadrop running on my ubuntu server 11.10. This installation guide assumes a basic familiarity with *nix shell commands. Major step in this tutorial took from http://mediadrop.net and http://blog.zixo.sk.
1. Install packages
1 |
sudo apt-get install mysql-server mysql-client libmysqlclient-dev python-dev python-doc libjpeg-dev libjpeg62 zlib1g-dev libfreetype6 libfreetype6-dev git |
2. Install Setuptools and virtual environment for python
1 |
sudo apt-get install python-setuptools python-virtualenv |
3. Create virtual environment specially for mediadrop
I make a virtual environment in /var/www.
1 2 |
sudo virtualenv --no-site-packages venv // 'venv' name of virtual env sudo source venv/bin/activate //activate the virtual env |
Now, i am currently on virtual environment named ‘venv’.
4. Download and Install Mediadrop
1 2 3 4 5 6 7 8 |
# Unpack the downloaded distribution sudo wget http://mediadrop.net/releases/MediaCore-0.10.3.tar.gz sudo tar xzvf MediaCore-0.10.3.tar.gz cd MediaCore-0.10.0 # Install! sudo python setup.py develop cd .. |
code ‘python setup.py develop’ i run it more than three times. So, make sure your packages and its dependencies are installed completely if there is en error running it again and again. After no error, then continue next step.
5. Create Mysql database and make it ready for mediadrop
1 2 3 4 5 6 7 8 9 10 11 12 13 |
sudo mysql -u root -p #Mysql mysql> create database mediadrop; Query OK, 1 row affected (0.00 sec) mysql> grant usage on mediadrop.* to root@localhost identified by 'root'; Query OK, 0 rows affected (0.00 sec) mysql> grant all privileges on mediadrop.* to rootr@localhost; Query OK, 0 rows affected (0.33 sec) mysql> exit; |
6. Make basic configuration file and change in deployment.ini
1 2 |
# To create deployment.ini in your current dir: paster make-config MediaCore deployment.ini |
Make sure there is no error messages. Then edit file deployment.ini match with my database config above. Search for line sqlalchemy.url
1 |
sqlalchemy.url = mysql://root:root@localhost/mediadrop?charset=utf8&use_unicode=0 |
7. Copy data folder from Mediadrop-0.10.3 folder to www folder
1 2 |
# i was in /var/www/ with virtual env active sudo cp -a MediaCore-0.10.3/data . |
8. The creation of all database tables and addition of initial data.
1 |
sudo paster setup-app deployment.ini |
To set up the triggers that enable fulltext searching, use this code.
1 2 3 4 |
# Import fulltext search database triggers sudo mysql -u root -p mediadrop < MediaCore-0.10.3/setup_triggers.sql #type your password |
9. Launch the Built-in Server
1 |
sudo paster serve --reload deployment.ini |
Now open http://localhost:8080/ to see how it works! You can try access the admin at http://localhost:8080/admin/ with username: admin, password: admin. You also can access it from LAN, with specific IP address to your server. ex : http://192.168.1.1:8080/
If you have a problem, post comment below, i hope can help you.
Next, i will do Production Deployments, wish me luck.
Article about production deployments can see here.
Thanks for the tutorial bro, good work. listen bro I’m having some issues when trying to run “paster setup-app deployment.ini”, I get this error: ValueError: Unrecognised treebuilder “beautifulsoup”.
What could be the cause? Thanks in advance.
To get the latest source please clone this git
https://github.com/mediadrop/mediadrop.git