forked from seomoz/qless-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
provision.sh
executable file
·41 lines (35 loc) · 943 Bytes
/
provision.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#! /usr/bin/env bash
set -e
# Some dependencies
sudo apt-get update
sudo apt-get install -y libhiredis-dev libevent-dev python-pip python-dev
# Some configuration files
(
cd /vagrant/provision
sudo cp etc/redis.conf /etc/redis.conf
sudo cp etc/init/redis.conf /etc/init/redis.conf
sudo cp etc/sysctl.d/99-overcommit.conf /etc/sysctl.d/99-overcommit.conf
)
# Install redis
(
# Make a redis user and space for redis
sudo useradd -U -s /bin/false -d /dev/null redis
sudo mkdir -p /var/redis
sudo chown redis:redis /var/redis
# Download and install the thing
cd /tmp
wget http://download.redis.io/releases/redis-2.8.19.tar.gz
tar xf redis-2.8.19.tar.gz
(
cd redis-2.8.19
make
sudo make install
sudo service redis start
)
sudo rm -r redis-2.8.19{,.tar.gz}
)
# Install python dependencies
(
cd /vagrant/
sudo pip install -r requirements.txt
)