公告版位

1. The table doesn't have foreign key.

>> USE DatabaseName;

>> TRUNCATE TABLE TableName;

 

2. The table has foreign key.

>> USE DatabaseName;

>> DELETE [TableName];

>> DBCC CHECKIDENT('TableName', RESEED, 0);

dreamtails 發表在 痞客邦 留言(0) 人氣()

1. Open "Sql Server Configuration Manager".

dreamtails 發表在 痞客邦 留言(0) 人氣()

1. 開啟「新增/移除程式」選單:

「cmd」→下指令「appwiz.cpl」

 

2. 開啟「系統服務」選單:

「cmd」→下指令「services.msc」

dreamtails 發表在 痞客邦 留言(1) 人氣()

step 1: 使用"管理者權限"打開「命令提示字元」

step 2: 下指令> net user administrator /active:yes

dreamtails 發表在 痞客邦 留言(0) 人氣()

Step1)

# vim /etc/udev/rules.d/70-persistent-net.rules
-----------------------------------------------------------------------
# PCI device 0x14e4:0x1680 (tg3)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:7b:d8:06", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eno16777736", NAME="eth0"
-----------------------------------------------------------------------

or

-----------------------------------------------------------------------
# PCI device 0x14e4:0x1680 (tg3)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:7b:d8:06", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eno*", NAME="eth0"
-----------------------------------------------------------------------

dreamtails 發表在 痞客邦 留言(0) 人氣()

環境: CentOS 6.5 64-bit

 

Download Packages:

----------------------------------------------------------------------------------------

1. http://www.centreon.com/

 

(1) Centreon Web

http://www.centreon.com/Content-Download/donwload-centreon

 

2. http://www.nagios.com/

 

(1) Nagios Core

http://www.nagios.org/download/core/

 

(2) Nagios Plugins

http://www.nagios.org/download/plugins/

 

(3) Nagios Addons

 

NRPE:

http://www.nagios.org/download/addons/

 

NDOUtils:

http://www.nagios.org/download/addons/

----------------------------------------------------------------------------------------

 

dreamtails 發表在 痞客邦 留言(3) 人氣()

由下列訊息可以看到紅色部份就是被Firewall擋下來的session.

root@SRX-3400> show security flow cp-session source-prefix 192.168.192.192

dreamtails 發表在 痞客邦 留言(0) 人氣()

NAT_Router

 

上圖為我們的環境架構。

我們主要的設定皆在NAT Server(CentOS 6.5)上,eth0為10.10.1.1/16, Gateway為10.10.0.254,eth1為192.168.212.82/30,eth2為192.168.212.85/30


情境: 由eth1過來的封包且source ip為100.66.1.1/32, 100.66.1.2/32, 100.66.1.3/32. 這些封包將NAT為192.168.212.85並且由eth2出去。

dreamtails 發表在 痞客邦 留言(0) 人氣()

# set security policies from-zone untrust to-zone junos-host policy deny-man-traffic match source-address 220.228.123.123/32 destination-address any application any
# set security policies from-zone untrust to-zone junos-host policy deny-man-traffic then deny

dreamtails 發表在 痞客邦 留言(0) 人氣()

step1)
至 http://java.sun.com/ 下載JRE,並安裝。

 

step2)
使用Firefox開啟BMC網頁的iKVM時,會跳出下載jviewer.jnlp的視窗,此時我們就使用JRE packages的javaws執行檔來執行jviewer.jnlp,這樣就可以順利開啟iKVM的畫面了。

 

註: CentOS 6.5的JRE 7 updated 45預設RPM安裝好後的javaws位置為 /usr/java/jre1.7.0_45/bin/ 裡。

dreamtails 發表在 痞客邦 留言(0) 人氣()

方法一:# vi /etc/rc.conf

or

方法二:
# sysinstall

dreamtails 發表在 痞客邦 留言(0) 人氣()

step1) 允許使用root與密碼登入
# vi /etc/ssh/sshd_config
------------------------------
......
PermitRootLogin yes
......
PasswordAuthentication yes
......
------------------------------


step2) 開啟SSH可以使用root遠端登入
# vi /etc/inetd.conf
------------拿掉註解------------------
......
ssh stream tcp nowait root /usr/sbin/sshd sshd -i -4
ssh stream tcp6 nowait root /usr/sbin/sshd sshd -i -6
......
----------------------------------------
 
step3) 開機後自動啟動SSH service
# vi /etc/rc.conf
------------------------------
......
sshd_enable="YES"
......
------------------------------  


step4)
# /etc/rc.d/sshd restart

dreamtails 發表在 痞客邦 留言(0) 人氣()

step1) 允許使用密碼登入
# vi /etc/ssh/sshd_config
------------------------------
......
PasswordAuthentication yes
......
------------------------------


step2) 開機後自動啟動SSH service
# vi /etc/rc.conf
------------------------------
......
sshd_enable="YES"
......
------------------------------  


step3)
# /etc/rc.d/sshd restart

dreamtails 發表在 痞客邦 留言(0) 人氣()

方法一:
# pw user mod <username> -G wheel

or

方法二:
# pw groupmod wheel -m <username>

 


看使用者的group有哪些。
# groups <username>

dreamtails 發表在 痞客邦 留言(0) 人氣()

1. 首先,要去修改sendmail的aliases設定檔(每一台機器的設定不同,aliases放的位子也會不同)

# vim /etc/mail/aliases

or

# vim /etc/aliases

-----------------------------------------
# trap decode to catch security attacks
decode:         root

# Person who should get root's mail
root:           root,dreamtails@mail.com.tw
,dream@mail.com.tw,tails@mail.com.tw
-----------------------------------------

 

2. 產生新的aliases.db檔案,這樣才算成功

# newaliases

dreamtails 發表在 痞客邦 留言(0) 人氣()