自由學習的風

幽夢影 張潮 少年讀書,如隙中窺月;中年讀書,如庭中望月;老年讀書,如臺上玩月。皆以閱歷之淺深,為所得之淺深耳。

[網管] Alcatel OmniStack 6850 儲存設定

2015年9月30日 星期三

在 Web GUI 修改過設定後,無法直接儲存設定(Save Configuration),可以利用 ssh 或 telnet 連線至 交換器,然後執行下列的指令,就可以把設定儲存下來,不會因為電源重置之後,導致設定跑到的問題!

-> copy certified working 
-> write memory
-> copy working certified

其它相關的操作:

Hi,

Do you mean (1) save the config file on an external device sich as a pc or (2) simply write the configuration so its saved so it isnt lost when it is rebooted?

Taking (2) first...... when you add configuration and you wish to save, issue a write memory command. This saves the configuration to the boot.cfg (see below) file located in the switches working directory. For reference the switch has 2 x copies of this boot.cfg file, firstly in the working directory as previously mentioned and also in a second directory called certified. If you are happy that the configuration changes you have made is safe then you should also make the boot.cfg file in certified directory identicle to that of the working directory. For this you overwrite the certified boot.cfg file using the working directory copy by issuing the copy working certified command. Why are there 2 copies?...... this is fail safe allowing recovery if you are making potentially dangerous config changes, to understand this consider the following: 
"when a switch boots it needs to boot into a configuration that it trusts, for this is uses a copy of configuration calledcertified, as the boot completes it compares the 2 boot.cfg files in certified and working, if both files are identicle then it assumes all is well and runs from the boot.cfg in working. If the 2 copies were not identicle then it assumes that there may be an issue and as such chooses the boot.cfg in certifed". Obviously this is the reason that you only issue the copy working certified when you are happy.
I could go on for pages on this topic and explain it fully but I will stop there.

(1) As previously mentioned the majority of configuration is stored in a file called boot.cfg. If you wish to back up your switch then you need to take a copy of this file.
The easiset way is using ftp as follows. It is assumed that you have allowed access to the switch via telnet/ ftp etc using the aaa authentication default localcommand when the switch was configured. If you have configured via console and havnt used this command then you will need to issue it to allow access via ftp.

Ok. Easiest method as follows, using windows PC. I assume that you have admin access either via the network or directly via a cat5 cable to one of the ports. Check, can you ping the switches IP? If yes procead as follows:

1. On windows PC go to the command prompt (Start/ Run / cmd [ENTER])
2. On the command line type ftp x.x.x.x [enter] (x.x.x.x is the IP address of your switch)
3. You should now get the prompt to enter username....enter your username
4. You should now get the prompt to enter password...enter your password
5. if logged in you should now type get boot.cfg c:\boot.cfg
6. you should now see something like x bytes transferred succesfully or soething similar
7. type bye to finish the ftp session.
8 You should now have a copy of the boot.cfg file on the root of your c:\ drive on the pc you are using.

Note when you enter via ftp, you go straight into the working directory hence why you can issue get boot.cfg.

Hope this helps you out.

Good luck

PS to put a config file back onto the switch use FTP again as follows:

1. On windows PC go to the command prompt (Start/ Run / cmd [ENTER])
2. On the command line type ftp x.x.x.x [enter] (x.x.x.x is the IP address of your switch)
3. You should now get the prompt to enter username....enter your username
4. You should now get the prompt to enter password...enter your password
5. if logged in you should now type put c:\boot.cfg boot.cfg
6. you should now see something like x bytes transferred succesfully or soething similar
7. type bye to finish the ftp session.
8. Now telnet to the switch from the command prompt telnet x.x.x.x [enter] (x.x.x.x is the IP address of your switch)
9. You should now get the prompt to enter username....enter your username
10. You should now get the prompt to enter password...enter your password
11. now issue the copy working certified command
12. now reboot the switch with the new config by using the reload all command.
13 The switch will now reboot using the new config file.

Good Luck

[Ubuntu] 變更 Docky 的項目內容

2015年9月29日 星期二

Docky 是一支 Launcher,執行後會出現像 MAC 一樣的選單,想把程式加到 Docky 時只要在程式執行時,在圖案上按右鍵,選「 Pin to Dock」就可以留在選單上。

不過,若要修改選單上每個程式項目的設定,就得透過 gconf-editor 來處理,事實上,它是執行去讀 /usr/share/application/ 內所有的 *.desktop 來用,所以如果 user 的權限不夠的話,程式項目的圖案就有可能會變成「?」,如果想要增刪 Docky 的項目,也可以直接處理!



support HEVC endcoded video

2015年9月26日 星期六

for (s)mplayer:
sudo add-apt-repository ppa:mc3man/mplayer-test
sudo apt-get update
sudo apt-get install mplayer smplayer
for vlc player:
sudo add-apt-repository ppa:mc3man/mplayer-test
sudo apt-get update
sudo apt-get install mplayer smplayer




[轉貼] Use Of All http-equiv Meta Tag

2015年9月11日 星期五

網頁裡 meta 標籤內的 http-equiv 屬性所有用法

Orig: http://www.frontendevelopers.com/use-of-all-http-equiv-meta-tag/

  • content-type:  網頁內容
    You may add this Content-Type meta tag to all of your webpages. For English sites use content=」text/html; charset=ISO-8859-1〞 and for Japanese sites use content=」text/html; charset=ISO-2022-JP」 this.
  • expires:  過期
    This content-type use for disable caching of the document at define time. It cause the browser to fetch new files.
  • set-cookie:
    This content-type use for set cookies for page. In this name is name of cookies. Date use for to set expires of cookie as mention above and url is path of document. You can include more than one http-equiv=」set-cookie」 if you need to set more than one cookie name/value pair.
  • content-encoding:  編碼
    This content-type use for indicates the encoding of the returned data; usually the compression type. For g-zipped documents.
  • allow:
    This content-type use for include methods supported by server.
  • date:
    This content-type use for page publish time and date set.
  • last-modified:
    This content-type use for page last modified time and date set.
  • location:
    This content-type use for redirects the recipient to another location. Here n is time in second after page redirect to new location.
  • refresh:
    This content-type use for refresh page to after time. Time define by n. If you want to redirect page to new url after certain time that for we need to also define that page url in url.
  • window-target:
    This content-type use for prevent a page from appearing inside another framed page.
  • www-authenticate:
    This content-type use for providing basic access authentication, but providing such authentication in such a visible manner is not recommended for security reasons.
  • pics-label:
    This content-type is Platform for Internet Content Selection (PICS) is a standard for labeling online content basically online content rating.
  • cache-control:
    This content-type is use when client browsers and caching devices are known to successfully implement all no-caching options, include multiple no-caching options including.
  • content-language:
    This content-type is for pecifies the primary natural language(s) of the document. Used by search engines to categorize pages by language.
  • content-script-type:
    This content-type use for Specifies browser default script language. The default script language for the script element is javascript. If you aren't using JavaScript as your default, declare content=」text/VBscript」.
  • page-enter:
    This content-type use for the Internet Explorer filter transition effect that is to be performed when the site is loaded.
  • page-exit:
    This content-type use for the Internet Explorer filter transition effect that is to be performed when the site is loaded.
  • imagetoolbar:
    This content-type use for when an image is hovered, an image toolbar appears in IE. This use for enables the disabling of the image toolbar.