16 Eki, 2013 ·

GD Library Kurulumu

GD Library Nedir?

GD bir çok programlama dili tarafından kullanılan bir grafik kütüphanesidir.
Bu kütüphane sayesinde programlama dilleri ile birlikte resim dosyaları üzerinde oynamalar yapabiliyoruz.

Genel olarak panelli sunucularda GD kütüphanesi kurulan panelle birlikte gelir. Bu sebeple ekstra kurulum gerektirmez. Ama panelsiz sunucu kullanıyorsanız SSH üzerinden kurulumu yapmanız gerekir.

Daha detaylı bilgi ve kullanabileceğiniz komutları PHP‘nin sitesinde bulabilirsiniz.

GD Library Nasıl Kurulur?

Öncelikle PHP’nin sunucuda hangi modlarla birlikte kurulu olduğunu kontrol edelim.

rpm -qa | grep php

phpmyadmin-2.11.11.3-2.el6.rf.noarch
php-cli-5.3.3-23.el6_4.i686
php-mysql-5.3.3-23.el6_4.i686
php-mbstring-5.3.3-23.el6_4.i686
php-common-5.3.3-23.el6_4.i686
php-pdo-5.3.3-23.el6_4.i686
php-xml-5.3.3-23.el6_4.i686
php-5.3.3-23.el6_4.i686

Görüldüğü gibi php ve kurulu eklentiler listelendi. İçerisinde php-gd yok.

Yum komutu ile GD Library (Grafik kütüphanesi) kurulumunu yapıyoruz.

yum install php-gd

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.lug.udel.edu
* extras: centos.vipernetworksystems.com
* rpmforge: mirror.us.leaseweb.net
* updates: mirror.symnds.com
base | 3.7 kB 00:00
extras | 3.5 kB 00:00
rpmforge | 1.9 kB 00:00
updates | 3.4 kB 00:00
updates/primary_db | 3.5 MB 00:00
Setting up Install Process
Resolving Dependencies
–> Running transaction check
—> Package php-gd.i686 0:5.3.3-23.el6_4 will be installed
–> Processing Dependency: libpng12.so.0(PNG12_0) for package: php-gd-5.3.3-23.e l6_4.i686
–> Processing Dependency: libpng12.so.0 for package: php-gd-5.3.3-23.el6_4.i686
–> Processing Dependency: libjpeg.so.62(LIBJPEG_6.2) for package: php-gd-5.3.3- 23.el6_4.i686
–> Processing Dependency: libjpeg.so.62 for package: php-gd-5.3.3-23.el6_4.i686
–> Processing Dependency: libfreetype.so.6 for package: php-gd-5.3.3-23.el6_4.i 686
–> Processing Dependency: libXpm.so.4 for package: php-gd-5.3.3-23.el6_4.i686
–> Processing Dependency: libX11.so.6 for package: php-gd-5.3.3-23.el6_4.i686
–> Running transaction check
—> Package freetype.i686 0:2.3.11-14.el6_3.1 will be installed
—> Package libX11.i686 0:1.5.0-4.el6 will be installed
–> Processing Dependency: libX11-common = 1.5.0-4.el6 for package: libX11-1.5.0 -4.el6.i686
–> Processing Dependency: libxcb.so.1 for package: libX11-1.5.0-4.el6.i686
—> Package libXpm.i686 0:3.5.10-2.el6 will be installed
—> Package libjpeg-turbo.i686 0:1.2.1-1.el6 will be installed
—> Package libpng.i686 2:1.2.49-1.el6_2 will be installed
–> Running transaction check
—> Package libX11-common.noarch 0:1.5.0-4.el6 will be installed
—> Package libxcb.i686 0:1.8.1-1.el6 will be installed
–> Processing Dependency: libXau.so.6 for package: libxcb-1.8.1-1.el6.i686
–> Running transaction check
—> Package libXau.i686 0:1.0.6-4.el6 will be installed
–> Finished Dependency Resolution

