2013/07/29


@echo off 
rem eth //eth 为网卡名称,可在网络连接中查询,如"本地链接" 
set eth="本地链接" 
rem ip //ip 为你想更改的IP 
set ip=192.168.4.23 
rem gw //gw 为网关地址 
set gw=192.168.4.1 
rem netmasks //netmasks 为子网掩码 
set netmasks=255.255.255.192 

echo 正在将本机IP更改到: %ip% 
rem 
if %gw%==none netsh interface ip set address %eth% static %ip% %netmasks% %gw% > nul 
if not %gw%==none netsh interface ip set address %eth% static %ip% %netmasks% %gw% 1 > nul 
echo......................... 
echo 检查当前本机IP: 
ipconfig 
echo......................... 
echo 成功将本机IP更改为%ip%! 
pause 
close 

2013/07/24

Build NTP server on CentOS via yum

yum -y install ntp

mv /etc/ntp.conf /etc/ntp.conf.bak

vi /etc/ntp.conf

--past it
driftfile /var/lib/ntp/drift
restrict default kod nomodify notrap nopeer noquery
restrict -6 default kod nomodify notrap nopeer noquery
restrict 127.0.0.1
restrict -6 ::1
restrict 192.168.0.0 mask 255.255.255.0 nomodify
server tick.stdtime.gov.tw
server tock.stdtime.gov.tw
server time.stdtime.gov.tw
server clock.stdtime.gov.tw
server watch.stdtime.gov.tw
includefile /etc/ntp/crypto/pw
keys /etc/ntp/keys
--


or edit

vi /etc/ntp.conf

####
#add
####

restrict 127.0.0.1
restrict -6 ::1
restrict 192.168.0.0 mask 255.255.255.0 nomodify

server tick.stdtime.gov.tw
server tock.stdtime.gov.tw
server time.stdtime.gov.tw
server clock.stdtime.gov.tw
server watch.stdtime.gov.tw

###
#qw
###

service ntp restart
chkconfig ntp on

##iptables
iptables -I INPUT -p udp --dport 123 -j ACCEPT
iptables -I OUTPUT -p udp --sport 123 -j ACCEPT

2013/07/19

cat config out put as file

cat anaconda-ks.cfg |grep -Env "^$|#" > log

2013/07/11

New server

rpm -Uvh http://mirror01.idc.hinet.net/EPEL/6/i386/epel-release-6-8.noarch.rpm
rpm -Uvh http://mirror01.idc.hinet.net/EPEL/6/x86_64/epel-release-6-8.noarch.rpm
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm

2013/07/08

sql2008 install error "SQL Server 服務的指定認證無效。若要繼續,請提供 SQL Server 服務的有效帳戶和密碼。"

error

"SQL Server 服務的指定認證無效。若要繼續,請提供 SQL Server 服務的有效帳戶和密碼。"

fix

username


"NT AUTHORITY\SYSTEM"   or  "NT AUTHORITY\NETWORK SERVICE"