| Home Register Memberlist Help Search Quick Links No Replies |
|
||||||
| Basic How-tos Help Us Noobs by Sharing Your Wisdom |
![]() |
![]() |
|
Thread Tools | ![]() |
|
#1
|
||||
|
||||
|
Install mlocate
If you do not already have locate available on your server, run the following command in root shell to install it via yum: Code:
yum install mlocate If you do have locate installed, but updatedb has not processed yet on the server, you will receive the following error when trying to run the locate command: Code:
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. Code:
updatedb Normally, updatedb should automatically run daily as a cron update to ensure that the locate database is up-to-date. If this is not happening, you will receive the following error when you try to run a locate command: Code:
warning: locate: warning: database /var/lib/slocate/slocate.db' is more than 8 days old Code:
#!/bin/sh . /etc/updatedb.conf [ "$DAILY_UPDATE" != "yes" ] && exit 0 renice +19 -p $$ >/dev/null 2>&1 /usr/bin/updatedb Code:
#!/bin/sh . /etc/updatedb.conf [ "$DAILY_UPDATE" = "yes" ] && exit 0 renice +19 -p $$ >/dev/null 2>&1 /usr/bin/updatedb Code:
cat /etc/crontab Code:
SHELL=/bin/bash PATH=/sbin:/bin:/usr/sbin:/usr/bin MAILTO=root HOME=/ # run-parts 01 * * * * root run-parts /etc/cron.hourly 02 4 * * * root run-parts /etc/cron.daily 22 4 * * 0 root run-parts /etc/cron.weekly 42 4 1 * * root run-parts /etc/cron.monthly
__________________
Miraenda ~ Ex uno disce omnes ~ |
![]() |
| Bookmarks |
| Thread Tools | |
|
|
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd. |
||