But first these questions. What must I do to invite the Holy Spirit to live in me? The second question is, how do I know the Holy Spirit is living in me?
You can invite the Holy Spirit to live in you by doing the will of God, as summarized by Jesus in Matthew 22:37-40, "Love the Lord your God with all your heart and with all your soul and with all your mind. This is the first and greatest commandment. And the second is like it: Love your neighbor as yourself." All the Laws and the Prophets hang on these two commandments."
On the second question. You would know the Holy Spirit is living in you when, regardless of all the spiritual and physical obstacles put in your path by the Evil One you succeed in demonstrating your love for God by treating your neighbors as you want to be treated. By this single act you have fulfilled the two greatest commandments which are: loving God and loving your neighbors.
Although the Holy Spirit connects you directly with God, you need faith to remain connected. By faith you would receive God's wisdom to see through the lies of the Evil One. You would also receive God's power to stand firm against the temptation of the Evil One, in order to continue treating your neighbors as you want to be treated. In other words, when you stop treating your neighbors as you want to be treated, you give the Evil One access to infiltrate and control your mind toward evil.
You may ask, if everything depends on faith what must I do to receive faith? In Romans 10:17 we read, "Consequently, faith comes from hearing and [reading] the message, and the message is heard through the word of Christ." What is the message of Christ that summarizes the entire gospel? It is this: "To love God and love your neighbors".
When you live by Christ's divine message, you would receive faith. The Holy Spirit will come and live in you. You would be connected directly with God and receive His wisdom and power. You would not be alone when the Evil One comes knocking at your door with temptations. And you would be empowered to continue treating your neighbors as you want to be treated, and as a result guarantee your happiness here on earth and your salvation in the after life.