Last active
August 22, 2021 15:24
-
-
Save yspb/53b33f3a0e25fb98aef169921cf6c5be to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#make directories | |
mkdir /git | |
mkdir /db | |
mkdir /db/modules | |
mkdir /downloads | |
#update packages, install gcc and redis | |
add-apt-repository ppa:chris-lea/redis-server -y && \ | |
apt-get update && \ | |
apt-get upgrade -y && \ | |
apt-get install build-essential make cmake -y && \ | |
apt-get install redis-server -y | |
#install modules | |
cd /git | |
git clone https://github.com/aviggiano/redis-roaring.git | |
git clone https://github.com/RedisJSON/RedisJSON.git | |
git clone https://github.com/RediSearch/RediSearch.git | |
cd /git/redis-roaring | |
./configure.sh | |
cp build/libredis-roaring.so /db/modules | |
cd /git/RedisJSON | |
make | |
cp src/rejson.so /db/modules | |
cd /git/RediSearch | |
mkdir build | |
cd build | |
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo | |
make | |
cp redisearch.so /db/modules | |
#copy config files | |
cd /git | |
git clone https://gist.github.com/8fad1c91bb5483d7cbde974fe34fc0d9.git | |
git clone https://gist.github.com/e54fe650687faf085da33b298514dc00.git | |
git clone https://gist.github.com/358babd38d9d0ce51b2862dc667c4f7a.git | |
git clone https://gist.github.com/14e3c1ce589319976615e6fbca294366.git | |
cp 8fad1c91bb5483d7cbde974fe34fc0d9/rc-local.service /etc/systemd/system/rc-local.service | |
cp e54fe650687faf085da33b298514dc00/rc.local /etc/rc.local | |
chmod 755 /etc/rc.local | |
chmod +x /etc/rc.local | |
cp 14e3c1ce589319976615e6fbca294366/redis.service /etc/systemd/system/redis.service | |
cat 358babd38d9d0ce51b2862dc667c4f7a/redis.conf | sed 's/node-x/'`uname -n`'/g' > /db/redis.conf | |
#create redis user | |
adduser --system --group --no-create-home redis | |
chown redis:redis -R /db | |
chmod 770 -R /db | |
#system services | |
systemctl enable rc-local | |
systemctl start rc-local.service | |
systemctl status rc-local.service | |
systemctl enable redis.service | |
systemctl start redis.service | |
systemctl status redis.service |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment