Redhatda (RedHat base linuxlarda) proqram yükləməyin qaydası
Ümumiyyətlə desək, linuxda proqram (paket) yükləməyin 3 ən geniş yayılmış qaydası, yolu var.
- Linuxun təqdim etdiyi utility ilə proqram birbaşa internetdən yüklənilir
- RedHat və ya Debian paketlər ilə proqram yüklənir
- Proqram source koddan yüklənir
Bundan başqa metodlarda qarşınıza çıxa bilər (məsələn .sh ilə bitən proqramı yükləmək, .py ilə bitən proqramı yükləmək və s). Amma bu 3 metod ən geniş yayılmış metodlardır. İndi bir – bir ətraflı şəkildə bu metodlara baxaq.
-
Red Hatda bu yum komandası vasitəsi ilə yerinə yetirilir. yum bizə çox imkanlar təqdim edir. man yum daxil etməklə, yum komandasının manualinə baxa bilərsiz. yum ilə proqramı install edəndə, yum install ad daxil etmək lazımdır. Bu metod çox rahat və asan metoddur. Çatışmayan cəhəti internetinizin sürəti zəif olsa, bu metodla böyük paketləri yükləmək çətin olacaq (vaxt çox gedəcək). Məsələn, yum vasitəsi ilə mysql i yükləyək.
[root@S2104 ~]# yum install mysql-server Loading "kernel-module" plugin Setting up Install Process Setting up repositories sl-base 100% |=========================| 1.1 kB 00:00 sl-errata 100% |=========================| 951 B 00:00 adobe-linux-i386 100% |=========================| 951 B 00:00 Reading repository metadata in from local files Parsing package install arguments Resolving Dependencies --> Populating transaction set with selected packages. Please wait. ---> Package mysql-server.i386 0:4.1.22-2.el4.sl set to be updated --> Running transaction check Beginning Kernel Module Plugin Finished Kernel Module Plugin Dependencies Resolved ============================================================================= Package Arch Version Repository Size ============================================================================= Installing: mysql-server i386 4.1.22-2.el4.sl sl-base 9.9 M Transaction Summary ============================================================================= Install 1 Package(s) Update 0 Package(s) Remove 0 Package(s) Total download size: 9.9 M Is this ok [y/N]: y Downloading Packages: (1/1): mysql-server-4.1.2 100% |=========================| 9.9 MB 00:16 Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Installing: mysql-server ######################### [1/1] Installed: mysql-server.i386 0:4.1.22-2.el4.sl Complete! [root@S2104 ~]#
bu qədər sadə, birdənə yum install mysql-server daxil etdik. Və birdə Is this ok [y/N]: sualına y daxil etməklə, cavab vermək lazımdır. Əgər bu suala əvvəlcədən yes cavab vermək istəyirsinizsə, onda yum -y install mysql-server komandasını, yəni -y əlavəsini daxil etməlisiniz.
yum vasitəsi ilə proqramı (paketi) silmək üçün yum remove ad daxil etmək lazımdır. mysql-server yum vasitəsi ilə silək.[root@S2104 ~]# yum remove mysql-server Loading "kernel-module" plugin Setting up Remove Process Resolving Dependencies --> Populating transaction set with selected packages. Please wait. ---> Package mysql-server.i386 0:4.1.22-2.el4.sl set to be erased --> Running transaction check Beginning Kernel Module Plugin Finished Kernel Module Plugin Dependencies Resolved ============================================================================= Package Arch Version Repository Size ============================================================================= Removing: mysql-server i386 4.1.22-2.el4.sl installed 21 M Transaction Summary ============================================================================= Install 0 Package(s) Update 0 Package(s) Remove 1 Package(s) Total download size: 0 Is this ok [y/N]: y Downloading Packages: Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Removing : mysql-server ######################### [1/1] Removed: mysql-server.i386 0:4.1.22-2.el4.sl Complete!
Beləliklə, mysql-serveri silmiş olduq.
-
Red Hatda (Red Hat əsaslı Linuxlarda, Suseda) proqramlar paketlər şəklində yüklənir. Bu paketlərə isə rpm (RedHat Packet Manager) paketlər adlanır. rpm paketlər idarə etmək üçün isə rpm (rpm Package Manager) komandası var. Məsələn sistemdə yüklü olan bütün paketlərə baxmaq üçün rpm -qa daxil etmək lazımdır. -qa əlavəsi, query all (hamısın sorğula) sözündən götürülüb.
[root@S2104 ~]# rpm -qa filesystem-2.3.0-1 glib2-2.4.7-1 checkpolicy-1.17.5-1 bash-3.0-19.7 perl-5.8.5-36.el4_6.3 info-4.7-5.el4.2 ash-0.3.8-20 readline-4.3-13 sed-4.1.2-7.el4 python-sqlite-1.1.6-1 policycoreutils-1.18.1-4.13 udev-039-10.22.el4 openldap-2.2.13-12.el4 specspo-9.0.92-3 glib-1.2.10-15 libibumad-1.1.7-1.el4 lrzsz-0.12.20-19 mt-st-0.8-1 pax-3.0-9 rdate-1.4-2 netconfig-0.8.21-1.1 tmpwatch-2.9.1-1 fontconfig-2.2.3-13.el4 irda-utils-0.9.16-3 OpenIPMI-1.4.14-1.4E.20 gettext-0.14.1-13 stunnel-4.05-3 libwvstreams-3.75.0-2 cyrus-sasl-plain-2.1.19-14 nfs-utils-lib-1.0.6-8.z1 mdadm-1.12.0-5 pcmcia-cs-3.2.7-3.5 wvdial-1.54.0-3 cadaver-0.22.1-3 alsa-lib-1.0.6-5.RHEL4
mysql-serveri rpm vasitəsi ilə yükləyək. Bunun üçün mysql-serverin rpm paketini tapmaq lazımdır. Siz bunu internetdən və ya sizdə olan linuxun dvdisindən tapa bilərsiz. İnternetdərpmfind.net kimi saytlardan lazım olan rpmi asanlıqla tapmaq olur.
rpm paketi yükləmək üçün rpm -i paketin_adı yazmaq lazımdır. Əgər paket install olanda nə baş verdiyin görmək istəyirsiniszə, onda -v əlavəsin etmək lazımdır. Və əgər siz install gedəndə, proqresində getdiyinə baxmaq istəyirsiniszə, onda -h əlavəsindəndə istifadə etmək lazımdır. 3 əlavəni isə birlikdə rpm -ihvşəklində yaza bilərsiz. Yəni[root@S2104 ~]# rpm -ivh mysql-server-4.1.22-2.el4.sl.i386.rpm warning: mysql-server-4.1.22-2.el4.sl.i386.rpm: V3 DSA signature: NOKEY, key ID 82fd17b2 Preparing... ########################################### [100%] 1:mysql-server ########################################### [100%]
rpm vasitəsi ilə paketi silmək üçün isə rpm -e əlavəsindən istifadə etmək lazımdır. Yəni:
[root@S2104 ~]# rpm -e mysql-server-4.1.22-2.el4.sl [root@S2104 ~]#
Gördüyünüz kimi ikinci metodda kifayət qədər rahat və asan metoddur. Hətta bu metodlarla proqram yükləmək windowsda proqram yükləməkdən də asandır
-
Bu metodla isə proqramı source koddan yükləmək lazımdır. Bu biraz çətin metoddur.
- Yükləmək istədiyiniz proqramın source kodunu internetdən yükləyin. Bu əsasən bz2 və gz sıxılmış formatlarında olur. bz2 formatında olan faylın həcmi daha kiçik olur. Məsələn php-ni source koddan yükləyək.
-
Sıxılmış faylı açın. bz2 formatl; faylı bunzip2 komandası ilə açmaq olur.
[root@S2104 ~]# bunzip2 php-5.2.11.tar.bz2 [root@S2104 ~]#
-
Faylı arxivdən çıxarın.
[root@S2104 ~]# tar -xvf php-5.2.11.tar php-5.2.11/ php-5.2.11/ext/ php-5.2.11/ext/gd/ php-5.2.11/ext/gd/gd.c php-5.2.11/ext/gd/gd_ctx.c php-5.2.11/ext/gd/libgd/ php-5.2.11/ext/gd/libgd/gd.c php-5.2.11/ext/gd/libgd/gd.h php-5.2.11/ext/gd/libgd/gdtables.c php-5.2.11/ext/gd/libgd/gd_gd2.c php-5.2.11/ext/gd/libgd/gd_png.c php-5.2.11/ext/gd/libgd/pngtogd2.c php-5.2.11/ext/gd/libgd/gddemo.c php-5.2.11/ext/gd/libgd/xbm.c php-5.2.11/ext/gd/libgd/gd2topng.c php-5.2.11/ext/gd/libgd/README php-5.2.11/ext/gd/libgd/gdparttopng.c php-5.2.11/ext/gd/libgd/gd_topal.c php-5.2.11/ext/gd/libgd/gdcache.c php-5.2.11/ext/gd/libgd/gdcache.h php-5.2.11/ext/gd/libgd/pngtogd.c php-5.2.11/ext/gd/libgd/gdtest.c php-5.2.11/ext/gd/libgd/testac.c php-5.2.11/ext/gd/libgd/gd2time.c php-5.2.11/ext/gd/libgd/gdhelpers.c php-5.2.11/ext/gd/libgd/gdhelpers.h php-5.2.11/ext/gd/libgd/gdkanji.c php-5.2.11/ext/gd/libgd/gd_arc_f_buggy.c php-5.2.11/ext/gd/libgd/gd_gd.c php-5.2.11/ext/gd/libgd/gd_io.c php-5.2.11/ext/gd/libgd/gd_io.h php-5.2.11/ext/gd/libgd/gd_ss.c php-5.2.11/ext/gd/libgd/gdxpm.c php-5.2.11/ext/gd/libgd/gdft.c php-5.2.11/ext/gd/libgd/gd_io_dp.c php-5.2.11/ext/gd/libgd/gd_io_ss.c php-5.2.11/ext/gd/libgd/jisx0208.h php-5.2.11/ext/gd/libgd/wbmp.c php-5.2.11/ext/gd/libgd/wbmp.h php-5.2.11/ext/gd/libgd/gd2copypal.c php-5.2.11/ext/gd/libgd/gd_io_file.c php-5.2.11/ext/gd/libgd/gdfontmb.c php-5.2.11/ext/gd/libgd/gdfontmb.h php-5.2.11/ext/gd/libgd/gd_jpeg.c php-5.2.11/ext/gd/libgd/gd_gif_in.c php-5.2.11/ext/gd/libgd/gdtestft.c
-
Müvafiq qovluğa keçin. İndiki halda
[root@S2104 ~]# cd php-5.2.11 [root@S2104 php-5.2.11]#
-
./configure daxil edin. (Source koddan proqram yükləyəndə README ləri oxumaq lazımdır. Orda proqramı necə yükləməyin qaydası yazılır)
[root@S2104 php-5.2.11]# ./configure creating cache ./config.cache checking for Cygwin environment... no checking for mingw32 environment... no checking for egrep... grep -E checking for a sed that does not truncate output... /bin/sed checking host system type... i686-pc-linux-gnu checking target system type... i686-pc-linux-gnu checking for gcc... gcc checking whether the C compiler (gcc ) works... yes checking whether the C compiler (gcc ) is a cross-compiler... no checking whether we are using GNU C... yes checking whether gcc accepts -g... yes checking how to run the C preprocessor... gcc -E checking for icc... no checking for suncc... no checking whether gcc and cc understand -c and -o together... yes checking how to run the C preprocessor... gcc -E checking for AIX... no checking whether ln -s works... yes checking for system library directory... lib checking whether to enable runpaths... yes checking if compiler supports -R... no checking if compiler supports -Wl,-rpath,... yes ... +--------------------------------------------------------------------+ | *** WARNING *** | | | | You will be compiling the CGI version of PHP without any | | redirection checking. By putting this cgi binary somewhere in | | your web space, users may be able to circumvent existing .htaccess | | security by loading files directly through the parser. See | | http://www.php.net/manual/security.php for more details. | +--------------------------------------------------------------------+ | License: | | This software is subject to the PHP License, available in this | | distribution in the file LICENSE. By continuing this installation | | process, you are bound by the terms of this license agreement. | | If you do not agree with the terms of this license, you must abort | | the installation process at this point. | +--------------------------------------------------------------------+ Thank you for using PHP.
-
make komandasın daxil edin.
[root@S2104 php-5.2.11]# make /bin/sh /root/php-5.2.11/libtool --silent --preserve-dup-deps --mode=compile gcc -Iext/date/lib -Iext/date/ -I/root/php-5.2.11/ext/date/ -DPHP_ATOM_INC -I/root/php-5.2.11/include -I/root/php-5.2.11/main -I/root/php-5.2.11 -I/root/php-5.2.11/ext/date/lib -I/usr/include/libxml2 -I/root/php-5.2.11/TSRM -I/root/php-5.2.11/Zend -I/usr/include -g -O2 -c /root/php-5.2.11/ext/date/php_date.c -o ext/date/php_date.lo /bin/sh /root/php-5.2.11/libtool --silent --preserve-dup-deps --mode=compile gcc -Iext/date/lib -Iext/date/ -I/root/php-5.2.11/ext/date/ -DPHP_ATOM_INC -I/root/php-5.2.11/include -I/root/php-5.2.11/main -I/root/php-5.2.11 -I/root/php-5.2.11/ext/date/lib -I/usr/include/libxml2 -I/root/php-5.2.11/TSRM -I/root/php-5.2.11/Zend -I/usr/include -g -O2 -c /root/php-5.2.11/ext/date/lib/astro.c -o ext/date/lib/astro.lo /bin/sh /root/php-5.2.11/libtool --silent --preserve-dup-deps --mode=compile gcc -Iext/date/lib -Iext/date/ -I/root/php-5.2.11/ext/date/ -DPHP_ATOM_INC -I/root/php-5.2.11/include -I/root/php-5.2.11/main -I/root/php-5.2.11 -I/root/php-5.2.11/ext/date/lib -I/usr/include/libxml2 -I/root/php-5.2.11/TSRM -I/root/php-5.2.11/Zend -I/usr/include -g -O2 -c /root/php-5.2.11/ext/date/lib/dow.c -o ext/date/lib/dow.lo /bin/sh /root/php-5.2.11/libtool --silent --preserve-dup-deps --mode=compile gcc -Iext/date/lib -Iext/date/ -I/root/php-5.2.11/ext/date/ -DPHP_ATOM_INC -I/root/php-5.2.11/include -I/root/php-5.2.11/main -I/root/php-5.2.11 -I/root/php-5.2.11/ext/date/lib -I/usr/include/libxml2 -I/root/php-5.2.11/TSRM -I/root/php-5.2.11/Zend -I/usr/include -g -O2 -c /root/php-5.2.11/ext/date/lib/parse_date.c -o ext/date/lib/parse_date.lo /bin/sh /root/php-5.2.11/libtool --silent --preserve-dup-deps --mode=compile gcc -Iext/date/lib -Iext/date/ -I/root/php-5.2.11/ext/date/ -DPHP_ATOM_INC -I/root/php-5.2.11/include -I/root/php-5.2.11/main -I/root/php-5.2.11 -I/root/php-5.2.11/ext/date/lib -I/usr/include/libxml2 -I/root/php-5.2.11/TSRM -I/root/php-5.2.11/Zend -I/usr/include -g -O2 -c /root/php-5.2.11/ext/date/lib/parse_tz.c -o ext/date/lib/parse_tz.lo /bin/sh /root/php-5.2.11/libtool --silent --preserve-dup-deps --mode=compile gcc -Iext/date/lib -Iext/date/ -I/root/php-5.2.11/ext/date/ -DPHP_ATOM_INC -I/root/php-5.2.11/include -I/root/php-5.2.11/main -I/root/php-5.2.11 -I/root/php-5.2.11/ext/date/lib -I/usr/include/libxml2 -I/root/php-5.2.11/TSRM -I/root/php-5.2.11/Zend -I/usr/include -g -O2 -c /root/php-5.2.11/ext/date/lib/timelib.c -o ext/date/lib/timelib.lo /bin/sh /root/php-5.2.11/libtool --silent --preserve-dup-deps --mode=compile gcc -Iext/date/lib -Iext/date/ -I/root/php-5.2.11/ext/date/ -DPHP_ATOM_INC -I/root/php-5.2.11/include -I/root/php-5.2.11/main -I/root/php-5.2.11 -I/root/php-5.2.11/ext/date/lib -I/usr/include/libxml2 -I/root/php-5.2.11/TSRM -I/root/php-5.2.11/Zend -I/usr/include -g -O2 -c /root/php-5.2.11/ext/date/lib/tm2unixtime.c -o ext/date/lib/tm2unixtime.lo /bin/sh /root/php-5.2.11/libtool --silent --preserve-dup-deps --mode=compile gcc -Iext/date/lib -Iext/date/ -I/root/php-5.2.11/ext/date/ -DPHP_ATOM_INC -I/root/php-5.2.11/include -I/root/php-5.2.11/main -I/root/php-5.2.11 -I/root/php-5.2.11/ext/date/lib -I/usr/include/libxml2 -I/root/php-5.2.11/TSRM -I/root/php-5.2.11/Zend -I/usr/include -g -O2 -c /root/php-5.2.11/ext/date/lib/unixtime2tm.c -o ext/date/lib/unixtime2tm.lo
-
Son olaraq make install komandasını daxil edin.
[root@S2104 php-5.2.11]# make install Installing PHP SAPI module: cgi Installing PHP CGI binary: /usr/local/bin/ Installing PHP CLI binary: /usr/local/bin/ Installing PHP CLI man page: /usr/local/man/man1/ Installing build environment: /usr/local/lib/php/build/ Installing header files: /usr/local/include/php/
Qeyd: Sonuncu metodun çətinliyi, bu ardıcılığı etməkdə deyil. Sonuncu metodda çətinlik səhvlər (errorlar) çox çıxa bilər, o adamı biraz yorur.
Ümid edirəm ki, faydalı oldu.

