环境:CentOS 6.4
下载地址:
准备工作:内网搭建一套邮件 服务器(此处使用的是Sendmail)
不足:我觉得不爽的是只能使用Apache作为WEB服务端
开始安装:
[root@Centos software]# chmod a+x bitnami-redmine-3.1.2-0-linux-x64-installer.run[root@Centos software]# ./bitnami-redmine-3.1.2-0-linux-x64-installer.runLanguage SelectionPlease select the installation language[1] English - English[2] Spanish - Espaol[3] Japanese - 日本語[4] Korean - [5] Simplified Chinese - 简体中文[6] Hebrew - [7] German - Deutsch[8] Romanian - Roman[9] Russian - РусскийPlease choose an option [1] : 5----------------------------------------------------------------------------欢迎来到 Bitnami Redmine Stack 安装程序。----------------------------------------------------------------------------选择您想要安装的组件,清除您不想安装的组件。当您准备继续时,点击前进。Subversion [Y/n] :yPhpMyAdmin [Y/n] :yRedmine : Y (Cannot be edited)Git [Y/n] :y上述选择是否正确? [Y/n]: y----------------------------------------------------------------------------安装文件夹请选择安装Bitnami Redmine Stack的文件夹选择一个文件夹 [/opt/redmine-3.1.2-0]: /usr/local/redmine/redmine-3.1.2-0----------------------------------------------------------------------------创建管理员帐户Bitnami Redmine Stack admin 用户创建您的真实姓名 [User Name]: yfshareEmail地址 [user@example.com]: yfshare@vip.qq.com登录 [user]: admin密码 :请确认密码 :----------------------------------------------------------------------------Web服务器端口输入Apache服务器捆绑监听的缺省端口。Apache Web 服务端口 [80]: 3000----------------------------------------------------------------------------缺省数据配置语言选择缺省数据配置语言:[1] 保加利亚语[2] 捷克语[3] 德语[4] 英语[5] 西班牙[6] 法语[7] 希伯来语[8] 意大利语[9] 日语[10] 朝鲜语[11] 荷兰语[12] 波兰语[13] 葡萄牙语[14] 葡萄牙语/巴西[15] 罗马尼亚语[16] 俄语[17] 塞尔维亚语[18] 瑞典语[19] 中文[20] 中文/繁体请选择选项 [19] : 19Do you want to configure mail support? [y/N]: y----------------------------------------------------------------------------配置SMTP设置This is required so your application can send notifications via email.默认电子邮件提供商:[1] GMail[2] 自定义请选择选项 [1] : 2----------------------------------------------------------------------------配置SMTP设置This data is stored in the application configuration files and may be visible toothers. For this reason, it is recommended that you do not use your personalaccount credentials.用户名 []: redmine密码 :重新输入 :SMTP 主机 []: 172.24.17.120SMTP端口 [587]: 25安全连接[1] 没有[2] SSL[3] TLS请选择选项 [3] : 1----------------------------------------------------------------------------安装程序已经准备好将 Bitnami Redmine Stack 安装到您的电脑。您确定要继续吗? [Y/n]: y----------------------------------------------------------------------------正在安装 Bitnami Redmine Stack 至您的电脑中,请稍候。 正在安装 0% ______________ 50% ______________ 100% #########################################----------------------------------------------------------------------------安装程序已经将 Bitnami Redmine Stack 安装于您的电脑中。启动Redmine应用程序。 [Y/n]: y信息: To access the Bitnami Redmine Stack, go tohttp://127.0.0.1:3000 from your browser.按 [Enter] 继续:[root@Centos software]#
Bitnami安装的mysql的root用户密码为:123456
下面来简单的修改Bitnami配置:
install_path=/usr/local/redmine/redmine-3.1.2-0
[root@Centos ~]# yum -y install ruby rubygems
修改邮件配置文件,把默认的smtp改成async_smtp
vim $install_path/apps/redmine/htdocs/config/configuration.yml[root@Centos config]# head -n 25 configuration.yml |tail delivery_method: :async_smtp async_smtp_settings: tls: false address: 172.24.17.120 port: 25 domain: example.net authentication: :login enable_starttls_auto: true user_name: redmine password: 123456[root@Centos config]#
[root@Centos redmine-3.1.2-0]# $install_path/mysql/bin/mysql -uroot -p123456
如果觉得敲一堆长路径不舒服的话,Bitnami提供了解决方法:
[root@Centos redmine-3.1.2-0]# source use_redminebash-4.1# ruby -vruby 2.0.0p647 (2015-08-18 revision 51631) [x86_64-linux]bash-4.1# gem install bundler
Bitnami mysql开启远程访问:
[root@Centos ~]# netstat -tunlp|grep 3306tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN 2179/mysqld.bin [root@Centos ~]# [root@Centos mysql]# head -n 12 $install_path/mysql/my.cnf[mysqladmin]user=root[mysqld]basedir=/usr/local/redmine/redmine-3.1.2-0/mysqldatadir=/usr/local/redmine/redmine-3.1.2-0/mysql/dataport=3306socket=/usr/local/redmine/redmine-3.1.2-0/mysql/tmp/mysql.socktmpdir=/usr/local/redmine/redmine-3.1.2-0/mysql/tmpmax_allowed_packet=16M#bind-address=127.0.0.1 //注销这个[root@Centos mysql]#
重启Bitnami mysql:
[root@Centos redmine-3.1.2-0]# $install_path/ctlscript.sh restart mysql/usr/local/redmine/redmine-3.1.2-0/mysql/scripts/ctl.sh : mysql stopped151120 15:40:44 mysqld_safe Logging to '/usr/local/redmine/redmine-3.1.2-0/mysql/data/mysqld.log'.151120 15:40:44 mysqld_safe Starting mysqld.bin daemon with databases from /usr/local/redmine/redmine-3.1.2-0/mysql/data/usr/local/redmine/redmine-3.1.2-0/mysql/scripts/ctl.sh : mysql started at port[root@Centos redmine-3.1.2-0]# netstat -tunlp|grep 3306tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 5694/mysqld.bin [root@Centos redmine-3.1.2-0]#[root@Centos ~]# netstat -tunlp|grep 3306tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 5694/mysqld.bin[root@Centos ~]#
修改数据库配置:
[root@Centos config]# pwd/usr/local/redmine/redmine-3.1.2-0/apps/redmine/htdocs/config[root@Centos config]# head -n 12 database.yml---# Default setup is given for MySQL with ruby1.9.# Examples for PostgreSQL, SQLite3 and SQL Server can be found at the end.# Line indentation must be 2 spaces (no tabs).production: adapter: mysql2 database: bitnami_redmine host: localhost username: bitnami password: df6baa03c6 encoding: utf8 socket: /usr/local/redmine/redmine-3.1.2-0/mysql/tmp/mysql.sock[root@Centos config]#
初始化新数据库:
[root@Centos ~]# PATH=/usr/local/redmine/redmine-3.1.2-0/ruby/bin:$PATH[root@Centos htdocs]# pwd/usr/local/redmine/redmine-3.1.2-0/apps/redmine/htdocs[root@Centos htdocs]# RAILS_ENV=production bundle exec rake db:migrate[root@Centos htdocs]# RAILS_ENV=production bundle exec rake redmine:load_default_data [root@Centos htdocs]# bundle exec rails server -b 172.24.17.120 webrick -e production -d[root@Centos htdocs]# netstat -anp|grep 3000tcp 0 0 172.24.17.120:3000 0.0.0.0:* LISTEN 6789/.ruby.bin [root@Centos htdocs]#
注:重启Bitnami服务
[root@Centos redmine-3.1.2-0]# ./ctlscript.sh -husage: ./ctlscript.sh help ./ctlscript.sh (start|stop|restart|status) ./ctlscript.sh (start|stop|restart|status) mysql ./ctlscript.sh (start|stop|restart|status) apache ./ctlscript.sh (start|stop|restart|status) subversionhelp - this screenstart - start the service(s)stop - stop the service(s)restart - restart or start the service(s)status - show the status of the service(s)[root@Centos redmine-3.1.2-0]#