Install on Mac OS X

From meshwiki
(Redirected from Build on Mac OS X)
Jump to: navigation, search

Build Cjdns

Cjdns requires Mac OS X 10.6 "Snow Leopard" or newer. Earlier versions of Mac OS X do not work with Cjdns.

NOTE: 10.7, 10.8 Users git is not installed by default. Please use git Installer to get git up and running.

Back to My Mac may conflict with cjdns. You might have to disable it by unchecking it in the iCloud System Preferences.

Dependencies

Install a compiler which you can download from the Apple website and log in with your Apple ID or register for free. Download "Command Line Tools for Xcode" and install it. You do NOT need Xcode itself; however, you can also download "Command Line Tools for Xcode" directly from Xcode itself (Newer versions of Mac OS X require Xcode installed as Apple no longer has a standalone for command line tools. Xcode can be downloaded from the Mac App Store App.)

If you're running a recent version of OS X, the easiest way to download the command line tools is to run this command:

   xcode-select --install

Actual build

Now open Terminal.app. The rest of this guide uses the command-line.

Grab the latest files from Cjdns on GitHub.

   # git clone https://github.com/cjdelisle/cjdns.git cjdns
   # cd cjdns

Now build it

   # ./do

When you see Build completed successfully it is done :).

Configure Cjdns

You now have a freshly build Cjdns install!

Create a config file

Running the following command creates a new privatekey, publickey and corresponding ip address.

 # ./cjdroute --genconf > cjdroute.conf

Add a Peer

First make sure you have connection info from to other peer before you continue. Here is a list of public nodes who will peer with anyone.
Note Note: This is not adviced as these connections will be removed when the peer decides to delete that password. When they setup public credentials and someone abuses it, the public credentials will be changed/removed which destroys your connection. Come on the IRC and find people to permanently peer with.

Once you have connection credentials you can add them with a client-side only javascript tool to edit the config file Otherwise, the values are explained below.

Open your config file with nano cjdroute.conf. In your cjdroute.conf file, you will see:

       // Nodes to connect to.
       "connectTo":
       {
           // Add connection credentials here to join the network
           // Ask somebody who is already connected.
       }

Now paste the connection info you got from the peer inbetween the { and } After adding their connection credentials, it will look like:

       // Nodes to connect to.
       "connectTo":
       {
           "0.1.2.3:45678":
           {
               "password": "thisIsNotARealConnection",
               "publicKey": "thisIsJustForAnExampleDoNotUseThisInYourConfFile.k"
           }
       }

Run Cjdns

Use this to start Cjdns. This will start the router and configure it with the the correct IPv6 address. The daemon needs to be started with admin priviledges, so enter your password when prompted. For security, it drops all extra permissions immediately after setup.

  # sudo ./cjdroute < cjdroute.conf

You now have a running cjdroute! It will need to stay running in that terminal the entire time you are using it. When you want to disconnect from the network, close the terminal (or enter control-C into it).

What to do on Hyperboria

Imporant links

See Also