apache1.3.29 如何通过ports重新再安装一次?
发表于 : 2011-03-10 14:26
apache1.3.29 如何通过ports重新再安装一次?从而把它的最大连接数改成512,再编译;另外是不是mysql5,你如果apache连接数太大,mysql5速度却不能跟上?二者这间是不是有个最佳值?
编辑/删除帖子
编辑/删除帖子
自带的apche不在port里,而在用户岛文件里, 也就是在src.tar.gz里。最大连接数好像不用编译吧,我记得可以直接在httpd.conf里设置。port里面现在全是mysql5了,最佳值的问题只能你自己试了,我没有那环境。:)junfengfan 写了:apache1.3.29 如何通过ports重新再安装一次?从而把它的最大连接数改成512,再编译;另外是不是mysql5,你如果apache连接数太大,mysql5速度却不能跟上?二者这间是不是有个最佳值?
编辑/删除帖子
嗨,怎么还是和原来一样呢?junfengfan 写了:自己搞不了~还请你再动手~~~~~
代码: 全选
# Limit on total number of servers running, i.e., limit on the number
# of clients who can simultaneously connect --- if this limit is ever
# reached, clients will be LOCKED OUT, so it should NOT BE SET TOO LOW.
# It is intended mainly as a brake to keep a runaway server from taking
# the system with it as it spirals down...
#
MaxClients 150
代码: 全选
#ifndef HARD_SERVER_LIMIT
[size=100][color=red][B]#define HARD_SERVER_LIMIT 256[/B][/color][/SIZE]
#endif
代码: 全选
#ifndef HARD_SERVER_LIMIT
[size=100][color=royalblue][B]#define HARD_SERVER_LIMIT 50000[/B][/color][/SIZE]
#endif
代码: 全选
# cd /usr/src/usr.sbin/httpd
# make
# make install
代码: 全选
+--------------------------------------------------------+
| You now have successfully built and installed the |
| Apache 1.3 HTTP server. To verify that Apache actually |
| works correctly you now should first check the |
| (initially created or preserved) configuration files |
| |
| /var/www/conf/httpd.conf
| |
| and then you should be able to immediately fire up |
| Apache the first time by running: |
| |
| /usr/sbin/apachectl start
| |
| Or when you want to run it with SSL enabled use: |
| |
| /usr/sbin/apachectl startssl
| |
| Thanks for using Apache. The Apache Group |
| http://www.apache.org/ |
+--------------------------------------------------------+
#
代码: 全选
# httpd -V
Server version: Apache/1.3.29 (Unix)
Server's Module Magic Number: 19990320:15
Server compiled with....
-D EAPI
-D HAVE_MMAP
-D HAVE_SHMGET
-D USE_MMAP_SCOREBOARD
-D USE_MMAP_FILES
-D HAVE_FLOCK_SERIALIZED_ACCEPT
-D HAVE_SYSVSEM_SERIALIZED_ACCEPT
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D DYNAMIC_MODULE_LIMIT=64
[size=100][color=red][B]-D HARD_SERVER_LIMIT=50000[/B][/color][/SIZE]
-D HTTPD_ROOT="/var/www"
-D SUEXEC_BIN="/usr/sbin/suexec"
-D DEFAULT_PIDLOG="logs/httpd.pid"
-D DEFAULT_SCOREBOARD="logs/httpd.scoreboard"
-D DEFAULT_LOCKFILE="logs/httpd.lock"
-D DEFAULT_ERRORLOG="logs/error_log"
-D TYPES_CONFIG_FILE="conf/mime.types"
-D SERVER_CONFIG_FILE="conf/httpd.conf"
-D ACCESS_CONFIG_FILE="conf/access.conf"
-D RESOURCE_CONFIG_FILE="conf/srm.conf"
#
代码: 全选
[B][size=100][color=#ff0000]#define HARD_SERVER_LIMIT 666[/color][/SIZE][/B]
代码: 全选
# chmod +x configure
# ./configure
# make
# make install
代码: 全选
./configure --with-layout="OpenBSD" --suexec-docroot="/cgi-bin" --suexec-logfile="/logs/suexec_log" --enable-suexec \
--enable-module=ssl --enable-module=so --enable-module=auth_anon --enable-shared=auth_anon \
--enable-module=expires --enable-shared=expires --enable-module=headers --enable-shared=headers \
--enable-module=auth_db --enable-shared=auth_db --enable-module=auth_dbm --enable-shared=auth_dbm \
--enable-module=auth_digest --enable-shared=auth_digest --enable-module=cern_meta --enable-shared=cern_meta \
--enable-module=define --enable-shared=define --enable-module=digest --enable-shared=digest \
--enable-module=info --enable-shared=info --enable-module=log_agent --enable-shared=log_agent \
--enable-module=log_referer --enable-shared=log_referer --enable-module=mime_magic --enable-shared=mime_magic \
--enable-module=mmap_static --enable-shared=mmap_static --enable-module=proxy --enable-shared=proxy \
--enable-module=rewrite --enable-shared=rewrite --enable-module=speling --enable-shared=speling \
--enable-module=unique_id --enable-shared=unique_id --enable-module=usertrack --enable-shared=usertrack \
--enable-module=vhost_alias --enable-shared=vhost_alias