Disclosed are pyrimidine derivatives represented by general formula (I) or pharmaceutically acceptable salts thereof. An example of the compounds of formula (I) is Methyl 2-(3-((3-(2-Amino-4-methyl-6-(pentylamino)pyrimidin-5-yl)propylamino)methyl)phenyl) acetate. The compounds of formula (I) are used to treat asthma, COPD, allergic rhinitis, allergic conjunctivitis, atopic dermatitis, cancer, hepatitis B, hepatitis C, HIV, HPV, bacterial infections and dermatosis.