File size: 1,360 Bytes
dfe785d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
51
52
53
54
55
56
57
58
#!/bin/bash

# -- Remove Proxy
unset http_proxy
unset https_proxy

# -- Install Libs
yum install -y zlib-devel bzip2 bzip2-devel readline-devel sqlite sqlite-devel openssl-devel tk-devel libffi-devel
yum install -y make gcc zlib-devel bzip2 bzip2-devel readline-devel sqlite sqlite-devel openssl-devel tk-devel libffi-devel

# -- Install IPTables
yum install iptables-services -y
systemctl start iptables
systemctl enable iptables

# -- Flushing iptables
iptables -F

# -- Allowing everthing
iptables -A FORWARD -j ACCEPT
iptables -A INPUT -j ACCEPT
iptables -A OUTPUT -j ACCEPT

# -- Saving
service iptables save
systemctl restart iptables

# -- Display Settings
iptables -L -n

# -- Add HTTP proxy
export http_proxy="http://company.com:80"
export https_proxy="http://company.com:80"
export no_proxy=localhost,127.0.0.1

# -- Install Python
wget https://www.python.org/ftp/python/3.11.4/Python-3.11.4.tgz
tar zxfv Python-3.11.4.tgz
rm Python-3.11.4.tgz
find ./Python-3.11.4/Python -type d | xargs chmod 0755
cd Python-3.11.4
./configure --prefix=$PWD/Python-3.11.4/Python
make
make install

# -- Create Virtual Env
mkdir -p -m777 demo
python -m venv demo/migration
source demo/migration/bin/activate

# -- Installing Dependencies
pip install --upgrade pip
pip  install -r requirements.txt

nohup python voice.py > voice.log &

# -- Exit Virtual Env
deactivate