centos7 安装redmin3.3.0+postgresql数据库
一、前言
???? Redmine是用Ruby開(kāi)發(fā)的基于web的項(xiàng)目管理軟件,是用ROR框架開(kāi)發(fā)的一套跨平臺(tái)項(xiàng)目管理系統(tǒng),據(jù)說(shuō)是源于Basecamp的ror版而來(lái),支持多種數(shù)據(jù)庫(kù),有不少自己獨(dú)特的功能,例如提供wiki、新聞臺(tái)等,還可以集成其他版本管理系統(tǒng)和BUG跟蹤系統(tǒng),例如Perforce、SVN、CVS、TD等等。這種 Web 形式的項(xiàng)目管理系統(tǒng)通過(guò)“項(xiàng)目(Project)”的形式把成員、任務(wù)(問(wèn)題)、文檔、討論以及各種形式的資源組織在一起,大家參與更新任務(wù)、文檔等內(nèi)容來(lái)推動(dòng)項(xiàng)目的進(jìn)度,同時(shí)系統(tǒng)利用時(shí)間線索和各種動(dòng)態(tài)的報(bào)表形式來(lái)自動(dòng)給成員匯報(bào)項(xiàng)目進(jìn)度。
二、安裝依賴和postgresql數(shù)據(jù)庫(kù)
???? 1、首先,我們需要安裝以下依賴關(guān)系
[root@bogon?~]#?yum?-y?install?zip?unzip?libyaml-devel?zlib-devel?curl-devel?openssl-devel?httpd-devel?apr-devel?apr-util-devel?gcc?ruby-devel?gcc-c++?make?postgresql-devel?ImageMagick-devel?sqlite-devel?perl-LDAP?mod_perl?perl-Digest-SHA? ? ?2、然后安裝epel源和postgresql數(shù)據(jù)庫(kù)
[root@bogon?~]#?yum?-y?install?epel-release [root@bogon?~]#?yum?-y?install?postgresql*???? 3、初始化數(shù)據(jù)庫(kù)
[root@bogon?~]#?postgresql-setup?initdb? ? ?4、啟動(dòng)設(shè)置postgresql為開(kāi)機(jī)自啟動(dòng)
[root@bogon?~]#?systemctl?restart?postgresql [root@bogon?~]#?systemctl?enable?postgresql? ? ?5、登進(jìn)數(shù)據(jù)庫(kù)查看狀態(tài)(可略)
[root@bogon?~]#?su?-?postgres -bash-4.2$?psql postgres=#?\du?(查看角色) postgres=#?\l?(列出所有數(shù)據(jù)庫(kù)) postgres=#?\q?(退出)? ? ?6、創(chuàng)建postgresql用戶及數(shù)據(jù)庫(kù)實(shí)例
[root@bogon?~]#?su?-?postgres -bash-4.2$?createuser?redmine??????????????????創(chuàng)建用戶名 -bash-4.2$?createdb?-e?-O?redmine?redmine??????綁定用戶名及數(shù)據(jù)庫(kù)實(shí)例? ? ?7、給數(shù)據(jù)庫(kù)新用戶設(shè)置密碼
[root@bogon?~]#?su?-?postgres -bash-4.2$?psql postgres=#?\password?redmine???????????????????給用戶redmine創(chuàng)建密碼 Enter?new?password:????????????????????????????輸入密碼 Enter?it?again:????????????????????????????????再次輸入密碼 postgres=#? postgres-#?\q??????????????????????????????????退出 -bash-4.2$?exit [root@bogon?~]#? ? ?8、編輯/var/lib/pgsql/data/pg_hba.conf文件,將# IPv4 local connections:下面的
host????all?????????????all?????????????127.0.0.1/32????????????ident?????ident改為md5? ? ?9、重啟數(shù)據(jù)庫(kù),讓新的驗(yàn)證方法生效
[root@bogon?~]#?systemctl?restart?postgresql? ? ?10、新用戶登錄數(shù)據(jù)庫(kù)(可略)
[root@bogon?~]#?psql?-U?redmine?-d?redmine?-h?127.0.0.1 Password?for?user?redmine:? psql?(9.2.15) Type?"help"?for?help. redmine=>? ? ?11、禁用selinux
[root@bogon?~]#?setenforce?0????????????????????這是臨時(shí)關(guān)掉,系統(tǒng)重啟后會(huì)自動(dòng)開(kāi)啟。 setenforce:?SELinux?is?disabled???????????? 永久關(guān)閉,編輯/etc/selinux/config文件,將SELINUX設(shè)置為disabled即可。??
???
三、安裝PHP和PHP相關(guān)插件,以及rvm和ruby安裝
? ? ? ? ? 1、php相關(guān)依賴安裝
[root@bogon?~]#?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? ? ?2、rvm安裝
[root@bogon?~]#??\curl?-L?https://get.rvm.io?|?bash? ? ?3、將rvm的命令加入到系統(tǒng)的環(huán)境變量中去
[root@bogon?~]#?source?/etc/profile.d/rvm.sh? ? ?4、安裝rubygems
[root@bogon?~]#?yum?install?-y?rubygems? ? ?5、移除ruby的官方源,使用淘寶的rubygems源(官網(wǎng)源被墻掉了)
[root@bogon?~]#?gem?sources?-a??????????加入淘寶源 [root@bogon?~]#??gem?sources?-remove????????移除官網(wǎng)源 [root@bogon?~]#?gem?sources?-l??????????????????????????????????查看rubygems源? ? ?6、查看rvm版本和使用rvm安裝ruby
四、下載并安裝redmine
? ? ?1、下載解壓
[root@bogon?~]#?wget??????下載 [root@bogon?~]#?unzip?redmine-3.3.0.zip????????????????????????????????????解壓 [root@bogon?~]#?ln?-sv?redmine-3.3.0?redmine???????????????????????????????鏈接? ? ?2、在redmine的程序中,配置數(shù)據(jù)庫(kù)相關(guān)的信息
[root@bogon?~]#?cd?redmine/config/ [root@bogon?config]#?cp?database.yml.example?database.yml? ? ? ? ?編輯database.yml文件,修改如下:
? ? ?3、安裝rails相關(guān)庫(kù)的支持
[root@bogon?config]#?gem?install?bundler Fetching:?bundler-1.12.5.gem?(100%) Successfully?installed?bundler-1.12.5 Parsing?documentation?for?bundler-1.12.5 Installing?ri?documentation?for?bundler-1.12.5 Done?installing?documentation?for?bundler?after?7?seconds 1?gem?installed [root@bogon?config]#? ? ?4、編輯redmine文件夾中的文件Gemfile文件
[root@bogon?redmine]#?vim?Gemfile? source?'????????????????將源改為淘寶源? [root@bogon?redmine]#?bundle?install?????????????bundle安裝,可能會(huì)報(bào)錯(cuò)。 [root@bogon?redmine]#?gem?update?????????????????需要先更新gem? ? ?5、創(chuàng)建一個(gè)session安裝密鑰
? ? ?6、創(chuàng)建初始化所有redmine用到的table表
[root@bogon?redmine]#?RAILS_ENV=production?rake?db:migrate? ? 7、裝入默認(rèn)的配置信息,輸入zh(選擇中文)
[root@bogon?redmine]#?RAILS_ENV=production?rake?redmine:load_default_data? ? ?8、啟動(dòng)redmine
[root@bogon?redmine]#?rails?server?webrick?-e?production? ? ?9、后臺(tái)運(yùn)行
[root@bogon?redmine]#?rails?server?webrick?-e?production?-d轉(zhuǎn)載于:https://blog.51cto.com/huan14/1841440
總結(jié)
以上是生活随笔為你收集整理的centos7 安装redmin3.3.0+postgresql数据库的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: jquery获取元素内容-text()和
- 下一篇: MySQL/MariaDB的respon