Changes between Version 14 and Version 15 of SysAdmin/Pootle


Ignore:
Timestamp:
05/21/13 21:31:21 (8 years ago)
Author:
Fran Boon
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • SysAdmin/Pootle

    v14 v15  
    2222cd ..
    2323
    24 wget ftp://ftp.tummy.com/pub/python-memcached/python-memcached-latest.tar.gz
     24apt-get install -y memcached
     25wget ftp://ftp.tummy.com/pub/python-memcached/python-memcached-1.51.tar.gz
    2526tar zxvf python-memcached-1.51.tar.gz
    2627cd python-memcached-1.51
     
    5253#virtualenv /var/www/pootle/env/
    5354#source /var/www/pootle/env/bin/activate
    54 
    5555pip install pootle
    5656
    57 # Reduce MacClients
     57# Reduce MaxClients
    5858sed -i 's|150|20|' /etc/apache2/apache2.conf
    59 
    60 adduser --system --disabled-password pootle
    61 addgroup pootle
    6259
    6360cd /var/www
    6461ln -s /usr/local/lib/python2.6/dist-packages/pootle
     62
     63adduser --system --disabled-password --home /var/www/pootle pootle
     64addgroup pootle
     65
    6566chgrp pootle /var/www/pootle/po
     67
     68mysqladmin create pootle -p
     69
     70#sed -i "s|'localhost'|'pootle.sahanafoundation.org'|" /var/www/pootle/settings/90-local.conf.sample
     71sed -i 's|django.db.backends.sqlite3|django.db.backends.mysql|' /var/www/pootle/settings/20-backends.conf
     72sed -i "s|working_path('dbs/pootle.db')|'pootle'|" /var/www/pootle/settings/20-backends.conf
     73sed -i "s|'USER': ''|'USER': 'root'|" /var/www/pootle/settings/20-backends.conf
     74sed -i "s|'PASSWORD': ''|'PASSWORD': 'mysqlrootpw'|" /var/www/pootle/settings/20-backends.conf
     75sed -i "s|'BACKEND': 'django.core.cache.backends.db.DatabaseCache'|'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache'|" /var/www/pootle/settings/20-backends.conf
     76sed -i "s|'LOCATION': 'pootlecache'|'LOCATION': '127.0.0.1:11211'|" /var/www/pootle/settings/20-backends.conf
     77sed -i "s|# ('Your Name', 'your_email@domain.com')|  ('Fran Boon', 'fran@sahanafoundation.org')|" /var/www/pootle/settings/30-site.conf
     78sed -i "s|info@YOUR_DOMAIN.com|pootle@sahanafoundation.org|" /var/www/pootle/settings/30-site.conf
     79
     80pootle --config=/var/www/pootle/settings/20-backends.conf syncdb --noinput
     81pootle --config=/var/www/pootle/settings/20-backends.conf initdb
     82
     83cat << EOF > "/var/www/pootle/wsgi.py"
     84import os, site
     85site.addsitedir('/var/www/pootle/apps')
     86os.environ.setdefault("DJANGO_SETTINGS_MODULE", "pootle.settings")
     87from django.core.wsgi import get_wsgi_application
     88application = get_wsgi_application()
     89EOF
    6690
    6791cat << EOF > "/etc/apache2/sites-available/pootle"
     
    83107a2ensite pootle
    84108/etc/init.d/apache2 restart
    85 
    86109}}}
    87110