we need libssl-dev for openssl/sha.h header
sudo apt-get install libssl-dev
sudo dnf -y install openssl-devel
To install MYSQL C client, run the following command, depending on your distribution.
sudo apt-get install libmysqlclient-dev
yum install mysql-devel
First, we need libevent library. Run the following command depending on your distribution.
sudo apt-get install libevent-dev
sudo yum install libevent-devel
NOTE: You can also run scripts/setup_redis.sh
, which sets up hiredis for use.
git clone https://github.com/redis/hiredis.git
make
sudo make install
Make header files and library globally available
sudo mkdir /usr/include/hiredis
sudo cp libhiredis.so /usr/lib/
sudo cp hiredis.h /usr/include/hiredis/
sudo cp read.h /usr/include/hiredis/
sudo cp sds.h /usr/include/hiredis/
ldconfig
Hiredis header files will be found at /usr/include/hiredis
Run . ./setenv
in the scripts directory, replacing values where appropriate. This sets up the appropriate environment variables.
Run make
.
Run make test
to run unit tests and ensure the library is working. exit code 0 means success.