Is it safe to do long strenuous hikes and weight training if I have copd?

Maybe... Only your doctor can answer this for sure after a thorough evaluation. You may need pulmonary rehab where you exercise while being monitored to determine what exercise is safe for you and whether you need supplemental oxygen while exercising. See your doctor.
Know your body. I don't disagree with weight training or hiking if you have COPD, but bring your medications along and know your limits. Listen to your body - if you're getting very short of breath, stop and rest or even call it a day. Don't push it, because once the lungs start to object it may be hard to turn back.
Not advised. If this is something you do on a regular basis and have no problem doing it, you should be ok. You can do long hikes that are not strenuous. You can do weights, but use small weights instead of heavy lifting. Ultimately, your body will tell you what you can do.