рдирд╡реАрдирддрдо RedMine + Apache + nginx рд╕реНрдерд╛рдкрд┐рдд рдХрд░реЗрдВ

Redmine рд▓реЛрдЧреЛ



рдпрд╣рд╛рдБ RedMine рдХрд╛ рдПрдХ рд╕рдВрдХреНрд╖рд┐рдкреНрдд рд╕рд╛рд░рд╛рдВрд╢ рджрд┐рдпрд╛ рдЧрдпрд╛ рд╣реИ:





рдореЗрд░реЗ рд▓рд┐рдП рд╕рднреА рдореЙрдбреНрдпреВрд▓ рдХреЗ рдирд╡реАрдирддрдо рд╕рдВрд╕реНрдХрд░рдгреЛрдВ рдХреЛ рд╕реНрдерд╛рдкрд┐рдд рдХрд░рдирд╛ рдмрд╣реБрдд рдорд╣рддреНрд╡рдкреВрд░реНрдг рдерд╛, рдореБрдЭреЗ рдмрд╣реБрдд рд╕рд╛рд░реЗ рд╕реНрд░реЛрдд рдорд┐рд▓реЗ, рд▓реЗрдХрд┐рди рд▓рдЧрднрдЧ рд╕рднреА рдЦрд╛рдорд┐рдпреЛрдВ рдХреЗ рд╕рд╛рде, рдФрд░ рдЙрдиреНрд╣реЗрдВ рдПрдХ рдЕрд╕реБрд╡рд┐рдзрд╛рдЬрдирдХ рдХреЙрдиреНрдлрд╝рд┐рдЧрд░реЗрд╢рди рдорд┐рд▓рд╛ред

рдЗрд╕рд▓рд┐рдП рдореБрдЭреЗ рдЦреБрдж рдПрдХ рд╕рд╛рд░реНрд╡рднреМрдорд┐рдХ рдХреЙрдиреНрдлрд╝рд┐рдЧрд░реЗрд╢рди рдмрдирд╛рдирд╛ рдкрдбрд╝рд╛, рдЬреЛ рдХрд┐ рдХрд┐рд╕реА рднреА рдореБрдЦреНрдп рд╡реЗрдм рд╕рд░реНрд╡рд░ рдХреЗ рддрд╣рдд рдХрд╛рдо рдХрд░ рд╕рдХреЗред



рд╣рдо CentOS 6.5 x86_64 рдкрд░ рд░рдЦрддреЗ рд╣реИрдВ:

[root@Red ~]#uname -a Linux Red 2.6.32-431.17.1.el6.x86_64 #1 SMP Wed May 7 23:32:49 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux [root@Red ~]# lsb_release -a LSB Version::base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch Distributor ID:CentOS Description:CentOS release 6.5 (Final) Release:6.5 Codename:Final [root@Red ~]#
      
      







рд╕реБрдирд┐рд╢реНрдЪрд┐рдд рдХрд░реЗрдВ рдХрд┐ рд╕рднреА рдкреИрдХреЗрдЬ рдирдП рд╣реИрдВ:

 [root@Red ~]# yum update Loaded plugins: downloadonly, fastestmirror, security, verify Loading mirror speeds from cached hostfile Setting up Update Process No Packages marked for Update [root@Red ~]#
      
      







рдПрдкреЗрд▓ рд░рд┐рдкреЛрдЬрд┐рдЯрд░реА рдЬреЛрдбрд╝реЗрдВ

 [root@Red ~]# rpm -Uvh http://ftp.jaist.ac.jp/pub/Linux/Fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm
      
      







рддреБрд░рдВрдд рдЙрди рд╕рднреА рдкреИрдХреЗрдЬреЛрдВ рдХреЛ рд╕реНрдерд╛рдкрд┐рдд рдХрд░реЗрдВ рдЬрд┐рдирдХреА рд╣рдореЗрдВ рдЬрд╝рд░реВрд░рдд рд╣реИ, рдФрд░ рд░рд╛рд╕реНрддреЗ рдореЗрдВ рдирд╣реАрдВ ...

 [root@Red ~]# yum groupinstall "Development Tools" [root@Red ~]# yum install zlib-devel openssl-devel ncurses-devel gdbm-devel openssl-devel zlib-devel readline-devel libyaml-devel curl-devel httpd-devel apr-devel apr-util-devel mysql-devel libffi-devel rpm-build ttmkfdir cabextract
      
      







рдкреИрдХреЗрдЬ рдХреА рдЕрдиреБрдХреВрд▓рддрд╛ рдХреЛ рджреЗрдЦрдиреЗ рдФрд░ рдЬрд╛рдВрдЪрдиреЗ рдХреЗ рдмрд╛рдж, рдЖрд╡рд╢реНрдпрдХ рд╕реНрд░реЛрддреЛрдВ рдХреЛ рдбрд╛рдЙрдирд▓реЛрдб рдХрд░реЗрдВ:

 [root@Red ~]# cd /usr/src [root@Red src]# [root@Red src]# wget http://ftp.ruby-lang.org/pub/ruby/2.1/ruby-2.1.2.tar.gz [root@Red src]# wget http://www.redmine.org/releases/redmine-2.5.1.tar.gz [root@Red src]# wget ftp://ftp.kddlabs.co.jp/graphics/ImageMagick/ImageMagick-6.8.9-1.tar.gz [root@Red src]# wget http://pyyaml.org/download/libyaml/yaml-0.1.6.tar.gz [root@Red src]# wget http://rubyforge.org/frs/download.php/76729/rubygems-1.8.25.tgz
      
      







рд░реВрдмреА рдХреЛ рдЕрдирдкреИрдХ рдФрд░ рдХреЙрдиреНрдлрд╝рд┐рдЧрд░ рдХрд░реЗрдВ

 [root@Red src]# tar zxvf ruby-2.1.2.tar.gz [root@Red ruby-2.1.2]# ./configure checking build system type... x86_64-unknown-linux-gnu checking host system type... x86_64-unknown-linux-gnu checking target system type... x86_64-unknown-linux-gnu checking for gcc... gcc [...skipped...] checking for nroff... /usr/bin/nroff .ext/include/x86_64-linux/ruby/config.h updated ruby library version = 2.1.0 configure: creating ./config.status config.status: creating GNUmakefile config.status: creating Makefile config.status: creating ruby-2.1.pc [root@Red ruby-2.1.2]#
      
      







рдЕрдЬреНрдЮрд╛рдд рдлрд╝рд╛рдЗрд▓реЛрдВ / рдкреБрд╕реНрддрдХрд╛рд▓рдпреЛрдВ рдХреЗ рд╕рд╛рде рдХреЛрдИ рд▓рд╛рдЗрдиреЗрдВ рдирд╣реАрдВ рд╣реИрдВ - рдЖрдк рд╕рдВрдХрд▓рди рдФрд░ рд╕реНрдерд╛рдкрд┐рдд рдХрд░ рд╕рдХрддреЗ рд╣реИрдВ!

 [root@Red ruby-2.1.2]# make [root@Red ruby-2.1.2]# make install
      
      







рд░реВрдмреА рдХреЗ рд╕рдВрд╕реНрдХрд░рдг рдХреА рдЬрд╛рдБрдЪ рдХрд░реЗрдВ

 [root@Red ruby-2.1.2]# rubby -v ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-linux]
      
      







RubyGems рдХреЛ рдЕрдирдкреИрдХ рдФрд░ рдЗрдВрд╕реНрдЯреЙрд▓ рдХрд░реЗрдВ

 [root@Red src]# tar zxvf rubygems-1.8.25.tgz [root@Red src]# cd rubygems-1.8.25 [root@Red rubygems-1.8.25]# ruby setup.rb RubyGems 1.8.25 installed == 1.8.25/ 2013-01-24 * 6 bug fixes: * Added 11627 to setup bin_file location to protect against errors. Fixes #328 by ConradIrwin * Specification#ruby_code didn't handle Requirement with multiple * Fix error on creating a Version object with a frozen string. * Fix incremental index updates * Fix missing load_yaml in YAML-related requirement.rb code. * Manually backport encoding-aware YAML gemspec ------------------------------------------------------------------------------ RubyGems installed the following executables: /usr/local/bin/gem
      
      





RubyGems рдХрд╛ рд╕рдВрд╕реНрдХрд░рдг рдЬрд╛рдВрдЪреЗрдВ

 [root@Red rubygems-1.8.25]# gem --version 1.8.25 [root@Red rubygems-1.8.25]#
      
      







