环境:CentOS 6.4
下载地址:https://bitnami.com/stack/redmine/installer
准备工作:内网搭建一套邮件 服务器(此处使用的是Sendmail)
不足:我觉得不爽的是只能使用Apache作为WEB服务端
开始安装:
[[email protected] software]# chmod a+x bitnami-redmine-3.1.2-0-linux-x64-installer.run [[email protected] software]# ./bitnami-redmine-3.1.2-0-linux-x64-installer.run Language Selection Please 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] :y PhpMyAdmin [Y/n] :y Redmine : 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]: yfshare Email地址 [[email protected]]: [email protected] 登录 [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] : 19 Do 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 to others. For this reason, it is recommended that you do not use your personal account credentials. 用户名 []: redmine 密码 : 重新输入 : SMTP 主机 []: 172.24.17.120 SMTP端口 [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 to http://127.0.0.1:3000 from your browser. 按 [Enter] 继续: [[email protected] software]#
Bitnami安装的mysql的root用户密码为:123456
下面来简单的修改Bitnami配置:
install_path=/usr/local/redmine/redmine-3.1.2-0
[[email protected] ~]# yum -y install ruby rubygems
修改邮件配置文件,把默认的smtp改成async_smtp
vim $install_path/apps/redmine/htdocs/config/configuration.yml [[email protected] 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 [[email protected] config]#
[[email protected] redmine-3.1.2-0]# $install_path/mysql/bin/mysql -uroot -p123456
如果觉得敲一堆长路径不舒服的话,Bitnami提供了解决方法:
[[email protected] redmine-3.1.2-0]# source use_redmine bash-4.1# ruby -v ruby 2.0.0p647 (2015-08-18 revision 51631) [x86_64-linux] bash-4.1# gem install bundler
Bitnami mysql开启远程访问:
[[email protected] ~]# netstat -tunlp|grep 3306 tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN 2179/mysqld.bin [[email protected] ~]# [[email protected] mysql]# head -n 12 $install_path/mysql/my.cnf [mysqladmin] user=root [mysqld] basedir=/usr/local/redmine/redmine-3.1.2-0/mysql datadir=/usr/local/redmine/redmine-3.1.2-0/mysql/data port=3306 socket=/usr/local/redmine/redmine-3.1.2-0/mysql/tmp/mysql.sock tmpdir=/usr/local/redmine/redmine-3.1.2-0/mysql/tmp max_allowed_packet=16M #bind-address=127.0.0.1 //注销这个 [[email protected] mysql]#
重启Bitnami mysql:
[[email protected] redmine-3.1.2-0]# $install_path/ctlscript.sh restart mysql /usr/local/redmine/redmine-3.1.2-0/mysql/scripts/ctl.sh : mysql stopped 151120 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 [[email protected] redmine-3.1.2-0]# netstat -tunlp|grep 3306 tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 5694/mysqld.bin [[email protected] redmine-3.1.2-0]# [[email protected] ~]# netstat -tunlp|grep 3306 tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 5694/mysqld.bin [[email protected] ~]#
修改数据库配置:
[[email protected] config]# pwd /usr/local/redmine/redmine-3.1.2-0/apps/redmine/htdocs/config [[email protected] 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 [[email protected] config]#
初始化新数据库:
[[email protected] ~]# PATH=/usr/local/redmine/redmine-3.1.2-0/ruby/bin:$PATH [[email protected] htdocs]# pwd /usr/local/redmine/redmine-3.1.2-0/apps/redmine/htdocs [[email protected] htdocs]# RAILS_ENV=production bundle exec rake db:migrate [[email protected] htdocs]# RAILS_ENV=production bundle exec rake redmine:load_default_data [[email protected] htdocs]# bundle exec rails server -b 172.24.17.120 webrick -e production -d [[email protected] htdocs]# netstat -anp|grep 3000 tcp 0 0 172.24.17.120:3000 0.0.0.0:* LISTEN 6789/.ruby.bin [[email protected] htdocs]#
注:重启Bitnami服务
[[email protected] redmine-3.1.2-0]# ./ctlscript.sh -h usage: ./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) subversion help - this screen start - start the service(s) stop - stop the service(s) restart - restart or start the service(s) status - show the status of the service(s) [[email protected] redmine-3.1.2-0]#
时间: 2024-10-14 14:01:18