2013年7月26日 星期五

Configure Windows Server 2008/2012 To Sync With Internet Time Servers

net stop w32time
w32tm /config /syncfromflags:manual /manualpeerlist:"time-a.nist.gov, time-b.nist.gov, time-c.nist.gov, time-d.nist.gov"
w32tm /config /reliable:yes
net start w32time
w32tm /query /configuration

2013年7月25日 星期四

Linux Uninstal Oracle

Uninstalling all products from UNIX is a lot more consistent. If you do need to resort to a manual uninstall you should do something like:

* Uninstall all Oracle components using the Oracle Universal Installer (OUI).
* Stop any outstanding processes using the appropriate utilities:

# oemctl stop oms user/password
# agentctl stop
# lsnrctl stop

Alternatively you can kill them using the kill -9 pid command as the root user.
* Delete the files and directories below the $ORACLE_HOME:

# cd $ORACLE_HOME
# rm -Rf *

* With the exception of the product directory, delete directories below the $ORACLE_BASE.

# cd $ORACLE_BASE
# rm -Rf admin doc jre o*

* Delete the /etc/oratab file. If using 9iAS delete the /etc/emtab file also.

# rm /etc/oratab /etc/emtab
#rm -rf /usr/local/oracle
#rm -rf /etc/oraInst.loc

2013年7月24日 星期三

/etc/ntp.conf

# Permit time synchronization with our time source, but do not
# permit the source to query or modify the service on this system.
restrict default kod nomodify notrap nopeer noquery
restrict -6 default kod nomodify notrap nopeer noquery

# Permit all access over the loopback interface.  This could
# be tightened as well, but to do so would effect some of
# the administrative functions.

restrict time.stdtime.gov.tw
restrict tock.stdtime.gov.tw
restrict tick.stdtime.gov.tw
restrict clock.stdtime.gov.tw
restrict watch.stdtime.gov.tw 
restrict 127.0.0.1 
restrict -6 ::1
restrict 192.168.9.0 mask 255.255.255.0 nomodify
restrict 10.144.82.0 mask 255.255.255.0 nomodify
restrict 192.168.100.0 mask 255.255.255.0 nomodify

# Hosts on local network are less restricted.
#restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap

# Use public servers from the pool.ntp.org project.
# Please consider joining the pool (http://www.pool.ntp.org/join.html).
server tick.stdtime.gov.tw prefer
server tock.stdtime.gov.tw prefer
server time.stdtime.gov.tw prefer
server clock.stdtime.gov.tw
server watch.stdtime.gov.tw

#broadcast 192.168.1.255 key 42  # broadcast server
#broadcastclient   # broadcast client
#broadcast 224.0.1.1 key 42  # multicast server
#multicastclient 224.0.1.1  # multicast client
#manycastserver 239.255.254.254  # manycast server
#manycastclient 239.255.254.254 key 42 # manycast client

# Undisciplined Local Clock. This is a fake driver intended for backup
# and when no outside source of synchronized time is available. 
server 127.127.1.0 # local clock
fudge 127.127.1.0 stratum 10 

# Drift file.  Put this in a directory which the daemon can write to.
# No symbolic links allowed, either, since the daemon updates the file
# by creating a temporary in the same directory and then rename()'ing
# it to the file.
driftfile /var/lib/ntp/drift

# Key file containing the keys and key identifiers used when operating
# with symmetric key cryptography. 
keys /etc/ntp/keys

# Specify the key identifiers which are trusted.
#trustedkey 4 8 42

# Specify the key identifier to use with the ntpdc utility.
#requestkey 8

# Specify the key identifier to use with the ntpq utility.
#controlkey 8
啟動 ntp 伺服器
#service ntpd start

設定開機自動啟動
#chkconfig ntpd on

等候數分鐘後檢查是否有連上伺服器
#ntpstat

列出 NTP 和上層 NTP 的狀態
#ntpq -p
Client 端設定
#vi /etc/ntp.conf
restrict 192.168.*.*(server 端 ip)
server 192.168.*.*

設定開機自動啟動
#chkconfig ntpd on

OR

設定 crontab 方式
#vi /etc/crontab
0 * * * * root ntpdate time.stdtime.gov.tw
每小時0分對時一次

Linux 手動設定日期時間

date --set="23 June 1988 10:00:00"
date --set="10:00:00"

2013年7月23日 星期二

Android 4.0.4 compile

