You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
flyapps/README.md

100 lines
2.1 KiB

4 years ago
##### 从git上面下载源码
3 years ago
```shell
4 years ago
cd /data/
git clone https://github.com/nineaiyu/FlyApps
```
5 years ago
4 years ago
### FlyApp 服务器搭建 [python3 环境]
##### 搭建python env 环境
3 years ago
```shell
4 years ago
yum install python36 python36-devel redis mariadb-server mariadb-devel -y
python3 -m venv py3
source py3/bin/activate
```
###### 安装pip包
3 years ago
```shell
cd fir_ser/
pip install -U setuptools pip
4 years ago
pip install -r requirements.txt
```
###### 配置数据库
```
3 years ago
在 config.py 配置redis 和 mysql 数据库
5 years ago
```
4 years ago
###### 迁移数据库
3 years ago
```shell
4 years ago
#如果是mysql,需要做一下配置,如果是sqlite,需要升级sqlite
#记得根据配置创建数据库
#create database flyapp default character set utf8 COLLATE utf8_general_ci;
#grant all on flyapp.* to flyuser@'127.0.0.1' identified by 'flypwd00oo.1';
python manage.py makemigrations
python manage.py migrate
```
3 years ago
### FlyApp zsign ipa重签名工具安装
```shell
yum install openssl-devel -y
yum install gcc-c++ gcc -y
wget https://github.com/nineaiyu/zsign/archive/refs/tags/v1.1.2.tar.gz
tar xvf v1.1.2.tar.gz
cd zsign-1.1.2/
g++ *.cpp common/*.cpp -lcrypto -O3 -std=c++11 -o zsign
cp zsign /usr/bin/
```
4 years ago
### FlyApp web端搭建
###### npm编译环境
3 years ago
```shell
4 years ago
yum install npm
npm install -g n
3 years ago
n 12.13 # 安装12版本的node ,最新版本会有问题
5 years ago
npm install -g yarn
```
3 years ago
###### 编译web端和下载页
```shell
4 years ago
cd FlyApps/fir_client/
3 years ago
vim vue.config.js #修改api接口地址
# pro_base_env 正式环境信息
# dev_base_env 开发环境信息
4 years ago
yarn install
3 years ago
yarn build index # web打包
yarn build short # 下载也打包
5 years ago
```
4 years ago
###### web目录操作
3 years ago
```shell
4 years ago
# web目录: /www/wwwroot/fly.dvcloud.xin/
cd /www/wwwroot/fly.dvcloud.xin/
cp -a /data/FlyApps/fir_client/dist/* .
cp -a /data/FlyApps/fir_download/dist/* .
```
##### 更新sqllite
3 years ago
```shell
4 years ago
tar xvf sqlite-autoconf-3310100.tar.gz
cd sqlite-autoconf-3310100
./configure --prefix=/usr/local/sqlite
make -j4
make install
rm -rf /usr/bin/sqlite3
ln -s /usr/local/sqlite/bin/sqlite3 /usr/bin/sqlite3
ll /usr/bin/sqlite3
echo "/usr/local/sqlite/lib" > /etc/ld.so.conf.d/sqlite3.conf
ldconfig
```