redmine常用命令(2019-01-07)

步骤1:打开linux下的命令行窗口,进入redmine的安装目录文件夹,发现文件“ctlscript.sh”,运行./ctlscript.sh,出现如下提示:

[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:如果是设置所有的服务,直接操作./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:如果是设置单独的服务,直接操作./ctlscript.sh + start/stop/restart/status + apache/mysql/subversion就可以了,例如apache服务的关闭、状态查询和开启,如下所示:

[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

你可能感兴趣的:(redmine常用命令(2019-01-07))