Insecure BF

So I've been with my BF for about four and a half years and I've noticed his insecurities are getting pretty bad. He always thinks I'm talking to other guys. For example, he peeks over at my phone when I'm on it or he will ask me who texts me every time my phone goes off. He accuses me of liking some of his friends and but he always brings them around. He also gets mad over the dumbest things. It's hard to let go because it's been so long and he really is a good guy and I do love him but his past relationships made him the way he is today. Need advice!