Purchase a cabinet lock kit, and read the instructions.
Arrange the lock onto the cabinet as mentioned in the manufacturer's instructions.
Use a screwdriver to screw the back piece of the lock mechanism onto the inside door of your cabinet with the screws for the lock kit. Make sure to research the screwdriver you will need before starting to install the lock.
Screw in the front pieces of the lock onto the outer door of your cabinet.
Set the lock and test it. Testing the lock is important to ensure proper functioning.