memcahed of config modified to pylibmc. (#36)

* memcahed of config modified to pylibmc.

* delete python-memcached

* modified ubuntu installer
This commit is contained in:
renfeipeng 2018-02-02 11:41:08 +08:00 committed by xiez
parent c53e332058
commit 2a594e5781
2 changed files with 9 additions and 5 deletions

View File

@ -160,9 +160,11 @@ firewall-cmd --reload
# extra packages for enterprise linux
yum install epel-release -y
yum upgrade -y
yum install python-setuptools python-imaging MySQL-python python-memcached memcached python-urllib3 \
yum install python-setuptools python-imaging MySQL-python memcached python-urllib3 \
pwgen curl openssl python-ldap java-1.7.0-openjdk poppler-utils libreoffice python-requests \
libreoffice-headless libreoffice-pyuno wqy-microhei-fonts wqy-zenhei-fonts wqy-unibit-fonts -y
libreoffice-headless libreoffice-pyuno wqy-microhei-fonts wqy-zenhei-fonts wqy-unibit-fonts \
gcc libffi-devel python-devel openssl-devel libmemcached libmemcached-devel python2-pip -y
pip install --upgrade pylibmc django-pylibmc
# start memcached on system boot
systemctl enable memcached
@ -421,7 +423,7 @@ cat >> ${DEST_SETTINGS_PY} <<EOF
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
'BACKEND': 'django_pylibmc.memcached.PyLibMCCache',
'LOCATION': '127.0.0.1:11211',
}
}

View File

@ -141,9 +141,11 @@ fi
# -------------------------------------------
apt-get update
apt-get install -y python2.7 sudo python-pip python-setuptools python-imaging python-mysqldb python-ldap python-urllib3 \
openjdk-8-jre memcached python-memcache pwgen curl openssl poppler-utils libpython2.7 libreoffice \
openjdk-8-jre memcached libmemcached-dev zlib1g-dev pwgen curl openssl poppler-utils libpython2.7 libreoffice \
libreoffice-script-provider-python ttf-wqy-microhei ttf-wqy-zenhei xfonts-wqy nginx python-requests
pip install --upgrade pylibmc django-pylibmc
rm /etc/nginx/sites-enabled/*
cat > /etc/nginx/sites-available/seafile.conf <<'EOF'
@ -345,7 +347,7 @@ cat >> ${DEST_SETTINGS_PY} <<EOF
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
'BACKEND': 'django_pylibmc.memcached.PyLibMCCache',
'LOCATION': '127.0.0.1:11211',
}
}