2014年8月16日 星期六

CentOS6 DNS 安裝

[A] Primary(Master) DNS Server Details:

Operating System     : CentOS 6.5 32 bit (Minimal Server)
Hostname             : masterdns.ostechnix.com
IP Address           : 192.168.1.200/24

[B] Secondary(Slave) DNS Server Details:

Operating System     : CentOS 6.5 32 bit (Minimal Server)
Hostname             : slavedns.ostechnix.com
IP Address           : 192.168.1.201/24  

Setup Primary(Master) DNS Server

[root@masterdns ~]# yum install bind* -y

1. Configure DNS Server

The main configuration of the DNS will look like below. Edit and add the entries below which were marked as bold in this configuration files.
[root@masterdns ~]# vi /etc/named.conf 
//
// named.conf
//
// Provided by Red Hat bind package to configure the ISC BIND named(8) DNS
// server as a caching only nameserver (as a localhost DNS resolver only).
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
options {
listen-on port 53 { 127.0.0.1; 192.168.1.200;};                      ## Master DNS IP ##
listen-on-v6 port 53 { ::1; };
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
        statistics-file "/var/named/data/named_stats.txt";
        memstatistics-file "/var/named/data/named_mem_stats.txt";
allow-query     { localhost; 192.168.1.0/24; };                      ## IP Range ##
allow-transfer{ localhost; 192.168.1.201; };                        ## Slave DNS IP ##  
recursion yes;
dnssec-enable yes;
dnssec-validation yes;
dnssec-lookaside auto;
/* Path to ISC DLV key */
bindkeys-file "/etc/named.iscdlv.key";
managed-keys-directory "/var/named/dynamic";
};
logging {
        channel default_debug {
                file "data/named.run";
                severity dynamic;
        };
};
zone "." IN {
type hint;
file "named.ca";
};
zone"ostechnix.com" IN {
type master;
file "fwd.ostechnix.com";
allow-update { none; };
};
zone"1.168.192.in-addr.arpa" IN {
type master;
file "rev.ostechnix.com";
allow-update { none; };
};
include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";

2. Create Zone files

Now we should create forward and reverse zone files which we mentioned in the‘/etc/named.conf file.

[A] Create Forward Zone

Create fwd.ostechnix.com file in the ‘/var/named’ directory and add the entries for forward zone as shown below.
[root@masterdns ~]# vi /var/named/fwd.ostechnix.com 
$TTL 86400
@   IN  SOA     masterdns.ostechnix.com. root.ostechnix.com. (
        2011071001  ;Serial
        3600        ;Refresh
        1800        ;Retry
        604800      ;Expire
        86400       ;Minimum TTL
)
@IN  NS      masterdns.ostechnix.com.
@IN  NS     slavedns.ostechnix.com.masterdns     IN  A    192.168.1.200
slavedns     IN  A   192.168.1.201

[B] Create Reverse Zone

Create rev.ostechnix.com file in the ‘/var/named’ directory and add the entries for reverse zone as shown below.
[root@masterdns ~]# vi /var/named/rev.ostechnix.com 
$TTL 86400
@   IN  SOA     masterdns.ostechnix.com. root.ostechnix.com. (
        2011071001  ;Serial
        3600        ;Refresh
        1800        ;Retry
        604800      ;Expire
        86400       ;Minimum TTL
)
@IN  NS      masterdns.ostechnix.com.
@IN  NS      slavedns.ostechnix.com.
masterdnsIN  A   192.168.1.200
slavedns IN  A   192.168.1.201
200       IN  PTR     masterdns.ostechnix.com.
201      IN  PTR    slavedns.ostechnix.com.

3. Start the bind service

[root@masterdns ~]# service named start
Generating /etc/rndc.key:                                  [  OK  ]
Starting named:                                            [  OK  ]
[root@masterdns ~]# chkconfig named on

4. Allow DNS Server through iptables

Add the lines shown in bold letters in ‘/etc/sysconfig/iptables’ file. This will allow all clients to access the DNS server.
[root@masterdns ~]# vi /etc/sysconfig/iptables
# Firewall configuration written by system-config-firewall
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -p udp -m state --state NEW --dport 53 -j ACCEPT
-A INPUT -p tcp -m state --state NEW --dport 53 -j ACCEPT
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT

