Nginx startup exception in centos5.4
### Install nginx ### [[email protected] _ MySQL ~] # Yum-y install nginx
### Start nginx ### [[email protected] _ MySQL ~] # Service nginx start --> no startup output information, which is depressing at the time
### View port ### [[email protected] _ MySQL ~] # SS-tanlp | grep nginx --> the port is normal, depressing to eliminate 0 0 *: 80 *: * Users :( ("nginx", 3092,6), ("nginx", 3093,6 ))
However, the browser cannot display the page.
### View status ### [email protected] _ MySQL ~] # Service nginx status --> No information is displayed
View error. log error:
[[email protected]_Mysql nginx]# tail -f /var/log/nginx/error.log2014/10/24 20:10:05 [emerg] 18760#0: eventfd() failed (38: Function not implemented)2014/10/24 20:10:05 [emerg] 18759#0: worker process 18760 exited with fatal code 2 and can not be respawn
The error is obvious. Google found that the kernel version is too low and does not support eventfd (eventfd is used to implement Event Notification between threads). Therefore, you must upgrade the kernel.
### View the current kernel version ### [[email protected] _ MySQL ~] # Cat/proc/version Linux version 2.6.18-164. EL5 ([email protected]) (GCC version 4.1.2 20080704 (Red Hat 4.1.2-46) #1 SMP Thu Sep 3 03:28:30 EDT 2009
If you do not specify a kernel version upgrade, you can use the following Upgrade Method --> simple and crude.
Wget http://mirrors.163.com/.help/CentOS6-Base-163.repo # download 163base source Yum clean all # Clear cache Yum makecache # Build cache rpm -- import/etc/pki/rpm-GPG/RPM-GPG-KEY * # import signature key to rpmyum upgrade-y # Upgrade the kernel version to the latest version.
After the upgrade, the system version will become the latest version.
[[email protected]_Mysql yum.repos.d]# cat /etc/issueCentOS release 5.11 (Final)
[[email protected]_Mysql ~]# cat /proc/version Linux version 2.6.18-398.el5 ([email protected]) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-55)) #1 SMP Tue Sep 16 20:50:52 EDT 2014
[[Email protected] _ MySQL ~] # Service nginx restart stop nginx: [OK] Start nginx: [OK]
This article from the "starting point dream" blog, please be sure to keep this source http://pangge.blog.51cto.com/6013757/1570807
Nginx startup exception caused by Kernel