wget --no-check-certificate https://raw.githubusercontent.com/teddysun/across/master/l2tp.sh
chmod +x l2tp.sh
./l2tp.sh
# 安装python3.6可能使用的依赖
yum install -y openssl-devel bzip2-devel expat-devel gdbm-devel readline-devel sqlite-devel zlib zlib-devel
yum install -y readline-devel.x86_64 # (一定要安装这个包,不然升级完成后会发现删除退格键用不了)
wget https://www.python.org/ftp/python/3.6.3/Python-3.6.3.tgz
tar zxvf Python-3.6.3.tgz
cd Python-3.6.3
./configure --with-ssl --prefix=/usr/local/python3.6
make
make install
ln -s /usr/local/python3.6/bin/python3.6 /usr/bin/python3.6
ln -s /usr/local/python3/bin/pip3.6 /usr/bin/pip3
pip3 install flask
pip3 install gevent-websocket
mkdir myproject
cd myproject/
python3.6 -m venv venv
source venv/bin/activate
deactivate
lt_web/config/settings.py
filedata_dir = os.path.join(BASE_DIR,"data") #读取您的文件目录 (例如:/etc/系统目录下或者把配置文件放在本系统的data目录下然后以软链接的方式到相关服务的配置目录)
filedata_path=os.path.join(filedata_dir,"chap-secrets") # 配置文件
filedata_path_bak = os.path.join(filedata_dir,"chap-secrets.bak") # 备份配置文件 (修改的时候需要使用请一定要与配置文件名称一样)
userinfo_path = os.path.join(filedata_dir,"userinfo") # 用户文件
cd myproject/lt_web/;python3.6 manager.py /dev/null 2>&1 &
本系统中data目录下的userinfo下一行行添加账户与密码信息
登录效果:
首页展示效果:
添加效果: