New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

今天部署过程中遇到的问题 #44

Open
hupinxiao opened this Issue Jan 25, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@hupinxiao

hupinxiao commented Jan 25, 2018

环境:Centos 7.4 x64 ,MySQL 5.7.21 Node.js 8.9.4

export NODE_ENV=development
cp config_default.js config_development.js
vim config_development.js
cp config_development.js config_development.js.bak
  • 建议装好Node.js 之后先去www目录执行 npm install
    1、初始化数据库init-db.js;
    SQL语句需要更改
    原:
    let cmd =mysql -h ${DB_HOST} -u root --password=${info.rootPassword} -e "CREATE DATABASE ${DATABASE};";
    其中--password=${info.rootPassword} 修改为: --password='${info.rootPassword}'
    不然密码会报错;
  • 2.数据库root密码中不能包含右斜杠 “\” 不然密码中的右斜杠会被删除掉然后报错;

  • 初始化CSS
    // 先去www目录执行 npm install 不然报错
    需要全局安装 gulp fab
    npm install --global gulp
    npm install --global fab
    然后修改release_sample.sh 注释掉里面的host
    sh release_sample.sh

  • 后台跑我用的是screen

supervisor nohup 都试过 不理想

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment