【32450新蒲京网站】Centos6.5+Redmine

2019-10-28 07:27 来源:未知

花了二日时间,基于centos6.5操作系统,搭建了redmine处境,在那间记录下进程中相见的难题以至搭建流程。

Centos下安装Redmine并集成git

第后生可畏取得安装文件

wget https://downloads.bitnami.com/files/stacks/redmine/2.6.1-0/bitnami-redmine-2.6.1-0-linux-x64-installer.run

增添可实行权限

chmod +x https://downloads.bitnami.com/files/stacks/redmine/2.6.1-0/bitnami-redmine-2.6.1-0-linux-x64-installer.run

安装

./bitnami-redmine-2.6.1-0-linux-x64-installer.run

此处配置全体剧情,蕴含git在内的某些东西,由于设置的时候未有记录,这里没有办法上操作,具体正是大约全数的配置都选yes,由于80端口被吞噬了,配置进度中作者将apache的端口配置成了8080

安装实现后,访问

登入成功后确立四个测验用的品类test

上面初阶安装git服务器

安装python-setuptools

sudo apt-get install python-setuptools

下载gitosis

<pre name="code" class="java">https://github.com/tv42/gitosis.git

进入gitosis目录

cd gitosis

安装

python setup.py install

创建git账号

sudo useradd -c 'git version manage' -m -d /home/git -s bin/bash  git

将顾客端生产的秘钥上盛传服务器,生成方法见生成秘钥

32450新蒲京网站,初始化git

sudo -H -u git gitosis-init < /home/git/id_rsa.pub

来得如下音讯则成功

#Initialized empty Git repository in /home/git/repositories/gitosis-admin.git/
#Reinitialized existing Git repository in /home/git/repositories/gitosis-admin.git/

修改post-update权限

sudo chmod 755 /home/git/repositories/gitosis-admin.git/hooks/post-update

客商端克隆饭馆举行配备

git clone [email protected]主机IP:gitosis-admin.git

仿造后keydir目录下贮存的是公钥,gitosis.conf是布局文件

开垦配置文件,增添上边包车型客车剧情,并将另大器晚成台机械的公钥[email protected]松手公钥目录下

[group webca]
writable = webca
members = [email protected] [email protected]

应用起头化的客户机[email protected]付给webca宾馆,代码如下

mkdir webca   
cd webca  
git init  
touch README.md 
git add README.md 
git commit -m "init webca"  
git remote add origin [email protected]主机IP:webca.git  
git push origin master 

配置redmine关联该git仓库,点击成立的test项目->配置->版本库->新建版本库->接受git->输入git目录,这里是/home/git/repositories/webca.git,勾选主版本库确定。

此刻恐怕会合世404,只怕的原因是webca.git的权杖远远不足,为了幸免事后无需的繁重,直接给777的权力给该目录,刷新就能够看出该版本库的付出消息

首先得到安装文件 wget 增添可执...

centos6.5;

redmine2.5.0;

Ruby1.9.3;

 

step 1:安装相关软件条件注重

yum -y install zip unzip libyaml-devel zlib-devel curl-devel openssl-devel httpd-devel apr-devel apr-util-devel mysql-devel gcc ruby-devel gcc-c++ make postgresql-devel ImageMagick-devel sqlite-devel perl-LDAP mod_perl perl-Digest-SHA

step 2:安装apache和mysql

yum -y install httpd mysql mysql-server

step 3:将apache和mysql配置为开机自运营,并在这时候运维apache和mysql,以便做多余的布局

chkconfig httpd on
chkconfig mysqld on

service httpd start
service mysqld start

step 4:配置mysql 账号密码音信,使用mysql_secure_installation来配置,也是二个简约的交互式配置工具

Because we not have a password for the root account so you press Enter to skip.
Enter current password for root (enter for none):      
#输入当前mysql的root密码,因为yum套件关系,root密码为空,直接回车即可
Select Yes to set the password for the MySQL root account.  
#是否设置新的mysql root密码,选是
Set root password? [Y/n] y
Enter and confirm your password, remove the anonymous user, select Yes
Remove anonymous users? [Y/n] y   
#是否移除匿名用户,安全起见,选是
Allow remote login to MySQL as root account, select No.
Disallow root login remotely? [Y/n] n 
#是否关闭root远程登录,看你如何选择了,官网说否,如果不是外网服务器的话,开放也无所谓。
Delete the test database, select Yes
Remove test database and access to it? [Y/n] y  
#移除测试数据库
Reload privilege tables, select Yes  
#刷新权限配置信息
Reload privilege tables now? [Y/n] y

  

step 5: 关闭selinux

vi /etc/selinux/config
SELINUX=disabled

编写制定保存退出后,输入以下命令,不重启系统关闭selinux

setenforce 0

注:

setenforce 1 设置SELinux 成为enforcing模式

setenforce 0 设置SELinux 成为permissive模式,即关闭selinux

step 6 :关闭iptables

service iptables stop

chkconfig iptables off

因为不是外网服务器用不到iptables做安全过滤。

step 7:安装php环境

因为redmine是ruby开辟,安装php和phpmyadmin重就算为了方便管理mysql数据库

yum -y install php php-mysql php-gd php-imap php-ldap php-mbstring php-odbc php-pear php-xml php-xmlrpc php-pecl-apc php-soap

step 8:安装ruby环境

curl -L https://get.rvm.io | bash

运作成功会变卦贰个文本,然后运转以下命令

source /etc/profile.d/rvm.sh
rvm list known

2.6本子须求ruby 支持的版本,在此大家接纳1.9.3 牢固版 

rvm install 1.9.3

注:那一个ruby版本很考究的,近年来安装官方网站文书档案,安装redmine 2.5X的都足以用1.9.3

设置到位后检查ruby版本

ruby -v

回来彰显:ruby 1.9.3p551 (二零一五-11-13 revision 48407) [x86_64-linux] ,表明安装成功。

step 9:安装rubygems

yum -y install rubygems

注:rubygems是Ruby’s packages management program 包管理程序,也正是yum 大概apt-get,全数ruby的东西由它来保(an)护(zhuang)

step 10:安装Passenger

gem install passenger

passenger-install-apache2-module

注:

The full name of the Passenger is Phusion Passenger, known as mod_rails or mod_rack, it is a web application intergrate with Apache and it can operate as a standalone web server support for the Ruby On Rails applications.总的来说正是ruby和apache结合的代谢物,redmine的apache帮衬,那样能够透过apache访谈.

 

上述安装到位后会提醒:

LoadModule passenger_module /usr/local/rvm/gems/ruby-1.9.3-p551/gems/passenger-5.0.28/buildout/apache2/mod_passenger.so
<IfModule mod_passenger.c>
PassengerRoot /usr/local/rvm/gems/ruby-1.9.3-p551/gems/passenger-5.0.28
PassengerDefaultRuby /usr/local/rvm/gems/ruby-1.9.3-p551/wrappers/ruby
</IfModule>

注意是安装达成的唤起,复制出来然后选用,将复制的开始和结果保留为三个新的apache配置文件

vi /etc/httpd/conf.d/passenger.conf

粘贴内容后保存退出,重启apache

service httpd restart

step 11: 创建redmine数据库

mysql -u root -p
create database redmine_db character set utf8 ;    #创建数据库
create user 'admin'@'localhost' identified by 'admin'; #创建用户
grant all privileges on redmine_db.* to 'admin'@'localhost';  #授权
quit ;

step 12:安装redmine

wget http://www.redmine.org/releases/redmine-2.5.0.tar.gz 
#下载最新版本,只要是2.5X范围即可
tar xvfz redmine-2.5.0.tar.gz
mv redmine-2.5.0 redmine
rm -rf redmine-2.5.0.tar.gz

注:

学科是新建了四个文件夹来作为寄存目录,作者在此直接设置到主目录下,并改良文件名叫redmine.难怪依据教程的门路去布署前边的公文少禽找不到...  

