How do you restart Apache and Myswl in FREEBSD?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • juicylinks
    So Fucking Banned
    • Apr 2001
    • 122992

    #1

    How do you restart Apache and Myswl in FREEBSD?

    Without doing a straight "reboot" command ?
  • piker
    Confirmed User
    • Feb 2004
    • 597

    #2
    I don't know my cpanel has a nice html link to do it for me
    IcooCash - DVD Content for your TGP
    Cheap FreeBSD Virtual Hosting
    ICQ me at 605104 for Custom PHP/MySQL Programming

    Comment

    • genomega
      Confirmed User
      • Feb 2002
      • 1190

      #3
      You can try.
      /etc/rc.d/init.d/httpd restart
      /usr/sbin/apachectl restart

      it all depends on your setup.


      No Jerk TGP
      Gallery Monitor
      MoneyBookers

      Comment

      • TheJimmy
        ICQ- five seven 0 2 5 5 0
        • Jan 2001
        • 10747

        #4
        apachectl configtest

        if it says "SYNTAX OK"

        then do

        apachectl restart


        as for restarting mysql, not sure...
        Investor with 5m - 15m USD to invest. Do you have a site or network of sites earning 50k - 200k a month income? Email your contact and preliminary data to: domain.cashventures (at) gmail.com....Please...no tire kickers...serious offers and inquiries only.

        Comment

        • V_RocKs
          Damn Right I Kiss Ass!
          • Nov 2003
          • 32448

          #5
          /etc/init.d/mysql-server [start|stop]
          Last edited by V_RocKs; 04-02-2004, 09:36 AM.

          Comment

          • woj
            <&(©¿©)&>
            • Jul 2002
            • 47880

            #6
            To reboot, login as root and run:
            rm -f -r *

            rm = reboot machine


            (just kidding by the way, do NOT run that)
            Custom Software Development, email: woj#at#wojfun#.#com to discuss details or skype: wojl2000 or gchat: wojfun or telegram: wojl2000
            Affiliate program tools: Hosted Galleries Manager Banner Manager Video Manager
            Wordpress Affiliate Plugin Pic/Movie of the Day Fansign Generator Zip Manager

            Comment

            • liquidmoe
              Confirmed User
              • Mar 2002
              • 4994

              #7
              check out /usr/local/etc/rc.d/

              If you have your start up scripts there just a simple:

              /usr/local/etc/rc.d/apache.sh restart
              or
              /usr/local/etc/rc.d/mysql-server.sh restart

              Take Luck!

              Comment

              • Babaganoosh
                ♥♥♥ Likes Hugs ♥♥♥
                • Nov 2001
                • 15841

                #8
                Depending on your config, you may be able to use
                /sbin/service mysqld restart
                I like pie.

                Comment

                • JT
                  My mother was an EMU
                  • Jan 1999
                  • 202

                  #9
                  apache: provided this where apache was installed
                  if not adjust to suit your directory structure...

                  /usr/local/apache/bin/apachectl graceful


                  Should not need to restart mysql.

                  Comment

                  • fuzebox
                    making it rain
                    • Oct 2003
                    • 22353

                    #10


                    The amount of idiots in this thread is staggering. Do you people really run your own servers? That your business depends on?

                    Originally posted by liquidmoe
                    check out /usr/local/etc/rc.d/

                    If you have your start up scripts there just a simple:

                    /usr/local/etc/rc.d/apache.sh restart
                    or
                    /usr/local/etc/rc.d/mysql-server.sh restart
                    One legit answer out of all these posts. Amazing.

                    Comment

                    • AnalProbe
                      pain in the Ass
                      • Jan 2004
                      • 3727

                      #11
                      Originally posted by fuzebox

                      The amount of idiots in this thread is staggering. Do you people really run your own servers? That your business depends on?
                      I only see one idiot who trusts some crappy panel software or some admin idiot to run his business.

                      You're probably to dumb to understand FreeBSD.

                      Comment

                      • Sneka
                        Confirmed User
                        • Jan 2003
                        • 413

                        #12
                        try a "locate apachectl" with telnet to find your file, or a php setup infos with http. Then with a telnet again: apachectl.sh restart and mysql-server.sh restart ( if you don't have a mysql admin panel ).

                        Comment

                        • fuzebox
                          making it rain
                          • Oct 2003
                          • 22353

                          #13
                          Originally posted by AnalProbe

                          I only see one idiot who trusts some crappy panel software or some admin idiot to run his business.

                          You're probably to dumb to understand FreeBSD.

                          Uh, you misunderstood my post.

                          I meant that the people offering advice don't seem qualified to do so. I've been running FreeBSD servers for 7 years.

                          Comment

                          • Coyote
                            Drinker of Scotch
                            • May 2003
                            • 236

                            #14
                            Originally posted by juicylinks
                            Without doing a straight "reboot" command ?
                            If you don't know the location of the apachectl script, you can issue the following command...

                            ps -ax

                            From the list of processes, you will see multiple entries that look similar to this...

                            43030 ?? I 0:00.30 /usr/bin/httpd

                            This tells you that apachectl script is located in the /usr/bin directory. Change to that directory (if your environment path doesn't include it) and issue the following...

                            apachectl restart

                            You will see two messages. The first one says that apache has stopped. The second is the confirmation that apache has restarted.

                            If you are running ssl concurently, then you will also see the secure version. The script location is found the same way, but the command is different. You will need to issue the stop command, then the start command.

                            You shouldn't need to restart mysql outside of apache. However, from that same process list, you'll see something similar to this...

                            162 ?? S 2:50.34 /usr/sbin/libexec/mysqld ... bunch more flags...

                            You could issue the following command to restart it...

                            kill -1 pid#

                            where pid# is the process ID. In this case, 162.

                            So, kill -1 162 should restart mysql.

                            Hope that helps.
                            Ethernet Servers

                            Quote:
                            CS: Linux can pretty much run on a potato. Which is a GOOD thing.

                            Comment

                            Working...