yearning

Yearning

开发模式 手动部署,如有侵权,请联系我删除。

[inception](数据库的ddl,dml操作是通过他来审核的)
安装步骤:
yearning项目git下来后,进入以下目录,群主已经编译好了,直接启动就可以
cd /root/Yearning/install/inception/bin

新建配置文件
vim inc.cnf #根据需求来写
[inception]
general_log=1
general_log_file=inception.log
port=6669

socket=/tmp/inc.socket
character-set-client-handshake=0
character-set-server=utf8
inception_support_charset=utf8
inception_enable_nullable=OFF
inception_enable_foreign_key=OFF
inception_check_primary_key=1
inception_check_column_comment=1
inception_check_table_comment=1
inception_enable_blob_type=1
inception_check_column_default_value=1
inception_support_charset=utf8
inception_osc_on=OFF
inception_check_column_default_value=OFF
inception_check_column_comment=OFF
inception_check_table_comment=OFF
inception_enable_identifer_keyword=ON
inception_remote_backup_host = 127.0.0.1 #备份库地址
inception_remote_backup_port = 3306
inception_remote_system_user = root
inception_remote_system_password = 000000
inception_check_insert_field=OFF
inception_max_key_parts=6
inception_max_update_rows=100000
inception_max_char_length=25
inception_check_autoincrement_name=OFF
inception_check_column_default_value=OFF

启动Inception:
/root/Yearning/install/inception/bin/Inception --defaults-file=inc.cnf #后台启动可以
#测试是否启动成功,输出所有变量就是成功
mysql -uroot -h127.0.0.1 -P6669
inception get variables;

python3 自己装(我是python3.6)
wget https://www.python.org/ftp/python/3.6.1/Python-3.6.1.tgz
tar -zxvf Python-3.6.1.tgz
cd Python-3.6.1
./configure --prefix=/usr/local/python3.6

npm
yum install npm

node
npm install node

前端相关安装
npm install --global vue-cli
npm install -g webpack
npm install webpack webpack-cli -g
npm install --global vue-cli
webpack -v #查看下是否安装成功
vue -V #查看下是否安装成功

nginx 自己装(前端代理用)
yum install nginx

MySQL创建表
mysql -uroot -p你的密码

创建数据库:
create database Yearning default character set utf8mb4 collate utf8mb4_unicode_ci;

sql源文件位置:
cd /root/Yearning/install/yearning-docker-compose/init-sql

导入表结构:
mysql -u root -p Yearning < install.sql

前端
cd /root/Yearning/webpage/
npm install
npm install phantomjs-prebuilt@2.1.16 --ignore-scripts(上面如果有问题,执行这条就ok)

#编译静态文件,编译完有个dist目录 就是静态文件
npm run build

复制静态文件到 你的!nginx 目录下
cp -r dist/ /usr/share/nginx/html/

[Yearning]# ll /usr/share/nginx/html/
总用量 20
-rw-r–r--. 1 root root 3650 11月 22 12:00 404.html
-rw-r–r--. 1 root root 3693 11月 22 12:01 50x.html
drwxr-xr-x. 3 root root 36 11月 22 13:09 dist
-rw-r–r--. 1 root root 1104 11月 22 13:05 index.html
-rw-r–r--. 1 root root 368 3月 6 2018 nginx-logo.png
-rw-r–r--. 1 root root 2811 3月 6 2018 poweredby.png

#打开你的浏览器 输入你的地址看看有没有静态页面
192.168.2.2
说明:默认是80端口

后端
cd /root/Yearning/src
pip3 install -r requirements.txt
cp deploy.conf.template deploy.conf

cat deploy.conf //配置你的mysql地址
[mysql]
db = Yearning
address = 127.0.0.1
port = 3306
username = root
password = 000000

[host]
ipaddress = 192.168.2.2:80 #其实就是你的访问地址

启动
cd /root/Yearning/src
python3 manage.py runserver 0.0.0.0:8000

打开浏览器,输入网址,进入吧。
192.168.2.2:80

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值