рдЖрдЗрдП рджреЗрдЦреЗрдВ рдХрд┐ рд░реЗрд▓ рдХрд╛ рдХреМрди рд╕рд╛ рд╕рдВрд╕реНрдХрд░рдг рдЙрдкрд▓рдмреНрдз рд╣реИред

 [root@Red rubygems-1.8.25]# gem list -r --all rails *** REMOTE GEMS *** rails (4.1.1, 4.1.0, 4.0.5, 4.0.4, 4.0.3, 4.0.2, 4.0.1, 4.0.0, 3.2.18, 3.2.17, 3.2.16, 3.2.15, 3.2.14, 3.2.13, 3.2.12, 3.2.11, 3.2.10, 3.2.9, 3.2.8, 3.2.7, 3.2.6, 3.2.5, 3.2.4, 3.2.3, 3.2.2, 3.2.1, 3.2.0, 3.1.12, 3.1.11, 3.1.10, 3.1.9, 3.1.8, 3.1.7, 3.1.6, 3.1.5, 3.1.4, 3.1.3, 3.1.2, 3.1.1, 3.1.0, 3.0.20, 3.0.19, 3.0.18, 3.0.17, 3.0.16, 3.0.15, 3.0.14, 3.0.13, 3.0.12, 3.0.11, 3.0.10, 3.0.9, 3.0.8, 3.0.7, 3.0.6, 3.0.5, 3.0.4, 3.0.3, 3.0.2, 3.0.1, 3.0.0, 2.3.18, 2.3.17, 2.3.16, 2.3.15, 2.3.14, 2.3.12, 2.3.11, 2.3.10, 2.3.9, 2.3.8, 2.3.7, 2.3.6, 2.3.5, 2.3.4, 2.3.3, 2.3.2, 2.2.3, 2.2.2, 2.1.2, 2.1.1, 2.1.0, 2.0.5, 2.0.4, 2.0.2, 2.0.1, 2.0.0, 1.2.6, 1.2.5, 1.2.4, 1.2.3, 1.2.2, 1.2.1, 1.2.0, 1.1.6, 1.1.5, 1.1.4, 1.1.3, 1.1.2, 1.1.1, 1.1.0, 1.0.0, 0.14.4, 0.14.3, 0.14.2, 0.14.1, 0.13.1, 0.13.0, 0.12.1, 0.12.0, 0.11.1, 0.11.0, 0.10.1, 0.10.0, 0.9.5, 0.9.4.1, 0.9.4, 0.9.3, 0.9.2, 0.9.1, 0.9.0, 0.8.5, 0.8.0) rails-3-settings (0.1.1) rails-action-args (0.1.1, 0.1.0) [root@Red rubygems-1.8.25]#
      
      





рд░реЗрд▓ рд╕реНрдерд╛рдкрд┐рдд рдХрд░реЗрдВред рдпрджрд┐ рдЖрдк рдЕрдирд╛рд╡рд╢реНрдпрдХ рджрд╕реНрддрд╛рд╡реЗрдЬ рдХреЗ рдмрд┐рдирд╛ рдЪрд╛рд╣рддреЗ рд╣реИрдВ, рддреЛ рдкреИрд░рд╛рдореАрдЯрд░ рдЬреЛрдбрд╝реЗрдВ-no-rdoc тАУno-ri



рдЗрд╕ рдЯрд┐рдк рдХреЗ рд▓рд┐рдП рдорд╛рд░реНрдХ рдХрд╛ рдзрдиреНрдпрд╡рд╛рдж, рдЙрдирдХреЗ рдПрдХ рдкреЛрд╕реНрдЯ рдореЗрдВ - rubydev.ru/2012/09/tipstricks-no-ri-no-rdoc-gem-install

 [root@Red rubygems-1.8.25]# gem install rails Fetching: i18n-0.6.9.gem Fetching: i18n-0.6.9.gem (100%) Fetching: json-1.8.1.gem Fetching: json-1.8.1.gem (100%) Building native extensions. This could take a while... Fetching: thread_safe-0.3.3.gem [...skipped...] Fetching: rails-4.1.1.gem Fetching: rails-4.1.1.gem (100%) Successfully installed i18n-0.6.9 Successfully installed json-1.8.1 Successfully installed thread_safe-0.3.3 Successfully installed tzinfo-1.1.0 [...skipped...] Successfully installed rails-4.1.1 30 gems installed Installing ri documentation for i18n-0.6.9... Installing ri documentation for json-1.8.1... [...skipped...] Installing RDoc documentation for rails-4.1.1... [root@Red rubygems-1.8.25]#
      
      







рд░реЗрд▓ рдХрд╛ рд╕рдВрд╕реНрдХрд░рдг рджреЗрдЦреЗрдВ:

 [root@Red src]# rails -v Rails 4.1.1 [root@Red src]#
      
      







рдлрд┐рд░ рдордгрд┐ рдХреЛ рдЕрджреНрдпрддрди рдХрд░реЗрдВ

 [root@Red src]# gem update --system Updating rubygems-update Fetching: rubygems-update-2.2.2.gem [...skipped...] Fetching: rubygems-update-2.2.2.gem (100%) Successfully installed rubygems-update-2.2.2 Installing RubyGems 2.2.2 RubyGems 2.2.2 installed Parsing documentation for rubygems-2.2.2 Installing ri documentation for rubygems-2.2.2 === 2.2.1 / 2014-01-06 Bug fixes: * Platforms in the Gemfile.lock GEM section are now handled correctly. Bug #767 by Diego Viola. [...skipped...] RubyGems installed the following executables: /usr/local/bin/gem Ruby Interactive (ri) documentation was installed. ri is kind of like man pages for ruby libraries. You may access it like this: ri Classname ri Classname.class_method ri Classname#instance_method If you do not wish to install this documentation in the future, use the --no-document flag, or set it as the default in your ~/.gemrc file. See 'gem help env' for details. RubyGems system software updated
      
      





 [root@Red src]# gem --version 2.2.2 [root@Red src]#
      
      







рдкрд╣рд▓реЗ рд╕реЗ рд╕реНрдерд╛рдкрд┐рдд MySQL рд╕рдВрд╕реНрдХрд░рдг рдХреА рдЬрд╛рдБрдЪ рдХрд░рдирд╛

 [root@Red src]# yum list mysql mysql-server mysql-devellist Loaded plugins: downloadonly, fastestmirror, security, verify Loading mirror speeds from cached hostfile Installed Packages mysql.x86_64 5.1.73-3.el6_5 @updates mysql-devel.x86_64 5.1.73-3.el6_5 @updates mysql-server.x86_64 5.1.73-3.el6_5 @updates Available Packages mysql-devel.i686 5.1.73-3.el6_5 updates [root@Red src]#
      
      







