How To Prepare a System for Production.[1]

[入库:2005年9月19日] [更新:2007年3月24日]

本文简介:


How To Prepare a System for Production.


update 11/07/2001 

By Colin A. Bitterfield 
SUN Microsystems, Inc.

Contact Me

--------------------------------------------------------------------------------

A note on these recommendations. Since Solaris 2.6 is end of life and Solaris 8 is the flagship OS currently. This article is targeted to Solaris 8. Some of the tuning parameters listed will did not exist in Solaris 2.6 and others are no longer an issue in 8.
Edit or Create the following Files:

a. /etc/default/login
+ CONSOLE=/dev/console (+号表示加入,该句的意思是只允许root用户从控制台登陆)
+ PATH=/opt/sfw/bin:/usr/local/bin:/usr/bin:/usr/sbin:/usr/openwin/bin:/usr/dt/bin:/usr/ccs/bin:/usr/ucb:.
+ SUPATH=/opt/sfw/bin:/usr/local/bin:/usr/bin:/usr/sbin:/usr/openwin/bin:/usr/dt/bin:/usr/ccs/bin:/usr/ucb
+ SYSLOG_FAILED_LOGINS=3

b. /etc/default/su
+ PATH=/opt/sfw/bin:/usr/local/bin:/usr/bin:/usr/sbin:/usr/openwin/bin:/usr/dt/bin:/usr/ccs/bin:/usr/ucb
(这个变量的在哪用,谁来解释一下?)
+ SUPATH=/opt/sfw/bin:/usr/local/bin:/usr/bin:/usr/sbin:/usr/openwin/bin:/usr/dt/bin:/usr/ccs/bin:/usr/ucb
(使用su命令后,系统设置的PATH路径)

c. /etc/default/telnetd 
+ BANNER=""
BANNER用来设置你使用telnet登陆时显示的欢迎信息,建议在后面加上个\n.

d. /etc/default/ftpd
+ BANNER=""
参考上面解释

e. /etc/default/inetinit
-  TCP_STRONG_ISS=1
+ TCP_STRONG_ISS=2
(不知道)

f. /etc/inetd.conf

See Example
[url]http://colin.bitterfield.com/files/example_inetd_conf.txt[/url]

Please note that a router filter should be in place for not allowing REXEC type commands from outside the network.
(在这个文件中注释掉一些不常用的服务,具体可以参考蜘蛛的一篇文章)

g. /etc/init.d/inetsvc
- /usr/sbin/inetd -s&
+ /usr/sbin/inetd -s -t&
 (以调试方式启动inetd进程)

h. create file /etc/notrouter
# touch /etc/notrouter
创建notrouter文件,以禁止路由.

i. Modify /etc/init.d/inetinit (At end), set TCP tuning parameters.

Reference: This information is an excerpt/recommendation from SysAdmin magazine November 2000, "Securing Solaris" by Idu Dubrowsky. 
修改/etc/init.d/inetinit文件,设置tcp协调参数: 

+/usr/sbin/ndd -set /dev/tcp tcp_mss_def_ipv4 846
+/usr/sbin/ndd -set /dev/arp arp_cleanup_interval 150000 

Reference: This information is an excerpt from "SUN Tuning and Performance" by Adrian Cockcroft and Richard Pettit second edition. 

(use at own risk, these are some of my recommendations for web services based machine)

+/usr/sbin/ndd -set /dev/tcp tcp_time_wait_interval 60000

+/usr/sbin/ndd -set /dev/tcp tcp_conn_req_max_q0 1024
侦听后备队列(默认为128)
+/usr/sbin/ndd -set /dev/tcp tcp_xmit_hiwat 32768
传输缓冲区大小(我建议设成最大值,65536)
+/usr/sbin/ndd -set /dev/tcp tcp_recv_hiwat 32768
接收窗口大小(我建议设成最大值,65536)
+/usr/sbin/ndd -set /dev/tcp tcp_slow_start_initial 2

Reference: This one is from a test I performed on moving small files via FTP. I saw a 500% improvement with this setting change.
+/usr/sbin/ndd -set /dev/tcp tcp_deferred_ack_interval1

j. Modify /etc/system
Reference: This is the manual for all tuning parameters in Solaris 8.Do *not* make hundreds of changes because you think you need them. Please read the book by Adrian Cockcroft and Richard Pettit.
* Good Values to add from defaults
* This adjusts many other parameters that use this as a base for calculation
(修改/etc/system文件, 修改这个文件前请一定要备份一份.)

set maxusers=512

本文关键:How To Prepare a System for Production.
  相关方案
Google
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top