tag:blogger.com,1999:blog-54333890510973980012024-03-12T19:01:00.207-07:00金牌雜役純粹在資訊工作的打雜記錄!AChinhttp://www.blogger.com/profile/00635455316165763799noreply@blogger.comBlogger15125tag:blogger.com,1999:blog-5433389051097398001.post-91722661690058791832017-08-16T18:23:00.002-07:002017-08-16T18:23:36.801-07:00CentOS 7 安裝桌面環境(GUI介面)如果一開始安裝CentOS 7 時,沒有安裝桌面環境的話,可以利用YUM來進行安裝桌面環境,作法如下:<br />
<blockquote class="tr_bq">
#yum groupinstall "GNOME Desktop" "Graphical Administration Tools" -------- 安裝桌面程式</blockquote>
<blockquote class="tr_bq">
#systemctl set-default graphical.target --------- 變更預設開機進入桌面環境,如果要改為文字模式則將graphical.target變更成multi-user.target</blockquote>
<blockquote class="tr_bq">
#reboot -------- 重新開機後即可</blockquote>
<br />
其他相關指令:<br />
<blockquote class="tr_bq">
#systemctl get-default --------- 查看目前目前系統預設運作層級指令</blockquote>
<blockquote class="tr_bq">
#systemctl list-units --type target --------- 查看可用的運作層級指令</blockquote>
<br />
<blockquote class="tr_bq">
</blockquote>
<blockquote class="tr_bq">
</blockquote>
<blockquote class="tr_bq">
</blockquote>
AChinhttp://www.blogger.com/profile/00635455316165763799noreply@blogger.com0tag:blogger.com,1999:blog-5433389051097398001.post-9421470787099531802017-05-27T08:32:00.002-07:002017-05-27T08:33:25.692-07:00CentOS 7 安裝 MariaDB ServerCentOS 7 要安裝MySQL 時,內建預設的已被取代成MariaDB,以下就對安裝MariaDB做個筆記<br />
安裝步驟如下:<br />
<a name='more'></a><br />
<br />
1. 安裝MariaDB<br />
<blockquote class="tr_bq">
#yum install mariadb-server mariadb</blockquote>
2. 啟用服務及開機時自動啟動<br />
<blockquote class="tr_bq">
#systemctl start mariadb.service </blockquote>
<blockquote class="tr_bq">
#systemctl enable mariadb.service</blockquote>
3. 以上及安裝完成,預設定的root 沒有密碼,故可以直接登入,可於登入後變更密碼,做法如下:<br />
<blockquote class="tr_bq">
#mysql -u root</blockquote>
<blockquote class="tr_bq">
MariaDB[none]>use mysql;</blockquote>
<blockquote class="tr_bq">
MariaDB[mysql]>update user set password=PASSWORD("new password") where User='root';</blockquote>
<blockquote class="tr_bq">
MariaDB[mysql]>flush privileges;</blockquote>
<blockquote class="tr_bq">
MariaDB[mysql]>quit</blockquote>
<br />
上述方式及完成密碼變更,可自行在登入測試,相關的操作流程如下圖:<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9yi2j7yQBA77OXavHE0n8ISw_VlVXjYYxgOKk0AYjXQl4vHQ4IApMNU39B5LANbE1Z6cR0JOOxNB6vw8truW5tgh_5aKnIzhq2L_xZbTgfemejGdNgeqrB1QEt4YT4IGAPN5gJ798MV0/s1600/MariaDB.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="934" data-original-width="1118" height="333" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9yi2j7yQBA77OXavHE0n8ISw_VlVXjYYxgOKk0AYjXQl4vHQ4IApMNU39B5LANbE1Z6cR0JOOxNB6vw8truW5tgh_5aKnIzhq2L_xZbTgfemejGdNgeqrB1QEt4YT4IGAPN5gJ798MV0/s400/MariaDB.png" width="400" /></a></div>
<br />AChinhttp://www.blogger.com/profile/00635455316165763799noreply@blogger.com0tag:blogger.com,1999:blog-5433389051097398001.post-54171052278783601142017-05-27T08:25:00.000-07:002017-05-27T08:25:40.829-07:00遙控車引擎發不動處理方式~距離上次玩遙控車大約隔了快一年了,當再次拿出來要去玩的時候~<br />
車子竟然發不動了!<br />
車子竟然發不動了!<br />
車子竟然發不動了!<br />
<a name='more'></a><br />
<br />
嘗試了各種方式,就是發不動~ Orz,後來上我谷歌一下,大部分的方式都是將引擎拆下來清潔應該就可以解決了,但這個方式我怕會失敗,拆了引擎就裝不回去了。最後,找到一個影片,應該 Kyosho 分享的,它的作法很簡單:<br />
<ol>
<li>檢查空氣濾清器是否堵塞,將其更換或清潔再嘗試發動</li>
<li>檢查引擎火星塞是否有積碳阻塞,將火星塞拆下,嘗試倒入一點燃料油在引擎中,然後用布蓋在引擎上,發動數次後,再將燃料油倒出,最後裝上火星塞後,再嘗試發動引擎</li>
</ol>
以上的方法我用了第二個方法,將火星塞拆下後,倒入燃料油,發動數次後將油倒出,結果發現,引擎內有很多積碳雜質,我重複做了多次後,終於可以發動了 !! 終於可以發動了 !! 終於可以發動了!!<br />
<br />
超開心,但無奈今天下午下雨,不然就可帶車出去跑一跑~~<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjp-Wm4NNDmLjstYfdJ-AQQAFMOJOKUX1rFMmekhyphenhyphenQwxqEI96Posav6SO4VON9lakN5iMt3dOwsGX93gNAKg7anVfnmPoohrOdnGJSMADsV0pLKsJceQXw-xTvlcBp4wTkQLACch9AR6Kw/s1600/IMG_5880.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjp-Wm4NNDmLjstYfdJ-AQQAFMOJOKUX1rFMmekhyphenhyphenQwxqEI96Posav6SO4VON9lakN5iMt3dOwsGX93gNAKg7anVfnmPoohrOdnGJSMADsV0pLKsJceQXw-xTvlcBp4wTkQLACch9AR6Kw/s400/IMG_5880.JPG" width="400" /></a></div>
<br />AChinhttp://www.blogger.com/profile/00635455316165763799noreply@blogger.com0tag:blogger.com,1999:blog-5433389051097398001.post-48760489367899351042017-05-25T10:20:00.002-07:002017-05-25T10:20:59.116-07:00食品也有履歷區塊鏈!剛剛看到一則新聞,現在也針對食品的來源做了區塊鏈,可以讓商家將食品的履歷寫入到AMIS的區塊鏈中。主要是提供食品業者能夠透過區塊鏈的特性,寫入無法竄改的方式,提供食品朔源,用以自清產品,藉以提高消費者信心,讓消費者可以查詢食品的詳細來歷。<br />
<a name='more'></a><br />
<br />
那什麼是區塊鏈呢? 我自己也在了解中,這目前也可能是我畢業論文的一個方向,天哪!想到這個~我論文題目都還沒出來呀~~<br />
<br />
好了,不離題,從維基百科中的說明,區塊鏈起源自比特幣,它是由一串使用密碼學方法相關連產生的資料塊,每一個資料塊中包含了若干次比特幣網路交易的資訊。<br />
<br />
比特幣區塊鏈的關鍵核心技術,包括用Hashcash演算法來進行工作量證明,且交易過程採用橢圓曲線數位簽章演算法來確保交易安全,並在每筆交易與每個區塊中使用多次Hash函數以及Merkle Tree,同時也使用時間戳來確保區塊序列。<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDmFE0x3e1SrSqOtabeIdKkDX2DD4f-b9QPWDcNMBZARwLlF3pAqz41ABDiFTdmipnOkylmU3US0CB_SUGE6KHa2I6R8w9dECE0btLyTQV7qrpKruLZHqr2GSpyGOfjGrr2CVsfk36q4o/s1600/blockchain.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="422" data-original-width="963" height="175" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDmFE0x3e1SrSqOtabeIdKkDX2DD4f-b9QPWDcNMBZARwLlF3pAqz41ABDiFTdmipnOkylmU3US0CB_SUGE6KHa2I6R8w9dECE0btLyTQV7qrpKruLZHqr2GSpyGOfjGrr2CVsfk36q4o/s400/blockchain.jpg" width="400" /></a></div>
<br />
比特幣區塊鏈採用Hashcash演算法(雜湊現金演算法)作為工作量證明,讓各節點經由POW計算來產生每一個有效的新區塊,再經由其他節點驗證並接受。<br />
<br />
每個區塊中Block
Header會包含許多固定的值,其中只有Nonce值為一隨機值,因此每個節點進行POW計算時要算的就是,藉由不斷替換這個Nonce值,來讓這個區塊的Block
Header Hash值,小於一個被設定好的難度目標值(Difficulty
Target),至於為什麼要小於這個目標值,則是因為這個難度值意味著每個區塊在理論上應該要被產生完成。<br />
<br />
好了,暫時先到這邊,上述的內容大部分都是來自於維基百科,等我有進一步的了解後再進行分享吧!AChinhttp://www.blogger.com/profile/00635455316165763799noreply@blogger.com0tag:blogger.com,1999:blog-5433389051097398001.post-36893273516059799692017-05-25T09:42:00.000-07:002017-05-27T08:23:21.020-07:00Agile 敏捷初體驗<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyJ9sVxfool5rvyzzoyB21gADrKMM71GGPUHvl0XiSmXOCOW6kt4X4XohVjrMT3_TbtvVZ9VxL6LoCOoc6Sj0kxUg4KAt8b-zTsY9vKA1Q-ZcXrMoa4vlg_ShxLRGI6bTKSCLcqxNSHyM/s1600/Agile.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="398" data-original-width="547" height="290" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyJ9sVxfool5rvyzzoyB21gADrKMM71GGPUHvl0XiSmXOCOW6kt4X4XohVjrMT3_TbtvVZ9VxL6LoCOoc6Sj0kxUg4KAt8b-zTsY9vKA1Q-ZcXrMoa4vlg_ShxLRGI6bTKSCLcqxNSHyM/s400/Agile.PNG" width="400" /></a></div>
<br />
<br />
什麼是敏捷? 敏捷能做什麼? 敏捷能帶給我們什麼?<br />
我想敏捷原是起源於軟體開發的方法,經過谷哥大神的幫忙,我從Wiki上的說明,節錄一小段,如下:<br />
<br />
<a name='more'></a><b>敏捷軟體開發</b>(<span class="LangWithName">英語:<span lang="en" xml:lang="en">Agile software development</span></span>),又稱<b>敏捷開發</b>,是一種從1990年代開始逐漸引起廣泛關注的一些新型<a data-mce-href="https://zh.wikipedia.org/wiki/%E8%BD%AF%E4%BB%B6%E5%BC%80%E5%8F%91" href="https://zh.wikipedia.org/wiki/%E8%BD%AF%E4%BB%B6%E5%BC%80%E5%8F%91" title="軟體開發">軟體開發</a>方法,是一種應對快速變化的需求的一種軟體開發能力。它們的具體名稱、理念、過程、術語都不盡相同,相對於「非敏捷」,更強調程式設計師團隊與業務專家之間的緊密協作、面對面的溝通(認為比書面的文檔更有效)、頻繁交付新的軟體版本、緊湊而自我組織型的團隊、能夠很好地適應需求變化的代碼編寫和團隊組織方法,也更注重軟體開發過程中人的作用。<br />
<br />
這次很有榮幸的能參加到敏捷內湖的第五次課程,這次主題是-我們來開公司吧;對於我這個非程式人,為什麼想要參加,主因是之前一直時有所聞的聽到關於SCRUM的內容,也看到一些主題式由樂高(LEGO)進行的活動,讓我就很想一探究竟。<br />
<br />
在這次的活動中,我們透過大家一同進行互動,並即時回饋,來達成目標,從中也發現當事情透明化後,問題相對減少,產量也能增加,這樣的活動對於不是程式人的我,也很受用。怎麼說呢,透過團隊一同進行面對面的溝通,給予所需的資源與信任,適當調整與修正自己的行為,將可產生更大的生產力,這也可用在一般工作團隊或生活中,會有很大的助益。<br />
<br />
最後,很感謝這次老師的安排,讓我能有機會參加這個活動,如果大家有興趣可以搜尋一下 "敏捷內湖",基本每月都會舉辦一次活動,有興趣可以一起來唷。AChinhttp://www.blogger.com/profile/00635455316165763799noreply@blogger.com0tag:blogger.com,1999:blog-5433389051097398001.post-19874938526524772452017-03-17T09:44:00.001-07:002017-03-17T09:49:52.934-07:00資料科學家 (Data Scientist)資料科學家這個名詞,之前我一直沒注意到,直到最近上課時,老師說的這個名詞,才開始注意的。<br />
<br />
<a name='more'></a><br />
到底什麼是資料科學家呢? 上Google Search 查詢資料科學家,你會發現第一個排名是 21世紀最迷人的工作『資料科學家』。<br />
<br />
另外,我們再從Wiki上查詢Data
Science,Data Science
稱之為數據科學,又稱為資料科學,是一門利用數據資料學習知識的學科,其目標是通過從數據中提取出有價值的部分來生產數據產品。他結合了諸多領域中的理論和技術,包括應用數學、統計、模式識別、機器學習、資料可視化、資料倉儲,以及高性能計算。資料科學通過運用各種相關的數據資料來幫助非專業人士理解問題。此外,資料科學也對商業競爭有極大的幫助。<a data-mce-href="https://zh.wikipedia.org/wiki/%E6%95%B0%E6%8D%AE%E7%A7%91%E5%AD%A6" href="https://zh.wikipedia.org/wiki/%E6%95%B0%E6%8D%AE%E7%A7%91%E5%AD%A6">wiki</a> 網址參考。<br />
<br />
而資料科學家的這個名詞是在2012年哈佛商業評論的文章『Data
Scientist: The Sexiest Job of the 21st
Century』,才廣為人知。為什麼我會這麼注意資料科學這部分呢?主要除了上課老師說之外,加上去年Google AlphaGo
打敗了世界第一的棋王,以及目前工作的接觸與客戶的需求,才會開始注意這個領域。<br />
<br />
資料科學,除了學術研究外,商業應用也愈來愈多,很多企業與公司或多或少都有在進行資料探勘、採集、分析等,舉個簡單的例子,當你上網購物時,如去PChome
或其他的購物網站,仔細觀察一下,當你瀏覽你可能會想要購買的商品時,下方就會出現相關的產品或是其他人也看的產品,這就是透過資料分析來進行的行銷活動。<br />
<br />
資料科學這個領域會是我近期的目標,另外分享一下去年針對資料科學家的薪水行情分析,可參考 <a data-mce-href="https://buzzorange.com/techorange/2016/07/18/data-scientist-salary/" href="https://buzzorange.com/techorange/2016/07/18/data-scientist-salary/">科技報橘 </a>的網站,這樣應該會更有興趣投入這個領域。<br />
<br />AChinhttp://www.blogger.com/profile/00635455316165763799noreply@blogger.com0tag:blogger.com,1999:blog-5433389051097398001.post-57361237482762811812016-11-25T23:57:00.005-08:002016-11-25T23:57:41.235-08:00刪除隨身碟中頑強的分割區,還給你原來的空間安裝Windows 10 做的USB隨身碟或是購買一些USB的產品時,當要將這些USB還原為一般用途的隨身碟時,卻發現隨身碟無法使用全部的空間,而用Windows 磁碟管理來進行刪除,也無法有效地將其刪除釋放出佔用的空間。<br />
<a name='more'></a>處理方式如下:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: left;">
1. 利用Windows 內建的DiskPart 功能,執行快速鍵Window鍵 + R,輸入cmd,呼叫出命令提示字元,接者輸入diskpart 並按Enter,呼叫diskpart 程式</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVajkvEpIEsPgObHFi638mu7O8NkD2ZleYqRKzPI-S8ldHhbcDJvkA2czzqf8fsi8sDf14mM3gytKkcv067jNTzmvvnLOPBsVsrsRnQ-Hxk8Yga31iaJMRnX8diMXB0Qm14LY_SpmXl1o/s1600/2.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="207" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVajkvEpIEsPgObHFi638mu7O8NkD2ZleYqRKzPI-S8ldHhbcDJvkA2czzqf8fsi8sDf14mM3gytKkcv067jNTzmvvnLOPBsVsrsRnQ-Hxk8Yga31iaJMRnX8diMXB0Qm14LY_SpmXl1o/s400/2.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
2. 執行list disk,可查閱磁碟狀態,可看到隨身碟是顯示在磁碟1,此時輸入select disk 1切換到磁碟1</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgY8JP4Sg6qMHE6YuI16qVgW-fM4IXIORB08qd__lDV5YcTkQy5PLJgvDRvQuTH6tVZwifA-E6N83vyeQZ2iNNstgaKK2YnvWtMLWYMYdHV2mAmx-ofDSoebWuc1gDKc4FeS2QLYF4soKE/s1600/3.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="256" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgY8JP4Sg6qMHE6YuI16qVgW-fM4IXIORB08qd__lDV5YcTkQy5PLJgvDRvQuTH6tVZwifA-E6N83vyeQZ2iNNstgaKK2YnvWtMLWYMYdHV2mAmx-ofDSoebWuc1gDKc4FeS2QLYF4soKE/s400/3.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
3. 輸入clean,即可清出該磁碟,在輸入exit 退出,之後將隨身碟重新插入進行格式化即可。</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9Z_rcd-fzDeqeclms6eUUnRKrpGYPQofj70_hRBEHQUcfJr64fHCR05slQg54WdeFHOERfrcXlqdMIIrr2UEX_4HHDIkvEkEtygN_H0lPujuPPHdWLjiwKm1g9FO6hSsGUWXTWvm94JA/s1600/4.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="220" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9Z_rcd-fzDeqeclms6eUUnRKrpGYPQofj70_hRBEHQUcfJr64fHCR05slQg54WdeFHOERfrcXlqdMIIrr2UEX_4HHDIkvEkEtygN_H0lPujuPPHdWLjiwKm1g9FO6hSsGUWXTWvm94JA/s400/4.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
這個Windows 內建的工具可以解決在電腦管理中的磁碟管理無法刪除的磁區或是分割區。</div>
<br />AChinhttp://www.blogger.com/profile/00635455316165763799noreply@blogger.com0tag:blogger.com,1999:blog-5433389051097398001.post-21946511754651480522016-11-14T02:16:00.002-08:002016-11-14T02:18:53.102-08:00黑護士襲擊-BlackNurse Attack國外資安業者TDC Security Operations Center日前發佈了一個DoS/DDoS攻擊,駭客利用ICMP發動攻擊,以傳送少量的ICMP 封包,即可造成防火牆的CPU 高附載,持續攻擊將造成LAN端的使用者無法使用網路。<br />
<a name='more'></a>TDC Security Operations Center 日前發佈一項攻擊,它們將它命名為BlackNurse,此攻擊有別以往的ICMP攻擊,BlackNurse主要針對ICMP type 3 code 3進行攻擊,當使用者允許ICMP type 3 code 3 至外部介面時(意旨為WAN,Outside interface),BlackNurse的攻擊即使在低頻寬也會非常有效,所謂低頻寬約為15~18Mbit/s,每秒約40k~50k 的封包。<br />
<br />
在低頻寬的情況下,就能造成防火牆設備CPU的高附載。在遭受此攻擊的情況下,將會影響防火牆LAN端的使用者,不能夠進行對外傳送與接收,使得網路造成癱瘓。<br />
<br />
什麼是ICMP Type 3 Code 3<br />
<blockquote class="tr_bq">
Type 3 - Destination Unreachable</blockquote>
<blockquote class="tr_bq">
Code 3 - Port Unreachable</blockquote>
<br />
相關的網站介紹 - http://www.ithome.com.tw/news/109565<br />
TDC 文件 - http://soc.tdc.dk/blacknurse/blacknurse.pdfAChinhttp://www.blogger.com/profile/00635455316165763799noreply@blogger.com0tag:blogger.com,1999:blog-5433389051097398001.post-36077879852909251192016-11-06T02:42:00.000-08:002016-11-06T02:42:04.280-08:00ARM 初體驗 - NanoPi M1 系統安裝前幾天分享了一個ARM平台的系統NanoPi M3,在那同時,我也多買的一個NanoPi M1,今天就先分享一下安裝NanoPi M1。<br />
<a name='more'></a>我們先來看看M1長什麼樣子,外殼是用3D列印製作的,可以至官網下載列印的檔案自行列印,但由於我沒有3D列印設備,所以只好跟官方購買~<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBNO5FfVsUsV6MJKHFdjdVHajSB8sks_uKN8auDFk2cjoV6tnMI5vT2wHYsfCbJ3JUb1tX9hTMyEeuHQdL0N4AKXnvxJd5uhJF4-vThM4bPBTGGNlNZCYoSxo7rlEh6lwJ_kYw3Q2Opls/s1600/IMG_4415.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBNO5FfVsUsV6MJKHFdjdVHajSB8sks_uKN8auDFk2cjoV6tnMI5vT2wHYsfCbJ3JUb1tX9hTMyEeuHQdL0N4AKXnvxJd5uhJF4-vThM4bPBTGGNlNZCYoSxo7rlEh6lwJ_kYw3Q2Opls/s200/IMG_4415.JPG" width="200" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguHazMZp4-ZzW1S3XCiKWy76H2BAZ5Y7kaibc_CoQnvaoj5RFjNvR3cpaG92Dtb_n2iL3Ldy1JXX9qx1m46AqKjtfmJ42tOBzGEwDpBSQzmYcuFyvR3yxB9oYSjE1GM8VsJrVuqQaFjVc/s1600/IMG_4414.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguHazMZp4-ZzW1S3XCiKWy76H2BAZ5Y7kaibc_CoQnvaoj5RFjNvR3cpaG92Dtb_n2iL3Ldy1JXX9qx1m46AqKjtfmJ42tOBzGEwDpBSQzmYcuFyvR3yxB9oYSjE1GM8VsJrVuqQaFjVc/s200/IMG_4414.JPG" width="200" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="" style="clear: both; text-align: left;">
再一張圖,後面還有M1的Logo</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgJDGg0D_fEdtHuXp5eAQT6vsLrVxL1NH7CI7s9obFu0y6ywioEHU1ENk8M9XTa7gVs9O6Ozz7kWTOdu1yQAp3JVEaZiPblJpn9zzUOPZXS07CibOezEUZzV3QbmK089UgXSrrDUloqWc/s1600/IMG_4416.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgJDGg0D_fEdtHuXp5eAQT6vsLrVxL1NH7CI7s9obFu0y6ywioEHU1ENk8M9XTa7gVs9O6Ozz7kWTOdu1yQAp3JVEaZiPblJpn9zzUOPZXS07CibOezEUZzV3QbmK089UgXSrrDUloqWc/s200/IMG_4416.JPG" width="200" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
安裝流程如下:<br />
1. 依據官網說明,可以安裝Linux / Android系統,而Linux 系統可以安裝Debian/Ubuntu,Source可從官網的Wiki說明中取得下載,本次先以 Linux安裝測試為主,這次選用 Debian系統做為測試環境,首先需要準備的東西如下<br />
a) Win32 Disk Imager<br />
b) nanopim1-debian-sd4g-20160907.img<br />
以上兩個皆可從wiki中連結下載,下載後,執行Win32 Disk Imager程式,執行後再畫面選擇nanopim1 的影像檔,確認好寫入的記憶卡位置後即可執行Write進行作業系統安裝。<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhh9qeGaGXa-lWLqsqboCeZpYoR3dlMPHCQZ3bxsVBYQUFQwDjlbKCOUlRpP2K5f7t3EH7sBscImHfb1FxMqzZBqxDQ8GA-mOQneOpLavejDo1eJWNMV3KLkzk7A8S1d4qfQLaZ6Hx1zB0/s1600/write-image.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="135" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhh9qeGaGXa-lWLqsqboCeZpYoR3dlMPHCQZ3bxsVBYQUFQwDjlbKCOUlRpP2K5f7t3EH7sBscImHfb1FxMqzZBqxDQ8GA-mOQneOpLavejDo1eJWNMV3KLkzk7A8S1d4qfQLaZ6Hx1zB0/s320/write-image.jpg" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
2. 將作業系統寫入到記憶卡後,就可以準備進行放到M1的設備上進行開機測試,準備的設備如下圖。<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhoNThjdoqWO7dHqTHSUkT8emz1wfYGioOdqKpWpRUvbgQ_TPrS4Ru5jcDt4pnBrdkgkS8hk8PwaoTi7EvN_1rEFvct7F6Eo4mvkAjEM5kxLzhadvzAXW6cxaSppBAglHTL0hpbAbBzJW0/s1600/IMG_4417.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhoNThjdoqWO7dHqTHSUkT8emz1wfYGioOdqKpWpRUvbgQ_TPrS4Ru5jcDt4pnBrdkgkS8hk8PwaoTi7EvN_1rEFvct7F6Eo4mvkAjEM5kxLzhadvzAXW6cxaSppBAglHTL0hpbAbBzJW0/s320/IMG_4417.JPG" width="320" /></a></div>
<div style="text-align: center;">
NanoPi M1 x 1</div>
<div style="text-align: center;">
無線鍵盤滑鼠 x 1</div>
<div style="text-align: center;">
micro SD card 16G x 1</div>
<br />
3. 將M1 設備接上有HDMI的螢幕,插上USB電源後,即可正常開機進入到Debian 系統,預設的帳號密碼為:root / fa<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSwHXAfo9AVPvue5_7oZqjjBaDlgGyTxX4RkPYycsb41dnbvbu-q_can2pYKSg2x-Y4FIQAdESubkr98_rKevHXYpEyoB7xbyOrUBzQ8pU20w87_-D9HI4naPnxShpbRqtnjTLotdprw4/s1600/IMG_4419.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSwHXAfo9AVPvue5_7oZqjjBaDlgGyTxX4RkPYycsb41dnbvbu-q_can2pYKSg2x-Y4FIQAdESubkr98_rKevHXYpEyoB7xbyOrUBzQ8pU20w87_-D9HI4naPnxShpbRqtnjTLotdprw4/s400/IMG_4419.JPG" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
4. 登入後,首先進行更新,開啟Terminal,執行sudo apt-get update</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQLkbtG64fUMGO9oyffR0Ww2s7Xz4QuZRU4CFUJVoTUrVc-rXdh0KMP_HNaqJGXTdhanX-n7-5xGXwLSCwEbCjlC3gZ8wBLxO9sVwRzNfi-f-3AJAYrnZFjQ0RjGkAo5QVFPBreI52mwM/s1600/IMG_4421.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQLkbtG64fUMGO9oyffR0Ww2s7Xz4QuZRU4CFUJVoTUrVc-rXdh0KMP_HNaqJGXTdhanX-n7-5xGXwLSCwEbCjlC3gZ8wBLxO9sVwRzNfi-f-3AJAYrnZFjQ0RjGkAo5QVFPBreI52mwM/s400/IMG_4421.JPG" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
5. 由於預設安裝好後只會佔用記憶卡4G的容量,如果要使用剩餘的如量可以執行下述的方式來延展空間,執行 sudo fs_resize,然後重新開機後,即可將剩餘的容量延展到根目錄下</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCC4vazjNXjrB3xBaGaz4x9JaXoFGLJUNRGX14jr8ORhA2f_0C6x9GobRucKcKKShPcLLd0OasZ3ILBASqlIGl0-oXDYQcaxmQ8vPrman6D-Papue_z6lJnEh5stD-sZF5CoECZCf4jbs/s1600/IMG_4425.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCC4vazjNXjrB3xBaGaz4x9JaXoFGLJUNRGX14jr8ORhA2f_0C6x9GobRucKcKKShPcLLd0OasZ3ILBASqlIGl0-oXDYQcaxmQ8vPrman6D-Papue_z6lJnEh5stD-sZF5CoECZCf4jbs/s400/IMG_4425.JPG" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
以上即完成初始化安裝及設定。</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<br />AChinhttp://www.blogger.com/profile/00635455316165763799noreply@blogger.com0tag:blogger.com,1999:blog-5433389051097398001.post-39638396784649148352016-11-01T04:48:00.001-07:002016-11-04T08:43:40.755-07:00NanoPi M3 初入手最近對ARM的設備感興趣,後上網查了一下,另外發現了一個類似樹梅派的設備 "Nanopi M3",也因此向國外訂購了一組,後續試用後會在寫篇產品試用文。<br />
<br />
先讓大家觀看Youtube上的影片介紹。<br />
<br />
<iframe allowfullscreen="" frameborder="0" height="320" src="https://www.youtube.com/embed/NYBQ8OQFeG0" width="480"></iframe>AChinhttp://www.blogger.com/profile/00635455316165763799noreply@blogger.com0tag:blogger.com,1999:blog-5433389051097398001.post-27992772150596394832016-10-30T06:18:00.001-07:002016-11-01T05:10:12.744-07:00在 Linux 上安裝 Oracle Database (二)接續上一篇Oracle Database 安裝後,本篇繼續後續的設定作業,基本先設定工作環境,如後說明:<br />
<a name='more'></a><br />
<br />
1. 設定Oracle 工作環境:可以直接開啟Browser連接本機的8080 port,或是利用Linux 視窗中的Oracle Get Started 捷徑開啟設定<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRikSwRkHoSfuihxG4YKXg1jkbuErvcLGuwrJQy4F7NsZnO-2uXXLPj11kIQrvcy8MkzOxIQaDOaBdzy2yjfLG6XgfjhA8IGzPeJ_D-J-fBT8DueNJ3hvpo-t48C6I-rFiQC3XcqJkC8E/s1600/%25E8%259E%25A2%25E5%25B9%2595%25E5%25BF%25AB%25E7%2585%25A7+2016-10-30+%25E4%25B8%258B%25E5%258D%25888.41.14.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="296" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRikSwRkHoSfuihxG4YKXg1jkbuErvcLGuwrJQy4F7NsZnO-2uXXLPj11kIQrvcy8MkzOxIQaDOaBdzy2yjfLG6XgfjhA8IGzPeJ_D-J-fBT8DueNJ3hvpo-t48C6I-rFiQC3XcqJkC8E/s400/%25E8%259E%25A2%25E5%25B9%2595%25E5%25BF%25AB%25E7%2585%25A7+2016-10-30+%25E4%25B8%258B%25E5%258D%25888.41.14.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_dbgrA5KD-b_ttXoW32CUGeRcMMVZDhkJv1W_4EY-V07IFDuHhgCEF1TcWHKki-EEacbs6hjm1ZRDdk5Qc75Q3ApfSumw2wSuAS0CzKwWUtr6JL_L6JadHDfXWT594-zVMYVd-CIIaCU/s1600/%25E8%259E%25A2%25E5%25B9%2595%25E5%25BF%25AB%25E7%2585%25A7+2016-10-30+%25E4%25B8%258B%25E5%258D%25888.42.40.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="188" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_dbgrA5KD-b_ttXoW32CUGeRcMMVZDhkJv1W_4EY-V07IFDuHhgCEF1TcWHKki-EEacbs6hjm1ZRDdk5Qc75Q3ApfSumw2wSuAS0CzKwWUtr6JL_L6JadHDfXWT594-zVMYVd-CIIaCU/s400/%25E8%259E%25A2%25E5%25B9%2595%25E5%25BF%25AB%25E7%2585%25A7+2016-10-30+%25E4%25B8%258B%25E5%258D%25888.42.40.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
2. 登入介面後,點選Application Express,此時輸入帳號密碼,帳號為:SYSTEM,密碼是安裝時所設定的密碼<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEewgQE9uiorKpcBbK2DfMG08V4hyY2WJx2ylse0DVDBOgBZZZyVfe86UaM1ZS5mh_ZWzt1o3SEd-5Hk38-OoPrOWq4MdUOc7UrCAzjSM1j4fZeAHmZULWVcgrGzl_BBmnaVVCKyTcIJg/s1600/%25E8%259E%25A2%25E5%25B9%2595%25E5%25BF%25AB%25E7%2585%25A7+2016-10-30+%25E4%25B8%258B%25E5%258D%25888.49.36.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="147" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEewgQE9uiorKpcBbK2DfMG08V4hyY2WJx2ylse0DVDBOgBZZZyVfe86UaM1ZS5mh_ZWzt1o3SEd-5Hk38-OoPrOWq4MdUOc7UrCAzjSM1j4fZeAHmZULWVcgrGzl_BBmnaVVCKyTcIJg/s400/%25E8%259E%25A2%25E5%25B9%2595%25E5%25BF%25AB%25E7%2585%25A7+2016-10-30+%25E4%25B8%258B%25E5%258D%25888.49.36.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
3. 登入後,輸入各欄位的值,輸入完,輸入完點選Create Workspace:</div>
<div class="separator" style="clear: both; text-align: left;">
Database Username:新增一個名稱</div>
<div class="separator" style="clear: both; text-align: left;">
Application Express Username:依喜好新增一個名稱</div>
<div class="separator" style="clear: both; text-align: left;">
Password:自訂密碼</div>
<div class="separator" style="clear: both; text-align: left;">
Confirm Password:再次輸入自訂密碼</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfzuW0cHEvXcgPF7XrAxLM1sKb5K9RCY7dte_wEAQnpla6nBLIs3gn8oF85Ggajp2KlKzS8-Omiwmi3XdyhOmukcO1GUsujtjnzcEqb50FbiuHc_TKyXC84ErJRvCAApFyPGtRHWdGmfc/s1600/%25E8%259E%25A2%25E5%25B9%2595%25E5%25BF%25AB%25E7%2585%25A7+2016-10-30+%25E4%25B8%258B%25E5%258D%25888.58.04.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="192" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfzuW0cHEvXcgPF7XrAxLM1sKb5K9RCY7dte_wEAQnpla6nBLIs3gn8oF85Ggajp2KlKzS8-Omiwmi3XdyhOmukcO1GUsujtjnzcEqb50FbiuHc_TKyXC84ErJRvCAApFyPGtRHWdGmfc/s400/%25E8%259E%25A2%25E5%25B9%2595%25E5%25BF%25AB%25E7%2585%25A7+2016-10-30+%25E4%25B8%258B%25E5%258D%25888.58.04.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
4. 在點選 Create Workspace並完成新增後,即可點選畫面中的click here,來開啟新增Workspace</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhst_vgpBGep7dV6UM2bfD18B_-RkeJAMtWNqCjmt2OTTVQ7ORZYGHw4ImdOP-2oY8vctLJtY066ukv8LB4BJ029Tdl2YKKqxq9edGwG21KOMcncrGl4FziuHazniw25Oqt68zbUweZJBI/s1600/%25E8%259E%25A2%25E5%25B9%2595%25E5%25BF%25AB%25E7%2585%25A7+2016-10-30+%25E4%25B8%258B%25E5%258D%25889.06.52.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="190" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhst_vgpBGep7dV6UM2bfD18B_-RkeJAMtWNqCjmt2OTTVQ7ORZYGHw4ImdOP-2oY8vctLJtY066ukv8LB4BJ029Tdl2YKKqxq9edGwG21KOMcncrGl4FziuHazniw25Oqt68zbUweZJBI/s400/%25E8%259E%25A2%25E5%25B9%2595%25E5%25BF%25AB%25E7%2585%25A7+2016-10-30+%25E4%25B8%258B%25E5%258D%25889.06.52.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
5. 輸入剛剛新增的Workspace 的帳號與密碼後即可進入工作視窗畫面<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDIOb0LlfcMmXD5vxyf8S9ETWkBe1kYYh6H78gxJxnVngWt-WcD6mD5OU0O3ohwU0eT6S4xLMbeWdDdIZlpxjtXtnQiCAGyKCpk_ZDXayrtiHsQC5InrxVT31aq0c6hW_M-cFUW2VgMF4/s1600/%25E8%259E%25A2%25E5%25B9%2595%25E5%25BF%25AB%25E7%2585%25A7+2016-10-30+%25E4%25B8%258B%25E5%258D%25889.07.39.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="218" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDIOb0LlfcMmXD5vxyf8S9ETWkBe1kYYh6H78gxJxnVngWt-WcD6mD5OU0O3ohwU0eT6S4xLMbeWdDdIZlpxjtXtnQiCAGyKCpk_ZDXayrtiHsQC5InrxVT31aq0c6hW_M-cFUW2VgMF4/s400/%25E8%259E%25A2%25E5%25B9%2595%25E5%25BF%25AB%25E7%2585%25A7+2016-10-30+%25E4%25B8%258B%25E5%258D%25889.07.39.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7d9dzoM4OOh5fNGoqlP2XruZvoxSBk-_BdTvngO8exsDs0wWpDYHLmelTBJoSa6tj-pBs9ahCYA-0_YHY8MLS-J8X84J8pCHTfBFZAKeBKYBI7d5QTRR4L7ZPPyDps9ROYTa5QAZfT_w/s1600/%25E8%259E%25A2%25E5%25B9%2595%25E5%25BF%25AB%25E7%2585%25A7+2016-10-30+%25E4%25B8%258B%25E5%258D%25889.13.32.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="235" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7d9dzoM4OOh5fNGoqlP2XruZvoxSBk-_BdTvngO8exsDs0wWpDYHLmelTBJoSa6tj-pBs9ahCYA-0_YHY8MLS-J8X84J8pCHTfBFZAKeBKYBI7d5QTRR4L7ZPPyDps9ROYTa5QAZfT_w/s400/%25E8%259E%25A2%25E5%25B9%2595%25E5%25BF%25AB%25E7%2585%25A7+2016-10-30+%25E4%25B8%258B%25E5%258D%25889.13.32.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
以上即完成Workspace 設定。 下一篇將說明建立一個Database。</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<br />
<br />AChinhttp://www.blogger.com/profile/00635455316165763799noreply@blogger.com0tag:blogger.com,1999:blog-5433389051097398001.post-69791318120922507702016-10-30T01:55:00.000-07:002016-11-01T05:10:41.732-07:00在 Linux 上安裝 Oracle Database (ㄧ)最近因工作關係,剛好有需要與Oracle Database 做介接,然而以前並未真正操作與使用Oracle,剛好也在使用上有些許的問題,一時之間也無法解決,就想安裝一套做一下測試。<br />
<br />
上網查了一下,發現在Oracle 也提供了免費版讓一般使用者、小型使用需求或是應用在Open Source上的Express Edition,事不宜遲立即到官網下載。<br />
<a name='more'></a><br />
<br />
1. 首先說明本次的環境,如下:<br />
<br />
<ul>
<li>OS: CentOS 7</li>
<li>Oracle Database 11g Express Edition</li>
</ul>
<br />
<br />
2. 從官網中,選擇 Downloads ,可看到Oracle Database 11g Express Edition,點選後可進入下載頁面。 官網下載位置:<a href="http://www.oracle.com/technetwork/database/database-technologies/express-edition/downloads/index.html">Oracle 11g Express Edition Downloads</a><br />
<blockquote class="tr_bq">
<div class="separator" style="clear: both; text-align: center;">
</div>
</blockquote>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgo9JlCPIAeL6iSAQ18T04hlrJGuZ4j0SDBg-32_WeHkFnTxa6UM1jGRnPqpPd0ee4dGTH7WYeE3lEXIw-MTqnNmwclUZwNRvJG8GxQdooQLULvPpKm0PGlzoJ5Q6Npo5Oqy1bR4T1-gWs/s1600/%25E8%259E%25A2%25E5%25B9%2595%25E5%25BF%25AB%25E7%2585%25A7+2016-10-30+%25E4%25B8%258B%25E5%258D%25884.11.31.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="175" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgo9JlCPIAeL6iSAQ18T04hlrJGuZ4j0SDBg-32_WeHkFnTxa6UM1jGRnPqpPd0ee4dGTH7WYeE3lEXIw-MTqnNmwclUZwNRvJG8GxQdooQLULvPpKm0PGlzoJ5Q6Npo5Oqy1bR4T1-gWs/s400/%25E8%259E%25A2%25E5%25B9%2595%25E5%25BF%25AB%25E7%2585%25A7+2016-10-30+%25E4%25B8%258B%25E5%258D%25884.11.31.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
3. 先來看一下Express Edition 的說明介紹,點選Overview,可看到對於此版本的說明,裡面有提到關於此版本僅可使用CPU 1 Core 以及最高可儲存11G的資料,對於用來測試也措措有餘。</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlaYh05TGJUccVGiZcT2G2eYPE5hw2hvcfdVbWKBdOJqjewNHAH17YMnA1YRarMHJHExFb9sjs-V4Ze84vfFEi8SM5DhQEX2AxbqP1IzIbtyUsKMSGDrvB9REXv_Pl_XDSE0ch4KtSuZo/s1600/%25E8%259E%25A2%25E5%25B9%2595%25E5%25BF%25AB%25E7%2585%25A7+2016-10-30+%25E4%25B8%258B%25E5%258D%25884.06.36.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="236" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlaYh05TGJUccVGiZcT2G2eYPE5hw2hvcfdVbWKBdOJqjewNHAH17YMnA1YRarMHJHExFb9sjs-V4Ze84vfFEi8SM5DhQEX2AxbqP1IzIbtyUsKMSGDrvB9REXv_Pl_XDSE0ch4KtSuZo/s400/%25E8%259E%25A2%25E5%25B9%2595%25E5%25BF%25AB%25E7%2585%25A7+2016-10-30+%25E4%25B8%258B%25E5%258D%25884.06.36.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
4. 再點選Downloads 頁籤準備下載Oracle,點選Accept License Agreement同意才可下載,本次使用的平台是 CentOS 7,故選擇for linux 版本,下載時會需要登入Oracle 帳號,此可免費註冊,在此就不再撰述。</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhmoSriM-VkKcYV0eEmWfvzuY2LB3FtwNpx1_2iV_NEsRbPph8uh1cYQ8iGIo2z4uLK_aewbr7UG5H8z0TL5QDpnzh2McCaBidCRbZEoZhJhbyrbbRwncz1PnPW6wX2EUvcd7Q-ba62Z8/s1600/%25E8%259E%25A2%25E5%25B9%2595%25E5%25BF%25AB%25E7%2585%25A7+2016-10-30+%25E4%25B8%258B%25E5%258D%25884.15.10.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="212" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhmoSriM-VkKcYV0eEmWfvzuY2LB3FtwNpx1_2iV_NEsRbPph8uh1cYQ8iGIo2z4uLK_aewbr7UG5H8z0TL5QDpnzh2McCaBidCRbZEoZhJhbyrbbRwncz1PnPW6wX2EUvcd7Q-ba62Z8/s400/%25E8%259E%25A2%25E5%25B9%2595%25E5%25BF%25AB%25E7%2585%25A7+2016-10-30+%25E4%25B8%258B%25E5%258D%25884.15.10.png" width="400" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
5. 下載完成後即可進行安裝,我把下載的檔案放到 /opt 的目錄下,先進行解壓縮再進行安裝。<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgoe7k0pWo_uEYWikBuaK9mF1fKUxlhfPsZLooYjzVvhj_sAmkbQkWIf6aB5w647twvV0-kGmqsOPofIrxHXreXHIc3Sl4YdMj8UHV8hJ9l7tN6ytPc9LBmgFMrThkumD-94pZ44TTKLtQ/s1600/%25E8%259E%25A2%25E5%25B9%2595%25E5%25BF%25AB%25E7%2585%25A7+2016-10-30+%25E4%25B8%258B%25E5%258D%25884.35.19.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="268" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgoe7k0pWo_uEYWikBuaK9mF1fKUxlhfPsZLooYjzVvhj_sAmkbQkWIf6aB5w647twvV0-kGmqsOPofIrxHXreXHIc3Sl4YdMj8UHV8hJ9l7tN6ytPc9LBmgFMrThkumD-94pZ44TTKLtQ/s400/%25E8%259E%25A2%25E5%25B9%2595%25E5%25BF%25AB%25E7%2585%25A7+2016-10-30+%25E4%25B8%258B%25E5%258D%25884.35.19.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
6. 安裝好後,須在執行基本設定,如上圖下方內容去執行設定</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhU5NypDGVqfyS6nG49rR3yBQ0ODs5q_3EjEy8PsGl7cDHjkF8aT4bhDjWwMpV6SbwQyz-JLfPVE0UluWyhPaWIKOFUe7PsefuJNUwIzNw9Q12FJ1B5WEotQNOXy6iBd2Ei5bqShVl_F4c/s1600/%25E8%259E%25A2%25E5%25B9%2595%25E5%25BF%25AB%25E7%2585%25A7+2016-10-30+%25E4%25B8%258B%25E5%258D%25884.50.00.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="268" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhU5NypDGVqfyS6nG49rR3yBQ0ODs5q_3EjEy8PsGl7cDHjkF8aT4bhDjWwMpV6SbwQyz-JLfPVE0UluWyhPaWIKOFUe7PsefuJNUwIzNw9Q12FJ1B5WEotQNOXy6iBd2Ei5bqShVl_F4c/s400/%25E8%259E%25A2%25E5%25B9%2595%25E5%25BF%25AB%25E7%2585%25A7+2016-10-30+%25E4%25B8%258B%25E5%258D%25884.50.00.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
以上即安裝完成。下一篇將介紹工作環境建立。<br />
<br />AChinhttp://www.blogger.com/profile/00635455316165763799noreply@blogger.com0tag:blogger.com,1999:blog-5433389051097398001.post-18886556973658547222016-10-25T12:42:00.001-07:002016-11-01T05:11:12.330-07:00Postfix forward mail to another SMTP gateway<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.8px Arial; color: #323333; -webkit-text-stroke: #323333}
span.s1 {font-kerning: none}
</style>
<br />
舊文章整理張貼 -
<br />
<br />
<div class="p1">
<span class="s1" style="background-color: white;">今天剛好有機會可以測試一個Mail gateway的產品,於是很快就把設備安裝並設定好,此時需要將原有的mail server的外寄信件都轉送到這台Mail gateway上</span></div>
<a name='more'></a><style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.8px Arial; color: #323333; -webkit-text-stroke: #323333}
span.s1 {font-kerning: none}
</style>
<br />
<div class="p1">
<span class="s1" style="background-color: white;">檢視目前郵件的系統,是Postfix mail,經瞭解設定方式後,記錄一下設定方式:</span></div>
<div class="p1">
<span class="s1" style="background-color: white;">
</span></div>
<div class="p1">
<span class="s1" style="background-color: white;">1. 修改main.cf 設定,更改relayhos</span></div>
<blockquote class="tr_bq">
<span class="s1" style="background-color: white;">
<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.8px Arial; color: #323333; -webkit-text-stroke: #323333}
p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.8px Arial; color: #ff2500; -webkit-text-stroke: #ff2500; background-color: #eeeeee}
span.s1 {font-kerning: none; background-color: #eeeeee}
span.s2 {font-kerning: none; color: #323333; -webkit-text-stroke: 0px #323333}
span.s3 {font-kerning: none}
span.s4 {font-kerning: none; color: #888888; -webkit-text-stroke: 0px #888888}
</style>
</span><br />
<div class="p1">
<span class="s1" style="background-color: white;"><span class="s1"># vi /etc/postfix/main.cf</span></span></div>
<span class="s1" style="background-color: white;">
</span>
<br />
<div class="p1">
<span class="s1" style="background-color: white;"><span class="s1">修改relayhost 值</span></span></div>
<span class="s1" style="background-color: white;">
</span>
<br />
<div class="p2">
<span class="s1" style="background-color: white;"><span class="s2">relayhost = </span><span class="s3">mail gateway IP </span><span class="s4">--> 修改後存檔離開</span></span></div>
<span class="s1" style="background-color: white;">
</span></blockquote>
<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.8px Arial; color: #323333; -webkit-text-stroke: #323333}
span.s1 {font-kerning: none}
</style>
<span style="background-color: white; color: #323333; font-family: "arial"; font-size: 12.8px;">2. 重新啓動postfix 服務,即可完成</span><br />
<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.8px Arial; color: #323333; -webkit-text-stroke: #323333; background-color: #eeeeee}
span.s1 {font-kerning: none}
</style>
<br />
<blockquote class="tr_bq">
<span style="background-color: white; color: #323333; font-family: "arial"; font-size: 12.8px;"># service postfix restart</span></blockquote>
<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.8px Arial; color: #323333; -webkit-text-stroke: #323333}
span.s1 {font-kerning: none}
</style>
<br />
<div class="p1">
<span class="s1" style="background-color: white;">另外補充一下,如果要將所有信件都導送到其他的Mail Server主機或Gateway,設定如下:</span></div>
<span style="background-color: white; color: #323333; font-family: "arial"; font-size: 12.8px;">1. 修改main.cf 設定,增加一筆transport的設定</span><br />
<blockquote class="tr_bq">
<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.8px Arial; color: #323333; -webkit-text-stroke: #323333}
p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.8px Arial; color: #323333; -webkit-text-stroke: #323333; background-color: #eeeeee}
span.s1 {font-kerning: none; background-color: #eeeeee}
span.s2 {font-kerning: none}
</style>
<br />
<div class="p1">
<span class="s1" style="background-color: white;">#vi /etc/postfix/main.cf</span></div>
<div class="p1">
<span class="s1" style="background-color: white;">在最後面增加一筆設定</span></div>
<div class="p2">
<span class="s2" style="background-color: white;">transport_maps = hash:/etc/postfix/transport --> 完成後存檔離開</span></div>
</blockquote>
<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.8px Arial; color: #323333; -webkit-text-stroke: #323333}
span.s1 {font-kerning: none}
</style>
<span style="background-color: white; color: #323333; font-family: "arial"; font-size: 12.8px;">2. 設定transport內容</span><br />
<blockquote class="tr_bq">
<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.8px Arial; color: #323333; -webkit-text-stroke: #323333}
p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.8px Arial; color: #323333; -webkit-text-stroke: #323333; background-color: #eeeeee}
span.s1 {font-kerning: none; background-color: #eeeeee}
span.s2 {font-kerning: none}
span.s3 {font-kerning: none; color: #ff2500; -webkit-text-stroke: 0px #ff2500}
</style>
<br />
<div class="p1">
<span class="s1" style="background-color: white;">#vi /etc/postfix/transport</span></div>
<div class="p1">
<span class="s1" style="background-color: white;">在最後面增加一筆設定</span></div>
<div class="p2">
<span style="background-color: white;"><span class="s2">* smtp:[</span><span class="s3">mail gateway IP</span><span class="s2">] --> 存檔後離開</span></span></div>
</blockquote>
<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.8px Arial; color: #323333; -webkit-text-stroke: #323333}
span.s1 {font-kerning: none}
</style>
<span style="background-color: white; color: #323333; font-family: "arial"; font-size: 12.8px;">3. 重新postfix</span><br />
<blockquote class="tr_bq">
<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.8px Arial; color: #323333; -webkit-text-stroke: #323333}
p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.8px Arial; color: #323333; -webkit-text-stroke: #323333; background-color: #eeeeee}
span.s1 {font-kerning: none; background-color: #eeeeee}
span.s2 {font-kerning: none}
</style>
<br />
<div class="p1">
<span class="s1" style="background-color: white;"># postmap /etc/postfix/transport</span></div>
<div class="p2">
<span class="s2" style="background-color: white;"># service postfix restart</span></div>
</blockquote>
AChinhttp://www.blogger.com/profile/00635455316165763799noreply@blogger.com0tag:blogger.com,1999:blog-5433389051097398001.post-26893555082827617162016-10-25T12:27:00.006-07:002016-11-01T05:11:31.463-07:00自建 YUM Server (CentOS 6.4)<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.8px Arial; color: #323333; -webkit-text-stroke: #323333}
span.s1 {font-kerning: none}
</style>
<br />
<div class="p1">
舊文章重新整理張貼 -<br />
<br /></div>
<div class="p1">
<span class="s1" style="background-color: white;">由於內部Linux主機愈來愈多了,每次在更新的時候,都會耗掉對外的頻寬,所以才想說要建立內部的YUM Server,除了可節省對外的頻寬外,安裝及更新的時間也都可以加快許多又方便</span></div>
<a name='more'></a><br />
<div class="p1">
<span class="s1" style="background-color: white;">內部的Linux都是使用CentOS 6,所以就另外安裝一台Linux,作為YUM Server,做法如下:</span></div>
<div class="p1">
<span class="s1" style="background-color: white;">
<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.8px Arial; color: #323333; -webkit-text-stroke: #323333}
span.s1 {font-kerning: none}
</style>
</span></div>
<div class="p1">
<span class="s1" style="background-color: white;">1. 安裝所需套件:httpd, yum-arch, createrepo</span></div>
<blockquote class="tr_bq">
<span class="s1" style="background-color: white;">
<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.8px Arial; color: #323333; -webkit-text-stroke: #323333}
p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.8px Arial; color: #323333; -webkit-text-stroke: #323333; background-color: #eeeeee}
span.s1 {font-kerning: none; background-color: #eeeeee}
span.s2 {font-kerning: none}
</style>
</span><br />
<div class="p1">
<span class="s1" style="background-color: white;"><span class="s1"><b>先安裝EPEL</b></span></span></div>
<span class="s1" style="background-color: white;">
</span>
<br />
<div class="p1">
<span class="s1" style="background-color: white;"><span class="s1">#rpm -Uvh http://http://mirror01.idc.hinet.net/EPEL/6/x86_64/epel-release-6-8.noarch.rpm</span></span></div>
<span class="s1" style="background-color: white;">
</span>
<div class="p1">
<span class="s1" style="background-color: white;"><span class="s1"><b>安裝httpd, yum-arch, createrepo</b></span></span></div>
<span class="s1" style="background-color: white;">
<div class="p1">
<span class="s1">#yum groupinstall "Web Server"</span></div>
<div class="p1">
<span class="s1">#yum install yum-arch createrepo</span></div>
<div class="p1">
<span class="s1"><b>啟動httpd 服務</b></span></div>
<div class="p1">
<span class="s1">#service httpd start</span></div>
<div class="p2">
<span class="s2">#chkconfig --level 235 httpd on --> 開機時自動啓動</span></div>
</span></blockquote>
<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.8px Arial; color: #323333; -webkit-text-stroke: #323333}
span.s1 {font-kerning: none}
</style>
<br />
<div class="p1">
<span class="s1" style="background-color: white;">2. 建立YUM Server 設定</span></div>
<blockquote class="tr_bq">
<span class="s1" style="background-color: white;">
<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.8px Arial; color: #323333; -webkit-text-stroke: #323333}
p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.8px Arial; color: #323333; -webkit-text-stroke: #323333; background-color: #eeeeee}
span.s1 {font-kerning: none; background-color: #eeeeee}
span.s2 {font-kerning: none}
</style>
</span><br />
<div class="p1">
<span class="s1" style="background-color: white;"><span class="s1"><b>建立要放置Source 目錄</b></span></span></div>
<span class="s1" style="background-color: white;">
</span>
<br />
<div class="p1">
<span class="s1" style="background-color: white;"><span class="s1">#mkdir -p /var/www/html/yum/centos/6.4/os/x86_64</span></span></div>
<span class="s1" style="background-color: white;">
</span>
<div class="p1">
<span class="s1" style="background-color: white;"><span class="s1">#mkdir -p /var/www/html/yum/centos/6.4/updates/x86_64</span></span></div>
<span class="s1" style="background-color: white;">
<div class="p1">
<span class="s1">#mkdir -p /var/www/html/yum/centos/6.4/extras/x86_64</span></div>
<div class="p1">
<span class="s1"><b>針對目錄mirror YUM Server 更新套件 (這裡使用rsync,而不是使用mirrordir的方式,因為當我使用mirrordir都會因為buffer over flow,而中斷無法更新)</b></span></div>
<div class="p1">
<span class="s1">#rsync -aqzH --delete ftp.cs.pu.edu.tw::CentOS/6.4/os/x86_64 /var/www/html/yum/centos/6.4/os/x86_64</span></div>
<div class="p1">
<span class="s1">#rsync -aqzH --delete ftp.cs.pu.edu.tw::CentOS/6.4/updates/x86_64 /var/www/html/yum/centos/6.4/updates/x86_64</span></div>
<div class="p1">
<span class="s1">#rsync -aqzH --delete ftp.cs.pu.edu.tw::CentOS/6.4/extras/x86_64 /var/www/html/yum/centos/6.4/extras/x86_64</span></div>
<div class="p1">
<span class="s1"><b>RPM分析,並在目錄下產生headers資料夾</b></span></div>
<div class="p1">
<span class="s1">#yum-arch /var/www/html/yum/centos/6.4/os/x86_64</span></div>
<div class="p1">
<span class="s1">#yum-arch /var/www/html/yum/centos/6.4/updates/x86_64</span></div>
<div class="p1">
<span class="s1">#yum-arch /var/www/html/yum/centos/6.4/extras/x86_64</span></div>
<div class="p1">
<span class="s1"><b>使用createrepo產生XML metadata,並在目錄下產生repodata資料夾</b></span></div>
<div class="p1">
<span class="s1">#createrepo /var/www/html/yum/centos/6.4/os/x86_64</span></div>
<div class="p1">
<span class="s1">#createrepo /var/www/html/yum/centos/6.4/updates/x86_64</span></div>
<div class="p1">
<span class="s1">#createrepo /var/www/html/yum/centos/6.4/extras/x86_64</span></div>
<div class="p1">
<span class="s1"><b>設定每週自動更新套件</b></span></div>
<div class="p1">
<span class="s1">#vim /usr/local/sbin/yum-update.sh</span></div>
<div class="p1">
<span class="s1"><b>加入上述rsync三個指令後,存檔,並修改權限</b></span></div>
<div class="p1">
<span class="s1">#rsync -aqzH --delete ftp.cs.pu.edu.tw::CentOS/6.4/os/x86_64 /var/www/html/yum/centos/6.4/os/x86_64</span></div>
<div class="p1">
<span class="s1">#rsync -aqzH --delete ftp.cs.pu.edu.tw::CentOS/6.4/updates/x86_64 /var/www/html/yum/centos/6.4/updates/x86_64</span></div>
<div class="p1">
<span class="s1">#rsync -aqzH --delete ftp.cs.pu.edu.tw::CentOS/6.4/extras/x86_64 /var/www/html/yum/centos/6.4/extras/x86_64</span></div>
<div class="p1">
<span class="s1">#chmod 777 /usr/local/sbin/yum-update.sh</span></div>
<div class="p1">
<span class="s1"><b>加到排程工作執行</b></span></div>
<div class="p1">
<span class="s1">#crontab -e</span></div>
<div class="p2">
<span class="s2">0 2 * * 7 /usr/local/sbin/yum-update.sh --> 設定為每週日凌晨2點執行</span></div>
</span></blockquote>
<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.8px Arial; color: #323333; -webkit-text-stroke: #323333}
span.s1 {font-kerning: none}
</style>
<span style="background-color: white; color: #323333; font-family: "arial"; font-size: 12.8px;">3. YUM Client 設定</span><br />
<blockquote class="tr_bq">
<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.8px Arial; color: #323333; -webkit-text-stroke: #323333}
p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.8px Arial; color: #ff2500; -webkit-text-stroke: #ff2500}
p.p3 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.8px Arial; color: #323333; -webkit-text-stroke: #323333; background-color: #eeeeee}
span.s1 {font-kerning: none; background-color: #eeeeee}
span.s2 {font-kerning: none}
</style>
<br />
<div class="p1">
<span class="s1" style="background-color: white;"><b>設定YUM</b></span></div>
<div class="p1">
<span class="s1" style="background-color: white;">#cp /etc/yum.repo/CentOS-Base.repo /etc/yum.repo/CentOS-Base.repo.bak</span></div>
<div class="p1">
<span class="s1" style="background-color: white;">#vi /etc/yum.repo/CentOS-Base.repo</span></div>
<div class="p1">
<span class="s1" style="background-color: white;"><b>將[base] [updates] [extras] 的更新路徑變更為內部的YUM Server</b></span></div>
<div class="p1">
<span class="s1" style="background-color: white;">----------------------------------------------------------------------------------------------------------------------------</span></div>
<div class="p1">
<span class="s1" style="background-color: white;">[base]</span></div>
<div class="p1">
<span class="s1" style="background-color: white;">name=CentOS-$releasever - Base</span></div>
<div class="p2">
<span class="s1" style="background-color: white;"><span style="color: red;">#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os</span></span></div>
<div class="p2">
<span class="s1" style="background-color: white;"><span style="color: red;">baseurl=http://YUM Server IP/yum/centos/$releasever/os/$basearch/</span></span></div>
<div class="p1">
<span class="s1" style="background-color: white;">gpgcheck=1</span></div>
<div class="p2">
<span class="s1" style="background-color: white;"><span style="color: red;">#gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6</span></span></div>
<div class="p2">
<span class="s1" style="background-color: white;"><span style="color: red;">gpgkey=http://YUM Server IP/yum/centos/$releasever/os/$basearch/RPM-GPG-KEY-CentOS-6</span></span></div>
<div class="p1">
<span class="s1" style="background-color: white;">[updates]</span></div>
<div class="p1">
<span class="s1" style="background-color: white;">name=CentOS-$releasever - Updates</span></div>
<div class="p2">
<span class="s1" style="background-color: white;"><span style="color: red;">#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates</span></span></div>
<div class="p2">
<span class="s1" style="background-color: white;"><span style="color: red;">baseurl=http://YUM Server IP/yum/centos/$releasever/updates/$basearch/</span></span></div>
<div class="p1">
<span class="s1" style="background-color: white;">gpgcheck=1</span></div>
<div class="p2">
<span class="s1" style="background-color: white;"><span style="color: red;">#gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6</span></span></div>
<div class="p2">
<span class="s1" style="background-color: white;"><span style="color: red;">gpgkey=http://YUM Server IP/yum/centos/$releasever/os/$basearch/RPM-GPG-KEY-CentOS-6</span></span></div>
<div class="p1">
<span class="s1" style="background-color: white;">[extras]</span></div>
<div class="p1">
<span class="s1" style="background-color: white;">name=CentOS-$releasever - Extras</span></div>
<div class="p2">
<span class="s1" style="background-color: white;"><span style="color: red;">#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras</span></span></div>
<div class="p2">
<span class="s1" style="background-color: white;"><span style="color: red;">baseurl=http://YUM Server IP/yum/centos/$releasever/extras/$basearch/</span></span></div>
<div class="p1">
<span class="s1" style="background-color: white;">gpgcheck=1</span></div>
<div class="p2">
<span class="s1" style="background-color: white;"><span style="color: red;">#gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6</span></span></div>
<div class="p2">
<span class="s1" style="background-color: white;"><span style="color: red;">gpgkey=http://YUM Server IP/yum/centos/$releasever/os/$basearch/RPM-GPG-KEY-CentOS-6</span></span></div>
<div class="p1">
<span class="s1" style="background-color: white;">----------------------------------------------------------------------------------------------------------------------------</span></div>
<div class="p1">
<span class="s1" style="background-color: white;">#yum clean all</span></div>
<div class="p3">
<span class="s2" style="background-color: white;">#yum update</span></div>
</blockquote>
<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.8px Arial; color: #323333; -webkit-text-stroke: #323333}
span.s1 {font-kerning: none}
</style>
<span style="background-color: white;"><span style="color: #323333; font-family: "arial"; font-size: 12.8px;">以上YUM Server/Client即完成設定</span> </span><br />
<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.8px Arial; color: #323333; -webkit-text-stroke: #323333}
span.s1 {font-kerning: none}
</style>
AChinhttp://www.blogger.com/profile/00635455316165763799noreply@blogger.com0tag:blogger.com,1999:blog-5433389051097398001.post-74026228375610887492016-10-25T05:44:00.003-07:002016-11-01T05:12:01.494-07:00CentOS 6 新增網卡<div style="background-color: white; border: 0px; color: #333333; font-family: arial, sans-serif; font-size: 12.8px; font-stretch: inherit; font-variant-numeric: inherit; line-height: 1.5; padding: 0px 0px 0.5em; vertical-align: baseline;">
舊文章重新整理張貼 - </div>
<div style="background-color: white; border: 0px; color: #333333; font-family: arial, sans-serif; font-size: 12.8px; font-stretch: inherit; font-variant-numeric: inherit; line-height: 1.5; padding: 0px 0px 0.5em; vertical-align: baseline;">
因有一台主機退役,所以多了一張Dual Port的網卡,還是Intel 的,昨天就特地要將網卡安裝在現有的主機上,檢視了一下主機,目前主機是跑 CentOS 6.4,就準備關機安裝新的網卡。</div>
<a name='more'></a><br />
<div style="background-color: white; border: 0px; color: #333333; font-family: arial, sans-serif; font-size: 12.8px; font-stretch: inherit; font-variant-numeric: inherit; line-height: 1.5; padding: 0px 0px 0.5em; vertical-align: baseline;">
安裝好網卡後,將主機開機,發現在系統上,並沒有出現新的網卡,檢視了一下/etc/sysconfig/network-script/內容,也未出現網卡的設定檔,但從dmesg 中卻可以找到該網卡的資訊,在谷哥大神的協助下,終於找到原因了,是因為CentOS 6中,預設的kudzu這個識別硬體服務不存在,基本上所有硬體管理都通過udev來管理,所以只要重啓udev就可以解決了。</div>
<blockquote class="tr_bq" style="background-color: white; border: 0px; color: #333333; font-family: arial, sans-serif; font-size: 12.8px; font-stretch: inherit; font-variant-numeric: inherit; line-height: 1.5; padding: 0px 0px 0.5em; vertical-align: baseline;">
<span style="background-color: #eeeeee; font-family: serif; font-size: 14.08px;">#start_udev</span></blockquote>
<br />AChinhttp://www.blogger.com/profile/00635455316165763799noreply@blogger.com0