-
Notifications
You must be signed in to change notification settings - Fork 0
/
env_var.sh
51 lines (36 loc) · 1.08 KB
/
env_var.sh
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
39
40
41
42
43
44
45
46
47
48
49
50
#!/bin/bash
# User Directories
INSTALL_DIR=$HOME/install
DL_DIR=$HOME/download
SCRIPT_DIR=$HOME/scripts/DDoS-on-Database-Impact
mkdir -p $INSTALL_DIR
mkdir -p $DL_DIR
mkdir -p $SCRIPT_DIR
# git clone https://github.com/candiceT233/DDoS-on-Database-Impact $SCRIPT_DIR
# database content -----------
MONGODB_PATH=$INSTALL_DIR/mongodb
REDIS_PATH=$INSTALL_DIR/redis
BEEGFS_PATH=/opt/beegfs
mkdir -p $MONGODB_PATH
mkdir -p $REDIS_PATH
mkdir -p $BEEGFS_PATH
# database directories -----------
MONGODB_DATA=/data/mongodb
BEEGFS_DATA=/data/beegfs
MONGODB_CLUSTER=/mnt/mongodb
BEEGFS_CLUSTER=/mnt/beegfs
MONGODB_LOGS=$MONGODB_CLUSTER/logs
BEEGFS_LOGS=$BEEGFS_CLUSTER/logs
sudo mkdir -p $MONGODB_DATA
sudo mkdir -p $BEEGFS_DATA
sudo mkdir -p $MONGODB_CLUSTER
sudo mkdir -p $BEEGFS_CLUSTER
# sudo mkdir -p $MONGODB_LOGS
sudo mkdir -p $REDIS_LOGS
sudo mkdir -p $BEEGFS_LOGS
sudo chown $USER:$USER $MONGODB_DATA
sudo chown $USER:$USER $BEEGFS_DATA
sudo chown $USER:$USER $MONGODB_CLUSTER
sudo chown $USER:$USER $BEEGFS_CLUSTER
# sudo chown $USER:$USER $MONGODB_LOGS
sudo chown $USER:$USER $BEEGFS_LOGS