[root @localhost ~]# ll 總用量 182656 -rw-------. 1 root root 2242 3月 23 2018 anaconda-ks.cfg -rwxr--r--. 1 root root 187029393 10月 18 11:33 bitnami-redmine-3.4.6-3-linux-x64-installer.run -rw-r--r--. 1 root root 2290 3月 23 2018 initial-setup-ks.cfg [root @localhost ~]# chmod +x bitnami-redmine-3.4.6-3-linux-x64-installer.run [root @localhost ~]# ./bitnami-redmine-3.4.6-3-linux-x64-installer.run
安裝過程根據界面進行設置,在此省略html
最後安裝完成以下java
[root@localhost ~]# cp -piv /opt/redmine-3.4.6-3/ctlscript.sh /etc/rc.d/init.d/bitnami-redmin [root@localhost init.d]# cd /etc/rc.d/init.d/ [root@localhost init.d]# vim ./bitnami-redmin 在#!/bin/sh下面添加: # chkconfig:2345 80 30 # description: BitNami Service 保存退出 [root@localhost init.d]# chkconfig --add ./bitnami-redmin [root@localhost init.d]# chkconfig --list
[root@localhost init.d]# /opt/redmine-3.4.6-3/ctlscript.sh --help usage: /opt/redmine-3.4.6-3/ctlscript.sh help /opt/redmine-3.4.6-3/ctlscript.sh (start|stop|restart|status) /opt/redmine-3.4.6-3/ctlscript.sh (start|stop|restart|status) mysql /opt/redmine-3.4.6-3/ctlscript.sh (start|stop|restart|status) apache /opt/redmine-3.4.6-3/ctlscript.sh (start|stop|restart|status) subversion help - this screen start - start the service(s) stop - stop the service(s) restart - restart or start the service(s) status - show the status of the service(s)
[root@localhost ~]# mkdir /git-repo [root@localhost ~]# chown daemon:daemon /git-repo
[root@localhost ~]# mkdir /usr/sbin/.ssh [root@localhost ~]# chown daemon:daemon /usr/sbin/.ssh [root@localhost ~]# sudo -u daemon -H ssh-keygen -t rsa [root@localhost ~]# cd /usr/sbin/.ssh [root@localhost .ssh]# ll 總用量 8 -rw-------. 1 daemon daemon 1675 10月 18 13:37 id_rsa -rw-r--r--. 1 daemon daemon 410 10月 18 13:37 id_rsa.pub
[root@localhost ~]# cd /git-repo [root@localhost git-repo]# sudo -u daemon -H git clone --mirror git@192.168.230.184:root/Test.git Test 克隆到裸版本庫 'Test'... The authenticity of host '192.168.230.184 (192.168.230.184)' can't be established. ECDSA key fingerprint is a7:ab:c0:dd:71:14:90:dc:36:4f:34:f5:6a:78:f2:f8. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '192.168.230.184' (ECDSA) to the list of known hosts. remote: Counting objects: 9, done. remote: Compressing objects: 100% (4/4), done. remote: Total 9 (delta 0), reused 0 (delta 0) 接收對象中: 100% (9/9), done.
[root@localhost Test]# crontab -l */1 * * * * cd /git-repo/Test && sudo -u daemon -H git remote update
[root@localhost ~]# cd /opt/redmine-3.4.6-3/apps/redmine/htdocs/plugins [root@localhost plugins]# sudo -u daemon -H git clone https://github.com/phlegx/redmine_gitlab_hook.git [root@localhost plugins]# /opt/redmine-3.4.6-3/use_redmine #進入到特定的bash環境下 bash-4.2# cd .. bash-4.2# pwd /opt/redmine-3.4.6-3/apps/redmine/htdocs bash-4.2# gem sources --add https://gems.ruby-china.com/ --remove https://rubygems.org/ bash-4.2# yum install gcc libxslt-devel libxml2-devel -y bash-4.2# bundle install --without development test --no-deployment #可能會安裝依賴,較耗時 bash-4.2# bundle exec rake redmine:plugins RAILS_ENV=production bash-4.2# /opt/redmine-3.4.6-3/ctlscript.sh restart bash-4.2# exit #退出bash