LINUX下REDMINE安装笔记

更新时间:2023-07-12 17:45:23 阅读: 评论:0

一、安装ruby
下载ruby-1.8.7
www.ruby-lang/zh_cn/downloads
(wget ftp://ftp.ruby-lang/pub/ruby/1.8/ruby-1.8.)#tar xzvf ruby-1.8.
#cd ruby-1.8.7
#./configure--prefix=/usr/local/ruby
#make&&make install
设置环境变量
have用法vim/etc/profile
export PATH=/usr/local/ruby/bin:$PATH
source/etc/profile直接生效
二、安装rubygems
如果系统中已经存在rubygems,可以通过如下方法卸载:
#ruby-e'puts$:'//查找rubygems安装目录#cd/usr/local/ruby/lib/ruby/site_ruby/1.8/
#rm-rf ubygems.rb rubygems rubygems.rb
#which gem gem1.8//查找gem包的安装目录#rm-rf/usr/local/ruby/bin/gem
下载rubygems-1.3.5
rubyforge/frs/?group_id=126
(wget rubyforge/frs/download.php/60718/rubygems-1.)
#tar zxvf rubygems-1.3.5
#cd rubygems-1.3.5
#ruby tup.rb
#gem-v//查看版本
anxious注意:开始时把rubygems更新到最新版本1.6.2了,最后用rake创建表时失败,郁闷。
安装完rubygems后注意修改更新站点(前提要能上网),否则有的包可能无法正常安装。
#gem source-r gems.rubyforge删除以前的更新站点
#gem source-a rubygems添加现在的更新站点supreme怎么读
三、安装rails
#gem install rails-v=2.3.5
Fetching:rake-0.(100%)
Fetching:activesupport-2.(100%)
Fetching:activerecord-2.(100%)夏佩的奇妙冒险
japane freeFetching:rack-1.(100%)
Fetching:actionpack-2.(100%)
Fetching:actionmailer-2.(100%)
Fetching:activeresource-2.(100%)
Successfully installed rake-0.8.7
Successfully installed activesupport-2.3.5
Successfully installed activerecord-2.3.5
Successfully installed rack-1.0.1
Successfully installed actionpack-2.3.5
Successfully installed actionmailer-2.3.5
Successfully installed activeresource-2.3.5
Successfully installed rails-2.3.5
8gems installed
Installing ri documentation for rake-0.
Installing ri documentation for activesupport-2.
Installing ri documentation for activerecord-2.
Installing ri documentation for rack-1.
Installing ri documentation for actionpack-2.
Installing ri documentation for actionmailer-2.
cma认证Installing ri documentation for activeresource-2.
Installing ri documentation for rails-2.
Installing RDoc documentation for rake-0.
Installing RDoc documentation for activesupport-2.
Installing RDoc documentation for activerecord-2.
curiousInstalling RDoc documentation for rack-1.
Installing RDoc documentation for actionpack-2.
Installing RDoc documentation for actionmailer-2.
Installing RDoc documentation for activeresource-2. Installing RDoc documentation for rails-2.
四、安装i18n
#gem install i18n-v=0.4.2
Fetching:i18n-0.(100%)
Successfully installed i18n-0.4.2
1gem installed
Installing ri documentation for i18n-0.
Installing RDoc documentation for i18n-0.
五、安装ruby-mysql
#gem install ruby-mysql
Successfully installed ruby-mysql-2.9.4
1gem installed
Installing ri documentation for ruby-mysql-2.
Installing RDoc documentation for ruby-mysql-2.
补充mysql的安装:
创建mysql用户名,用户组
#groupadd mysql
#usradd-g mysql mysql
下载mysql源码sql/download_file/gz/5.0/mysql-5.0. #cd mysql-5.0.22
#./configure--prefix=/usr/local/mysql
--datadir=/mydata//数据库存放目录
--with-chart=utf8//使用UTF8格式
--with-extra-charts=complex//安装所有的扩展字符集
--enable-thread-safe-client//启用客户端安全线程
--with-big-tables//启用大表
--with-ssl//使用SSL加密
ficc--with-embedded-rver//编译成embedded MySQL library(libmysqld.a)
--enable-local-infile//允许从本地导入数据
--enable-asmbler//汇编x86的普通操作符,可以提高性能
-
-with-plugins=innoba//数据库插件
--with-plugins=partition//分表功能,将一个大表分割成多个小表
#make&&make install
初始化mysql数据库
#chown-R mysql:mysql/usr/local/mysql
#cp mysql-5.0.22/support-files/my-mediumf/etc/myf
#cd/usr/local/mysql
#bin/mysql_install_db--ur=mysql
#chown-R mysql:mysql/usr/local/mysql/var///把初始化的数据库目录给MySQL所有者#/usr/local/mysql/bin/mysqld_safe--ur=mysql&//启动MySQL
配置开机自动启动
#cp mysql-5.0.22/support-files/mysql.rver/etc/init.d/mysqld
#chmod755/etc/init.d/mysqld
#chkconfig--add mysqld
#chkconfig mysqld on
#rvice mysqld restart
补充mysql的配置:
配置myf
配置主要把安装的目录的那几项打开就行.
改动如下:
[client]
#password=your_password
port=3306
socket=/tmp/mysql3306.sock
#The Mysql rver
[Mysqld]
port=3306
socket=/tmp/mysql3306.sock
打开下面几项
innodb_data_home_dir=/usr/local/mysql/var/
innodb_data_file_path=ibdata1:10M:autoextend
innodb_log_group_home_dir=/usr/local/mysql/var/
innodb_log_arch_dir=/usr/local/mysql/var/
六、安装redmine
注意redmine的版本
Redmine version Supported Ruby
versions
Required Rails
version
Required Rack
version
current trunk ruby1.8.6,1.8.7Rails2.3.11Rack1.1.0 trunk
from r2887to r490
3
ruby1.8.6,1.8.7Rails2.3.5Rack1.0.1
trunk
from r2493to r288
6
ruby1.8.6,1.8.7Rails2.2.2
trunk before r2493ruby1.8.6,1.8.7Rails2.1.2
1.1.x ruby1.8.6,1.8.7Rails
2.
3.5Rack1.0.1 1.0.x ruby1.8.6,1.8.7Rails2.3.5Rack1.0.1 0.9.x ruby1.8.6,1.8.7Rails2.3.5Rack1.0.1 0.8.x ruby1.8.6,1.8.7Rails2.1.2
下载redmine-1.1.0
#mkdir/usr/local/redmine
#cd/usr/local/redmine
#svn co redmine.rubyforge/svn/branches/1.0-stable redmine-1.0
#cd/usr/local/redmine/redmine-1.0/config
#l.l
#l//数据库配置文件
production:
adapter:mysql
databa:redmine
host:localhost
urname:root//数据库访问用户名
password:"123456"//数据库访问密码
encoding:utf8
使用rake创建表
#rake db:migrate RAILS_ENV="production"
a.报错:uninitialized constant ActiveSupport::Dependencies::Mutex
解决方法:rails和rubygems版本不匹配,rubygems降到1.3.5试试
b.报错:A key is required to write a cookie containing the ssion data.U config.action_controller.ssion={:key=>"_myapp_ssion",:cret=>"some cret phra"}in config/environment.rb
解决方法:rake config/initializers/ssion_store.rb
c.报错:No such file or directory-/tmp/mysql.sock
解决方法:由于之前在mysql配置时myf配置了socket导致
vim l
在production栏目最后一行添加socket:/tmp/mysql3306.sock
注意:socket的“:"后面必须有个空格,再接"/tmp/mysql3306.sock"
auction
d.报错:
!!!The bundled mysql.rb driver has been removed from Rails2.2.Plea install the mysql gem and try again:gem install mysql.
rake aborted!
需要安装mysql适配器。gem install mysql
e.报错1:
Access denied for ur'mysql'@'localhost'(using password:YES)
解决办法:
#mysql
Welcome to the MySQL monitor.Commands end with;or\g.
Your MySQL connection id is2
Server version:5.0.22-log
Type'help;'or'\h'for help.Type'\c'to clear the buffer.
ug是什么mysql>
mysql>grant all privileges on*.*to'mysql'@'localhost'identified by'mysql'with grant option;
mysql>flush privileges;
mysql>exit;
e.报错2:
Access denied for ur'root'@'localhost'(using password:YES)
解决办法:
rvice mysqld stop
/usr/local/mysql/bin/mysqld_safe--ur=mysql--skip-grant-tables--skip-networking&
#mysql-u root mysql
mysql>UPDATE ur SET Password=PASSWORD('newpassword')where USER='root';
mysql>FLUSH PRIVILEGES;
mysql>quit
rvice mysqld restart
mysql-uroot–p
Enter password:
mysql>
f.报错:Unknown databa'redmine'
解决办法:创建数据库redmine
mysql>create databa redmine;
加载默认配置
#rake redmine:load_default_data RAILS_ENV="production"
这里会要求选择默认语言,选中文zh:
Select language:bg,ca,cs,da,de,en,es,fi,fr,he,hu,it,ja,ko,lt,nl,no,pl,pt,pt-br,ro, ru,sk,sr,sv,th,tr,uk,vn,zh,zh-tw[en]zh
这个默认设置只是在未登录时的界面语言,当用户登录后,默认语言还是英语,在My account里可以修改成其它语言。
启动WEB服务

本文发布于:2023-07-12 17:45:23,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/fanwen/fan/90/175290.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:安装   数据库   配置   目录   语言
相关文章
留言与评论(共有 0 条评论)
   
验证码:
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图