Skip to content

Commit e718fae

Browse files
authored
Update INSTALL.md
1 parent ce54f11 commit e718fae

1 file changed

Lines changed: 12 additions & 39 deletions

File tree

INSTALL.md

Lines changed: 12 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ sudo make install
2424

2525
Clixon:
2626
```console
27+
28+
# Add a new clicon user
29+
sudo useradd -g clicon -m clicon
30+
2731
cd clixon
2832
./configure
2933
make
@@ -36,54 +40,23 @@ cd clixon-controller
3640
./configure
3741
make
3842
sudo make install
39-
sudo mkdir /usr/local/share/clixon/mounts/
4043
```
4144

4245
Clixon Python API
4346
```console
4447

4548
# Build and install the package
4649
cd clixon-pyapi
47-
sudo -u clicon pip3 install -r requirements.txt
48-
sudo python3 setup.py install
49-
50-
# Install the server
51-
sudo cp clixon_server.py /usr/local/bin/
52-
53-
# Add a new clicon user and install the needed Python packages,
54-
# the backend will start the Python server and drop the privileges
55-
# to this user.
56-
sudo useradd -g clicon -m clicon
50+
./install.sh
5751
```
5852

59-
### Start devices
60-
61-
Example using clixon-example device::
53+
### Optional: SystemD service
6254
```console
63-
cd test
64-
./start-devices.sh
65-
```
6655

67-
### Start controller
56+
# Copy clixon_controller.service
57+
cp clixon_controller.service /etc/systemd/network/
6858

69-
Kill old backend and start a new:
70-
```console
71-
sudo clixon_backend -f /usr/local/etc/clixon/controller.xml -z
72-
sudo clixon_backend -f /usr/local/etc/clixon/controller.xml
73-
```
74-
75-
Start the CLI and configure devices
76-
77-
```console
78-
clixon_cli -f /usr/local/etc/clixon/controller.xml
79-
80-
configure
81-
set devices device clixon-example1 description "Clixon container"
82-
set devices device clixon-example1 conn-type NETCONF_SSH
83-
set devices device clixon-example1 addr 172.20.20.2
84-
set devices device clixon-example1 user root
85-
set devices device clixon-example1 enable true
86-
set devices device clixon-example1 yang-config VALIDATE
87-
set devices device clixon-example1 root
88-
commit
89-
```
59+
# Enable and start the service
60+
systemctl daemon-reload
61+
systemctl enable clixon_controller
62+
systemctl start clixon_controller

0 commit comments

Comments
 (0)