blob: 26e794000ace4a5e262f4174ed1e8901fdd04759 [file] [log] [blame]
Zhiyi Zhang3aaf06d2020-10-17 13:05:36 -07001#! /bin/bash
2
3# compile and install ndncert
4git clone https://github.com/Zhiyi-Zhang/ndncert.git
5cd ndncert
6git checkout origin/v0.3
7./waf configure
8./waf install
9
10# set up systemd file for linux service
11sudo cp ./build/systemd/ndncert-server.service /etc/systemd/system/
12sudo chmod 644 /etc/systemd/system/ndncert-server.service
13
14# update CA configuration file
15echo -e "{\n\"ca-prefix\": \"/ndn\",\n\"ca-info\": \"NDN testbed root CA\",\n\"max-validity-period\": \"1296000\",\n\"max-suffix-length\": \"2\",\n\"supported-challenges\":\n[\n{ \"challenge\": \"pin\" }\n]\n}" > /usr/local/etc/ndncert/ca.conf
16
17# sudo HOME=/var/lib/ndn/ndncert-ca -u ndn ndnsec-keygen /ndn
18
19# prepare
20mkdir /var/lib/ndn/ndncert-ca
21chown ndn /var/lib/ndn/ndncert-ca
22
23# run the CA
24sudo systemctl start ndncert-server
25
26# check the status to make sure everything is correct
27sudo systemctl status ndncert-server