1. 安装locate名称
yum install mlocate
如果运行locate报错locate: can not stat () `/var/lib/mlocate/mlocate.db': No such file or directory
接着下步。
2.更新db
updatedb