Problema Instalare LAMP pe Unbutu

Probleme, intrebari si subiecte legate de Server Apache, setari in fisier htaccess si Gazduire site-uri Web (Hosting).
hi_ella
Mesaje: 40

Problema Instalare LAMP pe Unbutu

Salut,
Am trecut pe Ubuntu 12.04. Incerc sa instalez un LAMP insa imi da urmatoarea eroare cand incerc sudo service apache2 restart: *

Cod: Selectaţi tot

Restarting web server apache2                                                
no listening sockets available, shutting down
Unable to open logs
Action 'start' failed.
The Apache error log may have more information.
La fel si pentru : sudo /etc/init.d/apahe2 restart
Ma puteti ajuta cumva ?

PS : Nu stiu daca intrebarea este in categoria potrivita !

MarPlo
Salut
Din ce am gasit pe internet la probleme similare, cauza la eroarea: "no listening sockets available, shutting down", ar putea fi un alt program care foloseste acelasi port, probabil 80.
Trebuie detectat acel program cu:

Cod: Selectaţi tot

sudo netstat -ltnp | grep ':80'
Va returna ceva similar cu:

Cod: Selectaţi tot

tcp 0 0 127.0.0.1:80 0.0.0.0:* LISTEN 1588/aolserver4-nsd
In acest caz trebuie oprit proces 1588, cu:

Cod: Selectaţi tot

sudo kill -9 1588
La eroarea: "Unable to open logs", cauza ar putea fi permisiunile de scriere in "/var/log/apache2 ", sau numarul mic de descriptori de fisiere.
Rezolvarea la eroarea asta e urmatoarea (preluata de la: http://www.cpanelblog.in/apache-error-u ... -open-logs ):
Check the current limit of file descriptors in the file /proc/sys/fs/file-max:

$ cat /proc/sys/fs/file-max

If fs.file-max is quite small (several thousands or so), it should be changed to a higher value.

$ echo “65535″ > /proc/sys/fs/file-max

If you want this new value to survive across reboots you can add it to /etc/sysctl.conf.

# Maximum number of open files permited
fs.file-max = 65535

To load new values from the sysctl.conf file:

$ sysctl -p /etc/sysctl.conf

Add `ulimit -n 65536` command to /etc/rc.d/init.d/httpd and /usr/sbin/apachectl apache startup scripts before other commands.
Apoi se restarteaza Apache cu:

Cod: Selectaţi tot

sudo /etc/init.d/apache2 start

Subiecte similare