oracle 10g_rac_create tablespace_add_datafile
create tablespace test datafile '+XXXX' size 3M autoextent on next 50M maxsize 8000M extent management local uniform;alter tablespace test add datafile '+XXX' size 3M autoextent on next 50M maxsize 8000M ;drop tablespace test including contents and datafiles;[@more@]
linux_websphere_wsadmin.sh
websphere 6.0.2/app1/ibm/IBM/WebSphere/AppServer/bin/wsadmin.shwsadmin命令行管理[@more@]./wasprofile.sh -create -profileName bladetcb6profile -profilePath /usr/IBM/WebSphere/AppServer/profiles/bladetcb6profile -templatePath /usr/WebSphere/AppServer/profileTemplates/default -nodeName bladetcb6node -cellName bladetcb6Cell -hostName bladetcb6.rtp.raleigh.ibm.comAppSrv01./wasprofile.sh -create -profileName AppSrv01 -profilePath /app1/ibm/IBM/WebSphere/AppServer/profiles/AppSrv01 -templatePa
Linux_java_调用classes
java 调用class[@more@]#!/bin/shLANG=zh_CN.GBKDATE="`date +%m%d%H%M`"#add by llbcps=$CLASSPATH:"/usr/local/tomcat/webapps/sitestat/WEB-INF/classes"for jarPkg in `find /usr/local/tomcat/webapps/sitestat/WEB-INF/lib -name "*.jar"`do cps=$cps:$jarPkgdone#echo $cpsjava -cp $cps com.sinovatech.websitetotal.AnalyseDatasleep 10
solaris_linux_批量删除搜索出的文件
for file in `find ./ -name '*' | grep '.jsp$'` ;do rm -rf $file ; done ===========================#!/bin/shfor file in `find ./ -name '*' | grep '[a-z]*.[0-9]$'` do if [ -d $file ] ; then echo "This is Directory ..." continue else ls -trl ${file} fi done[@more@]
Linux下的Oracle9i data guard配置过程
Linux下的Oracle9i data guard配置过程[@more@]# CONFIGURE STANDBY DATABASEsqlplus /nologset lines 160col PARAMETER for a50col VALUE for a80col name for a40connect / as sysdba;# 启动主库导归档模式startup mount;archive log list;archive log start;alter database Archivelog; alter database force logging; alter database open;# Enable Archiving and Define a Local Archiving Destination ! mkdir -p /export/home/oracle/admin/ECOM/adump/ecom# Create a Control File for the Standby Databasealter database create
linux_php_jpeg6,png,gd
linux 下编译安装gd后php的探针总是不能检测到,以下是编译pnp,jpeg6,freetype ,gd,最后从新编译php后才算能够探测到gd.编译php后要从起apache[@more@]# 编译png./configure --prefix=/usr/local/png# 编译jpeg6./configure --with-jpeg=/usr/local/jpeg6 --with-png --with-zlib --with-freetype=/usr/local/freetype --with-xpm# 编译freetype ./configure --prefix=/usr/local/freetype# 编译 gd./configure --prefix=/usr/local/gd --with-jpeg=/usr/local/jpeg6 --with-png=/usr/local/lib --with-zlib=/usr/local/lib --with-freetyp
linux_web_中间建_数据库安装配置
web_中间建_数据库_安装配置[@more@] 安装部署文档 RedHat 安装:1. 安装要求:lvm管理方式 分区方式: 1):/ 4000M 2):swap(MEM<4096) =MEM * 2 (MEM>4096) =MEM 3):/user 12000M 4):/home 10000M 5):/var 4000M 6):/app 剩余空间 配置SSH安全:1) 关闭ssh底版本兼容#Protocol 2,1 ---> Protocol 22) 禁止root远程登陆 #PermitRootLogin yes --> PermitRootLogin n
linux_rsyncd.conf
uid = tomcatgid = appmax connections = 50pid file = /var/run/rsyncd.pidlock file = /var/run/rsyncd.locklog file = /var/log/rsyncd.log[lt]path = /app/tomcat/webapps/ltcomment = read only = no[ehall]path = /app/tomcat/webapps/lt/ehallcomment = read only = no[config]path = /appcomment = read only = no[@more@]uid = tomcatgid = appmax connections = 50pid file = /var/run/rsyncd.pidlock file = /var/run/rsyncd.locklog file = /var/log/rsyncd.log[lt]path = /app/tomcat/webapps/ltcomment = read only = no[eh
solaris_批量替换指定字符串_find_xargs_grep
==========================#!/bin/shapps_dir='/tmp/ddd/fj'cd ${apps_dir}/while read strs do echo ${strs} find ./ -type f | xargs perl -pi -e "s|href="${strs}|href="/|g" find ./ -type f | xargs perl -pi -e "s|href=" ${strs}|href="/|g" find ./ -type f | xargs perl -pi -e "s|src="${strs}|src="/|g" done < /tmp/ddd/string_file[@more@]==========================#!/bin/shapps_dir='/tmp/ddd/fj'cd ${apps_dir}/while
linux_scritp_apache日志中IP地址记录
#!/bin/bashLANG=en.USD=`date +"%Y%m%d"`LOG="/app/apache/logs/web-$1.log"cat ${LOG}| awk '{print $1}' | sort | uniq -c | sort -rn>./countIP_${1}.logexit 1[@more@]#!/bin/bashLANG=en.USD=`date +"%Y%m%d"`LOG="/app/apache/logs/web-$1.log"cat ${LOG}| awk '{print $1}' | sort | uniq -c | sort -rn>./countIP_${1}.logexit 1
linux_script_批量搜索指定串并取关键子
find ./ -type f | grep -v 'http://www.xxx.com| grep -iv 'gif' | grep -v 'WEB-INF' | grep -v 'logs' | xargs grep 'www.yyy.com.cn' | awk -F["] 'print $2' | sort | uniq -c | awk -F[//] '{print $2}' >/tmp/tmp.log[@more@]find ./ -type f | grep -v 'http://www.xxx.com| grep -iv 'gif' | grep -v 'WEB-INF' | grep -v 'logs' | xargs grep 'www.yyy.com.cn' | awk -F["] 'print $2' | sort | uniq -c | awk -F[//] '{print $2}' >/tmp/tmp.log
linux_perl批量替换文件
find ./ -type f | xargs perl -pi -e 's|old_strings|new_strings|g'[@more@]find ./ -type f | xargs perl -pi -e 's|old_strings|new_strings|g'
solaris 9_xargs grep递归
find ./ -type f -print | xargs file | grep text |sed -e "s/:.*//" | xargs -i grep -l '^M' {} > resultM.file while read LINE do chmod 755 $LINE dos2unix $LINE $LINE done < resultM.file==========================递归查找字符find ./sso/ -type f |grep -v 'log'|grep -v 'tar'| grep -v 'jpg'| grep -v 'JPG'|xargs grep -n 'www.sohu.com'>/tmp/www.sohu.com ===============================#!/bin/shDIR="$1"file="`echo $USER`"file_1="`basename ${DIR}`"find "
linux_sed替换特殊符号
1.sed 替换单引号sed 's/'200/'300/g' a.txt改成sed "s/'200/'300/g" a.txt2.sed替换变量sed 's/$a/$b/g' a.txt改成sed "s/$a/$d/g" a.txt[@more@]
apache_httpd.conf_重定向到其它网址
Redirect / "http://124.42.1.138/"[@more@]ac
oracle job_相关
select job,last_date,last_sec,next_date,next_sec,broken,failures from user_jobs; 启动:exec dbms_job.run(1);删除:exec dbms_job.remove(1);停止:exec dbms_job.broken(1,false);[@more@]select job,last_date,last_sec,next_date,next_sec,broken,failures from user_jobs; 启动:exec dbms_job.run(1);删除:exec dbms_job.remove(1);停止:exec dbms_job.broken(1,false);
apache_weblogic自动生成可执行脚本
mkdir -p /www/apache/htdocs/mzonehrchown -R weblogic.weblogic /www/apache/htdocs/mzonehrvi auto_app.sh#!/bin/shserv_dir="/weblogic/weblogic/myserver"service_name="$1"cd ${serv_dir}/$1/cat >$1_rsync_web<<EOF#!/bin/sh RSYNC="/usr/local/bin/rsync" OPT='-az --exclude "WEB-INF/" --exclude "*.jsp" --exclude "*.tar" --exclude "*.gz" --exclude "*.sh" --exclude "CVS/" --exclude "logs"'LOCAL='${se
apache日志中IP地址排序
#!/bin/bashLANG=en.USD=`date +"%Y%m%d"`LOG="$1"cat ${LOG}| awk '{print $1}' | sort | uniq -c | sort -rn>./countIP_${2}.logexit 1[@more@]
apache_别名_Alias
Alias /shop/ "/home/tom3/webapps/bjnewshop/" <Directory "/home/tom3/webapps/bjnewshop"> Options Indexes MultiViews AllowOverride None Order allow,deny Allow from all</Directory>[@more@]
aix命令_gzip_tar连用
gzip -dc file_name.tar.gz | tar -xvf -[@more@]gzip -dc file_name.tar.gz | tar -xvf -