For Debian-based distros:
sudo apt-get install libmicrohttpd-dev libssl-dev cmake build-essential
For Red Hat based distros:
sudo yum install openssl-devel cmake gcc-c++ libmicrohttpd-devel
Following this, you just need to use cmake to generate the build files, run make and copy the config file:
mkdir build-$(gcc -dumpmachine)
cd $_
cmake ../
make -j$(nproc)
cp ../config.txt bin/
cd bin
Don't celebrate just yet, as the miner needs to be configured. Running the miner now should give you a block of text to copy and paste:
what is monero
Open config.txt and replace the two "cpu_threads_conf" lines with the text you just copied. It should look something like this afterwards:
what is monero
Scroll down in the file until you see the lines containing "pool_address". Replace the contents of the second set of quotes with the address and port of the pool you chose earlier. You can find this information on the pool's website.
Put your wallet address between the quotes on the wallet address. You may leave the password blank unless the pool specifies otherwise.
After this, your config should look something like this:
what is monero
Running the miner
Save the config file and run the miner!
what is monero
Some pools allow you to monitor your hashrate by pasting your address into their website. You can also monitor your hashrate by pressing the h key.