Skip to main content
ExLibris
  • Subscribe by RSS
  • ExLibris Dev

    Stopping, starting, and restarting apache from the command line

    • Product: All products running apache

     

    Stopping apache:

     

    In order to stop apache from the command line, you must first find out under which user it is running. Type:

    ps -ef | grep httpd | awk '{if ($3 == 1) print }'

    If apache is running, the output will look like this:

    primo    13506     1  0 Jul10 ?        00:00:56 /exlibris/primo/p4_1/product/local/apache/bin/httpd -d /exlibris/primo/p4_1/primoe/apache

     

    The first column on the left lists the user under which apache is running. It should be either the application user (primo, in this case) or root.

    Note: If the server has more than one slot, there may be more than one line in the output above. In such a case, look at the line where the path on the right lists the slot you are currently in. If you are not certain what that is, please contact ExLibris support.

     

    Once you've identified under which user it is running, follow these steps:

    1. Log in as the application user.
    2. Type apcb
    3. If apache was run as the application user:
      • Type ./apachectl stop

    If the process was run under root:

    • Type pwd to receive the full path of the directory.
    • Log into root using su -
    • cd to the directory you found above
    • Type ./apachectl stop

    This should stop all apache processes that were run by that user. If you encounter any problem or see any errors, please contact ExLibris support.

     

     

    Starting apache:

     

    Before attempting to start apache, you need to know under what user it should run, which is based on the port it should be listening to - if the port number is smaller than 1024, apache should be run as root; otherwise, it should be run as the product user. If you do not have this information, please contact ExLibris support.

     

    1. Verify that apache isn't already running under the required user using (if apache is running you will see a list of apache processes):
      ps -ef | grep httpd
    2. Log in as the application user.
    3. Type apcb
    4. If apache was run as the application user:
      • Type ./apachectl_auto

    If the process was run under root:

    • Type pwd to receive the full path of the directory.
    • Log into root using su -
    • cd to the directory you found above
    • Type ./apachectl_auto

    This should start apache, which you can verify by typin ps -ef | grep httpd. If you run into any problem or see any error messages, please contact ExLibris support.

     

     

    Restarting apache:

     

    Stop and the start apache by following the guides above.

     

     


    • Article last edited: 20-July-2016
    //doorbell.io feedback widged