Dependencies Resolved

================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
php-gd i686 5.3.3-23.el6_4 updates 104 k
Installing for dependencies:
freetype i686 2.3.11-14.el6_3.1 updates 363 k
libX11 i686 1.5.0-4.el6 base 590 k
libX11-common noarch 1.5.0-4.el6 base 192 k
libXau i686 1.0.6-4.el6 base 24 k
libXpm i686 3.5.10-2.el6 base 50 k
libjpeg-turbo i686 1.2.1-1.el6 base 176 k
libpng i686 2:1.2.49-1.el6_2 base 184 k
libxcb i686 1.8.1-1.el6 base 114 k

Transaction Summary
================================================================================
Install 9 Package(s)

Total download size: 1.8 M
Installed size: 5.6 M
Is this ok [y/N]: y
Downloading Packages:
(1/9): freetype-2.3.11-14.el6_3.1.i686.rpm | 363 kB 00:00
(2/9): libX11-1.5.0-4.el6.i686.rpm | 590 kB 00:00
(3/9): libX11-common-1.5.0-4.el6.noarch.rpm | 192 kB 00:00
(4/9): libXau-1.0.6-4.el6.i686.rpm | 24 kB 00:00
(5/9): libXpm-3.5.10-2.el6.i686.rpm | 50 kB 00:00
(6/9): libjpeg-turbo-1.2.1-1.el6.i686.rpm | 176 kB 00:00
(7/9): libpng-1.2.49-1.el6_2.i686.rpm | 184 kB 00:00
(8/9): libxcb-1.8.1-1.el6.i686.rpm | 114 kB 00:00
(9/9): php-gd-5.3.3-23.el6_4.i686.rpm | 104 kB 00:00
——————————————————————————–
Total 3.8 MB/s | 1.8 MB 00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : libX11-common-1.5.0-4.el6.noarch 1/9
Installing : 2:libpng-1.2.49-1.el6_2.i686 2/9
Installing : libXau-1.0.6-4.el6.i686 3/9
Installing : libxcb-1.8.1-1.el6.i686 4/9
Installing : libX11-1.5.0-4.el6.i686 5/9
Installing : libXpm-3.5.10-2.el6.i686 6/9
Installing : libjpeg-turbo-1.2.1-1.el6.i686 7/9
Installing : freetype-2.3.11-14.el6_3.1.i686 8/9
Installing : php-gd-5.3.3-23.el6_4.i686 9/9
Verifying : libX11-1.5.0-4.el6.i686 1/9
Verifying : libxcb-1.8.1-1.el6.i686 2/9
Verifying : freetype-2.3.11-14.el6_3.1.i686 3/9
Verifying : libjpeg-turbo-1.2.1-1.el6.i686 4/9
Verifying : libXau-1.0.6-4.el6.i686 5/9
Verifying : php-gd-5.3.3-23.el6_4.i686 6/9
Verifying : libX11-common-1.5.0-4.el6.noarch 7/9
Verifying : 2:libpng-1.2.49-1.el6_2.i686 8/9
Verifying : libXpm-3.5.10-2.el6.i686 9/9

Installed:
php-gd.i686 0:5.3.3-23.el6_4

Dependency Installed:
freetype.i686 0:2.3.11-14.el6_3.1 libX11.i686 0:1.5.0-4.el6
libX11-common.noarch 0:1.5.0-4.el6 libXau.i686 0:1.0.6-4.el6
libXpm.i686 0:3.5.10-2.el6 libjpeg-turbo.i686 0:1.2.1-1.el6
libpng.i686 2:1.2.49-1.el6_2 libxcb.i686 0:1.8.1-1.el6

Complete!

Son olarak apache’ye restart atıyoruz

service httpd restart

bu kadar. artık php ile tüm gd komutlarını kullanabilirsiniz.

gd library nedir install gd library on centos php gd kütüphanesi