Always carry pump, tyre levers, spare tube, tube patch kit and water bottle.
Regularly check your tyre pressure, quick release skewers, brakes and bearings. Maintenance is important. If you don't feel confident working on your bike, take it to a good cycle shop for servicing.
Clean your drive chain regularly and then apply a lubricant according to the instructions. Wipe off the excess, because excess lube attracts dirt.
Buy a good quality 'U-lock' or 10mm cable lock from a cycle shop. Secure your bike to an immovable object.
You can secure your frame and rear wheel just by locking the wheel within the rear triangle to something secure. If you do the same cycle trip regularly then consider leaving a lock at your destination to avoid carrying a heavy lock every time.