This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rem 运维项目目录结构初始化 | |
md "安全评估" | |
md "变更管理" | |
md "部署配置" | |
md "合同服务内容" | |
md "事件管理" | |
md "数据库管理" | |
md "月报" | |
md "运维报告" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
echo 正在添加IIS功能,这可能需要几分钟时间... | |
start /w pkgmgr /iu:IIS-WebServerRole;IIS-WebServer;IIS-CommonHttpFeatures;IIS-StaticContent;IIS-DefaultDocument;IIS-DirectoryBrowsing;IIS-HttpErrors;IIS-HttpRedirect;IIS-ApplicationDevelopment;IIS-ASPNET;IIS-NetFxExtensibility;IIS-ASP;IIS-ISAPIExtensions;IIS-ISAPIFilter;IIS-ServerSideIncludes;IIS-HealthAndDiagnostics;IIS-HttpLogging;IIS-LoggingLibraries;IIS-RequestMonitor;IIS-HttpTracing;IIS-CustomLogging;IIS-ODBCLogging;IIS-Security;IIS-BasicAuthentication;IIS-WindowsAuthentication;IIS-DigestAuthentication;IIS-ClientCertificateMappingAuthentication;IIS-IISCertificateMappingAuthentication;IIS-URLAuthorization;IIS-RequestFiltering;IIS-IPSecurity;IIS-Performance;IIS-HttpCompressionStatic;IIS-HttpCompressionDynamic;IIS-WebServerManagementTools;IIS-ManagementConsole;IIS-ManagementScriptingTools;IIS-ManagementService;IIS-IIS6ManagementCompatibility;IIS-Metabase;IIS-WMICompatibility;IIS-LegacyScripts;IIS-LegacySnapIn;WAS-WindowsActivationService;WAS-ProcessModel;WAS-NetFxEnvi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[p_set]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) | |
drop procedure [dbo].[p_set] | |
GO | |
/*--将所有的表中,数值类型由char,varchar改为nchar,nvarchar | |
--*/ | |
/*--调用示例: | |
exec p_set |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DECLARE @Table NVARCHAR(30) | |
DECLARE tmpCur CURSOR FOR | |
SELECT name FROM sys.objects WHERE TYPE='U' AND name LIKE N'HSUPA%' | |
OPEN tmpCur | |
FETCH NEXT FROM tmpCur INTO @Table | |
WHILE @@FETCH_STATUS = 0 | |
BEGIN | |
DECLARE @sql VARCHAR(100) | |
SELECT @sql = 'drop table ' + @Table |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This program is part of LNNPP: http://code.google.com/p/lnmpp | |
ssh_port_ready='' | |
ip='' | |
main () { | |
gen_rsa_id | |
cat /etc/hosts | grep -v ^# | grep -v ^$ | while read line | |
do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# chkconfig: - 85 15 | |
# description: Startup script for the server of Rabbitmq | |
# | |
RABBITMQ=/usr/local/rabbitmq | |
SBIN=$RABBITMQ/sbin/rabbitmq-server | |
CONTROL=$RABBITMQ/sbin/rabbitmqctl | |
PID=$RABBITMQ/var/lib/rabbitmq/mnesia/rabbit@`hostname -s`.pid |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
TSUNG=/usr/local/tsung/bin/tsung | |
CONF=/data/httpd/tsung/etc/test.d.xml | |
LOG=/data/httpd/tsung/log | |
/usr/bin/screen -d -m $TSUNG -f $CONF -l $LOG start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function selfURL() { | |
$s = empty($_SERVER["HTTPS"]) ? '' | |
: ($_SERVER["HTTPS"] == "on") ? "s" | |
: ""; | |
$protocol = $this->strleft(strtolower($_SERVER["SERVER_PROTOCOL"]), "/").$s; | |
$port = ($_SERVER["SERVER_PORT"] == "80") ? "" | |
: (":".$_SERVER["SERVER_PORT"]); | |
return $protocol."://".$_SERVER['SERVER_NAME'].$port.dirname($_SERVER['REQUEST_URI'])."/"; | |
} | |
function strleft($s1, $s2) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
PHP forked daemon | |
Standalone PHP binary must be compiled with --enable-sockets and --enable-pcntl | |
Dave M. -2002 | |
Online Services USA | |
*/ | |
define(DEBUG,true); | |
require dirname(__FILE__)."/../../config/config.php"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
grep "use shop" /var/lib/mysql/slow.log | awk '{print $2}' | awk -F\; '{print $1}' | sort | uniq -c | sort -nr |
OlderNewer