Aklımda Kalası Kelimeler

* давайте работать вместе
* Zarf ve Mazruf, Zerafet(xHoyratlık) ile aynı kökten(za-ra-fe) gelir
* Bedesten
* Suç subuta ermiştir - Suç sabit olmuştur
Apache etiketine sahip kayıtlar gösteriliyor. Tüm kayıtları göster
Apache etiketine sahip kayıtlar gösteriliyor. Tüm kayıtları göster

14 Ocak 2015 Çarşamba

Redmine, Git, GitLab ve OTRS entegrasyonunu CentOS üstüne kurarken

YUM komutları

Ref: http://yum.baseurl.org/wiki/YumCommands
Ben yum install ruby dediğimde kurulacak ruby versiyonunu önceden görmek istedim.Bunun için yum info ruby demem gerekiyormuş.
Centos'a MYSQL kurulumunda:
www.rackspace.com/knowledge_center/article/installing-mysql-server-on-centos

Mysql içinde işlemler yapabilmek için:
http://www.cyberciti.biz/faq/mysql-command-to-show-list-of-databases-on-server/

charlock_holmes kurulumunda gcc++ hatasını gidermek için aşağıdaki komutu kullanın(http://superuser.com/a/590810):
yum install gcc-c++

Gitlab ile ilişkili bundle kurulumlarında mysql.h hatasını gidermek için(http://stackoverflow.com/a/10968675/104085):
yum install mysql-devel


Apache kurarken:
https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-centos-6

BASH, SH, KSH gibi shell'lerin tablosu
http://www.unix.com/answers-to-frequently-asked-questions/12274-difference-between-ksh-bash-different-shells.html
/bin/bash
       The bash executable
/etc/profile
       The systemwide initialization file, executed for login shells
~/.bash_profile
       The personal initialization file, executed for login shells
~/.bashrc
       The individual per-interactive-shell startup file
~/.bash_logout
       The individual login shell cleanup file, executed when a login shell exits
~/.inputrc
       Individual readline initialization file


MYSQL kurulumu

sudo yum install mysql-server
sudo /sbin/service mysqld start


Ruby yükleme zamanı. bash: gem: command not found

Ref: http://sharadchhetri.com/2014/01/12/how-to-easily-install-ruby-2-1-0-in-centos-and-rhel/
Önce /etc/profile.d/ dizinine gidelim ve ls ile rvm.sh var mı bakalım.
Yoksa:
[root@localhost profile.d]# curl -L get.rvm.io | bash -s stable
Tekrar ls ile baktığımızda ruby kurmayı kolaylaştıran rvm.sh script dosyasını göreceğiz. Eğer ssl keyi yüklemede sorun varsa
[root@localhost profile.d]# curl -sSL https://rvm.io/mpapis.asc | gpg2 --import
kullanarak ssl sertifikasını centos içine yükleyebilirsiniz. Yabancılık çekmeyin diye sertifika aşağıdaki gibidir.
[root@localhost Downloads]# curl -sSL https://rvm.io/mpapis.asc 
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v2

mQINBFRQA8EBEADrLHxW4807EJMzDjhrR5+FRy5/3616nyLlbWFTLnS1/i514L7Z
LVzbho4eZWjErRWqT1mr+E7dr/c8Ei5J8kUMqm5MoSkCoc5Y7Gp0jKhfDF4Megpd
X2ZKw7VG+4GZU9gxbm+6ymHeDAFRfQjUoHzCZsdsgnhi1C58kMoY39dFidlk24AG
E7y8WEg42yzSyJFjK5+qdGuKTBK4UmYM3uxHbxZgBLZ1PQ9DhsToauTqQSJEFzC+
r4qQeO6CeZAUEhgCt3HnmKE8hdARQelNRICrQc/Gpd3c3Wcpi3zj61cRqTCDBtNJ
h66bN+b6MilfT1S+9YMqLACXIWRcXPPUUWanmleguzGfngRjr/qf2PF6g2HYsp40
4M3CE0JX5O5iD4A81b5duuhIzZhJu1LFyn0uPX/zHlEwo36cQF3ElbsKyX6woXpx
hbHf67y6oQdSivhJvshJamRHxgi+bU6kkiiY0E8L5/8h309TVpd0wXfYfMPeE+V6
GsLjbxlU2bYrVxocREZpjCzqKBCmbZZxAd9eQPl8dYAs7kpxh8v3N9PEs0TRH2rh
KYjhKE++G/XuFOc6lm2gE5SnmwcDdJlIQm8YhW2LF/tTmQjAnxu4ILeWHwufhubv
BWn2UkdkGitrKEUmk9z24BMRKdPy0aALblvLCtri+2mf7ZaP9Stkdr/7yQARAQAB
tC1NaWNoYWwgUGFwaXMgKFJWTSBzaWduaW5nKSA8bXBhcGlzQGdtYWlsLmNvbT6J
AjkEEwECACMFAlRQA8ECGwMHCwkIBwMCAQYVCAIJCgsEFgIDAQIeAQIXgAAKCRA4
BLuC053A43HpD/9jf4DoYEu4adwJXJFSlUZMLZc7yNKwa2zsgBLZAzHuXc1lDDaJ
H+1hp7huxlq65EwmBJ5I8NgndBf42C0AYDXVVTQp6EW4tfnaW7zZgOcKZYp8Gu2G
HFIUPX28hm6VFJZCTo66yMVq+2a8GHhN/KgPbCd+eKIAzMWK859IYQgpXXqPgB3V
ERTGO34pBbz5GZ3BuYZvHo6Dp7Nb1RTaRdqCWXGabWz23+Gdni3K6ohNF87io7EK
SNcyzn81qG5oiYNwDMXt8T8nIIagUk7accQ6fw75FpFbZaR+nbOD7v88us40f6K9
WYV6qsOKAXygeTT63jLLLcLqe/uKRmKCO8fitIav8MHEtNOeQeQkG0O9YUCRpZvh
PlUbOhFO6iShs/AqPxIel33A65LjRpcxYNzbdgfnmdf5KEd3Uc8yafDIdSYrsSsS
...
pUSXUPl2O7qTbPAstIPT0+PstzNxcsgEzmroB7M7tTgKug==
=czPa
-----END PGP PUBLIC KEY BLOCK-----
Bu sertifikayı içeri alma işine bakalım:
[root@localhost Downloads]# curl -sSL https://rvm.io/mpapis.asc | gpg2 --import
gpg: keyring `/root/.gnupg/secring.gpg' created
gpg: /root/.gnupg/trustdb.gpg: trustdb created
gpg: key D39DC0E3: public key "Michal Papis (RVM signing) " imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
[root@localhost Downloads]# 
rvm Yüklememiz tamamlanmış mı diye kontrol etmek için which rvm diyelim ve eğer aşağıdaki gibiyse bu iş tamamdır demek:
[root@localhost ~]# which rvm
/usr/local/rvm/bin/rvm
[root@localhost ~]# 
Şimdi rvm'nin gerekliliklerini yüklemesi için şunu çalıştıralım:
[root@localhost ~]# rvm requirements

Bende yüklü olmadığını tespit ettiklerini yükledi ve şu sonuç çıktı:
Checking requirements for centos.
Installing requirements for centos.
Installing required packages: libyaml-devel, readline-devel, zlib-devel, libffi-devel, openssl-devel, sqlite-devel............
Requirements installation successful.

Şimdi ruby 2.1.0 sürümünü yüklemek için şunu çalıştıralım:
[root@localhost ~]# rvm install 2.1.0

Bendeki sonucu:
[root@localhost ~]# rvm install 2.1.0
Searching for binary rubies, this might take some time.
Found remote file https://rvm_io.global.ssl.fastly.net/binaries/centos/6/x86_64/ruby-2.1.0.tar.bz2
Checking requirements for centos.
Requirements installation successful.
ruby-2.1.0 - #configure
ruby-2.1.0 - #download
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 20.1M  100 20.1M    0     0   805k      0  0:00:25  0:00:25 --:--:-- 1129k
No checksum for downloaded archive, recording checksum in user configuration.
ruby-2.1.0 - #validate archive
ruby-2.1.0 - #extract
ruby-2.1.0 - #validate binary
ruby-2.1.0 - #setup
ruby-2.1.0 - #gemset created /usr/local/rvm/gems/ruby-2.1.0@global
ruby-2.1.0 - #importing gemset /usr/local/rvm/gemsets/global.gems................................................
ruby-2.1.0 - #generating global wrappers........
ruby-2.1.0 - #gemset created /usr/local/rvm/gems/ruby-2.1.0
ruby-2.1.0 - #importing gemsetfile /usr/local/rvm/gemsets/default.gems evaluated to empty gem list
ruby-2.1.0 - #generating default wrappers........
[root@localhost ~]# 

Tüm sistemde varsayılan olarak kullanılsın diye:
[root@localhost ~]#  rvm use 2.1.0 --default
Using /usr/local/rvm/gems/ruby-2.1.0
[root@localhost ~]# 

Ve son kontrolümüz, ruby'nin hangi versiyonu kuruldu olacak ve bize 2.1.0 diye dönecek:
[root@localhost ~]# ruby -v
ruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-linux]
[root@localhost ~]# 

Rubygem ne durumda peki. Bende 2.2 çıktı ama bu adrestekileri yapınca 2.4 oldu.

Bundler kurulması gerekecek. Neden mi? Çünkü bundler sayesinde projemizdeki Gemfile içeriğine göre ilgili paketlerin kurulmasını sağlamış oluruz. Detay için: http://bundler.io/
gem kurulumundan sonra çok kolay sadecegem install bundler çalıştırın:
[root@localhost redmine-2.6]# gem install bundler
Fetching: bundler-1.7.12.gem (100%)
Successfully installed bundler-1.7.12
Parsing documentation for bundler-1.7.12
Installing ri documentation for bundler-1.7.12
Done installing documentation for bundler after 7 seconds
1 gem installed
[root@localhost redmine-2.6]# 


Geany kurulumu

Bir çok ide var linux'te. 9 Tanesi için buraya bakabilirsiniz. Ben GENAY idesini seviyorum ama yum install geany işe yaramadı diye üzülmeyin bu adreste arkadaşın teki rpm paketini halletmiş. İndirin, çalıştırın ve gerisi paket yönetim sisteminize bırakın. Nasıl yapılacağını buradaki pdf dosyasından görebilirsiniz.


Redmine Kurulumu

Redmini indiriniz ve bir klasöre açınız. İçinde Gemfile bulacaksınız. Bu dosyanın içeriğinde kurulacak paketleri göreceksiniz. Bu paketler de sisteminizde neler yüklü, test, geliştirme, canlı sistem ihtiyaçlarına göre değişiyor.
Artık Gemfile içinde ne varsa bundler sayesinde test ve geliştirme olmayan kısımların kurulmalarını isteyelim:
bundle install --without development test

Sonuçta üretilen çıktıya bakarak neyin kurulup kurulamadığını ve hata mesajına göre ne yapamız gerektiğini inceleyelim. İşte çıktımız:
[root@localhost redmine-2.6]# bundle install --without development test
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and
installing your bundle as root will break this application for all non-root
users on this machine.
Please configure your config/database.yml first
Fetching gem metadata from https://rubygems.org/.........
Resolving dependencies...
Installing rake 10.4.2
Installing i18n 0.6.11
Installing multi_json 1.10.1
Installing activesupport 3.2.21
Installing builder 3.0.4
Installing activemodel 3.2.21
Installing erubis 2.7.0
Installing journey 1.0.4
Installing rack 1.4.5
Installing rack-cache 1.2
Installing rack-test 0.6.3
Installing hike 1.2.3
Installing tilt 1.4.1
Installing sprockets 2.2.3
Installing actionpack 3.2.21
Installing mime-types 1.25.1
Installing polyglot 0.3.5
Installing treetop 1.4.15
Installing mail 2.5.4
Installing actionmailer 3.2.21
Installing arel 3.0.3
Installing tzinfo 0.3.42
Installing activerecord 3.2.21
Installing activeresource 3.2.21
Using bundler 1.7.12
Installing coderay 1.1.0
Installing rack-ssl 1.3.4
Installing json 1.8.2
Installing rdoc 3.12.2
Installing thor 0.19.1
Installing railties 3.2.21
Installing jquery-rails 3.1.2
Installing net-ldap 0.3.1
Installing ruby-openid 2.3.0
Installing rack-openid 1.4.2
Installing rails 3.2.21
Installing rbpdf 1.18.4
Installing redcarpet 2.3.0
Installing request_store 1.0.5

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    /usr/local/rvm/rubies/ruby-2.1.0/bin/ruby extconf.rb 
checking for Ruby version >= 1.8.5... yes
checking for gcc... yes
checking for Magick-config... no
checking for pkg-config... yes
checking for ImageMagick version >= 6.4.9... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:
 --with-opt-dir
 --without-opt-dir
 --with-opt-include
 --without-opt-include=${opt-dir}/include
 --with-opt-lib
 --without-opt-lib=${opt-dir}/lib
 --with-make-prog
 --without-make-prog
 --srcdir=.
 --curdir
 --ruby=/usr/local/rvm/rubies/ruby-2.1.0/bin/ruby
extconf.rb:154:in ``': No such file or directory - convert (Errno::ENOENT)
 from extconf.rb:154:in `block in 
' from /usr/local/rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/mkmf.rb:918:in `block in checking_for' from /usr/local/rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/mkmf.rb:351:in `block (2 levels) in postpone' from /usr/local/rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/mkmf.rb:321:in `open' from /usr/local/rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/mkmf.rb:351:in `block in postpone' from /usr/local/rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/mkmf.rb:321:in `open' from /usr/local/rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/mkmf.rb:347:in `postpone' from /usr/local/rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/mkmf.rb:917:in `checking_for' from extconf.rb:151:in `
' extconf failed, exit code 1 Gem files will remain installed in /usr/local/rvm/gems/ruby-2.1.0/gems/rmagick-2.13.4 for inspection. Results logged to /usr/local/rvm/gems/ruby-2.1.0/extensions/x86_64-linux/2.1.0/rmagick-2.13.4/gem_make.out An error occurred while installing rmagick (2.13.4), and Bundler cannot continue. Make sure that `gem install rmagick -v '2.13.4'` succeeds before bundling. [root@localhost redmine-2.6]#

Hatanın olduğu yer rmagick yüklemesiydi. gem install rmagick -v '2.13.4' komutuyla hatayı bir kez daha görebiliriz. Biraz internet aramasıyla development sürümünün yüklenmesiyle bu sorun ortadan kalkıyormuş, yapalım. yum install ImageMagick-devel ile 6.5.4.7 sürümüyle sorunu giderebildiğimizi bundle install --without development test ile göreceğiz.
Bu kez komutumuzun çıktısı şöyle oldu:
[root@localhost redmine-2.6]# bundle install --without development test
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and installing your bundle as root will break this application for all non-root users on
this machine.
Please configure your config/database.yml first
Fetching gem metadata from https://rubygems.org/.........
Resolving dependencies...
Using rake 10.4.2
Using i18n 0.6.11
Using multi_json 1.10.1
Using activesupport 3.2.21
Using builder 3.0.4
Using activemodel 3.2.21
Using erubis 2.7.0
Using journey 1.0.4
Using rack 1.4.5
Using rack-cache 1.2
Using rack-test 0.6.3
Using hike 1.2.3
Using tilt 1.4.1
Using sprockets 2.2.3
Using actionpack 3.2.21
Using mime-types 1.25.1
Using polyglot 0.3.5
Using treetop 1.4.15
Using mail 2.5.4
Using actionmailer 3.2.21
Using arel 3.0.3
Using tzinfo 0.3.42
Using activerecord 3.2.21
Using activeresource 3.2.21
Using bundler 1.7.12
Using coderay 1.1.0
Using rack-ssl 1.3.4
Using json 1.8.2
Using rdoc 3.12.2
Using thor 0.19.1
Using railties 3.2.21
Using jquery-rails 3.1.2
Using net-ldap 0.3.1
Using ruby-openid 2.3.0
Using rack-openid 1.4.2
Using rails 3.2.21
Using rbpdf 1.18.4
Using redcarpet 2.3.0
Using request_store 1.0.5
Installing rmagick 2.13.4
Your bundle is complete!
Gems in the groups development and test were not installed.
Use `bundle show [gemname]` to see where a bundled gem is installed.
Post-install message from rmagick:
Please report any bugs. See https://github.com/gemhome/rmagick/compare/RMagick_2-13-2...master and https://github.com/rmagick/rmagick/issues/18
[root@localhost redmine-2.6]# 


Redmine Mysql ayarları

Mysql server çalışıyorsa mysql komut satırına terminal windowdan erişebiliriz ya da erişemeyiz:
[root@localhost redmine-2.6]# mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
[root@localhost redmine-2.6]# 
Yapacağımız şey centos servislerinde mysql sunucuyu başlatmak:
[root@localhost redmine-2.6]# service mysqld start
Starting mysqld:                                           [  OK  ]
[root@localhost redmine-2.6]# 

Ve tekrar:
[root@localhost redmine-2.6]# mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.1.73 Source distribution

Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> 

Şimdi önce database yaratıyoruz "utf8" karakter encodingiyle:
CREATE DATABASE redmine CHARACTER SET utf8;

DB işlemleri için `redmine` kullanıcısı oluşturalım ve yetkilendirelim:
CREATE USER 'redmine'@'localhost' IDENTIFIED BY 'şifre_ne_istiyorsanız';
GRANT ALL PRIVILEGES ON redmine.* TO 'redmine'@'localhost';


REDMINE Database AYARLARI

Sırada redmine uygulaması ayarlarından yarattığımız mysql kullanıcısı redmine'in bilgilerini database.yml içinde güncellemek. Önce redmine klasörüne (indirip extract ettiğimiz sıkıştırılmış dosyanın ardından oluşan klasöre) gidip config alt klasörü altındaki database.yml.example dosyasından bir kopya oluşturup(ben ilk örnek dosyaları tutmayı severim) adını database.yml olarak değiştirelim ve içindeki production ayarlarını:
production:
  adapter: mysql2
  database: redmine
  host: localhost
  username: redmine
  password: "redmine"
  encoding: uth8
olarak değiştirelim.


REDMINE session anahtarları için SECRET

rake generate_secret_tokenİle keyfe keder bir anahtar yaratalımki session id tahmin etme işini imkansıza taşıyalım. Rake nedir diye sorarsanız, kısaca otomatize işler yapabilmesi için Ruby'nin aracıdır.
[root@localhost redmine-2.6]# rake generate_secret_token
Could not find gem 'mysql2 (~> 0.3.11) ruby' in the gems available on this machine.
Run `bundle install` to install missing gems.
[root@localhost redmine-2.6]# 
O da ne! mysql2 yokmuş

O da ne! mysql2 yüklü değilmiş. Gem install ile yüklemeyi deneyelim:
[root@localhost redmine-2.6]# gem install mysql2
Fetching: mysql2-0.3.17.gem (100%)
Building native extensions.  This could take a while...
ERROR:  Error installing mysql2:
 ERROR: Failed to build gem native extension.

    /usr/local/rvm/rubies/ruby-2.1.0/bin/ruby extconf.rb
checking for ruby/thread.h... yes
checking for rb_thread_call_without_gvl() in ruby/thread.h... yes
checking for rb_thread_blocking_region()... yes
checking for rb_wait_for_single_fd()... yes
checking for rb_hash_dup()... yes
checking for rb_intern3()... yes
-----
Using mysql_config at /usr/bin/mysql_config
-----
checking for mysql.h... no
checking for mysql/mysql.h... no
-----
mysql.h is missing.  please check your installation of mysql and try again.
-----
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:
 --with-opt-dir
 --without-opt-dir
 --with-opt-include
 --without-opt-include=${opt-dir}/include
 --with-opt-lib
 --without-opt-lib=${opt-dir}/lib
 --with-make-prog
 --without-make-prog
 --srcdir=.
 --curdir
 --ruby=/usr/local/rvm/rubies/ruby-2.1.0/bin/ruby
 --with-mysql-dir
 --without-mysql-dir
 --with-mysql-include
 --without-mysql-include=${mysql-dir}/include
 --with-mysql-lib
 --without-mysql-lib=${mysql-dir}/lib
 --with-mysql-config
 --without-mysql-config

extconf failed, exit code 1

Gem files will remain installed in /usr/local/rvm/gems/ruby-2.1.0/gems/mysql2-0.3.17 for inspection.
Results logged to /usr/local/rvm/gems/ruby-2.1.0/extensions/x86_64-linux/2.1.0/mysql2-0.3.17/gem_make.out
[root@localhost redmine-2.6]# 

Hata korkutmasın sebebi `mysql.h is missing` cümlesinde yatıyor. Sanırım bunu da mysql-devel ile çözebiliriz.Nitekim aradık ve stackoverflow imdadımıza yetişti.
[root@localhost redmine-2.6]# yum install mysql-devel
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Install Process
Loading mirror speeds from cached hostfile
 * base: mirror.dgn.net.tr
 * extras: mirror.dgn.net.tr
 * updates: mirror.dgn.net.tr
Resolving Dependencies
--> Running transaction check
---> Package mysql-devel.x86_64 0:5.1.73-3.el6_5 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===================================================================================================
 Package                                Arch                              Version                                      Repository                       Size
===================================================================================================
Installing:
 mysql-devel                            x86_64                            5.1.73-3.el6_5                               base                            129 k

Transaction Summary
===================================================================================================
Install       1 Package(s)

Total download size: 129 k
Installed size: 388 k
Is this ok [y/N]: y
Downloading Packages:
mysql-devel-5.1.73-3.el6_5.x86_64.rpm                                                                                                 | 129 kB     00:00     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : mysql-devel-5.1.73-3.el6_5.x86_64                                                                                                         1/1 
  Verifying  : mysql-devel-5.1.73-3.el6_5.x86_64                                                                                                         1/1 

Installed:
  mysql-devel.x86_64 0:5.1.73-3.el6_5                                                                                                                        

Complete!
[root@localhost redmine-2.6]# 

Tekrar gem'den mysql2 yüklemeyi deneyelim:
[root@localhost redmine-2.6]# gem install mysql2
Building native extensions.  This could take a while...
Successfully installed mysql2-0.3.17
Parsing documentation for mysql2-0.3.17
Installing ri documentation for mysql2-0.3.17
Done installing documentation for mysql2 after 1 seconds
1 gem installed
[root@localhost redmine-2.6]#

Şimdi tekrar deneyelim Rakefile çalıştıralım ama generate_session_token anahtarıyla ve olduğunu görelim:
[root@localhost redmine-2.6]# rake generate_secret_token
[root@localhost redmine-2.6]# 

Tabloları ve ilişkileri oluşturmak için tekrar rake'e başvuralım.
[root@localhost redmine-2.6]# RAILS_ENV=production rake db:migrate
..... TONLA ÇIKTI ve
==  ChangeChangesetsCommentsLimit: migrating ==================================
-- change_column(:changesets, :comments, :text, {:limit=>16777216})
   -> 0.0649s
==  ChangeChangesetsCommentsLimit: migrated (0.0654s) =========================

==  AddPasswordChangedAtToUser: migrating =====================================
-- add_column(:users, :passwd_changed_on, :datetime)
   -> 0.0450s
==  AddPasswordChangedAtToUser: migrated (0.0452s) ============================

==  InsertBuiltinGroups: migrating ============================================
==  InsertBuiltinGroups: migrated (0.2701s) ===================================

[root@localhost redmine-2.6]# 


Başlangıç verilerini oluşturmak ve dilimizi(tr) seçmek için

[root@localhost redmine-2.6]# RAILS_ENV=production rake redmine:load_default_data

Select language: ar, az, bg, bs, ca, cs, da, de, el, en, en-GB, es, et, eu, fa, fi, fr, gl, he, hr, hu, id, it, ja, ko, lt, lv, mk, mn, nl, no, pl, pt, pt-BR, ro, ru, sk, sl, sq, sr, sr-YU, sv, th, tr, uk, vi, zh, zh-TW [en] tr
====================================
Default configuration data loaded.
[root@localhost redmine-2.6]# 


Ve çalıştıralım:

Başlayacak ve http taleplerini bekliyor olacak. Nerede mi? http://localhost:3000 adresinde.
[root@localhost redmine-2.6]# ruby script/rails server webrick -e production
=> Booting WEBrick
=> Rails 3.2.21 application starting in production on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2015-01-19 15:59:39] INFO  WEBrick 1.3.1
[2015-01-19 15:59:39] INFO  ruby 2.1.0 (2013-12-25) [x86_64-linux]
[2015-01-19 15:59:39] INFO  WEBrick::HTTPServer#start: pid=3547 port=3000


Sonuca birlikte bakalım:







REDMINE Yüklerken yaşadıklarımı ilk toparladığım başlık

http://www.redmine.org/projects/redmine/wiki/RedmineInstall

gem install json -v '1.8.2'
-- hata:
 mkmf.rb can't find header files for ruby at /usr/lib/ruby/ruby.h
-- çözüm:
 http://stackoverflow.com/questions/4304438/gem-install-failed-to-build-gem-native-extension-cant-find-header-files
 For those who may be confused by the accepted answer, as I was, you also need to have the ruby headers installed [ruby-devel].
-- çalışmadığı için:
 yum -y install gcc mysql-devel ruby-devel rubygems
-- sonra
 gem install json -v '1.8.2'

 gem install rmagick -v '2.13.3'
-- hata
 Can't install RMagick 0.0.0. Can't find Magick-config in /root/.rbenv/shims:
-- çözüm:
 yum install ImageMagick-devel

-- redmine yükle:
 bundle install --without development test

-- with Redmine 2.x:
 rake generate_secret_token

-- db için tablo v.s. oluşturma:
 RAILS_ENV=production rake db:migrate

-- Database default data set
 RAILS_ENV=production rake redmine:load_default_data

GITLAB'ın PORTUNU DEĞİŞTİRMEK

/var/opt/gitlab/nginx/conf klasöründe `gitlab-http.conf` dosyasını düzenleyerek aşağıdaki şekilde sunucu ayarını değiştirebilirsiniz:
server {
  listen *:82;
  server_name localhost;