Skip to content

Instantly share code, notes, and snippets.

@DRN88
Last active March 27, 2023 07:07
Show Gist options
  • Save DRN88/809381d0666391bcceff3e9c97996449 to your computer and use it in GitHub Desktop.
Save DRN88/809381d0666391bcceff3e9c97996449 to your computer and use it in GitHub Desktop.
Build memcached RPMs on CentOS 7
#!/bin/bash
# Set version
VERSION="1.4.33"
# Dependencies
yum -y install rpmdevtools automake gcc make wget libevent-devel perl-Test-Simple cyrus-sasl-devel
# Create rpmbuild directory structure
rpmdev-setuptree
# Download source
[ ! -f /root/rpmbuild/SOURCES/memcached-${VERSION}.tar.gz ] && wget "http://memcached.org/files/memcached-${VERSION}.tar.gz" -P /root/rpmbuild/SOURCES/
# Build from archive. memcached-1.4.29/memcached.spec
rpmbuild -tb /root/rpmbuild/SOURCES/memcached-${VERSION}.tar.gz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment