Jan
08
2010
Linuxda javanı yükləmək üçün, sunın saytına girin. Yüklədikdən sonra chmod ilə jdk-6u17-linux-i586.bin faylını quraşdırıla bilən hala gətirin.
ali@ali-laptop:~/Downloads$ chmod +x jdk-6u17-linux-i586.bin
Ondan sonra ./ ilə proqramı quraşdırın
ali@ali-laptop:~/Downloads$ ./jdk-6u17-linux-i586.bin
yes or no sualına yes cavabın verin.
Do you agree to the above license terms? [yes or no]
Onda sonra jdk1.6.0_17/ qovluğunu /usr/local/bin qovluğuna köçürün.
ali@ali-laptop:~/Downloads$ sudo mv jdk1.6.0_17/ /usr/local/bin/
Aşağıdakı şəkildə simvolik link (qısa yol) yaradın.
ali@ali-laptop:/usr/local/bin$ sudo ln -s jdk1.6.0_17/ jdk
export komandası ilə javanın yolun, istifadəçinin yolları siyahısına əlavə edin.
ali@ali-laptop:/usr/local/bin$ export PATH=$PATH:/usr/local/bin/jdk/bin/
Budur artıq bizdə java işlədi.
ali@ali-laptop:/usr/local/bin$ javac
Əgər hər dəfə komputer açılanda javanın yolunu export etmək istəmirsənsə, onda .bashrc yə yuxarıdakı export komandasın əlavə edin.
ali@ali-laptop:~$ vi .bashrc
Artık javadan istifadə edə bilərsiz
ali@ali-laptop:~$ javac hello.java
ali@ali-laptop:~$ java hello
Hello Java
Dec
30
2009
Real playeri yükləmək üçün ilk əvvəl real playerin saytında onu götürmək lazımdır. wget vasitəsi ilə bunu edə bilərsiz.
ali@ali-laptop:~$ sudo wget http://www.real.com/realcom/R?href=http://forms.real.com/real/player/download.html?f=unix/RealPlayer11GOLD.bin
[sudo] password for ali:
--2009-12-30 13:32:33-- http://www.real.com/realcom/R?href=http://forms.real.com/real/player/download.html?f=unix/RealPlayer11GOLD.bin
Resolving www.real.com... 207.188.5.44
Connecting to www.real.com|207.188.5.44|:80... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://forms.real.com/real/player/download.html?f=unix/RealPlayer11GOLD.bin&href=http%3A%2F%2Fforms.real.com%2Freal%2Fplayer%2Fdownload.html%3Ff%3Dunix%2FRealPlayer11GOLD.bin [following]
--2009-12-30 13:32:44-- http://forms.real.com/real/player/download.html?f=unix/RealPlayer11GOLD.bin&href=http%3A%2F%2Fforms.real.com%2Freal%2Fplayer%2Fdownload.html%3Ff%3Dunix%2FRealPlayer11GOLD.bin
Resolving forms.real.com... 207.188.5.188
Connecting to forms.real.com|207.188.5.188|:80... connected.
HTTP request sent, awaiting response... 302 Temporary Relocation
Location: http://www.real.com/R/RDX.fail-click.R/software-dl.real.com/307f884b8669f8919706/unix/RealPlayer11GOLD.bin [following]
--2009-12-30 13:33:00-- http://www.real.com/R/RDX.fail-click.R/software-dl.real.com/307f884b8669f8919706/unix/RealPlayer11GOLD.bin
Connecting to www.real.com|207.188.5.44|:80... connected.
HTTP request sent, awaiting response... 302 Temporary Relocation
Location: http://software-dl.real.com/307f884b8669f8919706/unix/RealPlayer11GOLD.bin [following]
--2009-12-30 13:33:01-- http://software-dl.real.com/307f884b8669f8919706/unix/RealPlayer11GOLD.bin
Resolving software-dl.real.com... 66.203.123.22
Connecting to software-dl.real.com|66.203.123.22|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 7535566 (7.2M) [application/octet-stream]
Saving to: `RealPlayer11GOLD.bin'
100%[============================================================================>] 7,535,566 278K/s in 27s
2009-12-30 13:33:44 (272 KB/s) - `RealPlayer11GOLD.bin' saved [7535566/7535566]
Real Playerin paketin götürdükdən sonra onu yükləmək qaldı. İlk əvvəl Real Playerin bin paketin çağrılabilən (executable) hala gətirək.
ali@ali-laptop:~$ sudo chmod a+x RealPlayer11GOLD.bin
Bundan sonra isə .bin paketin install etmək lazımdır.
ali@ali-laptop:~$ sudo ./RealPlayer11GOLD.bin
Extracting files for Helix installation........................
Welcome to the RealPlayer (11.0.2.1744) Setup for UNIX
Setup will help you get RealPlayer running on your computer.
Press [Enter] to continue...
Enter the complete path to the directory where you want
RealPlayer to be installed. You must specify the full
pathname of the directory and have write privileges to
the chosen directory.
Directory: [/opt/real/RealPlayer]:
Copying RealPlayer files...Path setup done.
Succeeded.
installing application icons resource...
installing document icons resource...
......Succeeded.
Configuring Mozilla...
Installing .mo locale files...
Setting selinux context...
Succeeded.
RealPlayer installation is complete.
Cleaning up installation files...
Done.
Beləliklə uğurlar RealPlayeri yüklədik.
Dec
12
2009
Ü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.
Dec
02
2009
Linuxda lazım olan faylı axtarmaq üçün find və locate komandalarından istifadə edilir. locate komandası ada görə faylı tapır. locate komandası ilə faylı tapmaq üçün ilk əvvəl bazanı update etmək lazımdır. Bunun üçün updatedb komandası istifadə edilir. updated komandasın daxil etməsəz, onda belə bir səhv ekrana çıxacaq.
ali@ali-laptop:~$ locate
warning: locate: could not open database: /var/lib/slocate/slocate.db: No such file or directory
warning: You need to run the 'updatedb' command (as root) to create the database.
Please have a look at /etc/updatedb.conf to enable the daily cron job.
Ona görə ilk əvvəl, updatedb komandasın daxil edək. updatedb komandası baza yaradır, əgər baza varsa onu yeniləyir. Əsasən cron vasitəsi ilə hər gün baza yenilənir. updatedb komandasın root (və ya icazə verilən sudo ) istifadəçisi daxil edə bilər.
Adi istifadəçi daxil edəndə aşağıdakı səhv çıxacaq.
ali@ali-laptop:~$ updatedb
updatedb: can not open a temporary file for `/var/lib/mlocate/mlocate.db'
sudo ilə komandanı daxil edək.
ali@ali-laptop:~$ sudo updatedb
[sudo] password for ali:
İndi isə locate ilə lazım olan faylı axtaraq. Məsələn bizə jdk- nın hara install olunduğuna baxmaq istəyirik, onda locate jdk yazsaq, jdk adı harda var onu tapıb ekrana çıxaracaq.
ali@ali-laptop:~$ locate jdk | less
/etc/java-6-openjdk
/etc/java-6-openjdk/accessibility.properties
/etc/java-6-openjdk/calendars.properties
/etc/java-6-openjdk/content-types.properties
/etc/java-6-openjdk/flavormap.properties
/etc/java-6-openjdk/fontconfig.bfc
/etc/java-6-openjdk/fontconfig.properties
/etc/java-6-openjdk/images
/etc/java-6-openjdk/jvm.cfg
/etc/java-6-openjdk/logging.properties
/etc/java-6-openjdk/management
/etc/java-6-openjdk/net.properties
/etc/java-6-openjdk/psfont.properties.ja
/etc/java-6-openjdk/psfontj2d.properties
/etc/java-6-openjdk/security
/etc/java-6-openjdk/sound.properties
/etc/java-6-openjdk/swing.properties
/etc/java-6-openjdk/images/cursors
/etc/java-6-openjdk/images/cursors/cursors.properties
/etc/java-6-openjdk/management/jmxremote.access
/etc/java-6-openjdk/management/jmxremote.password
/etc/java-6-openjdk/management/management.properties
/etc/java-6-openjdk/management/snmp.acl
/etc/java-6-openjdk/security/java.policy
/etc/java-6-openjdk/security/java.security
/home/ali/jdk1.6.0_16
/home/ali/.nbi/product-cache/jdk
/home/ali/.nbi/product-cache/jdk/1.6.0.16.1
/home/ali/.nbi/product-cache/jdk/1.6.0.16.1/installed-files.xml.gz
/home/ali/Downloads/jdk-6u16-nb-6_7_1-linux-ml.sh
/home/ali/SUNWappserver/imq/var/jdk.env
/home/ali/jdk1.6.0_16/COPYRIGHT
/home/ali/jdk1.6.0_16/LICENSE
/home/ali/jdk1.6.0_16/README.html
/home/ali/jdk1.6.0_16/README_ja.html
/home/ali/jdk1.6.0_16/README_zh_CN.html
/home/ali/jdk1.6.0_16/THIRDPARTYLICENSEREADME.txt
/home/ali/jdk1.6.0_16/bin
/home/ali/jdk1.6.0_16/db
/home/ali/jdk1.6.0_16/demo
/home/ali/jdk1.6.0_16/include
/home/ali/jdk1.6.0_16/jre
/home/ali/jdk1.6.0_16/lib
/home/ali/jdk1.6.0_16/man
/home/ali/jdk1.6.0_16/register.html
/home/ali/jdk1.6.0_16/register_ja.html
Dec
01
2009
Boş fayl yaratmaq istəyiriksə onda touch komandasından istifadə edirik.
[ali@alihost ders]$ touch fayl
[ali@alihost ders]$ ls -l
total 0
-rw-rw-r--. 1 ali ali 0 2009-09-10 22:07 fayl
Burdan görürük ki, faylın ölçüsü 0-dır, yəni boş fayldır. Bir neçə fayl eyni zamanda yaratmaq istəyiriksə, onda touch komandasını daxil edir, onun ardınca isə istədiyimiz sayda fayl adın boşluqla daxil edirik. Yəni
[ali@alihost ders]$ touch fayl1 fayl2 fayl3 fayl4
[ali@alihost ders]$ ls
fayl fayl1 fayl2 fayl3 fayl4
cat- Faylın tərkibinə (içinə) baxmaq üçün istifadə edilir. cat boş daxil etsəniz, onda sizin terminalda yazdığınız yazı input (yəni giriş) olaraq götürələcək və sonra output olaraq terminala veriləcək.
[ali@alihost ders]$ cat
Burda mən catı boş daxil etdim. İndi nə yazsam terminalda yenidən görsənəcək, bunu saxlamaq üçün CTRL+C istifadə et
Burda mən catı boş daxil etdim. İndi nə yazsam terminalda yenidən görsənəcək, bunu saxlamaq üçün CTRL+C istifadə et
^C
[ali@alihost ders]$
echo komandası ilə biz öz yazımızı ekrana verə bilərik. echo komandasının geniş istifadəsinə gələcək dərslərimizdə baxacayıq.
[ali@alihost ders]$ echo "Salam, echo komandası daxil etdim"
Salam, echo komandası daxil etdim
Dec
01
2009
rm – faylları silmək üçün bu komandadan istifadə olunur. Tutaq ki, dərs qovluğundakı text.txt faylını silmək istəyirik. Onda rm text.txt əmrini yazırıq
[ali@alihost ders]$ ls
hell.rb iki link new.sh run.py text.txt
[ali@alihost ders]$ rm text.txt
[ali@alihost ders]$ ls
hell.rb iki link new.sh run.py
Əgər faylı silərkən silinmə proseduruna baxmaq istəyirsinizsə, onda -v optionsdan istitfadə edin. Yəni rm -v yazsaz nəyi sildiyinizi görəcəksiniz. Məsələn:
[ali@alihost ders]$ rm -v file
removed `file`
Ümumiyyətlə, -v verbose deməkdir. Bu options çox komandada var. Və etdiyinizi görmək istəyirsinizsə, onda -v optionsdan istifadə edin.
rm faylın_adı yazdıqda faylı silə bilirik. Amma belə qovluğu silmək olmaz.
[ali@alihost ders]$ rm qovluq
rm: cannot remove `qovluq': Is a directory
Qovluq əgər boşdursa, onu rmdir komandası ilə silmək olar.
[ali@alihost ders]$ rmdir -v qovluq/
rmdir: removing directory, `qovluq/'
Lakin qovluğun içində nəsə varsa, onda onu rmdir ilə silmək olmaz. Onda onu rm -r istifadə etmək lazımdır. -r recursive deməkdir. Yəni recursive olaraq qovluğu və qovluğun içindəkiləri silir.
[ali@alihost ders]$ mkdir qovluq
[ali@alihost ders]$ touch qovluq/file
[ali@alihost ders]$ rmdir qovluq/
rmdir: failed to remove `qovluq/': Directory not empty
[ali@alihost ders]$ rm -r qovluq/
[ali@alihost ders]$ ls
hell.rb iki link new.sh run.py
-f force sozunun baş hərfi. Əgər fayl yoxdursa, onda heç nə prompt etməyəcək. Və rm -f komandası bizdən faylı silib-silməmək haqqında sorğunu ekrana çıxarmayacaq.
rm -rf Çox təhlükəli komandadır. Faylı zibil qabına göndərmir, birdəfəlik silir.
Nov
17
2009
mysql – ə daxil olmaq üçün istifadəçi adı və parolun bu şəkildə daxil edin. Əgər istifadəçi yaratmamısınızsa, onda root vasitəsi ilə mysql-ə daxil olun
1
2
3
4
5
6
7
8
| ali@ali-laptop:~$ sudo mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 38
Server version: 5.1.37-1ubuntu5 (Ubuntu)
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql > |
Yeni bir baza yaradaq. Bazanın adı blog olsun.
1
2
| mysql> create database blog;
Query OK, 1 row affected (0.02 sec) |
bu bazadan istifadə etmək üçün yeni istifadəçi yaradaq.(root ilə təbii bazadan istifadə edə bilərsiz, amma təhlükəsizlik üçün yeni istifadəçi yaratmaq lazımdır) Bu istifadəçinin adı bloger olsun. Bunun üçün create user komandasından istifadə etmək lazımdır. Ardınca İdentified by komandası ilə userin parolun daxil etmək lazımdır.
1
2
| mysql> create user 'blogger'@'localhost' Identified by 'B!l0g10';
Query OK, 0 rows affected (0.02 sec) |
Indi isə yaratdığımız bloq istifadə etmək üçün bütün hüquqları blogger istifadəçisinə verək. Ondan ötrü isə Grant Privileges komandasından istifadə olunur. Bundan əvvəl isə biz hansı bazadan istifadə etdiyimizi bildirmək üçün use komandasından istifadə etməliyik. Yəni belə:
1
2
3
4
| mysql> use blog;
Database changed
mysql> grant all privileges on *.* to 'blogger'@'localhost';
Query OK, 0 rows affected (0.00 sec) |
Beləliklə biz baza yaratdıq, sonra bu bazanı istifadə etmək üçün bir istifadəçi və bazanın bütün hüquqların bu istifadəçiyə verdik.
Nov
07
2009
Əgər siz serverdən faylları ftp vasitəsi ilə öz komputerinizə yüklüyürsünüzsə və serverdə olan bütün faylları birdən yükləmək istəyirsinizsə onda ncftp sizin köməyinizə gələcək. ncftpget vasitəsi ilə siz remote serverdən bütün faylları öz komputerinizə yükləyə bilərsiniz. Bunun üçün 1-ci ncftpni yükləmək lazımdır.
$ sudo apt-get install ncftp
Ondan sonra isə
ncftpget -u -R -v "istifadəçi_adı" ftp://remote_server_ip (or domain name) locak_qovluq
bu komanda vasitəsi ilə siz remote serverdən bütün faylları öz komputerinizə köçürə bilərsiz. Təbii ncftpput vasitəsi ilə isə siz öz komputerinizdən remote serverə istədiyiniz faylları göndərə bilərsiz.
Yuxarıdakı komandada
-u Istifidaçi adın bildirimək üçündür
-R Remote serverdəki qovluqlarıda köçürsün.
-v nəyi köçürdüyün bizə göstərsin.
Nov
06
2009
Deb (debian base paketlər) necə install edək? Bunun yolu çox sadədir. dpkg əmri vasitəsi ilə. dpkg -i (-i yəni install) paketin adın daxil edin.
ali@ali-laptop:~/Downloads$ sudo dpkg -i opera_10.01.4682.gcc4.qt3_i386.deb
[sudo] password for ali:
Selecting previously deselected package opera.
(Reading database ... 99453 files and directories currently installed.)
Unpacking opera (from opera_10.01.4682.gcc4.qt3_i386.deb) ...
Setting up opera (10.01.4682.gcc4.qt3) ...
Processing triggers for hicolor-icon-theme ...
Processing triggers for man-db ...
Operanı beləliklə öz Kubuntuma yüklədim.
Nov
06
2009
Ubuntuda .wmv faylları oxutmaqda problem varsa, onda bunun həlli çox asandır. 3 addıma .wmv faylları oxuda biləcəksiniz.
- /etc/sources.list faylını açın.
sudo vi /etc/apt/sources.list
-
Bu sətirləri həmin faylın sonuna əlavə edin.
deb http://mirror.ubuntulinux.nl dapper-seveas all
deb-src http://mirror.ubuntulinux.nl dapper-seveas all
deb http://mirror.ubuntulinux.nl edgy-seveas all
deb-src http://mirror.ubuntulinux.nl edgy-seveas all
- w32codecs codecsini install edin
sudo apt-get install w32codecs
Beləlikli wmv faylları linuxda oxuda biləcəksiniz.