python2.7 ~bin/repo init -u http://git.android-x86.org/manifest -b ics-x86
repo sync
lunch eeepc-eng
make iso_img
裝 Python 2.7.3, 這個版本才能執行 repo
yum groupinstall "Development tools"
yum install zlib-devel
yum install bzip2-devel openssl-devel ncurses-devel
wget http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tar.bz2
tar xf Python-2.7.3.tar.bz2 
cd Python-2.7.3
./configure --prefix=/usr/local
make && make altinstall
/usr/local/bin/python2.7
curl http://android.git.kernel.org/repo > ~/bin/repo
chmod a+x ~/bin/repo
python2.7 ~/bin/repo init

/etc/rc.d/rc.local

#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.

touch /var/lock/subsys/local
#KERNEL PARAMETER CONFIG BEGIN
echo 250 32000 100 128 > /proc/sys/kernel/sem
echo 4294967224 > /proc/sys/kernel/shmmax
echo 4096 > /proc/sys/kernel/shmmni
echo 2097152 > /proc/sys/kernel/shmall
echo 1024 65000 > /proc/sys/net/ipv4/ip_local_port_range
echo 262144 > /proc/sys/net/core/rmem_default
echo 262144 > /proc/sys/net/core/rmem_max
echo 262144 > /proc/sys/net/core/wmem_default
echo 262144 > /proc/sys/net/core/wmem_max
#KERNEL PARAMETER CONFIG END
#IP CONFIG BEGIN
#IP CONFIG END
#ENV STARTUP BEGIN
su - oracle -c "lsnrctl start"
sleep 5
su - oracle -c "echo startup |sqlplus \"/as sysdba\" "

su - oracle -c "lsnrctl set log_status off"
#/usr/local/gs36_gs_demo/IBM/HTTPServer/bin/apachectl start
#su - gs36_msig_poc -c 'cd /usr/local/gs36_gs_demo/IBM/WebSphere/AppServer/profiles/gs36_gs_demo;sh restart.sh'

#mount -t cifs //192.168.9.129/document /usr/local/gs36_gs_demo/IBM/WebSphere/AppServer/profiles/gs36_gs_demo/EBAO_ARCH_HOME/print_archive_data -o username=administrator,password=Ebaotech250,Domain=WIN-44TQ501NLG3,mode=777,uid=503,gid=504
mount -t cifs //192.168.9.129/print_archive_data  /home/ls36/domains/base_domain/ls36/EBAO_ARCH_HOME/document -o username=administrator,password=Ebaotech250,Domain=WORKGROUP,mode=777,uid=505,gid=505
su - ls36 -c 'source /home/ls36/.bash_profile;cd $BATCH_HOME;sh batch_manage.sh start; cd $DOMAIN_HOME; sh startWebLogic.sh'
#ENV STARTUP END

Linux Install Git

$ yum install curl-devel expat-devel gettext-devel \
  openssl-devel zlib-devel

$ apt-get install libcurl4-gnutls-dev libexpat1-dev gettext \
  libz-dev
wget http://www.codemonkey.org.uk/projects/git-snapshots/git/git-latest.tar.gz
tar xzvf git-latest.tar.gz
cd git-2013-07-3230 #您的目錄可能不是這個 
autoconf
./configure
make
sudo make install

2013年7月18日 星期四

VMWare Date Sync

xxxx.vmx tools.syncTime改為 True
usb:1.parent = "-1"
tools.syncTime = "TRUE"
ide1:0.autodetect = "TRUE"

2013年7月17日 星期三

eBao PASSWORD

eBao1234
3c4eee78457e3c9b0d2fa9ed9693e1dc
GS
 
?
ed06be42ae579b86a407a949b238021b
LS
ADMIN
?
c5718d5d761ef62b8e76c90864e93063
 
 


update t_user set password_change=sysdate where user_name='ADMIN';

Linux mount Windows共享目錄

mount -t cifs //192.168.9.129/print_archive_data  /home/ls36/domains/base_domain/ls36/EBAO_ARCH_HOME/document -o username=administrator,password=Ebaotech250,Domain=WORKGROUP,mode=777,uid=505,gid=505

2013年7月15日 星期一

LS 3.6 create user

sqlplus "/as sysdba"
SQL> @create_user.sql

CENTOS Install GNOME Desktop Environment

yum groupinstall 'GNOME Desktop Environment' -y

Install Oracle 11.2.0.3 /usr/local/oraInvetory

mkdir -p /usr/local/oracle /usr/local/oraInventory   /usr/local/oradata/
chown -R oracle:oinstall /usr/local/oracle /usr/local/oraInventory   /usr/local/oradata/
chmod -R 775 /usr/local/oracle 
chmod -R 775   /usr/local/oraInventory 
chmod -R 775   /usr/local/oradata/