步驟1:打開linux下的命令行窗口师幕,進入redmine的安裝目錄文件夾孵滞,發(fā)現(xiàn)文件“ctlscript.sh”沾歪,運行./ctlscript.sh漂彤,出現(xiàn)如下提示:
[root@localhost opt]# cd redmine-3.0.3-0/
[root@localhost redmine-3.0.3-0]# ls
apache2?ctlscript.sh?mysql ? ? ? ? ? README.txt ?uninstall
apps ? ? ? ? ? git ? ? ? ? ? ? ? ?perl ? ? ? ? ? ?ruby ? ? ? ?uninstall.dat
changelog.txt ?img ? ? ? ? ? ? ? ?php ? ? ? ? ? ? scripts ? ? use_redmine
common ? ? ? ? licenses ? ? ? ? ? postgresql ? ? ?sqlite
config ? ? ? ? manager-linux.run ?properties.ini ?subversion
[root@localhost redmine-3.0.3-0]# ./ctlscript.sh?
usage: ./ctlscript.sh help
? ? ? ?./ctlscript.sh (start|stop|restart|status)
? ? ? ?./ctlscript.sh (start|stop|restart|status) mysql
? ? ? ?./ctlscript.sh (start|stop|restart|status) apache
? ? ? ?./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)
步驟2:如果是設(shè)置所有的服務(wù),直接操作./ctlscript.sh + start/stop/restart/status就可以了灾搏,如下所示:
[root@localhost redmine-3.0.3-0]# ./ctlscript.sh status
subversion already running
apache already running
mysql already running
[root@localhost redmine-3.0.3-0]# ./ctlscript.sh restart
/opt/redmine-3.0.3-0/subversion/scripts/ctl.sh : subversion stopped
Syntax OK
/opt/redmine-3.0.3-0/apache2/scripts/ctl.sh : httpd stopped
/opt/redmine-3.0.3-0/mysql/scripts/ctl.sh : mysql stopped
170209 15:23:53 mysqld_safe Logging to '/opt/redmine-3.0.3-0/mysql/data/mysqld.log'.
170209 15:23:53 mysqld_safe Starting mysqld.bin daemon with databases from /opt/redmine-3.0.3-0/mysql/data
/opt/redmine-3.0.3-0/mysql/scripts/ctl.sh : mysql ?started at port 3306
Syntax OK
/opt/redmine-3.0.3-0/apache2/scripts/ctl.sh : httpd started at port 80
/opt/redmine-3.0.3-0/subversion/scripts/ctl.sh : subversion started at port 3690
步驟3:如果是設(shè)置單獨的服務(wù)挫望,直接操作./ctlscript.sh + start/stop/restart/status + apache/mysql/subversion就可以了,例如apache服務(wù)的關(guān)閉狂窑、狀態(tài)查詢和開啟媳板,如下所示:
[root@localhost redmine-3.0.3-0]# ./ctlscript.sh stop apache
Syntax OK
/opt/redmine-3.0.3-0/apache2/scripts/ctl.sh : httpd stopped
[root@localhost redmine-3.0.3-0]# ./ctlscript.sh status apache
apache not running
[root@localhost redmine-3.0.3-0]# ./ctlscript.sh start apache
Syntax OK
/opt/redmine-3.0.3-0/apache2/scripts/ctl.sh : httpd started at port 80