Step 1: Go to your control panel and create a custom app (listening on port) - remember the port for mysql. Then login via SSH.
Step 2: Get your own MySQL server.
Set MY_PORT variable for our my.cnf later on.
MY_PORT=PUT_RESERVED_PORT_NUMBER_HERE
Make a folder to house our source.
mkdir -p ~/mysql/.src ~/mysql/tmp
Get source and install it. Visit the downloads section at mysql.com and get the latest source code link. Copy it for the command below:
wget http://LINK/goes/here.tar.gz
tar xf mysql-5.x.x.tar.gz
cd mysql-5.x.x
./configure --prefix=$HOME/mysql
You have to wait a while here.
make
make install
Okay, now on to config:
mkdir $HOME/mysql/etc
cat > $HOME/mysql/etc/my.cnf << EOF
now copy paste this:
[mysqld]
port=$MY_PORT
socket=$HOME/mysql/mysql.sock
basedir=$HOME/mysql
datadir=$HOME/mysql/data
[client]
port=$MY_PORT
socket=$HOME/mysql/mysql.sock
EOF
All done. Now to export the new bin folder
echo export PATH=$HOME/mysql/bin:$PATH >> ~/.bash_profile
load up changes
source ~/.bash_profile
set up initial db
mysql_install_db --basedir=$HOME/mysql --datadir=$HOME/mysql/data --tmpdir=$HOME/mysql/tmp
Now you can start your mysql server by using this command. You may want to add this to a cron to make sure mysqld stays on.
cd $HOME/mysql; mysqld_safe --defaults-file=$HOME/mysql/etc/my.cnf &
Choose a password for your root user:
mysqladmin -u root -P $MY_PORT -S $HOME/mysql/mysql.sock password "YOURPASSWORDHERE"
Now that we have some libs python is going to use later on, let's add them to LD_LIBRARY_PATH
echo export LD_LIBRARY_PATH=$HOME/mysql/lib/mysql >> ~/.bash_profile
Step 3: On to the fun stuff -installing MediaCore.
Go to the control panel and add another app, this time a mod_wsgi 3.2/Python 2.5 one.
Back to ssh now.
Give mod_wsgi what it needs for later on:
cd $HOME/webapps/NAMEYOUGAVEYOURAPP/apache2/lib
ln -s $HOME/mysql/lib/mysql/libmysqlclient_r.so.16 ./libmysqlclient_r.so.16
Install virtualenv:
cd ../../
easy_install-2.5 virtualenv
set up env for mediacore.
virtualenv --no-site-packages mediacore_env
activate env
source mediacore_env/bin/activate
There's no git, so unless you want to install it yourself or use git on your home pc and then upload mediacore files, just get the latest release of mediacore. At this time, it's 0.8.2.
From here on you can follow the official installation documentation. I am including it in an attempt to save you time.
wget http://getmediacore.com/files/MediaCore-0.8.2.tar.gz
tar zxvf MediaCore-0.8.2.tar.gz
cd MediaCore-0.8.2
python2.5 setup.py develop
$HOME/mysql/bin/mysql -u root -p -S=$HOME/mysql/mysql.sock
create database DBNAMEHERE;
grant usage on DBNAMEHERE.* to DBUSER@localhost identified by 'PASSWORDFORDBUSER';
grant all privileges on DBNAMEHERE.* to DBUSER@localhost;
exit
Edit your development.ini file and set your sqlalchemy.url to something like this. Remember to set the right MYSQLPORT - the first app you added in your control panel.
sqlalchemy.url = mysql://DBUSER:PASSWORDFORDBUSER@127.0.0.1:MYSQLPORT/DBNAMEHERE?charset=utf8&use_unicode=0
paster setup-app development.ini
ok, now we have basic table structure, on to making search work:
$HOME/mysql/bin/mysql -u root -p -S=$HOME/mysql/mysql.sock DBNAMEHERE < setup_triggers.sql
Step 4: Deploying via mod_wsgi.
Get another port for MediaCore's by adding a new listening on port custom app. Edit your deployment.ini, set your email, listening port to whatever port they give you for that last custom app, and then simply copy the sqlalchemy.url over from development.ini.
The rest can be the same as http://getmediacore.com/docs/install/apache-wsgi.html
Make sure you restart your apache server after modifying httpd.conf.
I'll try to answer questions for as long as I can remember to revisit this post. If you see any errors or have additions, post them below.