CentOS 6.7 x64 Apache/PHP/Mariadb环境安装Redmine3.2.1

系统安装按照1# CentOS 6.7 x64 最小化安装

Apache/PHP/MariaDB环境按照2# CentOS 6.7 x64 Apache/PHP/Mariadb环境搭建



创建数据库

[[email protected] ~]# mysql -u root -pmariadb.2016P <<EOF 2> /dev/null 
create database redmine default character set utf8;
create user ‘redmineuser‘@‘%‘ identified by ‘redmine.2016P‘;
grant all privileges on redmine.* to ‘redmineuser‘@‘%‘ identified by ‘redmine.2016P‘;
flush privileges;
EOF


下载、安装Ruby2.3/rubygems2.6.3

[[email protected] src]# wget https://cache.ruby-lang.org/pub/ruby/2.3/ruby-2.3.0.tar.gz
[[email protected] src]# wget http://production.cf.rubygems.org/rubygems/rubygems-2.6.3.tgz
[[email protected] src]# wget http://www.redmine.org/releases/redmine-3.2.1.tar.gz
[[email protected] src]# tar zxf ruby-2.3.0.tar.gz
[[email protected] ruby-2.3.0]# cd ruby-2.3.0
[[email protected] ruby-2.3.0]# ./configure --prefix=/usr/local/ruby && make && make install
[[email protected] ruby-2.3.0]# echo "export PATH=/usr/local/ruby/bin:$PATH" > /etc/profile.d/ruby.sh
[[email protected] ruby-2.3.0]# source /etc/profile.d/ruby.sh
[[email protected] ruby-2.3.0]# cd ..
[[email protected] src]# tar xf rubygems-2.6.3.tgz
[[email protected] src]# cd rubygems-2.6.3
[[email protected] rubygems-2.6.3]# ruby setup.rb

修改gem源

[[email protected] src]# gem source --remove https://rubygems.org/
[[email protected] src]# gem sources -a https://ruby.taobao.org/

配置Redmine

[[email protected] src]# tar zxf redmine-3.2.1.tar.gz
[[email protected] src]# mv redmine-3.2.1 /data/redmine
[[email protected] src]# sed -i "s/source ‘https:\/\/rubygems.org‘/source ‘https:\/\/ruby.taobao.org‘/" /data/redmine/Gemfile
[[email protected] src]# cp /data/redmine/config/configuration.yml.example /data/redmine/config/configuration.yml
[[email protected] src]# cp /data/redmine/public/dispatch.fcgi.example /data/redmine/public/dispatch.fcgi
[[email protected] src]# cp /data/redmine/public/htaccess.fcgi.example /data/redmine/public/htaccess.fcgi
[[email protected] src]# sed -i ‘s/#imagemagick_convert_command:/imagemagick_convert_command:\ \/usr\/local\/imagemagick\/bin\/convert/‘ /data/redmine/config/configuration.yml
[[email protected] src]# sed -i ‘s/attachments_storage_path:/attachments_storage_path\: \/data\/redmine\/files/‘ /data/redmine/config/configuration.yml
# 配置数据库
[[email protected] src]# cat > /data/redmine/config/database.yml << EOF
production:
  adapter: mysql2
  database: redmine
  host: localhost
  username: redmineuser
  password: "redmine.2016P"
  encoding: utf8
EOF
[[email protected] src]# chown -R www.www /data/redmine
[[email protected] src]# mkdir /data/wwwlogs/redmine
[[email protected] src]# chown -R www:www /data/wwwlogs/redmine/
[[email protected] src]# rm -rf /data/redmine/files/delete.me


配置Apache

[[email protected] src]# mv /usr/local/apache/conf/vhost/0.conf{,\.bak}
[[email protected] src]# cat > /usr/local/apache/conf/vhost/redmine.conf << EOF
<VirtualHost *:80>
    ServerName redmine.test.com
    ServerAdmin [email protected]
    DocumentRoot /data/redmine/public/
    ErrorLog /data/wwwlogs/redmine/error_redmine_apache.log
    CustomLog /data/wwwlogs/redmine/access_redmine_apache.log common
    <Directory /data/redmine/public/>
        Options +indexes
        Order allow,deny
        Allow from all
        Require all granted
    </Directory>
</VirtualHost>
EOF

安装gem依赖包

[[email protected] src]# gem install bundle
[[email protected] src]# gem install rbpdf-font
[[email protected] src]# gem install htmlentities -v=4.3.1
[[email protected] src]# gem install rmagick --verbose -- --with-opt-dir=/usr/local/imagemagick --with-opt-include=/usr/local/imagemagick/include --with-opt-lib=/usr/local/imagemagick/lib --ruby=/usr/local/ruby
[[email protected] src]# gem install mysql2 -- --with-mysql-include=/usr/local/mariadb/include/mysql/ --with-mysql-lib=/usr/local/mariadb/lib/ --with-mysql-dir=/usr/local/mariadb/
[[email protected] src]# gem install passenger -v=5.0.28
[[email protected] src]# cat >> /usr/local/apache/conf/httpd.conf << EOF
    LoadModule passenger_module /usr/local/ruby/lib/ruby/gems/2.3.0/gems/passenger-5.0.28/buildout/apache2/mod_passenger.so
    <IfModule mod_passenger.c>
      PassengerRoot /usr/local/ruby/lib/ruby/gems/2.3.0/gems/passenger-5.0.28
      PassengerDefaultRuby /usr/local/ruby/bin/ruby
    </IfModule>
EOF
[[email protected] src]# passenger-install-apache2-module --apxs2-path /usr/local/apache/bin/apxs --apr-config-path /usr/local/apache/bin/apr-1-config
# 此处按回车

