歡迎您光臨本站 註冊首頁

apache 啟動不了

←手機掃碼閱讀     火星人 @ 2014-03-04 , reply:0

apache 啟動不了

大家好
我在linux下新裝了一個apache 但 啟動的時候啟動不了
我看了我的報錯日誌為:
pid file /usr/local/apache2/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
(11)Resource temporarily unavailable: apr_thread_create: unable to create worker thread
(11)Resource temporarily unavailable: apr_thread_create: unable to create worker thread
Apache/2.2.15 (Unix) DAV/2 configured -- resuming normal operations
No active workers found... Apache is exiting!

我在網上找了片文章不知道可能是這麼解決。但我沒看懂解決方法。連接地址http://www.linuxsir.com/bbs/thread203655.html
所以就發帖請教大家了  
在線等 先謝謝了
《解決方案》

他的意思是中了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」。

就行了
《解決方案》

但我檢查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" 53L, 1848C
《解決方案》

我vim一下  /etc/pam.d/login  也都有這個
session required /lib/security/pam_limits.so 存在~~

auth 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
~
《解決方案》

我vim一下  /etc/pam.d/login  也都有這個
session required /lib/security/pam_limits.so 存在~~

auth ...
yifengying 發表於 2010-07-21 16:52 http://bbs1.chinaunix.net/images/common/back.gif


    我也不知道你出的是什麼問題,我只是看懂了他的意思

[火星人 ] apache 啟動不了已經有618次圍觀

http://coctec.com/docs/service/show-post-17179.html