There are two ways to install the tools:
Download phar file
or if you have problems with SSL certificate:
curl -L -o n98-magerun.phar https://files.magerun.net/n98-magerun.phar
You can make the .phar file executable.
chmod +x ./n98-magerun.phar
If you want to use command system wide you can copy it to /usr/local/bin.
sudo cp ./n98-magerun.phar /usr/local/bin/
Debian / suhosin:
On some debian systems with compiled in suhosin the phar extension must be added to a whitelist.
Add this to your php.ini file:
You don’t like the filename?
Just rename it to whatever you want.
Install with Composer
$ n98-magerun.phar self-update