5. Restart iptables to save the changes

[root@masterdns ~]# service iptables restart
iptables: Flushing firewall rules:                         [  OK  ]
iptables: Setting chains to policy ACCEPT: filter          [  OK  ]
iptables: Unloading modules:                               [  OK  ]
iptables: Applying firewall rules:                         [  OK  ]

6. Test syntax errors of DNS configuration and zone files

[A] Check DNS Config file

[root@masterdns ~]# named-checkconf /etc/named.conf 
[root@masterdns ~]# named-checkconf /etc/named.rfc1912.zones

[B] Check zone files

[root@masterdns ~]# named-checkzone ostechnix.com /var/named/fwd.ostechnix.com 
zone ostechnix.com/IN: loaded serial 2011071001
OK
[root@masterdns ~]# named-checkzone ostechnix.com /var/named/rev.ostechnix.com 
zone ostechnix.com/IN: loaded serial 2011071001
OK
[root@masterdns ~]#

7. Test DNS Server

Method A:

[root@masterdns ~]# dig masterdns.ostechnix.com
; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.10.rc1.el6_3.6 <<>> masterdns.ostechnix.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 11496
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 1
;; QUESTION SECTION:
;masterdns.ostechnix.com.INA
;; ANSWER SECTION:
masterdns.ostechnix.com. 86400INA192.168.1.200
;; AUTHORITY SECTION:
ostechnix.com.86400INNSmasterdns.ostechnix.com.
ostechnix.com.86400INNSslavedns.ostechnix.com.
;; ADDITIONAL SECTION:
slavedns.ostechnix.com.86400INA192.168.1.201
;; Query time: 5 msec
;; SERVER: 192.168.1.200#53(192.168.1.200)
;; WHEN: Sun Mar  3 12:48:35 2013
;; MSG SIZE  rcvd: 110

Method B:

[root@masterdns ~]# dig -x 192.168.1.200
; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.10.rc1.el6_3.6 <<>> -x 192.168.1.200
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 40891
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 2
;; QUESTION SECTION:
;200.1.168.192.in-addr.arpa.INPTR
;; ANSWER SECTION:
200.1.168.192.in-addr.arpa. 86400 INPTRmasterdns.ostechnix.com.
;; AUTHORITY SECTION:
1.168.192.in-addr.arpa.86400INNSmasterdns.ostechnix.com.
1.168.192.in-addr.arpa.86400INNSslavedns.ostechnix.com.
;; ADDITIONAL SECTION:
masterdns.ostechnix.com. 86400INA192.168.1.200
slavedns.ostechnix.com.86400INA192.168.1.201
;; Query time: 6 msec
;; SERVER: 192.168.1.200#53(192.168.1.200)
;; WHEN: Sun Mar  3 12:49:53 2013
;; MSG SIZE  rcvd: 150

Method C:

[root@masterdns ~]# nslookup masterdns
Server:192.168.1.200
Address:192.168.1.200#53
Name:masterdns.ostechnix.com
Address: 192.168.1.200
Thats it. Now the Primary DNS server is ready

Setup Secondary(Slave) DNS Server

[root@slavedns ~]# yum install bind* -y

1. Configure Slave DNS Server

Open the main configuration file ‘/etc/named.conf and add the lines as shown in bold letters.
[root@slavedns ~]# vi /etc/named.conf 
//
// named.conf
//
// Provided by Red Hat bind package to configure the ISC BIND named(8) DNS
// server as a caching only nameserver (as a localhost DNS resolver only).
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
options {
listen-on port 53 { 127.0.0.1; 192.168.1.201; };                    ## Slve DNS IP ##      
listen-on-v6 port 53 { ::1; };
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
        statistics-file "/var/named/data/named_stats.txt";
        memstatistics-file "/var/named/data/named_mem_stats.txt";
allow-query     { localhost; 192.168.1.0/24; };                     ## IP Range ##   
recursion yes;
dnssec-enable yes;
dnssec-validation yes;
dnssec-lookaside auto;
/* Path to ISC DLV key */
bindkeys-file "/etc/named.iscdlv.key";
managed-keys-directory "/var/named/dynamic";
};
logging {
        channel default_debug {
                file "data/named.run";
                severity dynamic;
        };
};
zone "." IN {
type hint;
file "named.ca";
};
zone"ostechnix.com" IN {
type slave;
file "slaves/ostechnix.fwd";
masters { 192.168.1.200; };
};
zone"1.168.192.in-addr.arpa" IN {
type slave;
file "slaves/ostechnix.rev";
masters { 192.168.1.200; };
};
include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";