step 13:redmine相关配置

设置收尾后,大家要求在httpd的redmine.conf中开展改良: 

cd /redmine/config
cp database.yml.example database.yml

vi database.yml  #输入mysql访问信息,账号,密码,数据库名字,使用第一个production配置,编辑完成后保存退出

production:
  adapter: mysql2
  database: redmine
  host: localhost
  username: redmine
  password: "redmine"
  encoding: utf8

瞩目:官方网址中说MySQL database using ruby 1.9 (adapter must be set to mysql2)

step 14:安装rails

cd /var/www/redmine
gem install bundler
bundle install

注:

这一步骤,比较多课程都在说由于防火墙的原由,不能够向来安装官方网站源。须要先做一步别的布置,然则笔者灵魂行吗,没有进行配置也幸不辱命了......

 

关于报错,作者的装置进度只现出一个错:

An error occurred while installing mysql2 (0.3.18), and Bundler cannot continue.
Make sure that `gem install mysql2 -v '0.3.18'` succeeds before bundling.

#执行gem install mysql2 -v '0.3.18'报错:

checking for mysql.h... no
checking for mysql/mysql.h... no
-----
mysql.h is missing

#我们执行yum install mysql-devel后成功安装,接着再次bundle install 

实际上留意看提醒,都会报告您该实施什么样命令来缓和难题。

安装成功的唤起:

Bundle complete! 21 Gemfile dependencies, 56 gems now installed.
------
Details here: http://www.elabs.se/blog/60-introducing-capybara-2-1

安装完结后起先化数据库,暗中同意选项就能够。

rake generate_secret_token

#初始化redmine数据库表名

RAILS_ENV=production rake db:migrate
RAILS_ENV=production rake redmine:load_default_data

step 15:激活fcgi

cd redmine/public
mkdir plugin_assets
cp dispatch.fcgi.example dispatch.fcgi
cp htaccess.fcgi.example .htaccess

step 16: 安装Apache and FastCGI模块

rpm --import https://fedoraproject.org/static/0608B895.txt
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
rpm -ivh epel-release-6-8.noarch.rpm
yum -y install mod_fcgid
rm -rf epel-release-6-8.noarch.rpm

step 17:创设redmine的文书存款和储蓄目录

mkdir -p /data/redmine-2.6.3/files   #由于我自己把redmine安装在主目录下,执行这句命令时,提示我文件已存在...
cd redmine-2.6.3/config
cp configuration.yml.example configuration.yml

由于我们的files目录在redmine根目录下,因而configuration不用配置了,借使files目录在其余地点,我们必要 

vim configuration.yml
attachments_storage_path: /var/redmine/files

step 18:创造redmine虚构主机

<VirtualHost *:80>
        ServerName your_domain                #我填的是所在服务器的IP地址
        ServerAdmin your_domain@domain.com    #没有指定域名,所以我没写这句
        DocumentRoot /redmine/public/         # !!! Be sure to point DocumentRoot to 'public'!
        ErrorLog logs/redmine_error_log
        <Directory "/redmine/public/">
                Options Indexes ExecCGI FollowSymLinks
                Order allow,deny
                Allow from all       # This relaxes Apache security settings.
                AllowOverride all    # MultiViews must be turned off.
        </Directory>
</VirtualHost>

  

注:redmine目录要科学,钦点好相应的域名(如果部分话...)。  

step 19:授权apache权限到redmine目录

以便apache能够访谈redmine(先切到redmine安装的目录下,作者的是根目录,所以...)

chown -R apache:apache redmine
chmod -R 755 redmine

service httpd restart

 

测量检验试试看

32450新蒲京网站 1

binggo~

暗中认可的客商名和密码都为admin  

持有配置到此截至(其实作者并未有配置email...以后悠闲再说),首要参照文书档案:

 

TAG标签:
版权声明:本文由32450新蒲京网站发布于葡萄游戏厅_棋牌游戏,转载请注明出处:【32450新蒲京网站】Centos6.5+Redmine