I decided to introduce redmine in the project to manage the development tasks and plans, as for the benefits of Redmine, ask Niang or brain repair.
Internet search, basically are old version of, 1.2.1 the most, I want new Ah, so I had to come.
This paperMain reference Redmine Wiki installation page:Http://www.redmine.org/projects/redmine/wiki/RedmineInstall , the problems encountered themselves resolved a bit. In short, it is not a translation, but a practice record.
Environment description
The server operating system is a R2 enterprise,64-bit version of Windows Server.
Rails 3.2.19,ruby is 1.9.3p545.
Redmine is version 2.5.2.
MySQL is 5.5.40 Win32 version.
ImageMagick for Imagemagick-6.8.9-8-q16-x86-dll.
Installation and Configuration
Redmine is based on the Ruby on Rails, I choose the latest version of 2.5.2, please go to the installation page in the Redmine wiki site for more details.
As of the time I wrote the blog (October 17, 2014), the latest version was 2.5.2.
Dependent selection
Let's start by explaining the environment and software that Redmine relies on.
Can run Ruby operating system can run Redmine, according to the company, I found a server 2008 computer.
Redmine relies on Ruby and Rails, such as:
Redmine 2.5 requires 3.2 or more versions of Rails and supports 1.8.7, 1.9.2, 1.9.3, 2.0.0, 2.1, and so on. Later I chose RailsInstaller-2.2.4 to install Ruby and rails, which contained the rails version of 3.2.19, and the ruby version was 1.9.3p545, which met Redmine's requirements.
Redmine supports MySQL as a database backend and requires a version of 5.0 or higher. I choose the Community Edition Server, the version number is 5.5.40.
ImageMagick is an optional dependency that exports project data such as a Gantt chart in Remine to a PNG picture. Other optional dependencies include version management tools such as SVN, which Redmine can integrate with the version management system. If you want to support the Open ID, you also need the Ruby OpenID Library, 2 or later.
OK, now it's time to start the installation process.
Railsinstaller Installation
The diagram is easy, using Railsinstaller to configure Rails and Ruby, which is a one-click installation, very simple.
The website is here: Railsinstaller. As shown, select the installation package under Windows to download:
The Railsinstaller version of this article was written in 2.2.4, with Ruby and Rails compiled with Mingw32, and MySQL to match 32 bits.
The installation process is a little bit crazy Next. The first is the Welcome page:
Apart, poke Next button, the License Agreement page appears:
Accept it, then poke the Next button, and let you choose the installation location with additional software and settings, such as:
The space needed is not big, let's choose. Click the Install button to start the installation. Such as:
Wait, still able to ...
See just OK:
Click Finish, Pro. And then, you see the command-line environment for Ruby and Rails:
So far, Ruby and Rails are ready to install.
MySQL Installation
MySQL's official website is as follows:
You can choose a version, more than 5. I downloaded mysql-5.5.40-win32.msi using the 5.5.40 x86 32bit MSI installer. Here is the installation Welcome screen:
I'm next, I'll just order next, dot it's not sin ... Look, the Protocol page:
Only by accepting, can you enjoy the pleasure of poking Next. Under Stamp, go to the Installation Type page:
I chose a full installation, and I didn't make much room. Re-poke Next to the Ready interface:
With your helpless fingers, click Install, then we can only look at the progress bar in a daze:
Why did, did you build it? It's coming out. Enterprise Edition interface:
Cancel and back are all grey, a little bit like the feeling of being forced to shop on a tour of the group ... Don't get it, poke Next with your breath and see what it can do.
Next, yes, the wood has a, back to the progress bar ha, originally only a propaganda, just, not so bad ha ...
The following is the installation completion interface:
MySQL will have to do a configuration after loading. You fancy that check box, which is selected by default. If the machine has no already configured MySQL, let him go, click on your favorite Finish button!
(If you have installed and set up the MySQL root account password, there may be a problem, you do not choose this "Launch the MySQL Instance Configuration Wizard" option, run to the Start menu or the directory under the installation of the bin directory, find MyS Qlinstanceconfig the point. The wizard will give you a chance to change the root password. )
My computer was originally installed by a colleague MySQL, I thought deleted ... As a result, the bunker thing is in the back, let's not mention it, see MySQL Configuration Wizard:
Next Party, poke it happily. Next, let's choose your configuration type:
I picked the standard configuration and went on to Next and arrived at the Service configuration:
As shown, I chose to install the Windows service and boot, and add the MySQL Bin directory to the system environment variable PATH so that it can be accessed anytime, anywhere.
Poke Next, then you should set up your account:
I chose Modify Security Settings and didn't want to bury the mines without creating anonymous users. A cheerful poke down next, I arrived at the ready page:
Can see it, very happy! Wait, just hug Execute. Notice that you start to perform your previous configuration:
I hum a ditty in my heart, waiting for it to go out of the jump Finish interface, who knows, was frightened! Please see:
Wow, the security settings failed! Either because the firewall settings caused the connection not on the 3306 port, or the previous installation of MySQL, uninstall did not clear the data directory, resulting in root password is still there.
What kind of me is it?
I think it might be a firewall, because colleagues say that MySQL has been deleted. So I put mysqld, MySQL and so on are added to the exception, and then to the inbound rule there set up a 3306-port rule, the cost of a half-day strength, and finally back Retry, hey, and play this!
I had to call my colleague and ask for the previous MySQL password ... And then, Skip. Go back to the bin directory, find Mysqlinstanceconfig to run, keep the hard-working configuration just now, to modify the account here, such as:
Look, look, it's different ...
This episode tells us that foreplay must be full, otherwise ...
This time to get down, smoothly saw the long-awaited Finish AH:
Database configuration OK, Kiss!
ImageMagick installation
Go here to download:
Choose imagemagick-6.8.9-8-q16-x86-dll.exe that download. then run it.
I decided not to install this thing, first run the Redmine to see, the back needs to be reconfigured.
Redmine Installation and Configuration
Redmine here to download: Http://www.redmine.org/projects/redmine/wiki/Download. Remember that is version 2.5.2 Oh.
After the ZIP package has been downloaded, unzip it to the C:\Sites directory, and it's ready to install!
The following is the configuration, the moment of the torsion of the coming, do not know whether to be happy or sad ...
Copy Libmysql
In order for Redmine to connect to MySQL normally, MySQL's C API library, or Libmysql.dll, is required. Over here:
Copy to Ruby's Bin directory:
Installing MYSQL2
Redmine needs mysql2 (MySQL C binding for Ruby) is said to improve performance, and you can install it in the command-line environment of Ruby and Rails by executing the following command:
Gem Install MYSQL2
But I made a mistake here.
obediently, the lack of thread.h, check the next, Ruby really does not have this header file. Network A blind search, time flies ah. I'm angry, I want to find a thread.h, I want to change the Ruby version!
Search and find, thread.h, the trail of ... Later, I came here:
Aha, yes, rubyinstaller.org, that's it, I picked up Ruby 2.0.0-p576 download, find the Ruby/thread.h file in the 7z package, copy it to C:\RailsInstaller\Ruby1.9.3\include Under the \ruby-1.9.1\ruby directory.
Is everything all right?
Execute gem install mysql2 again, wrong ...
Rattling, can't find mysqlclient this library! Depending on the error message, you need to specify the location of MySQL C connector.
You can use--with-mysql-dir to specify the location of MySQL, and then the gem installation relies on MySQL header files and library files at the specified location. It should be stated that there are no spaces in the path, such as program Files (x86), so I copied the include and Lib folders and placed them under the C:\MYSQL_SDK directory. So I execute the following command:
Gem install mysql2----with-mysql-dir= "C:/MYSQL_SDK"
Will you pass the customs this time? The heart is disturbed unceasingly ... The ups and downs of life come too fast, be careful of the liver can not bear ah ... You see, that's the way it goes:
Build Library
Refer to the image of my build library, which contains commands, as follows:
The basic steps are Jiangzi: Execute the MySQL 5.5 Comand line Client from the Start menu, enter the password, log in successfully, create a library redmine, create a user redmine, authorize its access to the Redmine library.
Configure Database connections
Copy the database.yml.example in the C:\Sites\redmine-2.5.2\config directory, change the name to Database.yml, then open it with a text editor, and the database connection is DATABASE.YML In the configuration.
How happy Ah, Redmine the default configuration is for MySQL. You see:
, we only need to modify production this configuration. Generally you just modify the password can (in fact, you can change username to redmine, password corresponding). For example, my configuration:
Production: adapter:mysql2 database:redmine host:localhost username:root Password: "Zc_ Redmine " Encoding:utf8
Installation dependencies
First install bundler, Redmine use it to maintain gems dependencies. Command:
Gem Install Bundler
Then to confirm that you are under the C:\Sites\redmine-2.5.2 directory, if not, use the CD command to go in, and then execute the following command to resolve the dependencies required by Redmine:
Bundle Install--without Development test
This will try to install MYSQL2 again, as we specify the use of MYSQL2 as the database adapter in production. If the discovery is already installed, use the local directly. You will see information such as the Using xxx, such as:
The installation process is long ... Hope to succeed, but! It's a premature death! See:
The original is Rmagick Ah, first skip count, execute this command:
Bundle install--without Development test Rmagick
My heart, waiting, always waiting ... Bingo! There is a picture of the truth:
Finally can continue to move forward, really a nose drops a tear of ...
Or to say two words, if you bundle install failed, you can follow the failure prompt to see which gem has a problem, and then perform the installation operation alone to find out where the problem is ... It's just a loop, and it's always done. Life needs positive energy, it will be fixed.
Generate session Store secret key
Since our Redmine version is 2.x, execute this command:
Rake Generate_secret_token
The above command generates a random Key, which Rails uses to encrypt the cookie ...
So simple a command, also can be wrong ... Look at the picture:
Version problem Ah, listen to people advised, so do:
Bundle EXEC Rake Generate_secret_token
The dawn is quiet here ... Execute this command, actually wood has any output, is it successful? And walking ...
Create a database structure
To create the database structure, use the following command:
Set Rails_env=productionbundle exec Rake db:migrate
Note is a piece of execution Ah, the back does not remind ... Also, because of my rake version issue, I had to add the bundle exec in front of each call to rake.
It creates a series of tables, sets permissions on the table, and creates an administrator account, which is the admin that no one knows in the sky, and the password is admin.
See the figure below to illustrate the OK la La la:
Database default data settings
Use the following command to insert the default configuration data into the database:
Set Rails_env=productionbundle exec Rake Redmine:load_default_data
A single piece of execution.
When the second one executes, we set the language. :
I chose zh, then enter. It will be OK soon:
It's another pass. We still have to go, because, Anta, never stop.
Test installation
Unconsciously, incredibly to this step! Is this the rhythm to end?
Talk less, hurry up, execute the following command:
Ruby Script/rails Server WEBRICK-E production
You are my eyes, take me to the transformation of the Four Seasons ... Just tell me, did you see this picture:
Congratulations, Redmine has been successfully launched!
See from the output information, it listens to 0.0.0.0:3000, so you can visit http://localhost:3000 to see the effect, also can access the actual IP address, such as http://192.168.1.30:3000. The effect is as follows:
Click Login in the top right corner to see the following page:
Remember our admin account, enter, click the Login button, go in, casually point, you may see this interface:
OK, so far, you can enjoy the pleasure of being under the authority of the administrator, you can define the role, define the workflow, create members ... Wow, that's really good. However, long march has just begun, the environment is ready, how to put the project management process in Redmine, but the road long its repair far ...
??
Windows installation Redmine 2.5.2 not complete guide