2. Start the DNS Service

[root@slavedns ~]# service named start
Generating /etc/rndc.key:                                  [  OK  ]
Starting named:                                            [  OK  ]
[root@slavedns ~]# chkconfig named on
Now the forward and reverse zones are automatically replicated from Master DNS server to Slave DNS server.
To verify, goto DNS database location(i.e ‘/var/named/slaves’) and use command ‘ls’.
[root@slavedns ~]# cd /var/named/slaves/
[root@slavedns slaves]# ls
ostechnix.fwd  ostechnix.rev
The forward and reverse zones are automatically replicated from Master DNS. Now check the zone files whether the correct zone files are replicated or not.

[A] Check Forward zone:

[root@slavedns slaves]# cat ostechnix.fwd 
$ORIGIN .
$TTL 86400; 1 day
ostechnix.comIN SOAmasterdns.ostechnix.com. root.ostechnix.com. (
2011071001 ; serial
3600       ; refresh (1 hour)
1800       ; retry (30 minutes)
604800     ; expire (1 week)
86400      ; minimum (1 day)
)
NSmasterdns.ostechnix.com.
NSslavedns.ostechnix.com.
$ORIGIN ostechnix.com.
masterdnsA192.168.1.200
slavedns A192.168.1.201

[B] Check Reverse zone:

[root@slavedns slaves]# cat ostechnix.rev 
$ORIGIN .
$TTL 86400; 1 day
1.168.192.in-addr.arpaIN SOAmasterdns.ostechnix.com. root.ostechnix.com. (
2011071001 ; serial
3600       ; refresh (1 hour)
1800       ; retry (30 minutes)
604800     ; expire (1 week)
86400      ; minimum (1 day)
)
NSmasterdns.ostechnix.com.
NSslavedns.ostechnix.com.
$ORIGIN 1.168.192.in-addr.arpa.
200PTRmasterdns.ostechnix.com.
201PTRslavedns.ostechnix.com.
masterdnsA192.168.1.200
slavedns A192.168.1.201

3. Add the DNS Server details to all systems

[root@slavedns ~]# vi /etc/resolv.conf 
# Generated by NetworkManager
search ostechnix.com
nameserver 192.168.1.200
nameserver 192.168.1.201
nameserver 8.8.8.8

4. Test DNS Server

Method A:

[root@slavedns ~]# dig slavedns.ostechnix.com
; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.10.rc1.el6_3.6 <<>> slavedns.ostechnix.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 39096
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 1
;; QUESTION SECTION:
;slavedns.ostechnix.com.INA
;; ANSWER SECTION:
slavedns.ostechnix.com.86400INA192.168.1.201
;; AUTHORITY SECTION:
ostechnix.com.86400INNSmasterdns.ostechnix.com.
ostechnix.com.86400INNSslavedns.ostechnix.com.
;; ADDITIONAL SECTION:
masterdns.ostechnix.com. 86400INA192.168.1.200
;; Query time: 7 msec
;; SERVER: 192.168.1.200#53(192.168.1.200)
;; WHEN: Sun Mar  3 13:00:17 2013
;; MSG SIZE  rcvd: 110

Method B:

[root@slavedns ~]# dig masterdns.ostechnix.com
; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.10.rc1.el6_3.6 <<>> masterdns.ostechnix.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 12825
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 1
;; QUESTION SECTION:
;masterdns.ostechnix.com.INA
;; ANSWER SECTION:
masterdns.ostechnix.com. 86400INA192.168.1.200
;; AUTHORITY SECTION:
ostechnix.com.86400INNSmasterdns.ostechnix.com.
ostechnix.com.86400INNSslavedns.ostechnix.com.
;; ADDITIONAL SECTION:
slavedns.ostechnix.com.86400INA192.168.1.201
;; Query time: 13 msec
;; SERVER: 192.168.1.200#53(192.168.1.200)
;; WHEN: Sun Mar  3 13:01:02 2013
;; MSG SIZE  rcvd: 110

