Home Database Mysql Tutorial Redmine+SQL SERVER在Windows下的安装

Redmine+SQL SERVER在Windows下的安装

Jun 07, 2016 pm 04:20 PM
server windows Install

我们一直用Redmine做管理项目和系统缺陷跟踪.最近中心开发了微信平台,并引入了电话系统,都是SQL SERVER的,为了与这两个系统集成,算将Redmine改成SQL SERVER. 之前是用Bitnami一键安装的,没想到换个数据库的过程无比曲折.下面列出安装过程,希望对使用Redmine

   我们一直用Redmine做管理项目和系统缺陷跟踪.最近中心开发了微信平台,并引入了电话系统,都是SQL SERVER的,为了与这两个系统集成,算将Redmine改成SQL SERVER. 之前是用Bitnami一键安装的,没想到换个数据库的过程无比曲折.下面列出安装过程,希望对使用Redmine的朋友有帮助.

  Redmine版本:2.4.3

  操作系统:WIN2003 64位,win7 64位一样可以.

  SQL SERVER:2008 R2

  写在前面:不要试图在Bitnami的安装基础上去改.

  1. 官网下载源代码文件.[ ],解压到一个目录, 如D:Redmine,目录不要有空格,

  2. 下载ruby1.9.3.[ ],注意不要下载2.0版本,1.87版本不再更新了装它也没意思.安装它,安装到CRUBY 不要安装到有空格的目录,安装时记得勾选设置环境变量.

  3. 下载DevKIt,还在上一个页面,一定要注意下载的版本.安装它到一个目录,例如C:DEVKIT.注意目录不要有空格.然后用CMD定位至此文件夹下,执行以下语句:

  Ruby dk.rb init

  Ruby dk.rb install

  4. 下载ImageMagick[#windows],安装到一个没有空格的文件夹,如C:ImageMagic.添加环境变量CPATH,值为C:ImageMagickinclude,再增加环境变量LIBRARY_PATH,值为: C:ImageMagicklib

  5. 下载mysql-connector-c-noinstall,可以百度一个下载.解压它到一个文件夹,如D:mysql. 将lib目录下的libmysql.dll拷到C:rubybin和C:rubylib下.两个目录都放上保险.

  6. 建立Redmine数据库.空库即可.

  7. 配置数据库文件.在D:Redmine configdatabase.yml,没有这个文件的话直接把database.yml.example文件重命名即可.打开这个文件,用#号注释掉或删除掉每一行,只剩下最后# SQLServer configuration example部分的行.取消这部分的注释(删除#号)注意不要多删除一个空格.然后在host处配置数据库地址,username和password处配置数据库的用户名和密码.注意冒号后一定要有一个空格(很奇怪的设计)

  8. 打开gemfile文件,增加一行

  gem 'mongrel','~> 1.2.0.pre2'

  9. 将CMD定位至Redmine所在目录,,如D:Redmine(下面所有的操作都在这个目录下操作),接下来安装mongrel,不安装它的话使用webrick会慢得让你无可忍受

  gem install mongrel --pre

  10. 再执行如下语句:

  gem install bundler

  11. 再执行如下语句安装bundle环境,它会根据配置文件安装所有必须的组件.这是最重要的一步.要注意的是,如果增加或删除了数据库配置文件内容(database.yml)要重新执行下面这句.

  bundle install --without development test rmagick

  如果执行这句报mysql2之类的错误,则执行

  gem install mysql –-‘--with-mysql-dir=”D:mysql”’

  如果报的是json或rails之类的组件安装错误,则手工安装之.(怎么安装?右击,标记,选择复制出提示安装失败的组件名称,执行gem install 组件名)

  然后重复执行第10步,直到安装成功为止.这一步是最痛苦,最麻烦的一步.

  12. 上面成功以后就已经安装好了redmine的基本环境了,成功了90%.接下来执行

  rake generate_secret_token

  13. 再执行下面这两句生成数据库结构

  set RAILS_ENV=production

  rake db:migrate

  14. 接下来加载默认数据.

  set RAILS_ENV=production

  rake redmine:load_default_data

  这里会提示选择语言,输入ZH选择中文即可.

  15. 最后是启动服务.

  ruby script/rails server mongrel -e production -d -p 80

  这里使用的80端口,如果要改用其它端口将80换成其它的即可.服务启动后不要关掉这个窗口.然后就可以通过浏览器访问了.

  安装这玩意断断续续几乎花了我一周时间.网上的许多指引都太老了,照着老版本的指引整了半天,结果发现根本不行,其实redmine本身已经把很多需要的东西都打包好了.另外,官方文档中未注明一些异常的处理.我在Bitnami试了两天,失败告终.在第10步试了两天,主要是mysql的问题.其它就是安装了ruby没有安装devkit,或者版本安装错误,或者目录中有空格(为什么不能识别目录中的空格?)

  安装一个小东西如此繁琐,真不知道linux用户是如何忍受.许多linuxer可能还为能折腾如此复杂的东西而自豪不已,”哈!我用了N条命令搞定XX啦!”

  Linux的程序易用性实在太差——不在于它的命令行界面——在于它的程序包依赖之乱.在开源背景下错综复杂的依赖,只要其中一个稍微有点问题就完全无法使用.比windows的DLL HELL不知道严重多少倍.我相信,如果是一个普通用户来用它,一定会自杀.

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

Repo: How To Revive Teammates
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to update the latest version of Bybit Exchange? Will there be any impact if it is not updated? How to update the latest version of Bybit Exchange? Will there be any impact if it is not updated? Feb 21, 2025 pm 10:54 PM

The way to update ByBit exchanges varies by platform and device: Mobile: Check for updates and install in the app store. Desktop Client: Check for updates in the Help menu and install automatically. Web page: You need to manually access the official website for updates. Failure to update the exchange can lead to security vulnerabilities, functional limitations, compatibility issues and reduced transaction execution efficiency.

deepseek web version entrance deepseek official website entrance deepseek web version entrance deepseek official website entrance Feb 19, 2025 pm 04:54 PM

DeepSeek is a powerful intelligent search and analysis tool that provides two access methods: web version and official website. The web version is convenient and efficient, and can be used without installation; the official website provides comprehensive product information, download resources and support services. Whether individuals or corporate users, they can easily obtain and analyze massive data through DeepSeek to improve work efficiency, assist decision-making and promote innovation.

Pi Node Teaching: What is a Pi Node? How to install and set up Pi Node? Pi Node Teaching: What is a Pi Node? How to install and set up Pi Node? Mar 05, 2025 pm 05:57 PM

Detailed explanation and installation guide for PiNetwork nodes This article will introduce the PiNetwork ecosystem in detail - Pi nodes, a key role in the PiNetwork ecosystem, and provide complete steps for installation and configuration. After the launch of the PiNetwork blockchain test network, Pi nodes have become an important part of many pioneers actively participating in the testing, preparing for the upcoming main network release. If you don’t know PiNetwork yet, please refer to what is Picoin? What is the price for listing? Pi usage, mining and security analysis. What is PiNetwork? The PiNetwork project started in 2019 and owns its exclusive cryptocurrency Pi Coin. The project aims to create a one that everyone can participate

How to install deepseek How to install deepseek Feb 19, 2025 pm 05:48 PM

There are many ways to install DeepSeek, including: compile from source (for experienced developers) using precompiled packages (for Windows users) using Docker containers (for most convenient, no need to worry about compatibility) No matter which method you choose, Please read the official documents carefully and prepare them fully to avoid unnecessary trouble.

Coinsuper exchange software channel official website entrance Coinsuper exchange software channel official website entrance Feb 21, 2025 pm 10:39 PM

The official website entrance of the Coinsuper Exchange: https://www.coinsuper.com. The client download channels are: Windows client, macOS client, and mobile (iOS/Android). Registration requires an email, mobile phone number and password, and you need to complete real-name authentication before you can trade. The platform provides a variety of digital asset transactions, including Bitcoin, Ethereum, etc., with the transaction fee rate of 0.1% for both orders and acceptors. Security safeguards include cold wallet storage, dual-factor verification, anti-money laundering and anti-terrorism financing measures, and with security public

Ouyi okx installation package is directly included Ouyi okx installation package is directly included Feb 21, 2025 pm 08:00 PM

Ouyi OKX, the world's leading digital asset exchange, has now launched an official installation package to provide a safe and convenient trading experience. The OKX installation package of Ouyi does not need to be accessed through a browser. It can directly install independent applications on the device, creating a stable and efficient trading platform for users. The installation process is simple and easy to understand. Users only need to download the latest version of the installation package and follow the prompts to complete the installation step by step.

BITGet official website installation (2025 beginner's guide) BITGet official website installation (2025 beginner's guide) Feb 21, 2025 pm 08:42 PM

BITGet is a cryptocurrency exchange that provides a variety of trading services including spot trading, contract trading and derivatives. Founded in 2018, the exchange is headquartered in Singapore and is committed to providing users with a safe and reliable trading platform. BITGet offers a variety of trading pairs, including BTC/USDT, ETH/USDT and XRP/USDT. Additionally, the exchange has a reputation for security and liquidity and offers a variety of features such as premium order types, leveraged trading and 24/7 customer support.

Get the gate.io installation package for free Get the gate.io installation package for free Feb 21, 2025 pm 08:21 PM

Gate.io is a popular cryptocurrency exchange that users can use by downloading its installation package and installing it on their devices. The steps to obtain the installation package are as follows: Visit the official website of Gate.io, click "Download", select the corresponding operating system (Windows, Mac or Linux), and download the installation package to your computer. It is recommended to temporarily disable antivirus software or firewall during installation to ensure smooth installation. After completion, the user needs to create a Gate.io account to start using it.

See all articles