apache启动报错(98)Address already in use: make_sock: could not bind to address [::]:80 (98)Address alre

# /etc/init.d/httpd restart

Starting httpd: (98)Address already in use: make_sock: could not bind to address [::]:80
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs

                                                           [FAILED]


解决方法:

1. #netstat -lnp|grep 80

tcp        0      0 0.0.0.0:8080            0.0.0.0:*               LISTEN      10923/apache2

tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      14533/nginx


2. # ps -aux | grep http

Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html

ehuuhui  12547  0.0  0.1   3412   764 pts/1    S+   06:24   0:00 grep --color=auto http


3.# ps -aux | grep apache
root      9696  0.0  0.0   3320   564 ?        S    Oct10   0:28 tail -f /var/log/apache2/error.log
www-data 10923  0.0  0.3  18964  2228 ?        S    02:05   0:00 /usr/sbin/apache2 -k start
www-data 10924  0.0  0.3  18964  2228 ?        S    02:05   0:00 /usr/sbin/apache2 -k start
www-data 10925  0.0  0.3  18964  2228 ?        S    02:05   0:00 /usr/sbin/apache2 -k start
www-data 10926  0.0  0.3  18964  2228 ?        S    02:05   0:00 /usr/sbin/apache2 -k start
ehuuhui  11333  0.0  0.5  10328  3532 pts/1    T    03:04   0:00 vi 001-eaa-apache

ehuuhui  12579  0.0  0.1   3412   764 pts/1    S+   06:25   0:00 grep --color=auto apache


4. #sudo kill -9 10923
#sudo kill -9 10924

#sudo kill -9 10925
#sudo kill -9 10926


5.#ps -aux | grep apache
root      9696  0.0  0.0   3320   564 ?        S    Oct10   0:28 tail -f /var/log/apache2/error.log
ehuuhui  11333  0.0  0.5  10328  3532 pts/1    T    03:04   0:00 vi 001-eaa-apache
ehuuhui  12586  0.0  0.1   3412   768 pts/1    S+   06:28   0:00 grep --color=auto apache

6.#sudo /etc/init.d/apache2 restart
 * Restarting web server apache2                                         [ OK ]

你可能感兴趣的:(LAMP)