CyanogenMod is a very popular open-source custom ROM. The custom ROM is rather unstable in its current state and chances of crashes and things getting broken are there. So be careful while following the instructions and it is better to have a backup for all your important data. Be sure that your Galaxy S II is charged completely and there is at least 200MB of free space in your micro SD card. To install the custom ROM in your Galaxy S II, you need to first root your phone.
You must backup all the user data present in your phone since chances of data loss or corruption are there. Having a backup can help you replace the lost data if any damage occurs. Follow the link posted below to backup and restore all your data easily.
Steps To Install CyanogenMod 7 Nightly:
Step-1: Download Premium ROM Manager and install it.
Step-2: Open ROM Manager and tap on Flash ClockworkMod Recovery. Select Samsung Galaxy S II option from the list of compatible smartphones. Give the root permissions when it asks for it. You will have to wait for the installation since the process takes its time.
Step-3: After installation is complete, you have to boot into ClockworkMod Recovery. To do this open ROM Manager and tap Reboot Into Recovery.
Step-4: Open ROM Manager again. Tap on Download ROM then tap on CyanogenMod and choose Cyanogen Mod Nightly. You can also also choose the Google Apps option incase you want to pre-install Gmail/YouTube/Google Search apps with the new ROM. The CM7 Nightly will now be downloaded for your Galaxy S II by Rom Manager.
Step-5: Now it will ask you to Backup existing ROM, Wipe Cache, Dalvik Cache. Tap on Yes and CyanogenMod 7 Nightly will be installed in your Galaxy S II. It will reboot automatically and your device is all set to be used.
The above process should be followed carefully to ensure a safe and successful flashing.