Method C:

[root@slavedns ~]# nslookup slavedns
Server:192.168.1.200
Address:192.168.1.200#53
Name:slavedns.ostechnix.com
Address: 192.168.1.201

Method D:

[root@slavedns ~]# nslookup masterdns
Server:192.168.1.200
Address:192.168.1.200#53
Name:masterdns.ostechnix.com
Address: 192.168.1.200

Method E:

[root@slavedns ~]# dig -x 192.168.1.201
; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.10.rc1.el6_3.6 <<>> -x 192.168.1.201
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 56991
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 2
;; QUESTION SECTION:
;201.1.168.192.in-addr.arpa.INPTR
;; ANSWER SECTION:
201.1.168.192.in-addr.arpa. 86400 INPTRslavedns.ostechnix.com.
;; AUTHORITY SECTION:
1.168.192.in-addr.arpa.86400INNSmasterdns.ostechnix.com.
1.168.192.in-addr.arpa.86400INNSslavedns.ostechnix.com.
;; ADDITIONAL SECTION:
masterdns.ostechnix.com. 86400INA192.168.1.200
slavedns.ostechnix.com.86400INA192.168.1.201
;; Query time: 6 msec
;; SERVER: 192.168.1.200#53(192.168.1.200)
;; WHEN: Sun Mar  3 13:03:39 2013
;; MSG SIZE  rcvd: 150

Method F:

[root@slavedns ~]# dig -x 192.168.1.200
; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.10.rc1.el6_3.6 <<>> -x 192.168.1.200
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 42968
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 2
;; QUESTION SECTION:
;200.1.168.192.in-addr.arpa.INPTR
;; ANSWER SECTION:
200.1.168.192.in-addr.arpa. 86400 INPTRmasterdns.ostechnix.com.
;; AUTHORITY SECTION:
1.168.192.in-addr.arpa.86400INNSslavedns.ostechnix.com.
1.168.192.in-addr.arpa.86400INNSmasterdns.ostechnix.com.
;; ADDITIONAL SECTION:
masterdns.ostechnix.com. 86400INA192.168.1.200
slavedns.ostechnix.com.86400INA192.168.1.201
;; Query time: 4 msec
;; SERVER: 192.168.1.200#53(192.168.1.200)
;; WHEN: Sun Mar  3 13:04:15 2013
;; MSG SIZE  rcvd: 150
資料來源:http://ostechnix.wordpress.com/2013/12/15/setup-dns-server-step-by-step-in-centos-6-3-rhel-6-3-scientific-linux-6-3-3/

2014年6月20日 星期五

WIN7 IE9 Adobe flash player 14 安裝時ActiveX無法註冊解決方法

在命令中輸入regedit叫出註冊碼
1.找到HKEY_LOCAL_MACHINE\SOFTWARE\Macromedia\FlashPlayer\SafeVersions
將底下的子雞碼全刪除
2.移除舊版Adobe flash player
3.重開機
4.下載Adobe flash player : http://rghost.net/56286882
5.安裝install_flash_player


2014年4月21日 星期一

Adobe Flash Player 無法安裝(錯誤:註冊失敗)及Adobe Flash Player 13 在IE無法安裝解決


解決辦法:
1. 在 Microsoft Download Center下載 SubInACL

2. 安裝 SubInACL

3. 下載 reset_fp10.zip

(
目前版本為 Flash10.1.102.64 以後可能會變,如果找不到請至原文網頁最底下找)。

4. 解壓縮裡面的檔案 reset_fp10.cmd
到 C:\Program Files\Windows Resource Kits\Tools\ 目錄下。
(
重要:請確認 subinacl.exe 與 reset_fp10.cmd 在同一目錄之下 C:\Program Files\Windows Resource Kits\Tools\)

5. 執行 reset_fp10.cmd
,會開啟「命令提視字元」視窗,並執行修復工作。

6. 結束時,會看到「請按任意鍵繼續...」之類的提示訊息。

7. 打開 IE,重新安裝 Flash Player 試試看。


如果還是不行
那就再另外找辦法吧,至少我的問題解掉了 XD

