FreeBSD的systat命令备忘
[ 2007/11/14 13:09 | by Johnny.He ]
systat 是一个在FreeBSD中帮助你查看、观察系统状况的命令,并且显示在屏幕。
systat -- display system statistics on a crt
使用方法:
systat [-display] [更新-时间]
示范:
systat -vmstat 1
systat -- display system statistics on a crt
使用方法:
systat [-display] [更新-时间]
示范:
systat -vmstat 1
Apache 虚拟机 别名应用(ServerAlias)
[ 2007/11/13 13:00 | by Johnny.He ]
如果需要把 aaa.com bbb.com ccc.com全部指向/usr/local/www下,就在/usr/local/etc/apache22/extra/httpd-vhosts.conf中设置虚拟机的地方添加一条
范例如下:
ServerAlias aaa.com bbb.com ccc.com
范例如下:
<VirtualHost ***.***.***.**:80>
ServerAdmin Johnny.He#Live.com
DocumentRoot "/usr/local/www"
ServerName wwwer.org
ServerAlias aaa.com bbb.com ccc.com
ErrorLog "/usr/local/www/log/abc-error_log"
CustomLog /usr/local/www/log/abc-access_log common
</VirtualHost>
ServerAdmin Johnny.He#Live.com
DocumentRoot "/usr/local/www"
ServerName wwwer.org
ServerAlias aaa.com bbb.com ccc.com
ErrorLog "/usr/local/www/log/abc-error_log"
CustomLog /usr/local/www/log/abc-access_log common
</VirtualHost>
FreeBSD修改IP
[ 2007/11/12 07:51 | by Johnny.He ]
FreeBSD下如何更改IP
1.进入 /etc/rc.conf 文件
2.修改 ifconfig_lnc0="inet xxx.xxx.xxx.xxx netmask 255.255.255.0"
别忘了defaultrouter="xxx.xxx.xxx.xxx (gateway ip address)"
如果想一次性的话,只要直接输入 ifconfig lnc0 xxx.xxx.xxx.xxx netmask 255.255.255.0
即时生效
重启后失效!!
图形界面配置IP
sysinstall --> configure --> Networking -->interfaces -->相应网卡名
1.进入 /etc/rc.conf 文件
2.修改 ifconfig_lnc0="inet xxx.xxx.xxx.xxx netmask 255.255.255.0"
别忘了defaultrouter="xxx.xxx.xxx.xxx (gateway ip address)"
如果想一次性的话,只要直接输入 ifconfig lnc0 xxx.xxx.xxx.xxx netmask 255.255.255.0
即时生效
重启后失效!!
图形界面配置IP
sysinstall --> configure --> Networking -->interfaces -->相应网卡名
MySQL 服务器内存使用
[ 2007/11/11 15:02 | by Johnny.He ]
原文作者: Peter Zaitsev
原文来源: http://www.mysqlperformanceblog.com/2006/05/17/mys...
译者:叶金荣(Email:),转载请注明译者和出处,并且不能用于商业用途,违者必究。
Every so often people ask me the question how should they estimate memory consumption by MySQL Server in given configuration. What is the formula they could use.
经常有人问我配置MySQL时该如何估算内存的消耗。那么该使用什么公式来计算呢?
The reasons to worry about memory usage are quite understandable. If you configure MySQL Server so it uses too small amount of memory it will likey perform suboptimally. If you however configure it so it consumes too much memory it may be crashing , failing to execute queries or make operation to swap seriously slowing down. On now legacy 32bit platforms you could also run out of address space so that had to be watched as well.
Having said so, I do not think looking for the secret fomula to compute your possible memory usage is the right approach to this problem. The reasons are - this formula is very complex nowadays and what is even more important “theoretically possible” maximum it provides have nothing to do with real memory consumptions. In fact typical server with 8GB of memory will often run with maximum theoretical memory usage of 100GB or more. Furthermore there is no easy “overcommit factor” you can use - it really depends on application and configuration. Some applications will drive server to 10% of theoretical memory consumptions others only to 1%.
关心内存怎么使用的原因是可以理解的。如果配置MySQL服务器使用太少的内存会导致性能不是最优的;如果配置了太多的内存则会导致崩溃,无法执行查询或者导致交换操作严重变慢。在现在的32位平台下,仍有可能把所有的地址空间都用完了,因此需要监视着。
话虽如此,但我并不觉得找到什么可以计算内存使用的秘诀公式就能很好地解决这个问题。原因有 — 如今这个公式已经很复杂了,更重要的是,通过它计算得到的值只是“理论可能”并不是真正消耗的值。事实上,有8GB内存的常规服务器经常能运行到最大的理论值 — 100GB甚至更高。此外,你轻易不会使用到“超额因素” — 它实际上依赖于应用以及配置。一些应用可能需要理论内存的 10% 而有些仅需 1%。
原文来源: http://www.mysqlperformanceblog.com/2006/05/17/mys...
译者:叶金荣(Email:),转载请注明译者和出处,并且不能用于商业用途,违者必究。
Every so often people ask me the question how should they estimate memory consumption by MySQL Server in given configuration. What is the formula they could use.
经常有人问我配置MySQL时该如何估算内存的消耗。那么该使用什么公式来计算呢?
The reasons to worry about memory usage are quite understandable. If you configure MySQL Server so it uses too small amount of memory it will likey perform suboptimally. If you however configure it so it consumes too much memory it may be crashing , failing to execute queries or make operation to swap seriously slowing down. On now legacy 32bit platforms you could also run out of address space so that had to be watched as well.
Having said so, I do not think looking for the secret fomula to compute your possible memory usage is the right approach to this problem. The reasons are - this formula is very complex nowadays and what is even more important “theoretically possible” maximum it provides have nothing to do with real memory consumptions. In fact typical server with 8GB of memory will often run with maximum theoretical memory usage of 100GB or more. Furthermore there is no easy “overcommit factor” you can use - it really depends on application and configuration. Some applications will drive server to 10% of theoretical memory consumptions others only to 1%.
关心内存怎么使用的原因是可以理解的。如果配置MySQL服务器使用太少的内存会导致性能不是最优的;如果配置了太多的内存则会导致崩溃,无法执行查询或者导致交换操作严重变慢。在现在的32位平台下,仍有可能把所有的地址空间都用完了,因此需要监视着。
话虽如此,但我并不觉得找到什么可以计算内存使用的秘诀公式就能很好地解决这个问题。原因有 — 如今这个公式已经很复杂了,更重要的是,通过它计算得到的值只是“理论可能”并不是真正消耗的值。事实上,有8GB内存的常规服务器经常能运行到最大的理论值 — 100GB甚至更高。此外,你轻易不会使用到“超额因素” — 它实际上依赖于应用以及配置。一些应用可能需要理论内存的 10% 而有些仅需 1%。
Apache2开启mod_rewrite的方法
[ 2007/11/10 23:57 | by Johnny.He ]
本来要开启rewrite,只要打开httpd.conf,把下面这行前面的#去掉就可以了。
可是昨天装了apache2最新版却出了意外,去掉了这行,rewrite还没打开
用了一个下午,百思不得其解.终于发现httpd.conf里有这么一段
将AllowOverride None改为AllowOverride All
重启Apache,终于搞定!
#LoadModule rewrite_module modules/mod_rewrite.so
可是昨天装了apache2最新版却出了意外,去掉了这行,rewrite还没打开
用了一个下午,百思不得其解.终于发现httpd.conf里有这么一段
<Directory "/usr/local/www">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.2/mod/core.html#opt...
# for more information.
#
Options Indexes FollowSymLinks
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride None
#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all
</Directory>
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.2/mod/core.html#opt...
# for more information.
#
Options Indexes FollowSymLinks
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride None
#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all
</Directory>
将AllowOverride None改为AllowOverride All
重启Apache,终于搞定!
打算安装Xwindow!
[ 2007/11/09 00:24 | by Johnny.He ]
站位!,以后写笔记!






