做ppt的模板的网站有哪些内容,wordpress不能放大图片,遂宁移动网站建设,网站模板外包文章目录 官网安装文档#xff1a;命令步骤相关介绍GemRubyRailsBundler 安装 Redmine更新系统包列表和软件包#xff1a;安装必要的依赖#xff1a;安装 Ruby#xff1a;安装 bundler下载 Redmine 源代码#xff1a;安装 MySQL配置 Redmine 的数据库配置文件#xff1a;… 文章目录 官网安装文档命令步骤相关介绍GemRubyRailsBundler 安装 Redmine更新系统包列表和软件包安装必要的依赖安装 Ruby安装 bundler下载 Redmine 源代码安装 MySQL配置 Redmine 的数据库配置文件换源安装 Redmine 的依赖包如何修复在 ubuntu 上安装 rails 项目包时出现的权限错误 生成 Session 存储密钥创建数据库架构对象数据库默认数据集运行端口转发 官网安装文档
Wiki Guide https://www.redmine.org/projects/redmine/wiki/RedmineInstall
centos7.9安装Redmine 5.1
命令步骤
sudo apt update
sudo apt install mysql-server# ----------------------------------------------------------------
sudo mysql
ALTER USER rootlocalhost IDENTIFIED WITH mysql_native_password BY 123456;
FLUSH PRIVILEGES;use mysql;
update user set host% where userroot and hostlocalhost;
flush privileges;
grant all on *.* to root%;
flush privileges; mysql -u root -p
CREATE DATABASE redmine CHARACTER SET utf8mb4;
CREATE USER redminelocalhost IDENTIFIED BY 123456;
GRANT ALL PRIVILEGES ON redmine.* TO redminelocalhost;# ----------------------------------------------------------------
# Ruby环境
sudo apt install ruby-full
# 安装 RubyGems 编译或构建工具
sudo apt install -y build-essential libmysqlclient-dev imagemagick libmagickwand-dev# gem sources --remove https://rubygems.org/
gem sources --add https://gems.ruby-china.com/ --remove https://rubygems.org/
# gem sources --add https://mirrors.tuna.tsinghua.edu.cn/rubygems/ --remove https://rubygems.org/
# gem sources -lsudo gem install bundler
# sudo gem install rails
# sudo gem install rails -v 6.1.7.8bundle config mirror.https://rubygems.org https://gems.ruby-china.com
# bundle config mirror.https://rubygems.org https://mirrors.tuna.tsinghua.edu.cn/rubygems# ----------------------------------------------------------------
wget https://www.redmine.org/releases/redmine-5.1.3.tar.gz
tar -xf redmine-5.1.3.tar.gz
cd redmine-5.1.3/config/
cp database.yml.example database.yml
vim database.yml
cd ..# ----------------------------------------------------------------
sudo chown -R liuqz:liuqz /var/lib/gems/
sudo chown -R liuqz:liuqz /usr/local/bin
bundle config set --local without development test rmagick
bundle install# ----------------------------------------------------------------
bundle exec rake generate_secret_token
RAILS_ENVproduction bundle exec rake db:migrate
RAILS_ENVproduction bundle exec rake redmine:load_default_data
# zh
bundle exec rails server -e production -b 0.0.0.0
# bundle exec rails server -e production -b 0.0.0.0 -p 3002
# bundle exec rails server -e production -b 0.0.0.0 -p 3001
# nohup bundle exec rails server -e production -b 0.0.0.0 -p 3000 相关介绍
Gem
Linux Gem 是一个用于管理 Ruby 和 Rails 应用程序的包管理器它提供了一种简单的方式来安装、更新和管理 Ruby 和 Rails 应用程序所需的依赖项。
linux gem是什么
Ruby
Ruby一种简单快捷的面向对象面向对象程序设计脚本语言在20世纪90年代由日本人松本行弘(Yukihiro Matsumoto)开发遵守GPL协议和Ruby License。它的灵感与特性来自于 Perl、Smalltalk、Eiffel、Ada以及 Lisp 语言。由 Ruby 语言本身还发展出了JRubyJava平台、IronRuby.NET平台等其他平台的 Ruby 语言替代品。
Ruby 百科
Rails
Rails 是一个 Web 应用程序框架它包含根据 模型-视图-控制器 (MVC) 模式创建数据库支持的 Web 应用程序所需的一切。
Rails Github
Bundler Bundler 是一个用于管理 Ruby 项目依赖关系的工具。 它可以帮助开发人员确保项目的 Gem 包版本一致性避免由于不同开发环境导致的依赖冲突问题。Bundler 通过 Gemfile 文件定义项目的依赖关系使得依赖管理更加清晰和可维护。 Bundler 的最新功能包括
自动依赖解决确保安装和升级软件包时不会出现依赖错误。并行安装支持并行安装多个软件包加快安装速度。交互式界面提供交互式界面方便浏览、安装和卸载软件包。定制脚本支持允许用户编写定制脚本来执行特定的软件包操作。安全更新自动检查和应用软件包的安全更新确保系统安全
安装 Redmine
在Ubuntu 22.04上搭建Redmine的步骤如下
更新系统包列表和软件包
sudo apt update
sudo apt upgrade -y安装必要的依赖
sudo apt install -y build-essential libmysqlclient-dev imagemagick libmagickwand-dev# sudo apt-get install build-essential libssl-dev libreadline-dev zlib1g-dev安装 Ruby
sudo apt install -y ruby-full安装 bundler
sudo gem install bundler下载 Redmine 源代码
wget https://www.redmine.org/releases/redmine-5.1.3.tar.gz
wget https://www.redmine.org/releases/redmine-5.0.0.tar.gz
tar xzvf redmine-5.0.0.tar.gz
mv redmine-5.0.0 /var/www/redmine
cd /var/www/redmine安装 MySQL
ubuntu22安装mysql8.0
sudo apt install -y mysql-server mysql-client
# sudo systemctl enable mysql
# sudo systemctl start mysql
# sudo mysql_secure_installation# ----------------------------------------------------------------sudo mysql # 连接到 mysql 服务器 # -- 连接mysql服务器后需要执行两条命令
# -- 修改root登录通过密码验证并设置root用户密码
ALTER USER rootlocalhost IDENTIFIED WITH mysql_native_password BY 123456;
# -- 刷新权限表
FLUSH PRIVILEGES;use mysql;
# -- 更新root用户可以远程在任何机器上登录
update user set host% where userroot and hostlocalhost;
# -- 刷新权限表使配置生效。注意此时就要刷新一下权限表
flush privileges;
#-- all on 表示所有权限% 表示通配所有的host 可以远程访问。
grant all on *.* to root%;
#-- 再次刷新权限表
flush privileges;
exit# ----------------------------------------------------------------# 登录 MySQL
mysql -u root -p# 创建redmine数据库和用户
CREATE DATABASE redmine CHARACTER SET utf8mb4;
CREATE USER redminelocalhost IDENTIFIED BY 123456;
GRANT ALL PRIVILEGES ON redmine.* TO redminelocalhost;配置 Redmine 的数据库配置文件
cp config/database.yml.example config/database.yml
nano config/database.yml在文件中找到 production 部分并修改以下配置
production:adapter: mysql2database: redminehost: localhostusername: redminepassword: my_passwordencoding: utf8mb4换源
gem sources --remove https://rubygems.org/ gem sources --add https://gems.ruby-china.com/
gem sources --add https://mirrors.tuna.tsinghua.edu.cn/rubygems/# 查看一下修改
gem sources -l# 修改 bundle 配置
bundle config mirror.https://rubygems.org https://gems.ruby-china.com
# 或
bundle config mirror.https://rubygems.org https://mirrors.tuna.tsinghua.edu.cn/rubygems安装 Redmine 的依赖包
cd /var/www/redmine# 解决 bundler install 没有权限的问题
sudo chown -R liuqz:liuqz /var/lib/gems/
sudo chown -R liuqz:liuqz /usr/local/binbundle config set --local without development test rmagick
bundle install
# OR
bundle install --verbosereact-native工程执行bundler install挂死或超时问题 国内使用bundler install等命令时经常出现卡住或响应慢的现象替换为国内源即可解决问题
如何修复在 ubuntu 上安装 rails 项目包时出现的权限错误
chown -R l:l /usr/local/bin
# OR
bundle config path path
如何修复在 ubuntu 上安装 rails 项目包时出现的权限错误 使用 bundler 2.4.x 的 Bundler::PermissionError 写入错误
生成 Session 存储密钥
bundle exec rake generate_secret_token或者您可以将此秘密存储在 config/secrets.yml 中 http://guides.rubyonrails.org/upgrading_ruby_on_rails.html#config-secrets-yml
创建数据库架构对象
通过在应用程序根目录下运行以下命令来创建数据库结构
RAILS_ENVproduction bundle exec rake db:migrate数据库默认数据集
RAILS_ENVproduction bundle exec rake redmine:load_default_data
# 选择 zh 中文
# OR
RAILS_ENVproduction REDMINE_LANGfr bundle exec rake redmine:load_default_data运行
bundle exec rails server -e production
# OR
bundle exec rails server -e production -b 0.0.0.0
# OR
nohup bundle exec rails server -e production -b 0.0.0.0 -p 3000 端口转发
netstat -ano | findstr :3000
netsh interface portproxy show v4tov4 netsh interface portproxy add v4tov4 listenport3000 listenaddress0.0.0.0 connectport3000 connectaddress172.23.244.22 protocoltcpnetsh interface portproxy add v4tov4 listenport5244 listenaddress0.0.0.0 connectport5244 connectaddress172.19.221.125 protocoltcpvitualbox NAT模式多虚拟机网络配置
Windows 上为 WSL2 设置端口转发实现局域网访问 如何转发 wsl 的应用端口
防火墙 高级安全 Window Defender 防火墙入站规则开放 3000 端口 ☆