step1:安裝軟件包
[root@localhost api-web]# sudo yum install mlocate
Total download size: 113 k
Installed size: 379 k
Is this ok [y/d/N]: y
Downloading packages:
mlocate-0.26-8.el7.x86_64.rpm | 113 kB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : mlocate-0.26-8.el7.x86_64 1/1
Verifying : mlocate-0.26-8.el7.x86_64 1/1
Installed:
mlocate.x86_64 0:0.26-8.el7
Complete!
step2:初始化本地數據庫
sudo updatedb
step3:執行查找
locate nginx