标签:yml 帐号 修改 表名 检查 rate 命令解释 step sse
系统安装教程参考:
https://jingyan.baidu.com/article/359911f5afb04257fe0306c7.html
安装ssh
sudo apt-get update
sudo apt-get install openssh-server #安装ssh(默认大部分已安装)
sudo ps -aux|grep ssh #有sshd,说明ssh服务已经启动,如果没有启动,
sudo service ssh start #启动ssh服务
安装vim
Sudo apt-get install vim
安装git
Sudo apt-get install git
Step1:安装依赖
[dev@ubuntu]# sudo apt-get update
[dev@ubuntu]# sudo apt-get install git curl build-essential zlib1g-dev libyaml-dev libssl-dev libmysqlclient-dev libpq-dev libsqlite3-dev libreadline-dev libffi6
Step2:安装ruby
# Install rbenv locally for the dev user
[dev@ubuntu]# git clone https://github.com/rbenv/rbenv.git ~/.rbenv
# Optional: Compile bash extensions
[dev@ubuntu]# cd ~/.rbenv && src/configure && make -C src
# Add rbenv to the shell‘s $PATH.
[dev@ubuntu]# echo ‘export PATH="$HOME/.rbenv/bin:$PATH"‘ >> ~/.bash_profile
# Run rbenv-init and follow the instructions to initialize rbenv on any shell
[dev@ubuntu]# ~/.rbenv/bin/rbenv init
# Source bash_profile
[dev@ubuntu]# source ~/.bash_profile
[dev@ubuntu]# git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
rbenv install 2.6.1
rbenv global 2.6.1
查看ruby版本
Ruby –v
安装bundler
Gem install bundler #默认安装2.0.1
参考文档:
https://github.com/opf/openproject/blob/stable/8/docs/installation/manual/README.md
[openproject@host] git clone https://github.com/OiNutter/nodenv.git ~/.nodenv
[openproject@host] echo ‘export PATH="$HOME/.nodenv/bin:$PATH"‘ >> ~/.profile
[openproject@host] echo ‘eval "$(nodenv init -)"‘ >> ~/.profile
[openproject@host] source ~/.profile
[openproject@host] git clone git://github.com/OiNutter/node-build.git ~/.nodenv/plugins/node-build
[openproject@host] nodenv install 8.12.0
[openproject@host] nodenv rehash
[openproject@host] nodenv global 8.12.0
Ruby –v
Bundle –v
Npm –v
Node -v
备注:ruby –v报错时,执行下:source ~/.profile
2.安装mysql
可以直接默认安装:
sudo apt-get install mysql-client mysql-server
因为Ubuntu是16.04的,所以会默认安装5.7版本。
设置mysql远程访问
1.首先编辑文件/etc/mysql/mysql.conf.d/mysqld.cnf:
注释 bind_address = 127.0.0.1
2.将root用户授权给所有连接:
grant all privileges on *.* to ‘root‘@‘%‘ identified by ‘111‘;
在mysql>这里输入:grant all on *.* to username@‘%‘ identified by ‘password;
第一行命令解释如下,*.*:第一个*代表数据库名;第二个*代表表名。这里的意思是所有数据库里的所有表都授权给用户。root:授予root账号。“%”:表示授权的用户IP可以指定,这里代表任意的IP地址都能访问MySQL数据库。“password”:分配账号对应的密码,这里密码自己替换成你的mysql root帐号密码。
#让权限立即生效
flush privileges;
3.重启mysql
service mysql restart
[dev@ubuntu]# git clone https://github.com/opf/openproject.git
[dev@ubuntu]# cd openproject
# Install gem dependencies
# If you get errors here, you‘re likely missing a development dependency for your distribution
[dev@ubuntu]# bundle install
# Install node_modules
[dev@ubuntu]# npm install
Gem包安装位置:
bundle show warden #查看安装的位置
/home/lmg/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/warden-1.2.8
[dev@debian]# vim config/database.yml
[dev@ubuntu]# export RAILS_ENV=development
[dev@ubuntu]# bundle exec rake db:create
[dev@ubuntu]# bundle exec rake db:migrate
[dev@ubuntu]# bundle exec rake db:seed
[dev@ubuntu]#bundle exec rake db:test:prepare #报错也不影响
[dev@ubuntu]# gem install foreman
[dev@ubuntu]# foreman start -f Procfile.dev
备注:通过手动模式前台页面会报错
打开ubuntu系统浏览器,输入:127.0.0.1:3000
项目默认访问地址时:127.0.0.0:3000
修改为电脑ip访问:
Step1:
修改foreman的配置文件:/Procfile.dev
Step2:修改angular服务ip
文件路径:Open-Project/frontend/package.json
备注:修改为本地ip后,在宿主机(window)可以访问json接口,访问项目还需要在虚拟机中运行
添加:"start":"ng serve --host 192.168.30.55 --port 4200",
原来:
修改为:
netstat -apn|grep 4200 #查看4200端口进程id
ubuntu16.04配置openproject开发环境步骤
标签:yml 帐号 修改 表名 检查 rate 命令解释 step sse
原文地址:https://www.cnblogs.com/lmg-jie/p/11223847.html