Spaces:
Sleeping
Sleeping
Initial Draft
Browse files- install.sh +58 -0
install.sh
ADDED
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#!/bin/bash
|
2 |
+
|
3 |
+
# -- Remove Proxy
|
4 |
+
unset http_proxy
|
5 |
+
unset https_proxy
|
6 |
+
|
7 |
+
# -- Install Libs
|
8 |
+
yum install -y zlib-devel bzip2 bzip2-devel readline-devel sqlite sqlite-devel openssl-devel tk-devel libffi-devel
|
9 |
+
yum install -y make gcc zlib-devel bzip2 bzip2-devel readline-devel sqlite sqlite-devel openssl-devel tk-devel libffi-devel
|
10 |
+
|
11 |
+
# -- Install IPTables
|
12 |
+
yum install iptables-services -y
|
13 |
+
systemctl start iptables
|
14 |
+
systemctl enable iptables
|
15 |
+
|
16 |
+
# -- Flushing iptables
|
17 |
+
iptables -F
|
18 |
+
|
19 |
+
# -- Allowing everthing
|
20 |
+
iptables -A FORWARD -j ACCEPT
|
21 |
+
iptables -A INPUT -j ACCEPT
|
22 |
+
iptables -A OUTPUT -j ACCEPT
|
23 |
+
|
24 |
+
# -- Saving
|
25 |
+
service iptables save
|
26 |
+
systemctl restart iptables
|
27 |
+
|
28 |
+
# -- Display Settings
|
29 |
+
iptables -L -n
|
30 |
+
|
31 |
+
# -- Add HTTP proxy
|
32 |
+
export http_proxy="http://company.com:80"
|
33 |
+
export https_proxy="http://company.com:80"
|
34 |
+
export no_proxy=localhost,127.0.0.1
|
35 |
+
|
36 |
+
# -- Install Python
|
37 |
+
wget https://www.python.org/ftp/python/3.11.4/Python-3.11.4.tgz
|
38 |
+
tar zxfv Python-3.11.4.tgz
|
39 |
+
rm Python-3.11.4.tgz
|
40 |
+
find ./Python-3.11.4/Python -type d | xargs chmod 0755
|
41 |
+
cd Python-3.11.4
|
42 |
+
./configure --prefix=$PWD/Python-3.11.4/Python
|
43 |
+
make
|
44 |
+
make install
|
45 |
+
|
46 |
+
# -- Create Virtual Env
|
47 |
+
mkdir -p -m777 demo
|
48 |
+
python -m venv demo/migration
|
49 |
+
source demo/migration/bin/activate
|
50 |
+
|
51 |
+
# -- Installing Dependencies
|
52 |
+
pip install --upgrade pip
|
53 |
+
pip install -r requirements.txt
|
54 |
+
|
55 |
+
nohup python voice.py > voice.log &
|
56 |
+
|
57 |
+
# -- Exit Virtual Env
|
58 |
+
deactivate
|