Advertisement
HansVanEijsden

Redis build script

Dec 8th, 2016
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.94 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. # Variabelen, geef hier de versie in
  4. REDISV="3.2.6"
  5.  
  6. # Systeemvariabelen
  7. PATH=/usr/lib/ccache:$PATH
  8. DEB_CFLAGS_SET="-O3 -march=native -flto -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security"
  9. DEB_CXXFLAGS_SET="-O3 -march=native -flto -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security"
  10. DEB_FFLAGS_SET="-O3"
  11. DEB_LDFLAGS_SET="-Wl,-z,relro -flto"
  12.  
  13. # Downloaden, uitpakken en opschonen sources
  14. cd /usr/local/src
  15. curl -Lo redis.tar.gz http://download.redis.io/releases/redis-$REDISV.tar.gz
  16. tar -zxf redis.tar.gz
  17. rm -f redis.tar.gz
  18. cd /usr/local/src/redis-$REDISV
  19. make clean
  20.  
  21. # Configureren
  22. make \
  23. CFLAGS="-O3 -march=native -flto" \
  24. CXXFLAGS="-O3 -march=native -flto"
  25.  
  26. # Installeren en opschonen
  27. sudo make install
  28. rm -rf /usr/local/src/redis-$REDISV
  29.  
  30. # Vergeet niet de service te herstarten
  31. echo "Vergeet niet de service te herstarten: sudo /etc/init.d/redis_6379 restart"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement