How to Install mlocate (locate and updatedb Commands) on CentOS 7

http://www.liquidweb.com/kb/how-to-install-mlocate-locate-and-updatedb-commands-on-centos-7/

As root:

yum -y update
Then let’s install mlocate and any required packages:
yum -y install mlocate
The following command will update the search databases:
updatedb
mlocate installs a cron job that will run daily to update search databases at:
/etc/cron.daily/mlocate.cron

VI – Display line number

To set it as env variable in .exrc file, default location = home dir

[server ~]$ cd
[server ~]$ pwd
/home/binviji
[server ~]$ ls -al .exrc
ls: cannot access .exrc: No such file or directory
[server ~]$ echo “set number” > .exrc
[server ~]$ cat .exrc
set number

Or else, while editing:
[ESC]
:set nember
(to enable)

[ESC]
:set nonumber
(to disable)