ZIMG and TFS Build distributed Picture Server---zimg installation

Source: Internet
Author: User
Tags imagemagick install openssl install perl

Get ready:

First build the Catalog:

[[email protected] f2c-zimg]# mkdir/tools///All dependent packages are placed under tools

[[email protected] f2c-zimg]# mkdir/work//zimg put into work


Installing GCC and gcc-c++

Yum-y Install GCC gcc-c++


1. Install OpenSSL (this is critical and must be installed first )

Tar zxvf openssl-1.0.1e.tar.gz
./config shared--prefix=/usr--openssldir=/usr/ssl
Make && make install


This step can be directly

[[email protected]tools]# yum-y Install OpenSSL


2. Installing Libevent (http://libevent.org/)

tar zxvf libevent-2.0.17-stable.tar.gz
./configure--prefix=/usr
Make && make install


3. Installing CMake

CD cmake-2.8.10.2
./bootstrap--prefix=/usr

Make && make install


4. Installing LIBEVHTP

tar xzvf libevhtp-1.2.6.tar.gz
CD libevhtp-1.2.6/
Cmake-dcmake_prefix_path=/usr-dcmake_install_prefix=/usr-dlibevent_openssl_library=/usr/lib/openssl

Make && make install



5. Installing ImageMagick
#安装图片库

yum-y Install libjpeg libjpeg-devel libpng libpng-devel

tar xzvf imagemagick-6.8.7-2.tar.gz

CD imagemagick-6.8.7-2

./configure--with-perl

Make && make install
If make install error:

Yum Install Perl-extutils-embed-y




6. Installing libmemcached

tar zxvf libmemcached-0.42.tar.gz

CD libmemcached-0.42

./configure--with-jp2=yes--with-png=yes--with-jpeg=yes ldflags= '-l/usr/lib ' --with-memcached


Make && make install

7. Installing memcached

[email protected] tools]# tar zxf memcached-1.4.15.tar.gz
[email protected] tools]# CD memcached-1.4.15
[email protected] memcached-1.4.15]#./configure
[[email protected] memcached-1.4.15]# make && make install

8. Configure the library file

Vim/etc/ld.so.conf


Include ld.so.conf.d/*.conf

/usr/lib64

/usr/local/lib

[email protected] ~]# ldconfig

9. Upload other dependent library files

libevent_openssl-2.0.so.5.1.9

Libjpeg.so.9

libmemcached.so.2.0.0

libtbnet.so.0.0.0

libtbsys.so.0.0.0

libtfsclient_c.so.0.0.0

are uploaded to the directory/usr/lib64.

[email protected] ~]# ldconfig

10. Upload Zimg Package and unzip

Tar jxf f2c-zimg.tar.bz2

CD f2c-zimg

Vim start_memcached.sh

#!/bin/bash

/usr/local/bin/memcached-d-u root-m 512-l 127.0.0.1-p 11211-c 1024-p/var/run/memcached.pid

[[email protected]  f2c-zimg]#  ./ZIMG -H
usage: ./zimg -p port -t  thread_num -m memcached_ip -m memcached_port -l[og] -c[ache] -b  BACKLOG_NUM -K MAX_KEEPALIVES -Q IMG_QUALITY -F TFS_URL -H[ELP]

Vim start.sh
Ulimit-c Unlimited
cd/work/f2c-zimg/
Pn1= ' Ps-ef | grep zimg | Grep-v grep | Grep-v Start | Grep-v Log | Wc-l '
If [$pn 1-eq 0]; Then
Nohup/work/f2c-zimg/zimg-l-F 10.0.16.104:18101-m 127.0.0.1-m 11211-c >>/work/f2c-zimg/log/nohup.log &
echo "Start Zimg"
Else
echo "Zimg is running $PN 1"
Fi

SH start_memcached.sh

SH start.sh

Note:-F is a TFS server, install TFS Server, see http://meitangyanyan.blog.51cto.com/8768306/1683294

11. Turn off the firewall

Service Iptables Stop

Setenforce 0

12. Access Verification:

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/71/30/wKiom1XIQerRjSyuAAFBe155TDQ424.jpg "style=" float: none; "title=" 1.png "alt=" Wkiom1xiqerrjsyuaafbe155tdq424.jpg "/>

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/71/2C/wKioL1XIQ-mysgTdAAEHcXy2bvo712.jpg "style=" float: none; "title=" 2.png "alt=" Wkiol1xiq-mysgtdaaehcxy2bvo712.jpg "/>

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/71/30/wKiom1XIQezDrN5OAAMUdCtkxgY313.jpg "style=" float: none; "title=" 3.png "alt=" Wkiom1xiqezdrn5oaamudctkxgy313.jpg "/>


ZIMG and TFS Build distributed Picture Server---zimg installation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.