рд╕реБрдирд┐рд╢реНрдЪрд┐рдд рдХрд░реЗрдВ рдХрд┐ UTF-8 рдХреЗ рд╕рд╛рде рд╕рдм рдХреБрдЫ рдХреНрд░рдо рдореЗрдВ рд╣реИ рдФрд░ рдлрд╝рд╛рдЗрд▓ /etc/my.cnf рдореЗрдВ рдбрд┐рдлрд╝реЙрд▓реНрдЯ рд░реВрдк рд╕реЗ рд╕реЗрдЯ рд╣реИ

 [mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock user=mysql # Disabling symbolic-links is recommended to prevent assorted security risks symbolic-links=0 character-set-server=utf8 [mysqld_safe] log-error=/var/log/mysqld.log pid-file=/var/run/mysqld/mysqld.pid character-set-server=utf8
      
      





рд╣рд╛рд▓рд╛рдБрдХрд┐ рдХреБрдЫ рд▓реЛрдЧ рдбрд┐рдлрд╝реЙрд▓реНрдЯ-рд╡рд░реНрдг-рд╕реЗрдЯ = utf8 рд╕реЗрдЯ рдХрд░рдиреЗ рдХрд╛ рд╕реБрдЭрд╛рд╡ рджреЗрддреЗ рд╣реИрдВ



MySQL рдХреА рдкрд╣рд▓реА рд╢реБрд░реБрдЖрдд

 [root@Red etc]# servisece mysqld start Initializing MySQL database: Installing MySQL system tables... OK Filling help tables... OK To start mysqld at boot time you have to copy support-files/mysql.server to the right place for your system PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER ! To do so, start the server, then issue the following commands: /usr/bin/mysqladmin -u root password 'new-password' /usr/bin/mysqladmin -u root -h Red password 'new-password' Alternatively you can run: /usr/bin/mysql_secure_installation which will also give you the option of removing the test databases and anonymous user created by default. This is strongly recommended for production servers. See the manual for more instructions. You can start the MySQL daemon with: cd /usr ; /usr/bin/mysqld_safe & You can test the MySQL daemon with mysql-test-run.pl cd /usr/mysql-test ; perl mysql-test-run.pl Please report any problems with the /usr/bin/mysqlbug script! [ OK ] Starting mysqld: [ OK ] [root@Red etc]#
      
      





Mysqlroot MySQL рдкрд╛рд╕рд╡рд░реНрдб рдмрдирд╛рдПрдВ

 [root@Red etc]# mysql -uroot mysql Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A 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> update user set password=password('mysqlpasswd') where user = 'root';root Query OK, 3 rows affected (0.00 sec) Rows matched: 3 Changed: 3 Warnings: 0 mysql> delete from user where user = ''; Query OK, 2 rows affected (0.00 sec) mysql> flush privileges; Query OK, 0 rows affected (0.00 sec) mysql> exit Bye [root@Red etc]# service mysqld restart Stopping mysqld: [ OK ] Starting mysqld: [ OK ] [root@Red etc]#
      
      





Redmine рдбреЗрдЯрд╛рдмреЗрд╕ рдХреЗ рд▓рд┐рдП рдПрдХ рдЙрдкрдпреЛрдЧрдХрд░реНрддрд╛ рдФрд░ рдкрд╛рд╕рд╡рд░реНрдб рдмрдирд╛рдПрдБ

 [root@Red etc]# mysql -uroot -p Enter password: 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> CREATE USER 'redmine'@'localhost' IDENTIFIED BY 'RedPASS'; Query OK, 0 rows affected (0.00 sec) mysql> GRANT USAGE ON *.* TO 'redmine'@'localhost' IDENTIFIED BY 'RedPASS' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USE R_CONNECTIONS 0; Query OK, 0 rows affected (0.00 sec) mysql> CREATE DATABASE IF NOT EXISTS `redmine`; Query OK, 1 row affected (0.00 sec) mysql> GRANT ALL PRIVILEGES ON `redmine`.* TO 'redmine'@'localhost'; Query OK, 0 rows affected (0.00 sec) mysql> FLUSH PRIVILEGES; Query OK, 0 rows affected (0.00 sec) mysql> exit Bye [root@Red etc]#
      
      





рд╕реНрдЯрд╛рд░реНрдЯрдЕрдк рдХреЗ рд▓рд┐рдП MySQL рд╕рддреНрдпрд╛рдкрди рдХреЗ рд╕рд╛рде рдЬреЛрдбрд╝реЗрдВ

 [root@Red etc]# chkconfig --list mysqld mysqld 0:off1:off2:off3:off4:off5:off6:off [root@Red etc]# chkconfig mysqld on [root@Red etc]# chkconfig --list mysqld mysqld 0:off1:off2:on3:on4:on5:on6:off [root@Red etc]#
      
      







рдмрд╕ рдХреЗ рдорд╛рдорд▓реЗ рдореЗрдВ, рд╣рдо MySQL рдХреЗ рд▓рд┐рдП рдЖрд╢реНрд░рд┐рдд рдкреБрд╕реНрддрдХрд╛рд▓рдпреЛрдВ рдХреА рдЬрд╛рдБрдЪ рдХрд░рддреЗ рд╣реИрдВред

 [root@Red etc]# ll /usr/lib64/mysql total 3144 lrwxrwxrwx 1 root root 26 May 13 13:16 libmysqlclient_r.so -> libmysqlclient_r.so.16.0.0 lrwxrwxrwx 1 root root 26 May 13 12:51 libmysqlclient_r.so.16 -> libmysqlclient_r.so.16.0.0 -rwxr-xr-x 1 root root 1598280 Feb 12 21:42 libmysqlclient_r.so.16.0.0 lrwxrwxrwx 1 root root 24 May 13 13:16 libmysqlclient.so -> libmysqlclient.so.16.0.0 lrwxrwxrwx 1 root root 24 May 13 12:51 libmysqlclient.so.16 -> libmysqlclient.so.16.0.0 -rwxr-xr-x 1 root root 1587712 Feb 12 21:42 libmysqlclient.so.16.0.0 -rwxr-xr-x 1 root root 12935 Feb 12 21:42 mysqlbug -rwxr-xr-x 1 root root 6399 Feb 12 21:42 mysql_config drwxr-xr-x 2 root root 4096 May 13 12:52 plugin [root@Red etc]#
      
      







рдкреЛрд░реНрдЯ 3306 рдФрд░ рдПрдХреНрд╕реЗрд╕ рдЬрд╝реЛрди / etc / sysconfig / iptables рдореЗрдВ рдирд┐рдпрдореЛрдВ рдХреЛ рдЬреЛрдбрд╝рдирд╛ рди рднреВрд▓реЗрдВ

 -A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT
      
      







IPtables рдХреЛ рдкреБрдирд░рд╛рд░рдВрдн рдХрд░реЗрдВ

 [root@Red sysconfig]# service iptables restart iptables: Setting chains to policy ACCEPT: filter [ OK ] iptables: Flushing firewall rules: [ OK ] iptables: Unloading modules: [ OK ] iptables: Applying firewall rules: [ OK ] [root@Red sysconfig]#
      
      







рд╡реНрдпрдХреНрддрд┐рдЧрдд рд░реВрдк рд╕реЗ, рдореИрдВ рдХрд┐рд╕реА рднреА рд╣реЛрд╕реНрдЯ рдХреЛ рдкреВрд░реНрдг рдЕрдзрд┐рдХрд╛рд░ рджреЗрдирд╛ рдкрд╕рдВрдж рдХрд░рддрд╛ рд╣реВрдВ, рдФрд░ рдлрд┐рд░ HeidiSQL рдпрд╛ phpMyAdmin рдореЗрдВ рдЕрд▓рдЧ рд╕реЗ рдХреЙрдиреНрдлрд╝рд┐рдЧрд░ рдХрд░рддрд╛ рд╣реВрдВред

 mysql> GRANT ALL PRIVILEGES ON `root`.* TO '*'@'*';
      
      







рдпрджреНрдпрдкрд┐ рдЖрдк рд░рд┐рдкреЙрдЬрд┐рдЯрд░реА рдХреЗ рдорд╛рдзреНрдпрдо рд╕реЗ ImageMagick рдХреЗ рдирд╡реАрдирддрдо рд╕рдВрд╕реНрдХрд░рдг рдХреЛ рд╕реНрдерд╛рдкрд┐рдд рдХрд░ рд╕рдХрддреЗ рд╣реИрдВ - 6.5.4.7-7ред

 [root@Red src]# yum list ImageMagick ImageMagick-devel Loaded plugins: downloadonly, fastestmirror, security, verify Loading mirror speeds from cached hostfile * base: ftp.colocall.net * epel: ftp.colocall.net * extras: ftp.colocall.net * updates: ftp.colocall.net Available Packages ImageMagick.i686 6.5.4.7-7.el6_5 updates ImageMagick.x86_64 6.5.4.7-7.el6_5 updates ImageMagick-devel.i686 6.5.4.7-7.el6_5 updates ImageMagick-devel.x86_64 6.5.4.7-7.el6_5 updates [root@Red src]#
      
      







рдореИрдВ рд╕реНрд░реЛрдд рд╕реЗ рдирд╡реАрдирддрдо ImageMagick рд╕реНрдерд╛рдкрд┐рдд рдХрд░рддрд╛ рд╣реВрдВ:

 [root@Red src]# tar zxvf ImageMagick-6.8.9-1.tar.gz [root@Red ImageMagick-6.8.9-1]# ./configure configuring ImageMagick 6.8.9-1 checking build system type... x86_64-unknown-linux-gnu checking host system type... x86_64-unknown-linux-gnu [...skipped...] Update ImageMagick configuration checking that generated files are newer than configure... done configure: creating ./config.status config.status: creating common.shi [...skipped...] ImageMagick is configured as follows. Please verify that this configuration matches your expectations. Host system type: x86_64-unknown-linux-gnu Build system type: x86_64-unknown-linux-gnu Option Value ------------------------------------------------------------------------------- Shared libraries --enable-shared=yesyes [...skipped...] Options used to compile and link: PREFIX = /usr/local EXEC-PREFIX = /usr/local VERSION = 6.8.9 CC = gcc -std=gnu99 -std=gnu99 [...skipped...]
      
      





рд╣рдо рддреНрд░реБрдЯрд┐рдпреЛрдВ рдХреА рдЕрдиреБрдкрд╕реНрдерд┐рддрд┐ рдХреА рддрд▓рд╛рд╢ рдХрд░рддреЗ рд╣реИрдВ, рдлрд╛рдЗрд▓реЛрдВ рдХреЛ рдЧрд╛рдпрдм рдХрд░рддреЗ рд╣реИрдВ рдФрд░ рдлрд┐рд░ рдмрдирд╛рддреЗ рд╣реИрдВ

 [root@Red ImageMagick-6.8.9-1]# make make all-recursive make[1]: Entering directory `/usr/src/ImageMagick-6.8.9-1' Making all in . make[2]: Entering directory `/usr/src/ImageMagick-6.8.9-1' CC magick/magick_libMagickCore_6_Q16_la-accelerate.lo CC magick/magick_libMagickCore_6_Q16_la-animate.lo [...skipped...] cp -f magick/ImageMagick.pc magick/ImageMagick-6.Q16.pc cp -f magick/MagickCore.pc magick/MagickCore-6.Q16.pc cp -f wand/MagickWand.pc wand/MagickWand-6.Q16.pc cp -f wand/Wand.pc wand/Wand-6.Q16.pc cp -f Magick++/lib/Magick++.pc Magick++/lib/Magick++-6.Q16.pc cp -f Magick++/lib/ImageMagick++.pc Magick++/lib/ImageMagick++-6.Q16.pc make[2]: Leaving directory `/usr/src/ImageMagick-6.8.9-1' make[1]: Leaving directory `/usr/src/ImageMagick-6.8.9-1' [root@Red ImageMagick-6.8.9-1]#
      
      







ImageMagick рдХреЗ рд╕рдВрдЪрд╛рд▓рди рдХреА рдЬрд╛рдБрдЪ рдХрд░реЗрдВ,



рдлрд┐рд░ рд╣рдорд╛рд░реЗ рдкрд╛рд╕ рдПрдХ рдЪрд┐рддреНрд░ ImageMagic.gif рд╣реЛрдЧрд╛ рдЬрд┐рд╕реЗ рдЖрдк рдбрд╛рдЙрдирд▓реЛрдб рдХрд░ рд╕рдХрддреЗ рд╣реИрдВ рдФрд░ рджреЗрдЦ рд╕рдХрддреЗ рд╣реИрдВред

 [root@Red src]# /usr/local/bin/convert loho: imagemagic.gif
      
      





ImageMagick



рдЯреНрд░реВ рдЯрд╛рдЗрдк рдлрд╝реЙрдиреНрдЯ рд╕рдорд░реНрдерди рд╕реНрдерд╛рдкрд┐рдд рдХрд░реЗрдВред

 [root@Red src]# rpm -Uihv http://dl.atrpms.net/el6.5-x86_64/atrpms/stable/atrpms-repo-6-7.el6.x86_64.rpm [root@Red src]# yum install chkfontpath
      
      







MS рдЯреНрд░реВ рдЯрд╛рдЗрдк рдлрд╝реЙрдиреНрдЯ рд╕реНрдерд╛рдкрд┐рдд рдХрд░реЗрдВред Corefonts.sourceforge.net рдкреЗрдЬ рдкрд░ , рдирд╡реАрдирддрдо рд╕рдВрд╕реНрдХрд░рдг рджреЗрдЦреЗрдВ рдФрд░ рдЗрдВрд╕реНрдЯреЙрд▓ рдХрд░реЗрдВ

 [root@Red src]# wget http://corefonts.sourceforge.net/msttcorefonts-2.5-1.spec
      
      







MC рдХреЗ рдорд╛рдзреНрдпрдо рд╕реЗ рд╣рдо рдЗрд╕ рдлрд╛рдЗрд▓ рдХреЛ рд▓рд╛рдЗрди рдлрдВрдХреНрд╢рди set_mirror {рдореЗрдВ рдвреВрдВрдврддреЗ рд╣реИрдВ рдФрд░ рджрд░реНрдкрдг рдХреЛ рдлреЙрд░реНрдо рдХреА рдПрдХ рдкрдВрдХреНрддрд┐ рдореЗрдВ рдмрджрд▓рддреЗ рдпрд╛ рдмрджрд▓рддреЗ рд╣реИрдВ:

 mirror="http://${m}.dl.sourceforge.net/project/corefonts/the%20fonts/final/"
      
      







рдЙрд╕рдХреЗ рдмрд╛рдж, рдХрдорд╛рдВрдб рдЪрд▓рд╛рдПрдВ, рдмрд╣реБрдд рд╕рд╛рд░реЗ рдкреИрдХреЗрдЬ рдбрд╛рдЙрдирд▓реЛрдб рд╣реЛ рдЬрд╛рдПрдВрдЧреЗ рдФрд░ рдЕрдВрдд рдореЗрдВ рд╣рдо рджреЗрдЦреЗрдВрдЧреЗ рдХрд┐ рдЗрдВрд╕реНрдЯреЙрд▓реЗрд╢рди рдкреИрдХреЗрдЬ рдХрд╣рд╛рдВ рд╣реИ

 [root@Red src]# rpmbuild -bb msttcorefonts-2.5-1.spec [...skipped...] Wrote: /root/rpmbuild/RPMS/noarch/msttcorefonts-2.5-1.noarch.rpm Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.VHo2lJ + umask 022 + cd /root/rpmbuild/BUILD + '[' /root/rpmbuild/BUILDROOT/msttcorefonts-2.5-1.x86_64 '!=' / ']' + rm -rf /root/rpmbuild/BUILDROOT/msttcorefonts-2.5-1.x86_64 + exit 0 [root@Red src]#
      
      







рдЗрд╕реЗ рд╕реНрдерд╛рдкрд┐рдд рдХрд░реЗрдВ рдФрд░ рдЖрд╡рд╢реНрдпрдХ рд▓рд┐рдВрдХ рдмрдирд╛рдПрдВ:

 [root@Red src]# rpm -ivh /root/rpmbuild/RPMS/noarch/msttcorefonts-2.5-1.noarch.rpm Preparing... ########################################### [100%] 1:msttcorefonts ########################################### [100%] [root@Red src]# cd /usr/share/fonts/msttcorefonts [root@Red msttcorefonts]# mkfontscale [root@Red msttcorefonts]# mkfontdir [root@Red msttcorefonts]# mkdir -p /usr/share/fonts/default/TrueType [root@Red msttcorefonts]# cd /usr/share/fonts/default/TrueType [root@Red TrueType]# find /usr/share/fonts/msttcorefonts/ -exec ln -s {} \; [root@Red TrueType]#
      
      







RMagick рдФрд░ рдЙрд╕рдХреЗ рд░рд╛рд╕реНрддреЛрдВ рдХреЛ рд╕реНрдерд╛рдкрд┐рдд рдХрд░реЗрдВред

 [root@Red TrueType]# cd /usr/local/src/ [root@Red src]# gem list rmagick --all --remote *** REMOTE GEMS *** compass-rmagick-engine (0.0.2, 0.0.1) hornetseye-rmagick (1.0.3, 1.0.2, 1.0.1, 1.0.0, 0.5.0, 0.4.0, 0.3.1, 0.3.0, 0.2.2, 0.2.1, 0.2.0, 0.1.0) jdeerhake-compass-rmagick-engine (0.0.4, 0.0.3) rdp-rmagick (0.0.0) rmagick (2.13.2, 2.13.1, 2.12.2, 2.12.1, 2.12.0, 2.11.1, 2.11.0, 2.10.0, 2.9.2, 2.9.1, 2.9.0, 2.8.0, 2.7.2, 2.7.1, 2.7.0, 2.6.0, 2.5.2, 2.5.1, 2.5.0, 2.4.0, 2.3.0, 2.2.2, 2.2.0, 2.1.0, 2.0.0, 1.15.17, 1.15.16, 1.15.15, 1.15.14, 1.15.13, 1.15.12, 1.15.11, 1.15.10, 1.15.9, 1.15.8, 1.15.7, 1.15.6, 1.15.5, 1.15.4, 1.15.3, 1.15.2, 1.15.1, 1.15.0, 1.14.1, 1.14.0, 1.13.0, 1.12.0, 1.11.1, 1.11.0, 1.10.1, 1.10.0, 1.9.3, 1.9.2, 1.9.1, 1.9.0, 1.8.3, 1.8.2, 1.8.1, 1.8.0, 1.7.4, 1.7.3, 1.7.2, 1.7.1) rmagick-metadata (0.0.2, 0.0.1) rmagick-screwdrivers (0.2.0, 0.1.2, 0.1.1) rmagick-sprite (0.0.8, 0.0.7, 0.0.6, 0.0.5, 0.0.4) rmagick4j (0.3.8, 0.3.7, 0.3.6, 0.3.5, 0.3.4 java, 0.3.3 java, 0.3.2 java, 0.3.1 java) rmagick_captcha (0.6.2) [root@Red src]# [root@Red src]# whereis pkgconfig pkgconfig: /usr/lib64/pkgconfig /usr/local/lib/pkgconfig /usr/share/pkgconfig [root@Red src]# printenv PKG_CONFIG_PATH [root@Red src]# export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig [root@Red src]# printenv PKG_CONFIG_PATH /usr/local/lib/pkgconfig [root@Red src]# gem install rmagick Building native extensions. This could take a while... Successfully installed rmagick-2.13.2 Parsing documentation for rmagick-2.13.2 Installing ri documentation for rmagick-2.13.2 Done installing documentation for rmagick after 5 seconds 1 gem installed [root@Red src]# gem list rmagick *** LOCAL GEMS *** rmagick (2.13.2) [root@Red src]#
      
      





рдЕрдкрд╛рдЪреЗ рдХреЗ рдиреАрдЪреЗ рдпрд╛рддреНрд░реА рдФрд░ рдореЙрдбреНрдпреВрд▓ рд╕реНрдерд╛рдкрд┐рдд рдХрд░реЗрдВ

 [root@Red redmine]# gem install passenger Fetching: daemon_controller-1.2.0.gem Fetching: daemon_controller-1.2.0.gem (100%) Successfully installed daemon_controller-1.2.0 Fetching: passenger-4.0.42.gem Fetching: passenger-4.0.42.gem (100%) Building native extensions. This could take a while... Successfully installed passenger-4.0.42 Parsing documentation for daemon_controller-1.2.0 Installing ri documentation for daemon_controller-1.2.0 Parsing documentation for passenger-4.0.42 Installing ri documentation for passenger-4.0.42 Done installing documentation for daemon_controller, passenger after 3 seconds 2 gems installed [root@Red redmine]# passenger-install-apache2-module Welcome to the Phusion Passenger Apache 2 module installer, v4.0.42. This installer will guide you through the entire installation process. It shouldn't take more than 3 minutes in total. Here's what you can expect from the installation process: 1. The Apache 2 module will be installed for you. 2. You'll learn how to configure Apache. 3. You'll learn how to deploy a Ruby on Rails application. Don't worry if anything goes wrong. This installer will advise you on how to solve any problems. Press Enter to continue, or Ctrl-C to abort.
      
      





Enter рдкрд░ рдХреНрд▓рд┐рдХ рдХрд░реЗрдВ рдФрд░ рдлрд┐рд░ рд╕реЗ Enter рдХрд░реЗрдВ - рд░реВрдмреА рдХреЛ рдЪреБрдирдирд╛, рд╕рдВрдХрд▓рди рдЬрд╛рдПрдЧрд╛ рдФрд░ рдЕрдВрдд рдореЗрдВ рд╣рдо рджреЗрдЦреЗрдВрдЧреЗ:

 cd 'buildout/ruby/ruby-2.1.2-x86_64-linux/' && make compiling /usr/local/lib/ruby/gems/2.1.0/gems/passenger-4.0.42/ext/ruby/passenger_native_support.c /usr/local/lib/ruby/gems/2.1.0/gems/passenger-4.0.42/ext/ruby/passenger_native_support.c: In function f_generic_writev: /usr/local/lib/ruby/gems/2.1.0/gems/passenger-4.0.42/ext/ruby/passenger_native_support.c:327: warning: rb_thread_blocking_region is deprecated (declared at /usr/local/include/ruby-2.1.0/ruby/intern.h:870) linking shared-object passenger_native_support.so -------------------------------------------- Almost there! Please edit your Apache configuration file, and add these lines: LoadModule passenger_module /usr/local/lib/ruby/gems/2.1.0/gems/passenger-4.0.42/buildout/apache2/mod_passenger.so PassengerRoot /usr/local/lib/ruby/gems/2.1.0/gems/passenger-4.0.42 PassengerDefaultRuby /usr/local/bin/ruby After you restart Apache, you are ready to deploy any number of web applications on Apache, with a minimum amount of configuration! Press ENTER to continue. -------------------------------------------- Deploying a web application: an example Suppose you have a web application in /somewhere. Add a virtual host to your Apache configuration file and set its DocumentRoot to /somewhere/public: ServerName www.yourhost.com # !!! Be sure to point DocumentRoot to 'public'! DocumentRoot /somewhere/public # This relaxes Apache security settings. AllowOverride all # MultiViews must be turned off. Options -MultiViews # Uncomment this if you're on Apache >= 2.4: #Require all granted And that's it! You may also want to check the Users Guide for security and optimization tips, troubleshooting and other useful information: /usr/local/lib/ruby/gems/2.1.0/gems/passenger-4.0.42/doc/Users guide Apache.html http://www.modrails.com/documentation/Users%20guide%20Apache.html Enjoy Phusion Passenger, a product of Phusion (www.phusion.nl) :-) https://www.phusionpassenger.com Phusion Passenger is a trademark of Hongli Lai & Ninh Bui. [root@Red redmine]#
      
      





рд▓рд┐рдЦрд┐рдд рд╕реЗрдЯрд┐рдВрдЧреНрд╕ рдХреЗ рдЕрдиреБрд╕рд╛рд░ - рдлрд╝рд╛рдЗрд▓ /etc/httpd/conf.d/passenger.conf рдмрдирд╛рдХрд░ рдЕрдкрд╛рдЪреЗ рдореЗрдВ рдпрд╛рддреНрд░реА рд╡рд┐рдиреНрдпрд╛рд╕ рдЬреЛрдбрд╝реЗрдВ

 # Pathes from passenger-install-apache2-module LoadModule passenger_module /usr/local/lib/ruby/gems/2.1.0/gems/passenger-4.0.42/buildout/apache2/mod_passenger.so PassengerRoot /usr/local/lib/ruby/gems/2.1.0/gems/passenger-4.0.42 PassengerDefaultRuby /usr/local/bin/ruby # Remove HTTP Headers Header always unset "X-Powered-By" Header always unset "X-Rack-Cache" Header always unset "X-Content-Digest" Header always unset "X-Runtime" # Tuning of Passenger PassengerMaxPoolSize 20 PassengerMaxInstancesPerApp 4 PassengerPoolIdleTime 3600 #PassengerUseGlobalQueue on PassengerHighPerformance on PassengerStatThrottleRate 10 RailsSpawnMethod smart RailsAppSpawnerIdleTime 86400 #RailsFrameworkSpawnerIdleTime 0 # ServerName Host:Port ServerName redmine:80
      
      





рдЙрд╕рдХреЗ рдмрд╛рдж, рд╣рдо RedMine рдХрд╛ рдкреНрд░рд╛рд░рдВрднрд┐рдХ рд╕реЗрдЯрдЕрдк рдХрд░реЗрдВрдЧреЗ, рдФрд░ рдЪреВрдВрдХрд┐ рд╣реЛрд╕реНрдЯ рдкрд░ рдПрдХрд▓ рдХреЙрдиреНрдлрд╝рд┐рдЧрд░реЗрд╢рди (рдЙрддреНрдкрд╛рджрди) рд╣реЛрдЧрд╛

рдлрд┐рд░ рдЙрджрд╛рд╣рд░рдг рдХреЗ рдЕрдиреБрд╕рд╛рд░ /var/www/redmine/www/config/database.yml.example рдЙрд╕реА рд╕реНрдерд╛рди рдкрд░ рд╣рдо database.yml рдлрд╝рд╛рдЗрд▓ рдмрдирд╛рддреЗ рд╣реИрдВ

 # Default setup is given for MySQL with ruby1.9. If you're running Redmine # with MySQL and ruby1.8, replace the adapter name with `mysql`. # 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: redmine host: localhost username: redmine password: "RedPASS" encoding: utf8
      
      





рдЙрд╕реА рд╕реНрдерд╛рди рдкрд░ рд╣рдо рдПрдХ рдХреЙрдиреНрдлрд╝рд┐рдЧрд░реЗрд╢рди.рдЖрдИрдПрдордПрд▓ рдлрд╝рд╛рдЗрд▓ рдмрдирд╛рддреЗ рд╣реИрдВ рдЬрд┐рд╕рдореЗрдВ рд╣рдо RedMine рд╕реЗ рд╕реВрдЪрдирд╛рдПрдВ рдкреНрд░рд╛рдкреНрдд рдХрд░рдиреЗ рдореЗрдВ рд╕рдХреНрд╖рдо рд╣реЛрдиреЗ рдХреЗ рд▓рд┐рдП рдореЗрд▓ рдХреЗ рд▓рд┐рдП рдбреЗрдЯрд╛ рдирд┐рд░реНрджрд┐рд╖реНрдЯ рдХрд░рддреЗ рд╣реИрдВред рдпрд╣ рд╕рдм рдЖрдкрдХреЗ рдореЗрд▓ рд╕рд░реНрд╡рд░, рдкреНрд░реЛрдЯреЛрдХреЙрд▓, рдкреНрд░рд╛рдзрд┐рдХрд░рдг рд╡рд┐рдзрд┐рдпреЛрдВ рдЖрджрд┐ рдкрд░ рдирд┐рд░реНрднрд░ рдХрд░рддрд╛ рд╣реИред рдпрд╛рдиреА рдпрд╣рд╛рдВ рдЖрдкрдХреЛ рдХрдбрд╝реА рдореЗрд╣рдирдд рдХрд░рдиреА рд╣реЛрдЧреА рдФрд░ рдЕрддрд┐рд░рд┐рдХреНрдд рддрд▓рд╛рд╢ рдХрд░рдиреА рд╣реЛрдЧреАред рд╕реВрдЪрдирд╛

 # default configuration options for all environments default: # Outgoing emails configuration (see examples above) attachments_storage_path: /var/www/redmine/www/files autologin_cookie_name: autologin_cookie_path: autologin_cookie_secure: # scm_stderr_log_file: /var/log/redmine_scm_stderr.log scm_stderr_log_file: database_cipher_key: # Linux: # rmagick_font_path: /usr/share/fonts/ipa-mincho/ipam.ttf rmagick_font_path: # specific configuration options for production environment # that overrides the default ones production: email_delivery: delivery_method: :smtp smtp_settings: address: mail.domain.com port: 25 domain: domain.com authentication: :login user_name: redmine@domain.com password: RedMailPASS # specific configuration options for development environment # that overrides the default ones development:
      
      





рдмреБрдВрдбрд▓рд░ рдЗрдВрд╕реНрдЯрд╛рд▓реЗрд╢рди

 [root@Red www]# gem install bundler Successfully installed bundler-1.6.2 Parsing documentation for bundler-1.6.2 Done installing documentation for bundler after 1 seconds 1 gem installed [root@Red www]# bundle install --without development test postgresql sqlite 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. Fetching gem metadata from https://rubygems.org/......... Fetching additional metadata from https://rubygems.org/.. Resolving dependencies... Installing rake 10.1.1 [...skipped...] Using rmagick 2.13.2 Your bundle is complete! Gems in the groups development, test, postgresql and sqlite were not installed. Use `bundle show [gemname]` to see where a bundled gem is installed. Post-install message from rdoc: Depending on your version of ruby, you may need to install ruby rdoc/ri data: <= 1.8.6 : unsupported = 1.8.7 : gem install rdoc-data; rdoc-data --install = 1.9.1 : gem install rdoc-data; rdoc-data --install >= 1.9.2 : nothing to do! Yay! [root@Red www]#
      
      





рдЯреЛрдХрди рдХреНрд░рд┐рдПрд╢рди

 [root@Red www]# rake generate_session_store Note: The rake task generate_session_store has been deprecated, please use the replacement version generate_secret_token [root@Red www]# rake generate_secret_token [root@Red www]# ls config/initializers/secret_token.rb config/initializers/secret_token.rb [root@Red www]#
      
      





рдореЗрд░реЗ рдорд╛рдорд▓реЗ рдореЗрдВ, рдкрд╣рд▓реА рдмрд╛рд░ рд╕реБрдЪрд╛рд░реВ рд░реВрдк рд╕реЗ рдирд╣реАрдВ рдЪрд▓рд╛, рд▓реЗрдХрд┐рди рдЗрд╕ рддрд░рд╣ рдХреЗ рдХрд╛рд░реНрдпреЛрдВ рдиреЗ рдереЛрдбрд╝реА рдЕрдбрд╝рдЪрди рдХрд╛ рдлреИрд╕рд▓рд╛ рдХрд┐рдпрд╛ред

 [root@Red www]# rake generate_session_store --trace rake aborted! Gem::LoadError: You have already activated rake 10.3.1, but your Gemfile requires rake 10.1.1. Prepending `bundle exec` to your command may solve this. /usr/local/lib/ruby/gems/2.1.0/gems/bundler-1.6.2/lib/bundler/runtime.rb:34:in `block in setup' [...skipped...]
      
      







рдореЗрд░реЗ рдорд╛рдорд▓реЗ рдореЗрдВ, рдореБрдЭреЗ 10.1.1 рдФрд░ рдЕрддрд┐рд░рд┐рдХреНрдд 10.3.1 рд░реЗрдХ рдЪрд╛рд╣рд┐рдПред рдХреА рдЬрд╛рдБрдЪ рдХрд░реЗрдВ:

 [root@Red ~]# gem list rake *** LOCAL GEMS *** rake (10.3.1, 10.1.1, 10.1.0) [root@Red ~]# gem uninstall rake -v 10.3.1 Successfully uninstalled rake-10.3.1 [root@Red ~]# gem uninstall rake -v 10.3.1 list rake -r *** LOCAL GEMS *** rake (10.1.1, 10.1.0) [root@Red ~]#
      
      





рд░реВрдмреА рдХреЗ рд▓рд┐рдП MySQL рдореЙрдбреНрдпреВрд▓ рд╕реНрдерд╛рдкрд┐рдд рдХрд░реЗрдВред

 [root@Red www]# gem install mysql Fetching: mysql-2.9.1.gem Fetching: mysql-2.9.1.gem (100%) Building native extensions. This could take a while... Successfully installed mysql-2.9.1 Parsing documentation for mysql-2.9.1 Installing ri documentation for mysql-2.9.1 Done installing documentation for mysql after 0 seconds 1 gem installed [root@Red www]# whereis ruby ruby: /usr/src/ruby-2.1.2/ruby.o /usr/src/ruby-2.1.2/ruby.c /usr/src/ruby-2.1.2/ruby /usr/local/bin/ruby /usr/local/lib/ruby [root@Red www]# cd /usr/local/lib/ryuby/gems/2.1.0/gems/mysql-2.9.1 [root@Red mysql-2.9.1]# whereis mysql_config mysql_config: /usr/bin/mysql_config /usr/share/man/man1/mysql_config.1.gz [root@Red mysql-2.9.1]# ruby ext/mysql_api/extconf.rb --with-mysql-config=/usr/bin/mysql_config checking for mysql_ssl_set()... yes checking for rb_str_set_len()... yes checking for rb_thread_start_timer()... no checking for mysql.h... yes creating Makefile [root@Red mysql-2.9.1]#
      
      







рдЕрдЧрд▓рд╛, рдЖрдкрдХреЛ рдкреИрдХреЗрдЬ рдмрдирд╛рдиреЗ рдФрд░ рд╕реНрдерд╛рдкрд┐рдд рдХрд░рдиреЗ рдХреА рдЖрд╡рд╢реНрдпрдХрддрд╛ рд╣реИ, рд▓реЗрдХрд┐рди рдПрдХ рдирд┐рдпрдо рдХреЗ рд░реВрдк рдореЗрдВ рд╕рдВрдХрд▓рди рдХреЗ рджреМрд░рд╛рди рдПрдХ рддреНрд░реБрдЯрд┐ рд╣реЛрдЧреА, рдФрд░ рдлрд┐рд░ рдЖрдкрдХреЛ рдореЗрдХрдлрд╛рдЗрд▓ рдХреЛ рдереЛрдбрд╝рд╛ рдореЛрдбрд╝рдиреЗ рдХреА рдЖрд╡рд╢реНрдпрдХрддрд╛ рд╣реИ - рд╕реНрдкрд╖реНрдЯ рд░реВрдк рд╕реЗ рдкрде рдкрдВрдЬреАрдХреГрдд рдХрд░реЗрдВ

рдпрд╛рдиреА рдРрд╕рд╛ рдХрд░реЛ:

 SRCS = mysql.c OBJS = $(srcdir)/mysql.o
      
      





рдФрд░ рдлрд┐рд░ рд╕реЗ рд╕рдВрдХрд▓рд┐рдд рдХрд░реЗрдВ, рдЕрдВрдд рдореЗрдВ рд╣рдо рдкреНрд░рд╛рдкреНрдд рдХрд░рддреЗ рд╣реИрдВ:



 [root@Red mysql-2.9.1]# make linking shared-object mysql/mysql_api.so gcc: mysql.o: No such file or directory make: *** [mysql_api.so] Error 1 [root@Red mysql-2.9.1]# make linking shared-object mysql/mysql_api.so [root@Red mysql-2.9.1]# make install /usr/bin/install -c -m 0755 mysql_api.so /usr/local/lib/ruby/site_ruby/2.1.0/x86_64-linux/mysql installing default mysql_api libraries [root@Red mysql-2.9.1]# cd /var/www/redmine/www/lib [root@Red lib]# ln -s /usr/local/lib/ruby/gems/2.1.0/gems/mysql-2.9.1/lib/mysql.rb [root@Red lib]# cd ../
      
      







рджреВрд╕рд░рд╛ рдХрдорд╛рдВрдб рд╕реЗрд▓реЗрдХреНрдЯ рдХрд░рдиреЗ рдХреЗ рдмрд╛рдж рдПрдХ рдмреЗрд╕ рдмрдирд╛рдПрдВ

 [root@Red www]# rake db:migrate RAILS_ENV=production == Setup: migrating ========================================================== -- create_table("attachments", {:force=>true}) -> 0.0171s [...skipped...] == ChangeChangesetsCommentsLimit: migrated (0.0241s) ========================= [root@Red www]# [root@Red www]# rake redmine:load_default_data RAILS_ENV=production 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] ru ==================================== Default configuration data loaded. [root@Red www]#
      
      





RedMine рдХреЛрдб рдХрд╛ рд╡рд┐рд╕реНрддрд╛рд░ рдХрд░реЗрдВред рдпрд╣ рджреЗрдЦрддреЗ рд╣реБрдП рдХрд┐ рд╕рд░реНрд╡рд░ рдореЗрдВ рдХрдИ рдЕрдиреНрдп WWW рд╕реЗрд╡рд╛рдПрдБ рд╣реЛ рд╕рдХрддреА рд╣реИрдВ рдФрд░ рд╡реЗ Apache рдФрд░ / рдпрд╛ nginx рджреЛрдиреЛрдВ рдХреЗ рддрд╣рдд рдХрд╛рдо рдХрд░реЗрдВрдЧреЗ

рдлрд┐рд░ рд╕рд╣реА рдирд┐рд░реНрджреЗрд╢рд┐рдХрд╛ / var / www / redmine рдореЗрдВ рдбрд╛рд▓реЗрдВ

 [root@Red src]# tar xzvf redmine-2.5.1.tar.gz [root@Red src]# mv redmine-2.5.1 /var/www/redmine
      
      







Apache рд╕рд░реНрд╡рд░ рдкрд╣рд▓реЗ рд╕реЗ рд╣реА рд╕реНрдерд╛рдкрд┐рдд рд╣реИ, рд╣рдо рдЗрд╕реЗ рд╕реНрдЯрд╛рд░реНрдЯрдЕрдк рдореЗрдВ рдкрдВрдЬреАрдХреГрдд рдХрд░реЗрдВрдЧреЗ рдФрд░ рдЪрд▓рд╛рдПрдВрдЧреЗ

 [root@Red www]# chkconfig --level 345 httpd on [root@Red www]# service httpd start Starting httpd: [root@Red www]# service httpd restart Stopping httpd: [ OK ] Starting httpd: [ OK ] [root@Red www]#
      
      







рдЙрд╕рдХреЗ рдмрд╛рдж, 127.0.0.1 рдкрд░ рдЬрд╛рдПрдВ рдпрд╛ рдЖрдкрдХреЗ рдкрд╛рд╕ рдХреНрдпрд╛ рдЖрдИрдкреА рд╣реИ рдФрд░ рдкреНрд░рд╛рд░рдВрдн рдкреГрд╖реНрда рдХреЗ рд╕рдВрдЪрд╛рд▓рди рдХреА рдЬрд╛рдВрдЪ рдХрд░реЗрдВред



рдЗрд╕ рдирд┐рд░реНрджреЗрд╢рд┐рдХрд╛ рдореЗрдВ рдЕрдкрд╛рдЪреЗ рд╡рд┐рдиреНрдпрд╛рд╕ рдирд┐рд░реНрджреЗрд╢рд┐рдХрд╛ рдореЗрдВ рдПрдХ рд▓рд┐рдВрдХ рдмрдирд╛рдирд╛ рдЙрдЪрд┐рдд рд╣реИ, рдЬреЛ рдЖрдкрдХреЛ рднрд╡рд┐рд╖реНрдп рдореЗрдВ рдирд┐рд░реНрджреЗрд╢рд┐рдХрд╛ рдХреЗ рдвреЗрд░ рдХреЗ рдорд╛рдзреНрдпрдо рд╕реЗ рдирд╣реАрдВ рдЪрд▓рдиреЗ рдХреА рдЕрдиреБрдорддрд┐ рджреЗрдЧрд╛)

 [root@Red www]# ln -s /etc/httpd /var/www/httpd
      
      







рд╡рд░реНрдЪреБрдЕрд▓ рд╣реЛрд╕реНрдЯ рдХреЗ рд╕рд╛рде рдХрд╛рдо рдХрд░рдиреЗ рдХреЗ рд▓рд┐рдП Apache рдХреЙрдиреНрдлрд╝рд┐рдЧрд░ рдХрд░реЗрдВ - /etc/httpd/conf.d/vhosts.conf

 # VirtualHost example: # Almost any Apache directive may go into a VirtualHost container. # The first VirtualHost section is used for all requests that do not # match a ServerName or ServerAlias in any block. # NameVirtualHost *:80 ServerAdmin admin@redmine DocumentRoot /var/www/redmine/www/public ServerName redmine ServerAlias www.redmine RailsEnv production RailsBaseURI /redmine # <Directory "/var/www/redmine/www/public/"> # Options Indexes ExecCGI FollowSymLinks # Order allow,deny # Allow from all # AllowOverride all # ErrorLog /var/www/redmine/error.log CustomLog /var/www/redmine/access.log common # # ServerAdmin admin@glpi # DocumentRoot /var/www/glpi/www # ServerName glpi # ServerAlias www.glpi # ErrorLog /var/www/glpi/error.log # CustomLog /var/www/glpi/access.log common #
      
      





рд╕реНрдерд╛рдиреАрдп рд╣реЛрд╕реНрдЯ рдкрд░ IP рд╕реЗ рдмрд╛рдЗрдВрдбрд┐рдВрдЧ рдирд╛рдо рдЬреЛрдбрд╝реЗрдВ - рдпрд╣ рдЗрд╕ рд╣реЛрд╕реНрдЯ рдХреЛ рдирд╛рдо рд╕реЗ рдЪрд▓рдиреЗ рдХреА рдЕрдиреБрдорддрд┐ рджреЗрдЧрд╛ред

 10.30.10.104 redmine
      
      







рдорд╛рд▓рд┐рдХ рдХреЛ рдирд┐рд░реНрджреЗрд╢рд┐рдХрд╛ рдореЗрдВ рдмрджрд▓реЗрдВ:

 [root@Red redmine]# pwd /var/www/redmine [root@Red redmine]# ls access.log error.log www [root@Red redmine]# chown -R apache:apache www [root@Red redmine]# chmod -R 755 www
      
      







рдЙрд╕рдХреЗ рдмрд╛рдж, рд╣рдо RedMine рдХреЗ рдХрд╛рдо рдХреА рдЬрд╛рдБрдЪ рдХрд░рддреЗ рд╣реИрдВ,



рдЕрдЧрд░ рд╕рдм рдХреБрдЫ рдореЗрд░реЗ рдкрд░рд┐рджреГрд╢реНрдп рдХреЗ рдЕрдиреБрд╕рд╛рд░ рдХрд┐рдпрд╛ рдЧрдпрд╛ рдерд╛ - рдкрд░рд┐рдгрд╛рдо рдХреА рдкреНрд░рд╢рдВрд╕рд╛:

Redmine start рдкреЗрдЬ

рдЙрд╕рдХреЗ рдмрд╛рдж, рдмрд╛рдХреА рдХреЛ рдХреЙрдиреНрдлрд╝рд┐рдЧрд░ рдХрд░реЗрдВ:

 [root@Red www]# gem list imagemagick --all -r *** REMOTE GEMS *** imagemagick-binaries (6.8.7.5.1) imagemagick-identify (0.0.1) [root@Red www]# gem list imagemagick --all *** LOCAL GEMS ***
      
      





 [root@Red src]# gem install imagemagick-binaries Fetching: ffi-1.9.3.gem (100%) Building native extensions. This could take a while... Successfully installed ffi-1.9.3 Fetching: sys-uname-0.9.0.gem (100%) Successfully installed sys-uname-0.9.0 Fetching: imagemagick-binaries-6.8.7.5.1.gem (100%) imagemagick-binaries's executable "convert" conflicts with /usr/local/bin/convert Overwrite the executable? [yN] y imagemagick-binaries's executable "identify" conflicts with /usr/local/bin/identify Overwrite the executable? [yN] y Successfully installed imagemagick-binaries-6.8.7.5.1 Parsing documentation for ffi-1.9.3 Installing ri documentation for ffi-1.9.3 Parsing documentation for imagemagick-binaries-6.8.7.5.1 Installing ri documentation for imagemagick-binaries-6.8.7.5.1 Parsing documentation for sys-uname-0.9.0 Installing ri documentation for sys-uname-0.9.0 Done installing documentation for ffi, imagemagick-binaries, sys-uname after 7 seconds 3 gems installed [root@Red src]# gem install imagemagick-identify Fetching: imagemagick-identify-0.0.1.gem (100%) Successfully installed imagemagick-identify-0.0.1 Parsing documentation for imagemagick-identify-0.0.1 Installing ri documentation for imagemagick-identify-0.0.1 Done installing documentation for imagemagick-identify after 0 seconds 1 gem installed [root@Red src]#
      
      







ImageMagick 6.8.7.5.1

ImageMagick тАФ yum install ImageMagick

 [root@Red www]# yum install ImageMagick Loaded plugins: downloadonly, fastestmirror, security, verify Loading mirror speeds from cached hostfile Setting up Install Process Resolving Dependencies --> Running transaction check [...skipped...] Dependencies Resolved ================================================================================================================================== Package Arch Version Repository Size ================================================================================================================================== Installing: ImageMagick x86_64 6.5.4.7-7.el6_5 updates 1.7 M Installing for dependencies: GConf2 x86_64 2.28.0-6.el6 base 964 k ORBit2 x86_64 2.14.17-3.2.el6_3 base 168 k OpenEXR-libs x86_64 1.6.1-8.1.el6 base 197 k ilmbase x86_64 1.0.1-6.1.el6 base 72 k libIDL x86_64 0.8.13-2.1.el6 base 83 k libcroco x86_64 0.6.2-5.el6 base 100 k libgsf x86_64 1.14.15-5.el6 base 116 k librsvg2 x86_64 2.26.0-6.el6_5.3 updates 140 k libwmf-lite x86_64 0.2.8.4-22.el6.centos base 51 k sgml-common noarch 0.6.3-32.el6 base 43 k Transaction Summary ================================================================================================================================== Install 11 Package(s) [...skipped...]
      
      





, .



┬л ┬╗ , :

 [root@Red www]# mkdir public/plugin_assets [root@Red www]# chown -R apache:apache public/plugin_assets [root@Red www]# chmod -R 755 files log tmp public/plugin_assets
      
      







apache тАФ nginx.

, тАФ nginx

.



epel nginx 1.0.15 1.7.0, passenger 1.6.0



Apache:

 [root@Red conf]# service httpd stop Stopping httpd: [ OK ] [root@Red conf]# chkconfig httpd off [root@Red conf]# chkconfig --list httpd httpd 0:off1:off2:off3:off4:off5:off6:off [root@Red conf]#
      
      







passenger nginx, 1 ,

nginx тАФ /usr/local/nginx

 [root@Red conf]# passenger-install-nginx-module Welcome to the Phusion Passenger Nginx module installer, v4.0.42. This installer will guide you through the entire installation process. It shouldn't take more than 5 minutes in total. Here's what you can expect from the installation process: 1. This installer will compile and install Nginx with Passenger support. 2. You'll learn how to configure Passenger in Nginx. 3. You'll learn how to deploy a Ruby on Rails application. Don't worry if anything goes wrong. This installer will advise you on how to solve any problems. Press Enter to continue, or Ctrl-C to abort. [...skipped...] -------------------------------------------- Nginx with Passenger support was successfully installed. Please edit your Nginx configuration file (probably /usr/local/nginx/conf/nginx.conf), and set the passenger_root and passenger_ruby configuration options in the 'http' block, like this: http { ... passenger_root /usr/local/lib/ruby/gems/2.1.0/gems/passenger-4.0.42; passenger_ruby /usr/local/bin/ruby; ... } After you (re)start Nginx, you are ready to deploy any number of web applications on Nginx. Press ENTER to continue. -------------------------------------------- Deploying a web application: an example Suppose you have a web application in /somewhere. Add a server block to your Nginx configuration file, set its root to /somewhere/public, and set 'passenger_enabled on', like this: server { listen 80; server_name www.yourhost.com; root /somewhere/public; # And that's it! You may also want to check the Users Guide for security and optimization tips and other useful information: /usr/local/lib/ruby/gems/2.1.0/gems/passenger-4.0.42/doc/Users guide Nginx.html http://www.modrails.com/documentation/Users%20guide%20Nginx.html Enjoy Phusion Passenger, a product of Phusion (www.phusion.nl) :-) https://www.phusionpassenger.com Phusion Passenger is a trademark of Hongli Lai & Ninh Bui. [root@Red conf]#
      
      





nginx /var/www

 [root@Red www]# ln -s /usr/local/nginx /var/www/nginx
      
      







nginx.conf

 user nginx; worker_processes 1; error_log /var/log/nginx/error.log warn; pid /var/run/nginx.pid; events { worker_connections 1024; } http { include /etc/nginx/mime.types; default_type application/octet-stream; log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; access_log /var/log/nginx/access.log main; sendfile on; tcp_nopush on; keepalive_timeout 65; server_tokens off; reset_timedout_connection on; output_buffers 1 64k; tcp_nodelay on; log_not_found off; gzip on; gzip_vary on; gzip_min_length 2048; gzip_comp_level 5; gzip_http_version 1.0; gzip_proxied any; gzip_disable "msie6"; gzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript; client_max_body_size 30m; large_client_header_buffers 4 8k; include /etc/nginx/conf/*.conf; passenger_root /usr/local/lib/ruby/gems/1.9.1/gems/passenger-4.0.37; passenger_ruby /usr/local/bin/ruby; server { listen 80; server_name redmine redmine.domain.com; charset koi8-r; access_log /var/www/redmine/access.log main; error_log /var/www/redmine/error.log warn; passenger_enabled on; passenger_min_instances 1; rails_spawn_method smart; rails_env production; client_max_body_size 15m; # allow all; root /var/www/redmine/www/public; ## Disable viewing .htaccess & .htpassword location ~ /\.ht { deny all; } } }
      
      





nginx

 [root@Red conf]# chkconfig nginx on [root@Red conf]# chkconfig --list nginx nginx 0:off1:off2:off3:off4:off5:off6:off [root@Red conf]#
      
      





рдпрд╣реА рд╣реИ, рдЕрдм рд╣рдорд╛рд░реЗ рдкрд╛рд╕ nginx + redmine рдХрд╛ рдкреВрд░реА рддрд░рд╣ рд╕реЗ рдХрд╛рдо рдХрд░рдиреЗ рд╡рд╛рд▓рд╛ рдЧреБрдЪреНрдЫрд╛ рд╣реИред



рд╣рд╛рд▓рд╛рдВрдХрд┐ рдЖрдк рдореИрдиреНрдпреБрдЕрд▓ рд░реВрдк рд╕реЗ nginx рдХрд╛ рдирд╡реАрдирддрдо рд╕рдВрд╕реНрдХрд░рдг рд╕реНрдерд╛рдкрд┐рдд рдХрд░ рд╕рдХрддреЗ рд╣реИрдВ:

 [root@Red src]# wget http://nginx.org/download/nginx-1.7.0.tar.gz [root@Red src]# tar zxvf nginx-1.7.0.tar.gz [root@Red src]# cd nginx-1.7.0 [root@Red nginx-1.7.0]# ./configure --without-http_rewrite_module checking for OS + Linux 2.6.32-431.17.1.el6.x86_64 x86_64 checking for C compiler ... found + using GNU C compiler + gcc version: 4.4.7 20120313 (Red Hat 4.4.7-4) (GCC) checking for gcc -pipe switch ... found [...skipped...] creating objs/Makefile Configuration summary + PCRE library is not used + OpenSSL library is not used + md5: using system crypto library + sha1: using system crypto library + using system zlib library nginx path prefix: "/usr/local/nginx" nginx binary file: "/usr/local/nginx/sbin/nginx" nginx configuration prefix: "/usr/local/nginx/conf" nginx configuration file: "/usr/local/nginx/conf/nginx.conf" nginx pid file: "/usr/local/nginx/logs/nginx.pid" nginx error log file: "/usr/local/nginx/logs/error.log" nginx http access log file: "/usr/local/nginx/logs/access.log" nginx http client request body temporary files: "client_body_temp" nginx http proxy temporary files: "proxy_temp" nginx http fastcgi temporary files: "fastcgi_temp" nginx http uwsgi temporary files: "uwsgi_temp" nginx http scgi temporary files: "scgi_temp" [root@Red nginx-1.7.0]# make [root@Red nginx-1.7.0]# make install make -f objs/Makefile install make[1]: Entering directory `/usr/src/nginx-1.7.0' test -d '/usr/local/nginx' || mkdir -p '/usr/local/nginx' test -d '/usr/local/nginx/sbin' || mkdir -p '/usr/local/nginx/sbin' test ! -f '/usr/local/nginx/sbin/nginx' || mv '/usr/local/nginx/sbin/nginx' '/usr/local/nginx/sbin/nginx.old' cp objs/nginx '/usr/local/nginx/sbin/nginx' test -d '/usr/local/nginx/conf' || mkdir -p '/usr/local/nginx/conf' cp conf/koi-win '/usr/local/nginx/conf' cp conf/koi-utf '/usr/local/nginx/conf' cp conf/win-utf '/usr/local/nginx/conf' test -f '/usr/local/nginx/conf/mime.types' || cp conf/mime.types '/usr/local/nginx/conf' cp conf/mime.types '/usr/local/nginx/conf/mime.types.default' test -f '/usr/local/nginx/conf/fastcgi_params' || cp conf/fastcgi_params '/usr/local/nginx/conf' cp conf/fastcgi_params '/usr/local/nginx/conf/fastcgi_params.default' test -f '/usr/local/nginx/conf/fastcgi.conf' || cp conf/fastcgi.conf '/usr/local/nginx/conf' cp conf/fastcgi.conf '/usr/local/nginx/conf/fastcgi.conf.default' test -f '/usr/local/nginx/conf/uwsgi_params' || cp conf/uwsgi_params '/usr/local/nginx/conf' cp conf/uwsgi_params '/usr/local/nginx/conf/uwsgi_params.default' test -f '/usr/local/nginx/conf/scgi_params' || cp conf/scgi_params '/usr/local/nginx/conf' cp conf/scgi_params '/usr/local/nginx/conf/scgi_params.default' test -f '/usr/local/nginx/conf/nginx.conf' || cp conf/nginx.conf '/usr/local/nginx/conf/nginx.conf' cp conf/nginx.conf '/usr/local/nginx/conf/nginx.conf.default' test -d '/usr/local/nginx/logs' || mkdir -p '/usr/local/nginx/logs' test -d '/usr/local/nginx/logs' || mkdir -p '/usr/local/nginx/logs' test -d '/usr/local/nginx/html' || cp -R html '/usr/local/nginx' test -d '/usr/local/nginx/logs' || mkdir -p '/usr/local/nginx/logs' make[1]: Leaving directory `/usr/src/nginx-1.7.0' [root@Red nginx-1.7.0]#
      
      





рдЗрд╕рдХреЗ рдЕрд▓рд╛рд╡рд╛, рд╕рднреА tmp рд╕рдмрдлрд╝реЛрд▓реНрдбрд░ рдореЗрдВ 777 рдЕрдзрд┐рдХрд╛рд░ рд╕реЗрдЯ рдХрд░рдирд╛ рди рднреВрд▓реЗрдВ - рдпрд╣ рдЕрдиреБрдорддрд┐ рджреЗрдЧрд╛, рдЙрджрд╛рд╣рд░рдг рдХреЗ рд▓рд┐рдП, рд╕рдВрд▓рдЧреНрди рдлрд╝рд╛рдЗрд▓реЛрдВ рдХрд╛ рдкреВрд░реНрд╡рд╛рд╡рд▓реЛрдХрди рдХрд░рдиреЗ рдХреЗ рд▓рд┐рдПред

 [root@Red www]# chmod -R 777 files log tmp tmp/cache public/plugin_assets
      
      





RedMine рдЬрд╛рдирдХрд╛рд░реА рдкреГрд╖реНрда



рдЗрди рд╕рднреА рд╡рд┐рдиреНрдпрд╛рд╕ рдлрд╛рдЗрд▓ рдХреЛ рдпрд╣рд╛рдБ рдбрд╛рдЙрдирд▓реЛрдб рдХрд┐рдпрд╛ рдЬрд╛ рд╕рдХрддрд╛ рд╣реИ ред



All Articles