| 109 | ln -s /usr/local/lib/libpython2.6.so* /usr/lib/ |
| 110 | cd /usr/local/src |
| 111 | wget 'http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c11.tar.gz#md5=7df2a529a074f613b509fb44feefe74e' |
| 112 | tar zxvf setuptools-0.6c11.tar.gz |
| 113 | cd setuptools-0.6c11 |
| 114 | python setup.py install |
| 115 | cd /usr/local/src |
| 116 | wget "https://gdata-python-client.googlecode.com/files/gdata-2.0.14.tar.gz" --no-check-certificate |
| 117 | tar -zxvf gdata-2.0.14.tar.gz |
| 118 | cd gdata-2.0.14 |
| 119 | python setup.py install |
| 120 | purge python-mysqldb |
| 121 | wget "http://downloads.sourceforge.net/project/mysql-python/mysql-python/1.2.3/MySQL-python-1.2.3.tar.gz" |
| 122 | tar -zxvf MySQL-python-1.2.3.tar.gz |
| 123 | cd MySQL-python-1.2.3 |
| 124 | vim site.cfg |
| 125 | mysql_config = /usr/bin/mysql_config |
| 126 | aptitude install libmysqlclient-dev |
| 127 | python setup.py build |
| 128 | python setup.py install |
| 130 | |
| 131 | === GA Import === |
| 132 | |
| 133 | See python notes above and [http://clearcode.cc/offer/open-source-projects/google2piwik/ Google2Piwik]. |
| 134 | |
| 135 | {{{ |
| 136 | cd /web/piwik.transitionnetwork.org/ |
| 137 | wget http://clearcode.cc/google2piwik-1.2.5.tgz |
| 138 | tar -zxvf google2piwik-1.2.5.tgz |
| 139 | cd google2piwik-1.2.5 |
| 140 | cp google2piwik.conf.sample google2piwik.conf |
| 141 | }}} |
| 142 | |
| 143 | Edit {{{google2piwik.conf}}}: |
| 144 | |
| 145 | {{{ |
| 146 | ## Google Account Credentials |
| 147 | # If you don't know your site table_id type: |
| 148 | # ./google2piwik.py -p |
| 149 | [google] |
| 150 | user_login = XXX@gmail.com |
| 151 | user_pass = XXX |
| 152 | table_id = ga:XXX |
| 153 | |
| 154 | # MySQL Piwik Database configuration |
| 155 | [mysql] |
| 156 | db = piwik |
| 157 | host = localhost |
| 158 | port = 3306 |
| 159 | user = piwik |
| 160 | passwd = XXX |
| 161 | table_prefix = |
| 162 | |
| 163 | # Set export date range |
| 164 | [export] |
| 165 | start = 2011-05-01 |
| 166 | end = 2011-06-29 |
| 167 | |
| 168 | ## Piwik configuration of site. |
| 169 | # For default Piwik installation with one website, site_id should be set to 1 |
| 170 | [piwik] |
| 171 | site_id = 1 |
| 172 | site_url = http://www.transitionnetwork.org |
| 173 | }}} |
| 174 | |