(*)系统参数
1、消息队列大小 和 可打开文件数 设置
/etc/sysctl.conf中增加以下配置
kernel.msgmni=1000
kernel.msgmax=81920
kernel.msgmnb=1638400
#fs.mqueue.msg_max=1000
#fs.mqueue.msgsize_max=8192
net.ipv4.tcp_fin_timeout = 10
net.ipv4.tcp_syncookies = 1
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_tw_recycle = 1
fs.file-max=6553600
net.ipv4.tcp_max_tw_buckets = 5000
net.ipv4.tcp_fin_timeout = 30
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_tw_recycle = 1
net.ipv4.tcp_syncookies = 0
net.ipv4.tcp_keepalive_time = 600
net.ipv4.ip_local_port_range = 4000 65000
net.ipv4.tcp_max_syn_backlog = 8192
net.ipv4.route.gc_timeout = 100
net.ipv4.tcp_syn_retries = 1
net.ipv4.tcp_synack_retries = 1
net.ipv4.tcp_keepalive_probes = 3
net.ipv4.tcp_keepalive_intvl =15
net.ipv4.tcp_retries2 = 5
/sbin/sysctl -p 生效
2、系统资源数设置
/etc/security/limits.d/数字-nproc.conf
* soft nproc 65535
/etc/security/limits.conf中增加以下配置
* soft nproc 65535
* hard nproc 65535
(*)ORACLE数据库
su – oracle
sqlplus “/as sysdba”
(*)关闭审计
1、查看审计功能是否开启
SQL> show parameter audit_trail;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
audit_trail string DB
说明:VALUE值为DB,表明审计功能为开启的状态
2、关闭oracle的审计功能
alter system set audit_trail=FALSE scope=spfile;
3、重启数据库
shutdown immediate;
startup;
(*)修改oracle用户密码永不过期
1、查看用户的proifle是哪个,一般是default
SELECT username,PROFILE FROM dba_users;
2、查看指定概要文件(如default)的密码有效期设置
SELECT * FROM dba_profiles s WHERE s.profile=‘DEFAULT‘ AND resource_name=‘PASSWORD_LIFE_TIME‘;
3、将密码有效期由默认的180天修改成“无限制”
ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED;
4、修改后,还没有被提示ORA-28002警告的帐户不会再碰到同样的提示;已经被提示的帐户必须再改一次密码,举例如下
alter user smsc identified by ----不用换新密码
5、重启数据库
shutdown immediate;
startup;
(*)修改最大连接数和最大游标数
1、修改Oracle最大连接数
查询目前连接数:show parameter processes;
修改最大连接数:alter system set processes=1000 scope=spfile;
2、修改Oracle最大游标数
查看游标数:show parameter open_cursors;
查看当前打开游标数:select count(*) from v$open_cursor;
修改Oracle最大游标数:alter system set open_cursors=3000 scope=both;
3、重新启动Oracle
shutdown immediate;
startup;
(*)应用模块
(*)tomcat配置多应用【多个war包】时
1、catalina.sh
找到 # Bugzilla 37848: only output this if we have a TTY
if [ $have_tty -eq 1 ]; then
echo "Using CATALINA_BASE: $CATALINA_BASE"
增加:JAVA_OPTS="-Xms1024m -Xmx2048m -XX:PermSize=1024m -XX:MaxPermSize=2048M"
# Bugzilla 37848: only output this if we have a TTY
if [ $have_tty -eq 1 ]; then
JAVA_OPTS="-Xms1024m -Xmx2048m -XX:PermSize=1024m -XX:MaxPermSize=2048M"
echo "Using CATALINA_BASE: $CATALINA_BASE"
2、web.xml
webAppRootKey
metmsweb
3、server.xml
并发数
maxThreads="400" minSpareThreads="400"/>
port="8080" protocol="HTTP/1.1"
acceptCount="1000" enableLookups="false"
connectionTimeout="20000" redirectPort="8443" URIEncoding="utf-8"/>
4、去掉tomcat access日志