Senin, 08 Juni 2015

Install locate di Centos 6



Perintah locate default nya tidak di install otomatis pada OS Centos 6, locate ini fungsi nya untuk melakukan pencarian dari suatu file atau folder.

Cara melakukan instalasi nya cukup sederhana :

1. Install dulu dari repo centos :

# yum install mlocate
Failed to set locale, defaulting to C
Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
 * base: centos.biz.net.id
 * extras: centos.biz.net.id
 * updates: centos.biz.net.id
Resolving Dependencies
--> Running transaction check
---> Package mlocate.x86_64 0:0.22.2-4.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

==================================================================================================================================
 Package                       Arch                         Version                              Repository                  Size
==================================================================================================================================
Installing:
 mlocate                       x86_64                       0.22.2-4.el6                         base                        86 k

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

Total download size: 86 k
Installed size: 279 k
Is this ok [y/N]: y
Downloading Packages:
mlocate-0.22.2-4.el6.x86_64.rpm                                                                            |  86 kB     00:00    
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : mlocate-0.22.2-4.el6.x86_64                                                                                    1/1
  Verifying  : mlocate-0.22.2-4.el6.x86_64                                                                                    1/1

Installed:
  mlocate.x86_64 0:0.22.2-4.el6                                                                                                  

Complete!

2. Setelah selesai, update database locate nya dulu :

# updatedb

3. Selesai, tinggal cari file yang di inginkan, misal saya ingin mencari file rlm_sql_oracle.so, perintah nya adalah :

# locate rlm_sql_oracle.so
/root/freeradius-server-2.1.12/src/modules/lib/.libs/rlm_sql_oracle.so
/root/freeradius-server-2.1.12/src/modules/rlm_sql/drivers/rlm_sql_oracle/.libs/rlm_sql_oracle.so
/usr/raddb/lib/rlm_sql_oracle.so

Atau kita bisa juga menggunakan perintah find untuk mencari suatu file di command linux, misal saya mau mencari file "rlm_sqlcounter.la", maka perintah nya adalah :

# find / -name rlm_sqlcounter.la

Semoga bermanfaat..

Dony Ramansyah
site : http://donyramansyah.net
blog : dony-ramansyah.blogspot.com
email : dony.ramansyah[at]gmail.com
Registered linux user : ID 400171

Tidak ada komentar: