apache 启动不了
时间:2010-07-21
来源:互联网
大家好
我在linux下新装了一个apache 但 启动的时候启动不了
我看了我的报错日志为:
[Thu Jan 15 02:40:50 2009] [warn] pid file /usr/local/apache2/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Thu Jan 15 02:40:50 2009] [alert] (11)Resource temporarily unavailable: apr_thread_create: unable to create worker thread
[Thu Jan 15 02:40:50 2009] [alert] (11)Resource temporarily unavailable: apr_thread_create: unable to create worker thread
[Thu Jan 15 02:40:50 2009] [notice] Apache/2.2.15 (Unix) DAV/2 configured -- resuming normal operations
[Thu Jan 15 02:40:52 2009] [alert] No active workers found... Apache is exiting!
我在网上找了片文章不知道可能是这么解决。但我没看懂解决方法。连接地址http://www.linuxsir.com/bbs/thread203655.html
所以就发帖请教大家了
在线等 先谢谢了
我在linux下新装了一个apache 但 启动的时候启动不了
我看了我的报错日志为:
[Thu Jan 15 02:40:50 2009] [warn] pid file /usr/local/apache2/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Thu Jan 15 02:40:50 2009] [alert] (11)Resource temporarily unavailable: apr_thread_create: unable to create worker thread
[Thu Jan 15 02:40:50 2009] [alert] (11)Resource temporarily unavailable: apr_thread_create: unable to create worker thread
[Thu Jan 15 02:40:50 2009] [notice] Apache/2.2.15 (Unix) DAV/2 configured -- resuming normal operations
[Thu Jan 15 02:40:52 2009] [alert] No active workers found... Apache is exiting!
我在网上找了片文章不知道可能是这么解决。但我没看懂解决方法。连接地址http://www.linuxsir.com/bbs/thread203655.html
所以就发帖请教大家了
在线等 先谢谢了
作者: yifengying 发布时间: 2010-07-21
他的意思是中了DoS类型攻击,只要
编辑/etc/security/limits.conf加:
* hard core 0
* hard rss 5000
* hard nproc 20
你也必须编辑/etc/pam.d/login文件加/检查这一行的存在。
session required /lib/security/pam_limits.so
上面的命令禁止core files“core 0”,限制进程数为“nproc 50“,且限制内存使用
为5M“rss 5000”。
就行了
编辑/etc/security/limits.conf加:
* hard core 0
* hard rss 5000
* hard nproc 20
你也必须编辑/etc/pam.d/login文件加/检查这一行的存在。
session required /lib/security/pam_limits.so
上面的命令禁止core files“core 0”,限制进程数为“nproc 50“,且限制内存使用
为5M“rss 5000”。
就行了
作者: 0vk0 发布时间: 2010-07-21
但我检查limits.conf和 etc/pam.d/login 这里边都有呀
我vim一下limits.conf文件
在文件的最下边有
# End of file
* hard core 0
* hard rss 5000
* hard nproc 20
这个呀
# /etc/security/limits.conf
#
#Each line describes a limit for a user in the form:
#
#<domain> <type> <item> <value>
#
#Where:
#<domain> can be:
# - an user name
# - a group name, with @group syntax
# - the wildcard *, for default entry
# - the wildcard %, can be also used with %group syntax,
# for maxlogin limit
#
#<type> can have the two values:
# - "soft" for enforcing the soft limits
# - "hard" for enforcing hard limits
#
#<item> can be one of the following:
# - core - limits the core file size (KB)
# - data - max data size (KB)
# - fsize - maximum filesize (KB)
# - memlock - max locked-in-memory address space (KB)
# - nofile - max number of open files
# - rss - max resident set size (KB)
# - stack - max stack size (KB)
# - cpu - max CPU time (MIN)
# - nproc - max number of processes
# - as - address space limit
# - maxlogins - max number of logins for this user
# - maxsyslogins - max number of logins on the system
# - priority - the priority to run user process with
# - locks - max number of file locks the user can hold
# - sigpending - max number of pending signals
# - msgqueue - max memory used by POSIX message queues (bytes)
# - nice - max nice priority allowed to raise to
# - rtprio - max realtime priority
#
#<domain> <type> <item> <value>
#
#* soft core 0
#* hard rss 10000
#@student hard nproc 20
#@faculty soft nproc 20
#@faculty hard nproc 50
#ftp hard nproc 0
#@student - maxlogins 4
# End of file
* hard core 0
* hard rss 5000
* hard nproc 20
~
"/etc/security/limits.conf" [readonly] 53L, 1848C
我vim一下limits.conf文件
在文件的最下边有
# End of file
* hard core 0
* hard rss 5000
* hard nproc 20
这个呀
# /etc/security/limits.conf
#
#Each line describes a limit for a user in the form:
#
#<domain> <type> <item> <value>
#
#Where:
#<domain> can be:
# - an user name
# - a group name, with @group syntax
# - the wildcard *, for default entry
# - the wildcard %, can be also used with %group syntax,
# for maxlogin limit
#
#<type> can have the two values:
# - "soft" for enforcing the soft limits
# - "hard" for enforcing hard limits
#
#<item> can be one of the following:
# - core - limits the core file size (KB)
# - data - max data size (KB)
# - fsize - maximum filesize (KB)
# - memlock - max locked-in-memory address space (KB)
# - nofile - max number of open files
# - rss - max resident set size (KB)
# - stack - max stack size (KB)
# - cpu - max CPU time (MIN)
# - nproc - max number of processes
# - as - address space limit
# - maxlogins - max number of logins for this user
# - maxsyslogins - max number of logins on the system
# - priority - the priority to run user process with
# - locks - max number of file locks the user can hold
# - sigpending - max number of pending signals
# - msgqueue - max memory used by POSIX message queues (bytes)
# - nice - max nice priority allowed to raise to
# - rtprio - max realtime priority
#
#<domain> <type> <item> <value>
#
#* soft core 0
#* hard rss 10000
#@student hard nproc 20
#@faculty soft nproc 20
#@faculty hard nproc 50
#ftp hard nproc 0
#@student - maxlogins 4
# End of file
* hard core 0
* hard rss 5000
* hard nproc 20
~
"/etc/security/limits.conf" [readonly] 53L, 1848C
作者: yifengying 发布时间: 2010-07-21
我vim一下 /etc/pam.d/login 也都有这个
session required /lib/security/pam_limits.so 存在~~
auth [user_unknown=ignore success=ok ignore=ignore default=bad] pam_securetty.so
auth include system-auth
account required pam_nologin.so
account include system-auth
password include system-auth
# pam_selinux.so close should be the first session rule
session required pam_selinux.so close
session include system-auth
session required pam_loginuid.so
session optional pam_console.so
# pam_selinux.so open should only be followed by sessions to be executed in the user context
session required pam_selinux.so open
session optional pam_keyinit.so force revoke
session required /lib/security/pam_limits.so
~
session required /lib/security/pam_limits.so 存在~~
auth [user_unknown=ignore success=ok ignore=ignore default=bad] pam_securetty.so
auth include system-auth
account required pam_nologin.so
account include system-auth
password include system-auth
# pam_selinux.so close should be the first session rule
session required pam_selinux.so close
session include system-auth
session required pam_loginuid.so
session optional pam_console.so
# pam_selinux.so open should only be followed by sessions to be executed in the user context
session required pam_selinux.so open
session optional pam_keyinit.so force revoke
session required /lib/security/pam_limits.so
~
作者: yifengying 发布时间: 2010-07-21
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28