Installing From Source
2016-04-13 00:00
176 查看
摘要: Installing From Source
NewInstallFromSource
Using the Source, Luke
Updated Dec 12, 2012 by tsaavik
Ubuntu: apt-get install libevent-dev
Redhat/Fedora: yum install libevent-devel
If you wish to build with SASL support, ensure the cyrus-sasl libraries are built and run ./configure --enable-sasl. See the SASLHowto for more information.
You will need gcc and libevent-devel installed. (yum install gcc libevent libevent-devel)
Then install the RPM via a standard rpm -Uvh memcached-etc.rpm
NewInstallFromSource
Using the Source, Luke
Updated Dec 12, 2012 by tsaavik
Why Build From Source
Before you build from source, consider why? If you have a perfectly good package of a recent version, you're better off using that.Building From Source
Prereqs
You'll likely need to install the development package for libeventUbuntu: apt-get install libevent-dev
Redhat/Fedora: yum install libevent-devel
Get
wget http tar zxvf memcachedxtargz cd memcachedx
Config
Optional install destination
If your compiling from source you likely want to specify a destination directory as well, replace /usr/local/memcached with whatever you fancy../configure --prefix=/usr/local/memcached
Make and install
make make test sudo make install
If you wish to build with SASL support, ensure the cyrus-sasl libraries are built and run ./configure --enable-sasl. See the SASLHowto for more information.
To Build a Package, or make install ?
If you're deploying memcached to more than one server, you probably really want to package it. That way you may have cleaner updates, easy uninstalls, easy re-installs, future installs, etc. make install is for developers and chumps.Building an RPM
The memcached source tarball has contained a workable .spec file. To use it, create a build directory for RPM and compile memcached using the commands below. Do not run this as root, as tests will not pass.echo homeyourpmbuildSPECSBUILDSRPMSRPMSSOURCES wget http rpmbuild ta memcachedxtargz
You will need gcc and libevent-devel installed. (yum install gcc libevent libevent-devel)
Then install the RPM via a standard rpm -Uvh memcached-etc.rpm
Building a deb
TODO: this sectionBuilding clients
Note that many clients depend on libmemcached. They either include it in their sources, or require an external build. You can follow the above practices for fetching and installing libmemcached as well.PEAR/CPAN/GEM/etc
If you're building from source, especially remember that most major languages have distribution systems which make installation easy.相关文章推荐
- Recent Release Notes
- Hardware Considerations
- Configuring Memcached
- Client Configurations
- Protocol Commands
- Protocol Documentation
- Binary Protocol
- Common Client Features
- Using Memcached Basics
- Memcached Usage FAQ
- Programming HOWTO's and Tricks
- Memcached Internals for End Users
- Maintaining a Server
- Maintaining a Cluster
- What To Expect With Performance
- Source Code
- Build Farm
- Range operations
- SASL Authentication
- erer