-
Notifications
You must be signed in to change notification settings - Fork 0
/
installationStep
112 lines (46 loc) · 2.26 KB
/
installationStep
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# coding:utf-8
###❤必读:
#环境:Centos 6/7(通过安装检查√), Linux应都可以安装。Windows 10(通过安装检查√),windows平台应可安装。
#Python 3,在下述安装中,使用Python3.6.5,其他Python3版本亦可。(换言之,如果安装了Python3,即可跳过Python3,安装,
但需执行pip3 install flask pymysql paramiko requests psutil,详情见安装手册)
#数据库采用Mysql,默认创建本地用户simpledrive,密码simpledrive,建立本地数据库simpledrive。
Windows 下只需下载安装好Python3,然后 cmd运行pip3 install flask pymysql paramiko requests psutil
然后从'https://codeload.github.com/TravellerXi/SimpleDrive/zip/master'下载源码,然后解压运行main.py即可。
以下是Linux环境下安装细节:
###安装Python3.6.5 ###如果已经安装好python3任意版本,可以跳过。
yum install -y wget unzip wget
mkdir -p /simpledrive
cd /simpledrive
wget https://www.python.org/ftp/python/3.6.5/Python-3.6.5.tgz
tar xzvf Python-3.6.5.tgz
rm -rf /simpledrive/Python-3.6.5/Modules/Setup.dist
cp -f /simpledrive/Setup.dist /simpledrive/Python-3.6.5/Modules/Setup.dist
cd /simpledrive/Python-3.6.5/
./configure --prefix=/usr/local/python
make && make install
ln -s /usr/local/python/bin/python3.6 /usr/bin/python3
ln -s /usr/local/python/bin/pip3.6 /usr/bin/pip3
yum install -y python-pip
pip3 install flask pymysql paramiko requests psutil
cd /simpledrive/ && rm -rf Python-3.6.5*
###开启防火墙指定端口
vi /etc/sysconfig/iptables
###在'-A INPUT'第一行加一句(ACCEPT一定要在REJECT语句之前):
-A INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT
####
service iptables restart
###下载解压代码
cd /simpledrive
wget https://codeload.github.com/TravellerXi/SimpleDrive/zip/master
unzip master
\cp -R -f SimpleDrive-master/* /simpledrive/
rm -rf SimpleDrive-master/ master
####配置启动mysql
service mysqld start
mysql -uroot < /simpledrive/static/simpledrive.sql
####启动程序
nohup python3 /simpledrive/main.py > /simpledrive/main.log 2>&1 &
#浏览器输入服务器IP即可访问管理后台。
###注意:
###默认管理员admin,密码admin
###请登入系统后尽快修改管理员密码。