資料來源:http://brian6724.pixnet.net/blog/post/28040253-%5b%e5%b0%8f%e6%8a%80%e5%b7%a7%5d-%e8%a7%a3%e6%b1%ba-flash-player-%e7%84%a1%e6%b3%95%e5%9c%a8-ie-%e4%b8%8a%e5%ae%89%e8%a3%9d-%28acti

PS:
Adobe Flash Player 13無法再IE安裝,可以上軟體王下載IE安裝離線版(plugin-17MB),即可解決無上YOUTUBE無法播放Flash的問題。

2014年4月2日 星期三

Java 7因安全性關係無法在IE上執行

解決

Adding a URL to the Exception Site list

  • Go to the Java Control Panel (On Windows, Click Start and then Configure Java)
  • Click on the Security tab
  • Click on the Edit Site List button
  • Click the Add in the Exception Site List window
資料來源:Java

瀏覽器安裝失敗 ie無法開啟新視窗 瀏覽器錯誤 無法執行javascript ie錯誤

瀏覽器安裝失敗 ie無法開啟新視窗 瀏覽器錯誤 無法執行javascript ie錯誤

這各批次檔專門處理瀏覽器安裝引擎失敗、IE不能打開新視窗或連結等各種莫名其妙的問題的解決方法,瀏覽器無法執行JavaScript(瀏覽器 無法使用 java script)

簡單的說有瀏覽器問題,就使用看看,或許可以幫你解決問題
請將虛線以下文字剪下,存成 Fix-IE.bat ,然後執行它,試試看~ (參考)

— 由此虛線以下文字剪下,存成 Fix-IE.bat ——–

@echo on
echo ==================================
echo 安裝引擎失敗、IE不能打開新視窗或連結等各種莫名其妙的問題的解決方法.
echo 本處理程式是安全的,但是往往能解決一下因 DLL 註冊失效造成的問題.
echo ==================================
echo.
echo 執行中,大約需要幾分鐘,完成後自動退出.如果出現提示框,確定就可以了.
regsvr32 setupwbv.dll /s
regsvr32 wininet.dll /s
regsvr32 comcat.dll /s
regsvr32 shdoc401.dll /s
regsvr32 shdoc401.dll /s /i
regsvr32 asctrls.ocx /s
regsvr32 oleaut32.dll /s
regsvr32 shdocvw.dll /s /I
regsvr32 shdocvw.dll /s
regsvr32 browseui.dll /s
regsvr32 browseui.dll /s /I
regsvr32 msrating.dll /s
regsvr32 mlang.dll /s
regsvr32 hlink.dll /s
regsvr32 mshtml.dll /s
regsvr32 mshtmled.dll /s
regsvr32 urlmon.dll /s
regsvr32 plugin.ocx /s
regsvr32 sendmail.dll /s
regsvr32 comctl32.dll /s /i
regsvr32 inetcpl.cpl /i
regsvr32 mshtml.dll /s /i
regsvr32 scrobj.dll /s
regsvr32 mmefxe.ocx /s
regsvr32 proctexe.ocx /s
regsvr32 corpol.dll /s
regsvr32 jscript.dll /s
regsvr32 msxml.dll /s
regsvr32 imgutil.dll /s
regsvr32 thumbvw.dll /s
regsvr32 cryptext.dll /s
regsvr32 rsabase.dll /s
regsvr32 triedit.dll /s
regsvr32 dhtmled.ocx /s
regsvr32 inseng.dll /s
regsvr32 iesetup.dll /s /i
regsvr32 hmmapi.dll /s
regsvr32 cryptdlg.dll /s
regsvr32 actxprxy.dll /s
regsvr32 dispex.dll /s
regsvr32 occache.dll /s
regsvr32 occache.dll /s /i
regsvr32 iepeers.dll /s
regsvr32 wininet.dll /s /i
regsvr32 urlmon.dll /s /i
regsvr32 digest.dll /s /i
regsvr32 cdfview.dll /s
regsvr32 webcheck.dll /s
regsvr32 mobsync.dll /s
regsvr32 pngfilt.dll /s
regsvr32 licmgr10.dll /s
regsvr32 icmfilter.dll /s
regsvr32 hhctrl.ocx /s
regsvr32 inetcfg.dll /s
regsvr32 trialoc.dll /s
regsvr32 tdc.ocx /s
regsvr32 MSR2C.dll /s
regsvr32 msident.dll /s
regsvr32 msieftp.dll /s
regsvr32 xmsconf.ocx /s
regsvr32 ils.dll /s
regsvr32 msoeacct.dll /s
regsvr32 wab32.dll /s
regsvr32 wabimp.dll /s
regsvr32 wabfind.dll /s
regsvr32 oemiglib.dll /s
regsvr32 directdb.dll /s
regsvr32 inetcomm.dll /s
regsvr32 msoe.dll /s
regsvr32 oeimport.dll /s
regsvr32 msdxm.ocx /s
regsvr32 dxmasf.dll /s
regsvr32 laprxy.dll /s
regsvr32 l3codecx.ax /s
regsvr32 acelpdec.ax /s
regsvr32 mpg4ds32.ax /s
regsvr32 voxmsdec.ax /s
regsvr32 danim.dll /s
regsvr32 Daxctle.ocx /s
regsvr32 lmrt.dll /s
regsvr32 datime.dll /s
regsvr32 dxtrans.dll /s
regsvr32 dxtmsft.dll /s
regsvr32 vgx.dll /s
regsvr32 WEBPOST.dll /s
regsvr32 WPWIZdll /s.dll /s
regsvr32 POSTWPP.dll /s
regsvr32 CRSWPP.dll /s
regsvr32 FTPWPP.dll /s
regsvr32 FPWPP.dll /s
regsvr32 FLUPL.ocx /s
regsvr32 wshom.ocx /s
regsvr32 wshext.dll /s
regsvr32 vbscript.dll /s
regsvr32 scrrun.dll /s mstinit.exe /setup
regsvr32 msnsspc.dll /s /SspcCreateSspiReg
regsvr32 msapsspc.dll /s /SspcCreateSspiReg
echo ==================================
echo 執行完成!希望可以解決你的問題哦~不行的話另想辦法囉!.
pause

