美文网首页我爱编程
Linux下 apache mysql启动停止重启

Linux下 apache mysql启动停止重启

作者: 河西走廊 | 来源:发表于2018-03-29 10:14 被阅读0次

    Apache启动命令

    假设当前Linux用户的apahce安装目录为/usr/local/apache2,那么在命令行终端中使用以下命令启动,停止和重启apache。

    启动:/usr/local/apache2/bin/apachectl start apache

    停止:/usr/local/apache2/bin/apachectl stop

    重启:/usr/local/apache2/bin/apachectl restart

    要在重启 Apache 服务器时不中断当前的连接,则应运行:

    重启:/usr/local/sbin/apachectl graceful

    如果当前用户的apache已经安装为linux的服务的话,可以使用以下命令进行以上操作。

    启动:service httpd start

    停止:service httpd stop

    重启:service httpd restart

    Linux系统为Ubuntu

    一、Start Apache 2 Server /启动apache服务

    # /etc/init.d/apache2 start

    or

    $ sudo /etc/init.d/apache2 start

    二、 Restart Apache 2 Server /重启apache服务

    # /etc/init.d/apache2 restart

    or

    $ sudo /etc/init.d/apache2 restart

    三、Stop Apache 2 Server /停止apache服务

    # /etc/init.d/apache2 stop

    or

    $ sudo /etc/init.d/apache2 stop

    mysql启动命令

    1、使用linux命令service :

    启动:service mysqld start

    停止:service mysqld stop

    重启:service mysqld restart

    2、使用 mysqld 脚本启动:

    启动 /etc/inint.d/mysqld start

    停止: /etc/inint.d/mysqld stop

    重启:/etc/inint.d/mysqld restart

    3、使用 safe_mysqld 启动:

    启动 :safe_mysqld&

    停止:mysqladmin shutdown

    相关文章

      网友评论

        本文标题:Linux下 apache mysql启动停止重启

        本文链接:https://www.haomeiwen.com/subject/srtmcftx.html