安装Redmine

[[email protected] redmine]# cd /data/redmine
[[email protected] redmine]# bundle install --without development test postgresql sqlite
[[email protected] redmine]# sed -i "/inodot/{ n; s/‘inodot‘/#‘inodot‘/; }" /usr/local/ruby/lib/ruby/gems/2.3.0/gems/htmlentities-4.3.1/lib/htmlentities/mappings/expanded.rb
[[email protected] redmine]# mv /data/redmine/lib/tasks/testing.rake{,\.bak}
[[email protected] redmine]# rm -rf /data/redmine/Gemfile.lock
[[email protected] redmine]# gem install rbpdf-font
[[email protected] redmine]# bundle install --without development test postgresql sqlite
[[email protected] redmine]# bundle exec rake generate_secret_token
[[email protected] redmine]# bundle exec rake db:migrate RAILS_ENV=production
[[email protected] redmine]# RAILS_ENV=production rake redmine:load_default_data
# 此处输入"zh",然后按回车键

重启Apache

[[email protected] redmine]# service httpd restart


访问Redmine

浏览器访问服务器的80端口

时间: 2024-08-06 03:41:06

CentOS 6.7 x64 Apache/PHP/Mariadb环境安装Redmine3.2.1的相关文章

CentOS 6.7 x64 Apache/PHP/Mariadb环境搭建

系统安装参考CentOS 6.7 x64 最小化安装 使用修改过的OneinStack工具安装Apache2.4.18/PHP5.6.20/MariaDB10.1.13 工具下载:junlins_lnamp 修改内容: 增加apache-2.4.sh编译参数 [ --enable-dav --enable-dav-fs --enable-maintainer-mode ] 修改apps.conf和ImageMagick.sh内的ImageMagick_version版本为ImageMagick_

基于centOS7,快速搭建LAMP(Linux+Apache+MySQL/MariaDB)环境

详情见本人博客http://www.spencer.xin/wordpress/index.php/155/ 原文地址:http://blog.51cto.com/spencergra/2094005

php apache phpmyadmin mysql环境安装

文件下载: Apache: http://httpd.apache.org/download.cgi PHP,phpMyAdmin,mysql,API下载:http://pan.baidu.com/s/1o69XDEi 1.安装MySql: MySql是安装文件,点击Setup进行安装,可选default或者server only模式,设置的数据库root用户密码一定要记住. 2.Apache安装: 在D盘根目录添加Apache24文件夹,将下载的Apache服务器解压到文件夹 配置conf文件

CentOS 6.7 x64 Redmine与Subversion结合

系统安装按照1# CentOS 6.7 x64 最小化安装 Apache/PHP/MariaDB环境按照2# CentOS 6.7 x64 Apache/PHP/Mariadb环境搭建 Redmine安装按照3# CentOS 6.7 x64 Apache/PHP/Mariadb环境安装Redmine3.2.1 Subversion安装按照4# CentOS 6.7 x64 安装Subversion1.9.3(svn,http) 配置Redmine,使redmine能够使用svn命令 [[ema

4# CentOS 6.7 x64 安装Subversion1.9.3(svn,http)

系统安装按照1# CentOS 6.7 x64 最小化安装 Apache/PHP/MariaDB环境按照2# CentOS 6.7 x64 Apache/PHP/Mariadb环境搭建 更新Python # CentOS 6.7 x64 默认使用Python2.6, 我把它更新成了2.7 [[email protected] src]# wget http://python.org/ftp/python/2.7.3/Python-2.7.3.tar.bz2 [[email protected] 

centos6.4搭建apache+mysql+php环境

最近用php做的项目到了项目部署的时候,服务器为centos6.4系统,为了快捷部署,采用yum安装部署 大部分内容参考博客  http://blog.sina.com.cn/s/blog_c02ed6590101d2sl.html 一.安装 MySQL 首先来进行 MySQL 的安装.打开超级终端,输入: [[email protected] ~]# yum install mysql mysql-server 安装完毕,让 MySQL 能够随系统自动启动: [[email protected

centos下 apache+mysql+php的安装

一.安装 MySQL 首先来进行 MySQL 的安装.打开超级终端,输入: [[email protected] ~]# yum install mysql mysql-server 安装完毕,让 MySQL 能够随系统自动启动: [[email protected] ~]# chkconfig --levels 235 mysqld on [[email protected] ~]# /etc/init.d/mysqld start 设置 MySQL 数据 root 账户的密码: [[emai

基于Centos 6.5 配置分离式LAMP平台环境的一次扩展实现多PHP Apache和自建DNS来提升LAMP的负载

要达到的目的双Apache+PHP能正常的被DNS轮询解析到Apache 1 2 服务器能正常访问NFS上的静态资源PHP 1 2 服务器能正常访问NFS上的PHP资源Apache 1 2 和PHP 1 2服务器都能和MariaDB数据库服务器通信最终实现低价格提高网站负载的方案 由于这里使用了7台服务器所以下文区别服务器的方法请看命令行的[[email protected] ~]这个字段 服务器编号 服务器IP 服务器安装的服务 服务器系统 LookBack163 172.16.41.163

CentOS 7搭建tengine+php+mariadb环境并安装discuz论坛

一.安装tengine+php+mariadb环境 1.配置网络 nmcli c del 'System eth0'  # 删除网络 nmcli c add con-name myeth0 ifname eth0 typeethernet ip4 172.16.10.133/24 gw4 172.16.10.254     #配置IP地址以及网关 nmcli c mod myeth0 ipv4.dns"223.5.5.5,223.6.6.6" #设置DNS服务器 systemctl d