或直接下載 Fix-IE.bat
http://www.itmaster.tw/fix-ie.bat


資料來源:IT達人

2014年2月11日 星期二

SFS3重新架設



1.

vi /etc/sysconfig/i18n
LANG="zh_TW.UTF-8" 改為 LANG="zh_TW.Big5"

2.
# vi /etc/httpd/conf/httpd.conf

找到  AddDefaultCharset UTF-8 改成 AddDefaultCharset BIG5

3.
修改 # vi /etc/php.ini
;default_charset = "
iso-8859-1" 修改為 default_charset = "big5" ( ; 記得拿掉)

magic_quotes_gpc = Off 修改為 magic_quotes_gpc = On (減少繁體中文字特殊字的問題)

display_errors = Off 修改為 display_errors = On (php有錯時可以出現偵錯訊息以供參考)

;error_reporting = E_ALL & ~E_NOTICE 修改為 error_reporting = E_ALL & ~E_NOTICE (;拿掉)

error_reporting = E_ALL 修改為 ;error_reporting = E_ALL (加上;)

放寬 memory_limit,建議改為memory_limit = 64M以上 (CentOS 5.5 內預設為128M,所以不改也可)

放寬 max_execution_time,建議改為max_execution_time = 300

確認 register_globals = Off ( CentOS 5.5 內預設為Off )

確認short_open_tag = On (CnetOS 6.5 PHP5.3.3.27中預設為Off)

post_max_size = 20M

upload_max_filesize = 4M

4.
因需更新的不多,可以先執行 # yum update

再順便安裝 # yum -y install php mysql mysql-server php-mysql php-gd php-mbstring  php-cli php-common

安裝相關相依套件

# yum -y install http*

# yum -y install php*

# yum -y install msql*

5.
接下準備安裝phpMyAdmin
# wget http://downloads.sourceforge.net/project/phpmyadmin/phpMyAdmin/2.11.10/phpMyAdmin-2.11.10-all-languages.tar.gz

