How to install a Lisk node on your Mac running OSX 10.5.11 Server:
UPDATED FOR 0.4.1
You can use the upgrade script now as they fixed the MD5 check.
So if you're already running 0.4.0, simply do this:
copy your ssl directory away so you can copy the certificates back afterwards. Also copy config.json so you can refer to it when you have to add the ssl and forging part back in after the upgrade.
rm -f installLisk.sh
wget https://downloads.lisk.io/lisk/main/installLisk.sh installLisk.sh
bash installLisk.sh upgrade -r main
Copy any SSL certificates back where they belong and manually add any missing entries in config.json such as SSL, Forging or API whitelists.
For a new install follow these steps:
Firstly, it may well work with other versions of OSX including non server. I simply don't know but from the small number of changes I had to make, I very much believe that it will work just fine. If you don't have the server version then things should be even easier as you don't have to work around the already installed Postgres version that is used by OSX Server.
If you know your way around the terminal and shell commands, you will no doubt succeed. If you do not have that knowledge then I strongly suggest you do not even start. Download the Nano client and find happiness in it.
So here it goes:
If you want to use a dedicated account to run Lisk, then you have to create one in system preferences but you can just run it under any account, really. (Well, not root but anything else).
The installation requires you to have wget. Which you will not find on a Mac. (Strictly speaking, wget isn't required but the installer checks for it anyway.)
You can of course modify the script to remove the check for wget but I didn't know that wget wasn't required when I did the installation so I added it as described below:
If you have BREW installed, you can simply add it:
brew install wget
If you don't have brew, you can just cheat your way around it by creating a script:
copy&paste the 2 lines below:
curl -L $1 -o $2
save & exit.
change permissions on the file:
chmod 755 wget
Download the install script.
If you couldn't' be bothered with wget, just use curl:
curl -L https://downloads.lisk.io/scripts/installLisk.sh -o installLisk.sh
Note that you have to add an extra target file name if you are using the wget workaround:
wget https://downloads.lisk.io/scripts/installLisk.sh installLisk.sh
If you have installed wget using brew, you can just use:
On OSX Server, you may find that the postgres commands are taken from the wrong directory as there is already a Postgres DB running. To fix this, edit .bash_profile and add the following line (again: do not add it if you're not running OSX Server):
Replace <YOUR_HOME_DIRECTORY> with the correct path to wherever you are intending to install Lisk. The default is to install it into the users home folder.
For any OSX Version, also add the environment variables for Postgres:
Save the file, close your terminal session and start a new one. Check whether you do have the variable settings as expected.
Now, hold your horses just yet as we have to make one more change for Postgres to work:
This is where your setup could be different if you're on a different version or if you're not running the Server version.
However, you should be able to adjust it if you can find out where the .s.PGSQL.5432 file actually is.
The installation script installs postgres and it will think that your .s.PGSQL.542 socket file should default to /private/var/pgsql_socket but alas, it does not.
you can fix this by issuing this command:
sudo ln -s /tmp/.s.PGSQL.5432 /var/pgsql_socket/.s.PGSQL.5432
This creates a symbolic link pointing to /tmp and postgres will now happily find what it's looking for.
Now then, back to run the install script:
bash installLisk.sh install -r main
Follow the installation guide and things should progress. You may or may not get the "Failed to create Postgresql user" error. If so, try this:
bash lisk.sh rebuild
Please let me know if you come across any issues not mentioned here.