blob: 67f19408d300a99baa1130fd817684f3d0155dc9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
#in order to make things right, you should check the following comments to visualize and use properly the PSQL database.
#assuming that you installed psql prior
#https://www.postgresql.org/download/linux/debian/
#create the user
adduser atsuser
#use the password '123456'
#connect as postgres
su - postgres
#launch the psql terminal
psql
#create the user that we use in our scripts
CREATE USER atsuser WITH PASSWORD '123456';
#create our databse
CREATE DATABASE atsdb;
#grant the privileges to our user
GRANT ALL PRIVILEGES ON DATABASE atsdb to atsuser;
#quit
Ctrl+D
#log in as atsuser
su - atsuser
#launch psql with our user and our database
psql -d atsdb -U atsuser
#initialize the tables
\i /WHATEVER_PATH_YOUR_INIT_IS_IN/ATS-Project/website/init-bd.sql
#quick insert
insert into paquet(heure,protocole,ip_source,ip_destination,port_source,port_destination) values ('10:30:30.60','ICMP','192.168.0.1','1.1.1.1',10000,1);
|