The minimal Zhenga setup requires just a few steps.
1. Hardware
Demo Zhenga network can run on any computer running Windows, Linux, FreeBSD and macOS.
2. The binaries
Download latest Zhenga for your operating system and unzip to a separate directory.
3. System driver
Install Dokan for Windows or macFUSE for macOS. Both are filesystem-in-userspace drivers. There is nothing to install on Linux and FreeBSD as most distributions come with fuse
by default.
4. Configuration files
Example configuration files alice.cfg
, bob.cfg
and carol.cfg
can be found in the downloaded archive.
5. Start
Firewall users must allow ports 42001, 42002 and 42003 for Zhenga binary.
5.1 Windows
Start command prompt by pressing Win
+R
, type cmd
and press Enter
. Navigate to the location of downloaded Zhenga binary and issue the following command:
C:\Users\Zhen\Zhenga>zhenga.exe -fc alice.cfg -m X -n Alice
Start another command prompt, navigate to the same directory and issue another command:
C:\Users\Zhen\Zhenga>zhenga.exe -fc bob.cfg -m Y -n Bob
One more command prompt and another command:
C:\Users\Zhen\Zhenga>zhenga.exe -fc carol.cfg -m Z -n Carol
With all instances of Zhenga running you shoud see new drives X:
, Y:
and Z:
in the system named Alice
, Bob
and Carol
respectively with some demo content inside.
5.2 Linux and FreeBSD
FreeBSD users should issue the following command in order to mount filesystems as unprivileged user:
$ sudo sysctl vfs.usermount=1
Navigate to the location of downloaded Zhenga binary and issue the following commands (use sudo
where appropriate):
$ mkdir ~/alice
$ ./zhengad -fc alice.cfg -m ~/alice
Start another command prompt, navigate to the same directory and issue more commands:
$ mkdir ~/bob
$ ./zhengad -fc bob.cfg -m ~/bob
One more command prompt and again commands:
$ mkdir ~/carol
$ ./zhengad -fc carol.cfg -m ~/carol
With all instances of Zhenga running you shoud have demo nodes mounted to ~/alice
, ~/bob
and ~/carol
.
5.3 macOS
Running Zhenga on latest macOS versions requires explicit permission. Google has a number of solutions to this along with explanations of what code signing is and how it prevents malicious software spread.
Unfortulately, running on BigSur is currently impossible. Stay tuned for development updates.
Once done with the permission, start command prompt, navigate to the location of downloaded Zhenga binary and run alice
node:
/Users/Zhen/zhenga $ ./zhengad -fc alice.cfg -fm /Volumes/Alice
Then in another command prompt run bob
node:
/Users/Zhen/zhenga $ ./zhengad -fc bob.cfg -fm /Volumes/Bob
And in another command prompt run carol
node:
/Users/Zhen/zhenga $ ./zhengad -fc carol.cfg -fm /Volumes/Carol
When all Zhenga nodes are up you should see demo nodes at /Volumes/Alice
, /Volumes/Bob
and /Volumes/Carol
.
6. Stop
Various options are available on different systems.
6.1 Windows
Stop Zhenga by pressing Ctrl
+C
in command prompt windows with running Zhenga.
6.2 Linux and FreeBSD
Use umount
to release the filesystems (use sudo
where appropriate):
$ umount ~/alice
$ umount ~/bob
$ umount ~/carol
or just press Ctrl
+C
in the consoles running Zhenga.
6.3 macOS
It is preferred to use Eject
option from the drive context menu.
Otherwise use the following commands:
/Users/Zhen/zhenga $ umount -f /Volumes/Alice
/Users/Zhen/zhenga $ umount -f /Volumes/Bob
/Users/Zhen/zhenga $ umount -f /Volumes/Carol
or just press Ctrl
+C
in the consoles running Zhenga.
7. Congratulations!
You’ve just set up your own P2P network! Now it is time to add real nodes and shares.
If you feel familiar with TCP/IP, mount points, shares, etc - just take the provided configuration files as an example and go ahead with real hostnames, ports and paths.
For more example setup refer to quick pair guide.
For more information about the configuration please refer to step-by-step manual.