ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Apache Installed

    Scheduled Pinned Locked Moved IT Discussion
    24 Posts 3 Posters 1.7k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • scottalanmillerS
      scottalanmiller
      last edited by

      For netstat, use these options for best results...

      netstat -tulpn
      
      LakshmanaL 1 Reply Last reply Reply Quote 0
      • scottalanmillerS
        scottalanmiller @Lakshmana
        last edited by

        @Lakshmana said in Apache Installed:

        @Lakshmana
        [test@localhost ~]$ /etc/init.d/httpd status
        httpd dead but subsys locked

        Is Nginx still running? If not, was httpd restarted after it was removed?

        systemctl restart httpd
        
        1 Reply Last reply Reply Quote 0
        • LakshmanaL
          Lakshmana @scottalanmiller
          last edited by

          @scottalanmiller

          (Not all processes could be identified, non-owned process info
          will not be shown, you would have to be root to see it all.)
          Active Internet connections (only servers)
          Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
          tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN -
          tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN -
          tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN -
          tcp 0 0 :::80 :::* LISTEN -
          tcp 0 0 :::22 :::* LISTEN -
          tcp 0 0 ::1:631 :::* LISTEN -
          tcp 0 0 ::1:25 :::* LISTEN -
          udp 0 0 0.0.0.0:631 0.0.0.0:* -
          udp 0 0 0.0.0.0:68 0.0.0.0:*

          scottalanmillerS 1 Reply Last reply Reply Quote 0
          • thwrT
            thwr @Lakshmana
            last edited by thwr

            @Lakshmana please post the output of

            netstat -anp tcp | grep listening | grep 80

            assuming you want to run on port 80. Please also post the output of

            ps ax | grep -v grep | grep -E 'apache|httpd'

            OK, not required anymore. About the error: ps ax, not ps -ax, my bad

            LakshmanaL 2 Replies Last reply Reply Quote 0
            • LakshmanaL
              Lakshmana @thwr
              last edited by

              @thwr [test@localhost ~]$ ps -ax | grep -v grep | grep -E 'apache|httpd'
              Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.8/FAQ
              2239 ? Ss 0:00 /usr/sbin/httpd
              2246 ? S 0:00 /usr/sbin/httpd
              2247 ? S 0:00 /usr/sbin/httpd
              2248 ? S 0:00 /usr/sbin/httpd
              2249 ? S 0:00 /usr/sbin/httpd
              2250 ? S 0:00 /usr/sbin/httpd
              2251 ? S 0:00 /usr/sbin/httpd
              2252 ? S 0:00 /usr/sbin/httpd
              2253 ? S 0:00 /usr/sbin/httpd

              1 Reply Last reply Reply Quote 0
              • LakshmanaL
                Lakshmana @thwr
                last edited by

                @thwr [test@localhost ~]$ netstat -anp tcp | grep listening | grep 80
                usage: netstat [-veenNcCF] [<Af>] -r netstat {-V|--version|-h|--help}
                netstat [-vnNcaeol] [<Socket> ...]
                netstat { [-veenNac] -I[<Iface>] | [-veenNac] -i | [-cnNe] -M | -s } [delay]

                    -r, --route                display routing table
                    -I, --interfaces=<Iface>   display interface table for <Iface>
                    -i, --interfaces           display interface table
                    -g, --groups               display multicast group memberships
                    -s, --statistics           display networking statistics (like SNMP)
                    -M, --masquerade           display masqueraded connections
                
                    -v, --verbose              be verbose
                    -n, --numeric              don't resolve names
                    --numeric-hosts            don't resolve host names
                    --numeric-ports            don't resolve port names
                    --numeric-users            don't resolve user names
                    -N, --symbolic             resolve hardware names
                    -e, --extend               display other/more information
                    -p, --programs             display PID/Program name for sockets
                    -c, --continuous           continuous listing
                
                    -l, --listening            display listening server sockets
                    -a, --all, --listening     display all sockets (default: connected)
                    -o, --timers               display timers
                    -F, --fib                  display Forwarding Information Base (default)
                    -C, --cache                display routing cache instead of FIB
                    -T, --notrim               stop trimming long addresses
                    -Z, --context              display SELinux security context for sockets
                

                <Iface>: Name of interface to monitor/list.
                <Socket>={-t|--tcp} {-u|--udp} {-S|--sctp} {-w|--raw} {-x|--unix} --ax25 --ipx --netrom
                <AF>=Use '-A <af>' or '--<af>'; default: inet
                List of possible address families (which support routing):
                inet (DARPA Internet) inet6 (IPv6) ax25 (AMPR AX.25)
                netrom (AMPR NET/ROM) ipx (Novell IPX) ddp (Appletalk DDP)
                x25 (CCITT X.25)

                1 Reply Last reply Reply Quote 0
                • scottalanmillerS
                  scottalanmiller @Lakshmana
                  last edited by

                  @Lakshmana said in Apache Installed:

                  @scottalanmiller

                  (Not all processes could be identified, non-owned process info
                  will not be shown, you would have to be root to see it all.)
                  Active Internet connections (only servers)
                  Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
                  tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN -
                  tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN -
                  tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN -
                  tcp 0 0 :::80 :::* LISTEN -
                  tcp 0 0 :::22 :::* LISTEN -
                  tcp 0 0 ::1:631 :::* LISTEN -
                  tcp 0 0 ::1:25 :::* LISTEN -
                  udp 0 0 0.0.0.0:631 0.0.0.0:* -
                  udp 0 0 0.0.0.0:68 0.0.0.0:*

                  Looks like you are forgetting to be root when doing systems administration tasks. Switch to root before doing any of this.

                  1 Reply Last reply Reply Quote 1
                  • thwrT
                    thwr
                    last edited by

                    netstat -an | grep -i tcp | grep -i listening | grep 80
                    
                    ps ax | grep -v grep | grep -E 'apache|httpd'
                    

                    again, my bad. Could be your grep doesn't support -E, just use

                    ps ax | grep -v grep | grep apache 
                    
                    ps ax | grep -v grep | grep httpd
                    

                    instead.

                    LakshmanaL 1 Reply Last reply Reply Quote 0
                    • LakshmanaL
                      Lakshmana @thwr
                      last edited by

                      @thwr said in Apache Installed:

                      ps ax | grep -v grep | grep httpd

                      [root@localhost ~]# ps ax | grep -v grep | grep apache
                      [root@localhost ~]# ps ax | grep -v grep | grep httpd
                      2239 ? Ss 0:00 /usr/sbin/httpd
                      2246 ? S 0:00 /usr/sbin/httpd
                      2247 ? S 0:00 /usr/sbin/httpd
                      2248 ? S 0:00 /usr/sbin/httpd
                      2249 ? S 0:00 /usr/sbin/httpd
                      2250 ? S 0:00 /usr/sbin/httpd
                      2251 ? S 0:00 /usr/sbin/httpd
                      2252 ? S 0:00 /usr/sbin/httpd
                      2253 ? S 0:00 /usr/sbin/httpd

                      1 Reply Last reply Reply Quote 0
                      • scottalanmillerS
                        scottalanmiller
                        last edited by

                        Okay, so at this point, httpd is definitely running.

                        1 Reply Last reply Reply Quote 1
                        • 1
                        • 2
                        • 2 / 2
                        • First post
                          Last post