- ntopng finished for Raspbian 10
This commit is contained in:
2
build.sh
2
build.sh
@@ -15,7 +15,7 @@ invoke-rc.d ssh start
|
||||
ssh-keygen -t rsa -b 2048 -f ~/.ssh/id_rsa -q -N ""
|
||||
#
|
||||
#
|
||||
PUBKEY="'$(<~.ssh/id_rsa.pub)'" && ansible-playbook -i hosts deploy_authorized_keys.xml --ask-pass --extra-vars="pubkey=$PUBKEY"
|
||||
PUBKEY="'$(<~/.ssh/id_rsa.pub)'" && ansible-playbook -i hosts deploy_authorized_keys.yml --ask-pass --extra-vars="pubkey=$PUBKEY"
|
||||
ansible-playbook -i hosts main.yaml --ask-become-pass
|
||||
ansible-playbook -i hosts reboot.yaml
|
||||
reboot
|
||||
|
||||
@@ -14,12 +14,28 @@
|
||||
git:
|
||||
repo: https://github.com/ntop/ntopng.git
|
||||
dest: "{{ ansible_user_dir }}/ntopng"
|
||||
- name: build nDPI
|
||||
command: "./autogen.sh && ./configure --with-pic && make"
|
||||
- name: run nDPI autogen.sh
|
||||
command: "./autogen.sh"
|
||||
args:
|
||||
chdir: "{{ ansible_user_dir }}/nDPI"
|
||||
- name: configure nDPI
|
||||
command: "./configure --with-pic"
|
||||
args:
|
||||
chdir: "{{ ansible_user_dir }}/nDPI"
|
||||
- name: build nDPI
|
||||
command: "make -j 3"
|
||||
args:
|
||||
chdir: "{{ ansible_user_dir }}/nDPI"
|
||||
- name: run ntopng autogen.sh
|
||||
command: "./autogen.sh"
|
||||
args:
|
||||
chdir: "{{ ansible_user_dir }}/ntopng"
|
||||
- name: run ntopng configure
|
||||
command: "./configure"
|
||||
args:
|
||||
chdir: "{{ ansible_user_dir }}/ntopng"
|
||||
- name: build ntopng
|
||||
command: "./autogen.sh && ./configure && make"
|
||||
command: "make -j 3"
|
||||
args:
|
||||
chdir: "{{ ansible_user_dir }}/ntopng"
|
||||
- name: install
|
||||
@@ -27,10 +43,20 @@
|
||||
command: "make install"
|
||||
args:
|
||||
chdir: "{{ ansible_user_dir }}/ntopng"
|
||||
- name: create ntopng group
|
||||
become: yes
|
||||
group:
|
||||
name: ntopng
|
||||
state: present
|
||||
- name: creaate ntopng user
|
||||
become: yes
|
||||
user:
|
||||
name: ntopng
|
||||
group: ntopng
|
||||
- name: create directories
|
||||
become: yes
|
||||
file:
|
||||
path: "{{ items }}"
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
owner: ntopng
|
||||
group: ntopng
|
||||
@@ -39,7 +65,8 @@
|
||||
- /usr/share/ntopng
|
||||
- /etc/ntopng
|
||||
- name: copy files
|
||||
template:
|
||||
become: yes
|
||||
copy:
|
||||
src: "{{ item.src }}"
|
||||
dest: "{{ item.dest }}"
|
||||
owner: root
|
||||
@@ -52,9 +79,11 @@
|
||||
become: true
|
||||
systemd:
|
||||
daemon_reload: yes
|
||||
tags: test
|
||||
- name: start ntopng
|
||||
become: yes
|
||||
systemd:
|
||||
name: ntopng.service
|
||||
state: restarted
|
||||
enabled: yes
|
||||
tags: test
|
||||
|
||||
@@ -11,3 +11,4 @@ ntopng_dependency_packages:
|
||||
- libglib2.0-dev
|
||||
- redis
|
||||
- libmaxminddb-dev
|
||||
- libjson-c-dev
|
||||
|
||||
Reference in New Issue
Block a user