CentOS 7.7 部署Zimg 图片服务器

guiyun affiliate

1. 安装依赖库:


yum install -y wget openssl-devel cmake libevent-devel libjpeg-devel giflib-devel \

libpng-devel libwebp-devel ImageMagick-devel libmemcached-devel \

 glibc-headers gcc-c++ build-essential nasm  libtool\ 



2. 安装openssl:


cd /usr/local/src

wget http://www.openssl.org/source/openssl-1.0.1i.tar.gz

tar zxvf openssl-1.0.1i.tar.gz

cd openssl-1.0.1i

./config shared --prefix=/usr/local --openssldir=/usr/ssl

make && make install


3. 安装cmake:


cd /usr/local/src

wget http://www.cmake.org/files/v3.0/cmake-3.0.1.tar.gz

tar xzvf cmake-3.0.1.tar.gz 

cd cmake-3.0.1

./bootstrap --prefix=/usr/local 

make && make install



4. 安装libevent:


cd /usr/local/src

wget https://github.com/libevent/libevent/releases/download/release-2.1.8-stable/libevent-2.1.8-stable.tar.gz

tar zxvf libevent-2.1.8-stable.tar.gz

cd libevent-2.1.8-stable

./configure --prefix=/usr/local 

make && make install 




5. 安装libjpeg-turbo:


cd /usr/local/src

wget https://downloads.sourceforge.net/project/libjpeg-turbo/1.3.1/libjpeg-turbo-1.3.1.tar.gz

tar zxvf libjpeg-turbo-1.3.1.tar.gz

cd libjpeg-turbo-1.3.1

./configure --prefix=/usr/local --with-jpeg8

make && make install


6. 安装webp:


cd /usr/local/src

wget http://downloads.webmproject.org/releases/webp/libwebp-0.4.1.tar.gz

tar zxvf libwebp-0.4.1.tar.gz

cd libwebp-0.4.1

./configure

make && make install


7. 安装jpegsrc:


cd /usr/local/src

wget http://www.imagemagick.org/download/delegates/jpegsrc.v9b.tar.gz

tar zxvf pegsrc.v9b.tar.gz 

cd jpeg-9b

./configure --enable-shared 

make libdir=/usr/lib64   

make libdir=/usr/lib64 install


8. 安装imageMagic:


cd /usr/local/src

wget http://www.imagemagick.org/download/ImageMagick.tar.gz

tar zxvf ImageMagick.tar.gz

cd ImageMagick-7.0.9-23

./configure --prefix=/usr/local 

make && make install


9.安装libmemcached:


cd /usr/local/src

wget https://launchpad.net/libmemcached/1.0/1.0.18/+download/libmemcached-1.0.18.tar.gz

tar zxvf libmemcached-1.0.18.tar.gz

cd libmemcached-1.0.18

./configure -prefix=/usr/local 

make && make install


10.git下载zimg源码并安装


cd /usr/local

yum  install git -y 

git clone https://github.com/buaazp/zimg -b master --depth=1

cd zimg   

make


#启动

cd /usr/local/zimg/bin/ 

./zimg -d conf/zimg.lua



11.构建可选的存储后端 memcached(可选)



cd /usr/local/src

tar zxvf memcached-1.4.20.tar.gz

cd memcached-1.4.20

./configure --prefix=/usr/local

make && make install


安装包.zip


guiyun affiliate

作者头像
南宫俊逸创始人

君子好学,自强不息~

上一篇: 安装zimg最后一部make时报错make[1]: 进入目录“/usr/local/zimg/deps/libjpeg-turbo” make[1]: ***
下一篇:CentOS 7.7 安装配置 zabbix-4.4

发表评论