# tar zxvf phpMyAdmin-2.11.10-all-languages.tar.gz
# mv phpMyAdmin-2.11.10-all-languages phpMyAdmin
(安全性考量,名稱最好不要用phpMyAdmin)
# /phpMyAdmin/libraries/config.default.php 複製(改名)到 /phpMyAdmin/config.inc.php 下
# vi config.inc.php
$cfg['Servers'][$i]['auth_type'] = '
config'; // Authentication method (config, http or cookie based)?
改為
$cfg['Servers'][$i]['auth_type'] =
'http'; // Authentication method (config, http or cookie based)?

phpMyAdmin2.11.11.3無法進入控制網頁的話,換成phpMyAdmin 3.3.10
# cd /var/www/html/phpMyAdmin
# cp config.example.inc.php config.inc.php
# 修改Auth_Type = http
# 修改AllowNoPassword = true(允許無密碼登入,新建立MYSQL尚未建立root的密碼)
登入phpMyAdmin修改完root,新建sfs3的管理者及sfs3的資料庫再把AllowNoPassword 值修改為false
6.


啟動http mysql

#service httpd start

#service mysqld start

修改 mysql root 的密碼 (用phpMyadmin修改即可)
待會兒安裝學務系統,一定會用到!

7.
準備安裝學務系統了,
# wget http://sfscvs.tcc.edu.tw/sfs_stable.tar.gz (
下載最新版的SFS3 )
# tar zxvf sfs_stable.tar.gz (
解開sfs_stable.tar.gz)
# chmod 711 setup.sh
# ./setup.sh

使用瀏灠器執行安裝程式:http://xxx.xx.xx.xx/sfs3/install.php
安裝畫面中,相關的設定則需依各自的需求填入參數.

8.
修改 include/config.php 的權限成唯讀,確保您系統不會被竄改 # chmod 644 include/config.php

9.
設定上傳目錄的alias:在apache 在設定檔 httpd.conf最一行下面,
加入底下資料
# vi /etc/httpd/conf/httpd.conf

Alias /upfiles/ '/var/www/html/sfs3/data/'
< Directory '/var/www/html/sfs3/data/'>
Options None
AllowOverride None
Order allow,deny
Allow from all
< /Directory>

10.
登入剛安裝好的學務系統,首次使用預設的帳號:1001、密碼:demo

  這步驟一定要做,登入後,隨便晃晃便可退出來;看似沒什麼作用,但卻關係到稍後原機學務系統的資料庫倒入後,能否成功的瀏覽接已受原資料的新學務系統!

  之前,曾在此吃了大虧,剛安裝完SFS3,馬上把原機資料庫倒入,以為大功告成,結果連SFS3的首頁都看不到,只好鼻子摸摸,再重裝一次學務系統

11.
首先,清空SFS3資料庫下的所有資料表,

接著倒入原學務系統的資料庫
# mysql sfs3 < xxxxxx.sql -uroot –p

(或是 #mysql –uroot –p sfs3 < xxx.sql)

 

 

 

 

資料來源:http://163.17.90.135/plog/post/2/64

CentOS6.5移植問題小記:
若出現無畫面,就降SQL跟SFS3資料夾移除重開機,再重新還原一次,先不更改SFS3的conjfig.php中的網址位置,先測試登陸是否可以看到教務的連結,再進行更改config.php的網址更改!

 

 

附記:

php的版本更新

 

升級請看以下的指令:

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

#cd /root

#rpm -ivh http://repo.webtatic.com/yum/centos/5/`uname -i`/webtatic-release-5-0.noarch.rpm

安裝PHP

#yum --enablerepo=webtatic install php

升級PHP

#yum --enablerepo=webtatic update php

如果不能安裝或升級時,請改用下列指令
#yum --disablerepo=* --enablerepo=webtatic update php

下列指令也是安裝php,但指定不要5.3.x版的

#yum --disablerepo=* --enablerepo=webtatic --exclude=php*5.3* install php

 

 

 

資料來源:http://blog.smps.tp.edu.tw/~kcodavid/index.php?load=read&id=564



遠端ftp備份:
至SFS3官網下載99學年度台中縣講義,複製FTP備份shell,修改ftp部分指令為:

ftp -n "$host" << EOF
user $user $password
cd $replace_dir
bin
put $targetfile1
put $targetfile2
put $sqlfilename.zip
bye
EOF


SFS3自動更新:
SFS3官網下載99學年度台中縣講義,複製自動更新shell進行修改。