tag:blogger.com,1999:blog-206123932024-03-13T21:01:59.077+07:00Surachart Opun's BlogThis page contains my experiences and my thoughts about Information Technology and something new what I learned in my life.Surachart Opunhttp://www.blogger.com/profile/05646896104906516714noreply@blogger.comBlogger647125tag:blogger.com,1999:blog-20612393.post-75269240872430881652020-01-27T21:54:00.000+07:002020-01-27T21:55:41.761+07:00How to create signed url on google cloud storage?A signed URL is a URL that provides limited permission and time to make a request. It's good to be used by someone who does not have a Google Account. I caught up reading on Google Cloud documents and finding how to do it. Assume I would like to share file on google cloud storage to my friend who does have a Google Account. Example: gs://mysurachartbucket/test.txt<br />
<blockquote class="tr_bq">
[student@centos~]$ gsutil mb gs://mysurachartbucket<br />
Creating gs://mysurachartbucket/...<br />
[student@centos~]$ cat test.txt<br />
TEST<br />
[student@centos~]$ gsutil cp test.txt gs://mysurachartbucket/<br />
Copying file://test.txt [Content-Type=text/plain]...<br />
- [1 files][ 5.0 B/ 5.0 B]<br />
Operation completed over 1 objects/5.0 B.<br />
[student@centos~]$ gsutil ls gs://mysurachartbucket/test.txt<br />
gs://mysurachartbucket/test.txt</blockquote>
First of all, I need <b>keystore-file</b> from service account. So, To create service account and key file.<br />
<br />
<blockquote class="tr_bq">
[student@centos~]$<span style="color: blue;"> gcloud iam service-accounts list</span><br />
NAME EMAIL DISABLED<br />
Compute Engine default service account ********-compute@developer.gserviceaccount.com False<br />
[student@centos~]$ <span style="color: blue;">gcloud iam service-accounts create surachart</span><br />
Created service account [surachart].<br />
[student@centos~]$ <span style="color: blue;">gcloud iam service-accounts list</span><br />
NAME EMAIL DISABLED<br />
Compute Engine default service account ********-compute@developer.gserviceaccount.com False<br />
<b>surachart@myproject.iam.gserviceaccount.com </b> False<br />
[student@centos~]$ <span style="color: blue;">gcloud iam service-accounts keys create ~/surachart.json --iam-account surachart@myproject.iam.gserviceaccount.com</span><br />
created key [4d6b1bd*********08f966dd31] of type [json] as [/home/student/surachart.json] for [surachart@myproject.iam.gserviceaccount.com]</blockquote>
Then, service account should be able to read file in bucket.<br />
<blockquote class="tr_bq">
[student@centos~]$ <span style="color: blue;">gsutil acl ch -u surachart@myproject.iam.gserviceaccount.com:R gs://mysurachartbucket/test.txt</span><br />
Updated ACL on gs://mysurachartbucket/test.txt</blockquote>
Finally, create signed url by using <b>gsutil </b>command.<br />
<blockquote class="tr_bq">
[student@centos~]$ gsutil signurl -d 20m surachart.json gs://mysurachartbucket/test.txt<br />
CommandException: The signurl command requires the pyopenssl library (try pip install pyopenssl or easy_install pyopenssl)</blockquote>
<br />
####As error that need to install pyopenssl.<br />
<blockquote class="tr_bq">
[student@centos~]$<span style="color: blue;"> sudo pip install pyopenssl</span><br />
[student@centos~]$ <span style="color: blue;">gsutil signurl -d 20m surachart.json gs://mysurachartbucket/test.txt</span><br />
URL HTTP Method Expiration Signed URL<br />
gs://mysurachartbucket/test.txt GET 2020-01-27 21:34:08 https://storage.googleapis.com/mysurachartbucket/test.txt?x-goog-signature=99dbc749d2891eb1d9d22a5ccd03a81d4f0366380ff3bb0c34faf246d20677290778c6033a81fce43363709b244a882308b1c8590eaed409e1c8a0d4aca76cfec8537b1231e6b1f57************c6abaaacd128ac85f798edfb41bfa48d688897882be28cd1838520144ff197a5e84f499da914c2f8b309c32343011974a8f888163cba2a33c491fd858906bce2ad3cb5c5249c1e79127d200dccea553deafe7e1eb43a8b1527cb20e935c66129b0cad1683f01b6474a4c2940b92dd6daaa65da48fba7cbe94ed5881d46f268908735b2ad12ef2b1f7b0e79a2dd4a527cc611ea35718db96db&x-goog-algorithm=GOOG4-RSA-SHA256&x-goog-credential=surachart%40myproject.iam.gserviceaccount.com%2F20200127%2Fus%2Fstorage%2Fgoog4_request&x-goog-date=20200127T140408Z&x-goog-expires=1800&x-goog-signedheaders=host</blockquote>
This signed url will expire in 20 minutes. Then send it to my friend.<br />
<br />
<b>Reference: </b><br />
<a href="https://cloud.google.com/storage/docs/access-control/signed-urls">https://cloud.google.com/storage/docs/access-control/signed-urls</a><br />
<a href="https://cloud.google.com/storage/docs/gsutil/commands/signurl">https://cloud.google.com/storage/docs/gsutil/commands/signurl</a><div class="blogger-post-footer">Written By: Surachart Opun
http://surachartopun.com</div>Surachart Opunhttp://www.blogger.com/profile/05646896104906516714noreply@blogger.com0tag:blogger.com,1999:blog-20612393.post-84557358938531764402018-10-22T22:58:00.004+07:002018-10-22T23:00:20.061+07:00Oracle Database EM 18 XE Available to Remote ClientsI found lot of posts about <b><a href="https://www.oracle.com/technetwork/database/database-technologies/express-edition/downloads/index.html" target="_blank">Oracle Database 18 XE</a></b>. It's very interesting for me. I didn't blog about how to install, because it's very easy for using rpm package and<a href="https://www.oracle.com/database/technologies/appdev/xe/quickstart.html" target="_blank"> document</a> very helpful.<br />
I was interested in Enterprise Manager Database Express 18.4.0.0.0. How it looks like?<br />
<b>- Installing. I used CentOS7.</b><br />
<blockquote class="tr_bq">
[student@centos-learning ~]$ <span style="color: blue;">sudo yum -y localinstall oracle-database*18c*</span><br />
[student@centos-learning ~]$ <span style="color: blue;">sudo rpm -qa |grep oracle</span><br />
oracle-database-preinstall-18c-1.0-1.el7.x86_64<br />
oracle-database-xe-18c-1.0-1.x86_64<br />
<br />
[student@centos-learning ~]$ <span style="color: blue;">sudo /etc/init.d/oracle-xe-18c configure</span><br />
Specify a password to be used for database accounts. Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9]. Note that the same password will be used for SYS, SYSTEM and PDBADMIN accounts:<br />
The password you entered contains invalid characters. Enter password:<br />
Confirm the password:<br />
Configuring Oracle Listener.<br />
Listener configuration succeeded.<br />
Configuring Oracle Database XE.<br />
Enter SYS user password:<br />
*********<br />
Enter SYSTEM user password:<br />
********<br />
Enter PDBADMIN User Password:<br />
*********<br />
Prepare for db operation<br />
7% complete<br />
Copying database files<br />
29% complete<br />
Creating and starting Oracle instance<br />
30% complete<br />
31% complete<br />
34% complete<br />
38% complete<br />
41% complete<br />
43% complete<br />
Completing Database Creation<br />
47% complete<br />
50% complete<br />
Creating Pluggable Databases<br />
54% complete<br />
71% complete<br />
Executing Post Configuration Actions<br />
93% complete<br />
Running Custom Scripts<br />
100% complete<br />
Database creation complete. For details check the logfiles at:<br />
/opt/oracle/cfgtoollogs/dbca/XE.<br />
Database Information:<br />
Global Database Name:XE<br />
System Identifier(SID):XE<br />
Look at the log file "/opt/oracle/cfgtoollogs/dbca/XE/XE.log" for further details.<br />
Connect to Oracle Database using one of the connect strings:<br />
Pluggable database: centos-learning.surachartopun.com/XEPDB1<br />
Multitenant container database: centos-learning.surachartopun.com<br />
Use https://localhost:5500/em to access Oracle Enterprise Manager for Oracle Database XE<br />
[student@centos-learning ~]$ <span style="color: blue;">netstat -ltn |grep 5500</span><br />
tcp 0 0 <b>127.0.0.1:5500 </b> 0.0.0.0:* LISTEN</blockquote>
<div>
<b>- As I didn't want to connect 127.0.0.1, I changed binding - "<a href="https://docs.oracle.com/en/database/oracle/oracle-database/18/xeinl/making-oracle-database-em-express-available-remote-clients.html" target="_blank">Making Oracle Database EM Express Available to Remote Clients</a>"</b><br />
<blockquote>
SQL> !netstat -ltn |grep 5500<br />
tcp 0 0 <b>127.0.0.1:5500 </b> 0.0.0.0:* LISTEN<br />
SQL> !lsnrctl status | grep HTTP<br />
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=127.0.0.1)(PORT=5500))(Security=(my_wallet_directory=/opt/oracle/product/18c/dbhomeXE/admin/XE/xdb_wallet))(Presentation=HTTP)(Session=RAW))<br />
SQL><br />
SQL><br />
SQL> <span style="color: blue;"><b>EXEC DBMS_XDB.SETLISTENERLOCALACCESS(FALSE);</b></span><br />
PL/SQL procedure successfully completed.<br />
SQL> !netstat -ltn |grep 5500<br />
tcp 0 <b>0 0.0.0.0:5500</b> 0.0.0.0:* LISTEN<br />
SQL> !lsnrctl status | grep HTTP<br />
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=centos-learning.surachartopun.com)(PORT=5500))(Security=(my_wallet_directory=/opt/oracle/admin/XE/xdb_wallet))(Presentation=HTTP)(Session=RAW))</blockquote>
<div class="separator" style="clear: both; text-align: left;">
<b>- Browsed it - https://IP:5500/em</b></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-RqxcG1OXANM/W83vTQm_VPI/AAAAAAAADFk/REc6_I9D9ZwjlYAZ1Gra3n_DT6IOAl0owCLcBGAs/s1600/1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="440" data-original-width="1037" height="168" src="https://2.bp.blogspot.com/-RqxcG1OXANM/W83vTQm_VPI/AAAAAAAADFk/REc6_I9D9ZwjlYAZ1Gra3n_DT6IOAl0owCLcBGAs/s400/1.jpg" width="400" /></a></div>
<div>
<br /></div>
<div>
However, I got some error like "<span style="color: red;">Connection with database failed. Database instance might be down.</span>"</div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/-xuTYEiCYYT0/W83v0MgnfmI/AAAAAAAADFs/s8xixGixmZkNnj5j1b577ya8GW0LoxqkgCLcBGAs/s1600/2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="319" data-original-width="371" height="275" src="https://3.bp.blogspot.com/-xuTYEiCYYT0/W83v0MgnfmI/AAAAAAAADFs/s8xixGixmZkNnj5j1b577ya8GW0LoxqkgCLcBGAs/s320/2.jpg" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<b>- Checked alert log file and fixed.</b><br />
<b>Error:</b> <i>Global ports off in Root, do SetGlobalPortEnabled(TRUE) to enable.</i><br />
<blockquote class="tr_bq">
bash-4.2$ tail -f alert_XE.log<br />
2018-10-22T22:06:32.890217+07:00<br />
Global ports off in Root, do SetGlobalPortEnabled(TRUE) to enable.<br />
2018-10-22T22:06:38.489011+07:00<br />
Global ports off in Root, do SetGlobalPortEnabled(TRUE) to enable.<br />
2018-10-22T22:10:32.402822+07:00<br />
Resize operation completed for file# 3, old size 501760K, new size 512000K<br />
2018-10-22T22:15:55.791490+07:00<br />
Global ports off in Root, do SetGlobalPortEnabled(TRUE) to enable.<br />
2018-10-22T22:18:02.248906+07:00<br />
<span style="color: red;">Global ports off in Root, do SetGlobalPortEnabled(TRUE) to enable.</span></blockquote>
Setting the Global Port for EM Express to Manage a CDB and the PDBs. (<i><b>It might not be the right solution, but I just wanted to see EM</b></i>).<br />
<blockquote>
SQL> select dbms_xdb_config.getHttpsPort() from dual;<br />
DBMS_XDB_CONFIG.GETHTTPSPORT()<br />
------------------------------<br />
5500<br />
SQL> <b><span style="color: blue;">exec dbms_xdb_config.SetGlobalPortEnabled(TRUE)</span></b><br />
PL/SQL procedure successfully completed.</blockquote>
<b>- Login again.</b><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-_59lII-5sek/W83xrcHm6nI/AAAAAAAADF4/Nc7HYCmnpSItf1-kspDoX2oMM1BuFwu1gCLcBGAs/s1600/3.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="425" data-original-width="1053" height="258" src="https://1.bp.blogspot.com/-_59lII-5sek/W83xrcHm6nI/AAAAAAAADF4/Nc7HYCmnpSItf1-kspDoX2oMM1BuFwu1gCLcBGAs/s640/3.jpg" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-1TpDTc-GlV8/W83yPtHMEAI/AAAAAAAADGA/mjuL1MiS_KQ2mQOrBkyNogW0EopRUKtUgCLcBGAs/s1600/4.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="559" data-original-width="1329" height="268" src="https://4.bp.blogspot.com/-1TpDTc-GlV8/W83yPtHMEAI/AAAAAAAADGA/mjuL1MiS_KQ2mQOrBkyNogW0EopRUKtUgCLcBGAs/s640/4.jpg" width="640" /></a></div>
<br />
It worked fine for now.<br />
<br />
<b>Reference:</b> I<a href="https://docs.oracle.com/en/database/oracle/oracle-database/18/xeinl/installation-guide.html#GUID-31891F22-B1FA-4489-A1C5-195E6B3D89C8" target="_blank">nstallation Guide for Linux x86-64</a><div class="blogger-post-footer">Written By: Surachart Opun
http://surachartopun.com</div>Surachart Opunhttp://www.blogger.com/profile/05646896104906516714noreply@blogger.com0tag:blogger.com,1999:blog-20612393.post-89957583068693731622018-09-19T14:41:00.002+07:002018-09-19T14:41:57.889+07:00How to allow private connectivity across organizations(GCP)?It's interesting, when you would like to allow private connectivity across two VPC networks that they belong to the different project/organization on Google Cloud Platform (GCP).<br /><br />As google document that we can use <a href="https://cloud.google.com/vpc/docs/vpc-peering" target="_blank">VPC Network Peering</a>? VPC Network Peering is a decentralized or distributed approach to multi-project networking. Additional, it works with Compute Engine, Kubernetes Engine,and App Engine flexible environments.<br />
<br />
I did a lab about Virtual Private Cloud (VPC) Network Peering. There shows to do VPC Network Peering between VPC networks in the same project. So, I would like to see how it works on across organizations.<br /><br /><b>Example:</b> On My Organization (my project), I would like to connect server (<b>Private IP Address</b>) on another Organization (another project).<br /><br />As a subnet CIDR prefix in one peered VPC network cannot overlap with a subnet CIDR prefix in another peered network. So, both VPC networks must have the different CIDR prefix.<br />
<br /><b><span style="color: blue;">My Organization [myproject] {ubuntu-test, default/10.146.0.2} <======> No organization [qwiklabs-gcp***]{privatenet-us-vm/172.16.0.2}</span></b><br /><br /><b>On No organization [qwiklabs-gcp***]:</b> VPC network name is "<b>privatenet</b>".<br /><a href="https://2.bp.blogspot.com/-G4pZengqWLY/W6HsAcZGwOI/AAAAAAAADDg/k7A0bg00oskj4afwZG0EKNO12rC1a4PTgCLcBGAs/s1600/lab-vm.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="28" data-original-width="700" src="https://2.bp.blogspot.com/-G4pZengqWLY/W6HsAcZGwOI/AAAAAAAADDg/k7A0bg00oskj4afwZG0EKNO12rC1a4PTgCLcBGAs/s1600/lab-vm.jpg" /></a><br />VPC:<a href="https://1.bp.blogspot.com/-36PCj6qoUyM/W6HsrwpMivI/AAAAAAAADDs/piv34OkSjhILqVEznriJazeRDebORDO9QCLcBGAs/s1600/lab-vpc.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="85" data-original-width="879" src="https://1.bp.blogspot.com/-36PCj6qoUyM/W6HsrwpMivI/AAAAAAAADDs/piv34OkSjhILqVEznriJazeRDebORDO9QCLcBGAs/s1600/lab-vpc.jpg" /></a><br />
Firewall:<br /><a href="https://1.bp.blogspot.com/-DhW-jCb63ts/W6Hsrzrtz-I/AAAAAAAADDw/eiGQxTXT73Ex8cW7ovT8-6Occ7foL_ZRACLcBGAs/s1600/lab-firewall.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="56" data-original-width="762" src="https://1.bp.blogspot.com/-DhW-jCb63ts/W6Hsrzrtz-I/AAAAAAAADDw/eiGQxTXT73Ex8cW7ovT8-6Occ7foL_ZRACLcBGAs/s1600/lab-firewall.jpg" /></a><br />
<br />
<b>My Organization [myproject]: </b>I used "<b>default</b>" VPC and default firewall.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/-Xw6xta46Gxc/W6HuRXT8BbI/AAAAAAAADEA/Hy3miOBoBhINeQAmieMkRkKTVUQpqJNsQCLcBGAs/s1600/my-vm.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"></a></div>
<div style="clear: left; display: inline !important; margin-bottom: 1em; margin-right: 1em; text-align: left;">
<a href="https://3.bp.blogspot.com/-Xw6xta46Gxc/W6HuRXT8BbI/AAAAAAAADEA/Hy3miOBoBhINeQAmieMkRkKTVUQpqJNsQCLcBGAs/s1600/my-vm.jpg" imageanchor="1" style="clear: left; display: inline !important; margin-bottom: 1em; margin-right: 1em;"></a><a href="https://3.bp.blogspot.com/-Xw6xta46Gxc/W6HuRXT8BbI/AAAAAAAADEA/Hy3miOBoBhINeQAmieMkRkKTVUQpqJNsQCLcBGAs/s1600/my-vm.jpg" imageanchor="1" style="clear: left; display: inline !important; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="27" data-original-width="637" src="https://3.bp.blogspot.com/-Xw6xta46Gxc/W6HuRXT8BbI/AAAAAAAADEA/Hy3miOBoBhINeQAmieMkRkKTVUQpqJNsQCLcBGAs/s1600/my-vm.jpg" /></a></div>
<br />
<br />Then, starting to create "VPC Network Peering".<br />
<b><br />- To create "VPC Network Peering" on myproject:</b> Networking => "VPC network" => "VPC network peering".<br />
Click "Create Peering Connection". name = "peering-to-lab". <br />Note: you must know Project ID and VPC network name for network destination.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-8KCj8PjNKRw/W6HwLVzcy9I/AAAAAAAADEU/OiyGtll_L9IhB9r2o6C29iemxXi-9wUYQCLcBGAs/s1600/01.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="493" data-original-width="517" src="https://2.bp.blogspot.com/-8KCj8PjNKRw/W6HwLVzcy9I/AAAAAAAADEU/OiyGtll_L9IhB9r2o6C29iemxXi-9wUYQCLcBGAs/s1600/01.jpg" /></a><a href="https://2.bp.blogspot.com/-8KCj8PjNKRw/W6HwLVzcy9I/AAAAAAAADEU/OiyGtll_L9IhB9r2o6C29iemxXi-9wUYQCLcBGAs/s1600/01.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><br /></a></div>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<a href="https://1.bp.blogspot.com/-p-LAzyhs06I/W6Hw3umwGSI/AAAAAAAADEg/4jRY5FYHwIA3XGhSLbocanmiKVIDZMwPgCLcBGAs/s1600/02.jpg" imageanchor="1" style="clear: left; display: inline !important; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="173" data-original-width="795" src="https://1.bp.blogspot.com/-p-LAzyhs06I/W6Hw3umwGSI/AAAAAAAADEg/4jRY5FYHwIA3XGhSLbocanmiKVIDZMwPgCLcBGAs/s1600/02.jpg" /></a><br />
<br />It should show "<b>Waiting for peer network to connect</b>".<br /><br /><b>- To create "VPC Network Peering" on another Projec</b>t: On No organization [qwiklabs-gcp***], "Create Peering Connection". name = "peering-to-mygcp".<br /><a href="https://1.bp.blogspot.com/-QgrGoWD3jD8/W6Hx9iU3AOI/AAAAAAAADEs/swjqbu032tMsTUC-bsXP5HMKMdj-by-aQCLcBGAs/s1600/03.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="447" data-original-width="647" src="https://1.bp.blogspot.com/-QgrGoWD3jD8/W6Hx9iU3AOI/AAAAAAAADEs/swjqbu032tMsTUC-bsXP5HMKMdj-by-aQCLcBGAs/s1600/03.jpg" /></a><br />
<br />
<div class="separator" style="clear: both; text-align: left;">
After clicking "Create". It should show "<b>Connected</b>" on both projects (if configuration corrects) like.</div>
<br />
<div style="text-align: left;">
<a href="https://3.bp.blogspot.com/-H-ff3F5Qiwk/W6H01j-r0SI/AAAAAAAADE8/ptEN_DEIjJ0j0LPMY32QPrG3EmT6ivumQCLcBGAs/s1600/04.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="73" data-original-width="628" src="https://3.bp.blogspot.com/-H-ff3F5Qiwk/W6H01j-r0SI/AAAAAAAADE8/ptEN_DEIjJ0j0LPMY32QPrG3EmT6ivumQCLcBGAs/s1600/04.jpg" /></a></div>
On myproject:<br /><div style="text-align: start;">
<a href="https://2.bp.blogspot.com/-j00Yl_LovX0/W6H01m_WrbI/AAAAAAAADE4/tflWcVEcryUkPIt18NGFyQ0Fsp3lyye1QCLcBGAs/s1600/05.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="170" data-original-width="690" src="https://2.bp.blogspot.com/-j00Yl_LovX0/W6H01m_WrbI/AAAAAAAADE4/tflWcVEcryUkPIt18NGFyQ0Fsp3lyye1QCLcBGAs/s1600/05.jpg" /></a></div>
<br /><b>- Finally, test connection: </b>ssh to my vm and test (ssh) connection to {privatenet-us-vm/172.16.0.2}.<br /><b>Note:</b> (as firewall allow icmp/ssh). No need to do on firewall.<br /><a href="https://3.bp.blogspot.com/-jbOeDWgn_yE/W6H2SKbHdqI/AAAAAAAADFM/ZFI5-THLT34sddsOaw68GCuX3i2MbTqIACLcBGAs/s1600/06.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="427" data-original-width="711" src="https://3.bp.blogspot.com/-jbOeDWgn_yE/W6H2SKbHdqI/AAAAAAAADFM/ZFI5-THLT34sddsOaw68GCuX3i2MbTqIACLcBGAs/s1600/06.jpg" /></a><br />
<blockquote class="tr_bq">
opun@ubuntu-test:~$ ssh 172.16.0.2<br />opun@172.16.0.2's password:<br />Linux privatenet-us-vm 4.9.0-8-amd64 #1 SMP Debian 4.9.110-3+deb9u4 (2018-08-21) x86_64<br />The programs included with the Debian GNU/Linux system are free software;<br />the exact distribution terms for each program are described in the<br />individual files in /usr/share/doc/*/copyright.<br />Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent<br />permitted by applicable law.<br />Last login: Wed Sep 19 06:22:05 2018 from 10.146.0.2<br />Could not chdir to home directory /home/opun: No such file or directory<br />$ w<br /> 06:22:55 up 43 min, 2 users, load average: 0.00, 0.00, 0.00<br />USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT<br />opun pts/1 <b>10.146.0.2 </b> 06:22 1.00s 0.00s 0.00s w ************</blockquote>
<b>Reference:</b> <a href="https://cloud.google.com/vpc/docs/vpc-peering">https://cloud.google.com/vpc/docs/vpc-peering</a><div class="blogger-post-footer">Written By: Surachart Opun
http://surachartopun.com</div>Surachart Opunhttp://www.blogger.com/profile/05646896104906516714noreply@blogger.com0tag:blogger.com,1999:blog-20612393.post-26217875809801871662018-04-21T11:13:00.000+07:002018-04-21T11:21:10.137+07:00GCP - How to manage SSH keys on VM Instance?<div class="separator" style="clear: both; text-align: left;">
On Google Cloud Platform, adding SSH keys in Metadata (project-wide public SSH keys). It can help to ssh to every VM instances on Compute Engine easily but it's not a good idea. We are able to do for test, but should not use on Production. We should add SSH Key in OS login. </div>
<a href="https://cloud.google.com/compute/docs/instances/adding-removing-ssh-keys#risks">https://cloud.google.com/compute/docs/instances/adding-removing-ssh-keys#risks</a><br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div>
<a href="https://4.bp.blogspot.com/-qivaXdSaZMY/WtqtIW073CI/AAAAAAAADBI/DZCzcBXkdWQISpnIKLOmSgDZv-YK8kPjQCLcBGAs/s1600/00.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="425" data-original-width="923" height="292" src="https://4.bp.blogspot.com/-qivaXdSaZMY/WtqtIW073CI/AAAAAAAADBI/DZCzcBXkdWQISpnIKLOmSgDZv-YK8kPjQCLcBGAs/s640/00.jpg" width="640" /></a><br />
<b><br />Question:</b> How can we block SSH Keys from Metadata(project-wide public SSH keys) on VM instance?<br />
<b>Answer:</b> We can block by checking "Block project-wide SSH keys" on each instance.<br />
<br />
In case we have SSH Key on metadata. We are able to ssh by using private key and login like.<br />
<a href="https://1.bp.blogspot.com/-Ja3X0loEZE0/WtqvDwtKoUI/AAAAAAAADBc/yC1X335rr3IqL0N8mZvdQ3eLXdylR8NxgCLcBGAs/s1600/t3.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="252" data-original-width="711" height="225" src="https://1.bp.blogspot.com/-Ja3X0loEZE0/WtqvDwtKoUI/AAAAAAAADBc/yC1X335rr3IqL0N8mZvdQ3eLXdylR8NxgCLcBGAs/s640/t3.jpg" width="640" /></a></div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
So, we block it... On "<b>Compute Engine</b>" - "<b>VM Instances</b>", click <b>[instance name]</b> and "<b>Edit</b>". To check "<b><span style="color: red;">Block project-wide SSH keys</span></b>" and "<b>Save</b>".</div>
<div>
<br /></div>
<div>
<a href="https://2.bp.blogspot.com/-ir2X0nKOzZ4/WtqvD22z4HI/AAAAAAAADBk/eai2IilyxxkAWX49GGpn7RiCpt9T1dnuwCEwYBhgL/s1600/t4.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="581" data-original-width="751" height="494" src="https://2.bp.blogspot.com/-ir2X0nKOzZ4/WtqvD22z4HI/AAAAAAAADBk/eai2IilyxxkAWX49GGpn7RiCpt9T1dnuwCEwYBhgL/s640/t4.jpg" width="640" /></a></div>
<div>
<br />
<b>VM instance should refuse Key what 's not in SSH Keys of VM instance. (You can remove SSH Keys of project owner on instance, but it will be automatic added when you click "SSH" on GUI).</b></div>
<div class="separator" style="clear: both; text-align: left;">
<a href="https://2.bp.blogspot.com/-Ls3NWGJ3JJA/WtqwoJGo7RI/AAAAAAAADBw/erDuYhy6HkYYRw28YycQiDimcwagtPAYQCLcBGAs/s1600/t5.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="285" data-original-width="523" height="348" src="https://2.bp.blogspot.com/-Ls3NWGJ3JJA/WtqwoJGo7RI/AAAAAAAADBw/erDuYhy6HkYYRw28YycQiDimcwagtPAYQCLcBGAs/s640/t5.jpg" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
</div>
<div>
<br />
<b>Additional, we should review and remove SSH Keys in metadata(project-wide public SSH keys), if we ensure we have not used. (</b>Don't remove ssh key of project owner<b>).</b></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div>
After removing, We would like to add SSH Key and don't want to add it in OS login. We are able to add it in SSH Keys on Instance like.<br />
<a href="https://2.bp.blogspot.com/-SgEaMZSkw2Q/WtqvDuAnV0I/AAAAAAAADBg/jmrxneB_ugwcIcW47sjWKUnk3FBaO0u-gCEwYBhgL/s1600/t1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="339" data-original-width="762" height="284" src="https://2.bp.blogspot.com/-SgEaMZSkw2Q/WtqvDuAnV0I/AAAAAAAADBg/jmrxneB_ugwcIcW47sjWKUnk3FBaO0u-gCEwYBhgL/s640/t1.jpg" width="640" /></a><br />
<br />
<b>Assume: username is "myuser".</b><br />
<br />
First of all, we have to generate Private and Public Keys. Example uses "PuTTY Key Generator". Because I use "Putty.<br />
<a href="https://2.bp.blogspot.com/-WhZHE9c9uEg/WtqzGdM3VzI/AAAAAAAADB8/j2RgEB1CZiM7r9ZQcfhzFHK5AkwzY3vRgCLcBGAs/s1600/t2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="484" data-original-width="497" height="620" src="https://2.bp.blogspot.com/-WhZHE9c9uEg/WtqzGdM3VzI/AAAAAAAADB8/j2RgEB1CZiM7r9ZQcfhzFHK5AkwzY3vRgCLcBGAs/s640/t2.jpg" width="640" /></a><br />
<br />
Then "Save private key" (We have to use when putty to server) and "Save public key". <br />
<br />
To use public key on VM instance, click "<b>Add item</b>".<br />
<br />
<a href="https://2.bp.blogspot.com/-ibNNJOfC3XI/Wtqz3TQhUjI/AAAAAAAADCE/w46vjKgovPQ2gXieBUQp7c1HSIfHV4I9wCLcBGAs/s1600/10.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="349" data-original-width="550" height="404" src="https://2.bp.blogspot.com/-ibNNJOfC3XI/Wtqz3TQhUjI/AAAAAAAADCE/w46vjKgovPQ2gXieBUQp7c1HSIfHV4I9wCLcBGAs/s640/10.jpg" width="640" /></a><br />
<br />
<b>Example: It's [public key] [username] </b><br />
<a href="https://2.bp.blogspot.com/-fNCgU6q1PE8/Wtq1J4Kd19I/AAAAAAAADCQ/Spm1xRJaVhsADA2UDZSoa3Kp0nJToq5kgCLcBGAs/s1600/12.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="315" data-original-width="514" height="392" src="https://2.bp.blogspot.com/-fNCgU6q1PE8/Wtq1J4Kd19I/AAAAAAAADCQ/Spm1xRJaVhsADA2UDZSoa3Kp0nJToq5kgCLcBGAs/s640/12.jpg" width="640" /></a><br />
then "<b>Save</b>".<br />
<span style="color: blue;"><b>Note:</b> In picture, it's highlight about [username]</span><br />
<br />
Open "putty", select "Private key file for authentication", fill in ip address and connect.<br />
<a href="https://1.bp.blogspot.com/-ftgWLXg7pCo/Wtq2bp2CQBI/AAAAAAAADCc/4D-YpLOpmgsi_TwNcmFv1yiA-XexdZvHwCLcBGAs/s1600/13.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="269" data-original-width="650" height="264" src="https://1.bp.blogspot.com/-ftgWLXg7pCo/Wtq2bp2CQBI/AAAAAAAADCc/4D-YpLOpmgsi_TwNcmFv1yiA-XexdZvHwCLcBGAs/s640/13.jpg" width="640" /></a></div>
<div>
<br /></div>
<div>
it's easy, right?<br />
<blockquote class="tr_bq">
myuser@centos7:~$ id<br />
uid=1003(myuser) gid=1004(myuser) groups=1004(myuser),4(adm),30(dip),44(video),46(plugdev),1000(google-sudoers)</blockquote>
If we use command "id [user in project-wide SSH keys], we still see it, but it's unable to ssh on this VM instance.<br />
<blockquote class="tr_bq">
myuser@centos7:~$ id opun<br />
uid=1001(opun) gid=1002(opun) groups=1002(opun),4(adm),30(dip),44(video),46(plugdev),</blockquote>
</div>
<div>
<b>Reference:</b></div>
<div>
<a href="https://cloud.google.com/compute/docs/instances/adding-removing-ssh-keys">https://cloud.google.com/compute/docs/instances/adding-removing-ssh-keys</a></div>
<div class="blogger-post-footer">Written By: Surachart Opun
http://surachartopun.com</div>Surachart Opunhttp://www.blogger.com/profile/05646896104906516714noreply@blogger.com0tag:blogger.com,1999:blog-20612393.post-75637677833062561342016-09-14T21:15:00.000+07:002016-09-15T08:20:22.329+07:00Install OEM 13c Silent modeHow to install Oracle EM 13c? It's the first time that I have a chance to install Oracle EM 13c. I remember last time I installed Oracle EM 12c. I have to install weblogic first. On OEM 13c, I don't need to do something like that. It installs WLS -12.1.0.3 , JDK – 1.7.0_80.<br />
<div>
<div>
In this post, I installed Oracle EM 13c Silent mode with "SMALL" deployment. I assume, I installed Oracle Database Software 12.1.0.2 (Software Only), downloaded "<a href="http://www.oracle.com/technetwork/oem/enterprise-manager/downloads/db-templates-2767916.html" target="_blank">12.1.0.2 DB Template for EM 13.1.0.0 on Linux x86-64</a>" template and uncompressed it in $ORACLE_HOME/assistants/dbca/templates folder.</div>
<blockquote class="tr_bq">
<b>OS:</b><br />
ip_local_port_range parameter is set between 11000 to 65000<br />
soft nofiles = 30000<br />
file max = 65536<br />
<b>Database:</b><br />
optimizer_adaptive_features = FALSE</blockquote>
<div>
Then, created database by using template.<br />
<blockquote class="tr_bq">
[oracle@em13c ~]$ diff /u01/app/oracle/product/12.1.0/dbhome_1/assistants/dbca/dbca.rsp dbca-emrep.rsp<br />
78c78<br />
< GDBNAME = "orcl12c.us.oracle.com"<br />
---<br />
> GDBNAME = "emrep"<br />
205c205<br />
< SID = "orcl12c"<br />
---<br />
> SID = "emrep"<br />
265c265<br />
< TEMPLATENAME = "General_Purpose.dbc"<br />
---<br />
> <b>TEMPLATENAME = "12.1.0.2.0_Database_Template_for_EM13_1_0_0_0_Small_deployment.dbc"</b><br />
286c286<br />
< #SYSPASSWORD = "password"<br />
---<br />
> SYSPASSWORD = "password1"<br />
296c296<br />
< #SYSTEMPASSWORD = "password"<br />
---<br />
> SYSTEMPASSWORD = "password1"<br />
467c467<br />
< #DATAFILEDESTINATION =<br />
---<br />
> DATAFILEDESTINATION = /u02/oradata<br />
487c487<br />
< #STORAGETYPE=FS<br />
---<br />
> STORAGETYPE=FS<br />
525c525<br />
< #CHARACTERSET = "US7ASCII"<br />
---<br />
> <b>CHARACTERSET = "AL32UTF8"</b><br />
[oracle@em13c ~]$ export ORACLE_HOME=/u01/app/oracle/product/12.1.0/dbhome_1<br />
[oracle@em13c ~]$ export ORACLE_BASE=/u01/app/oracle<br />
[oracle@em13c ~]$ /u01/app/oracle/product/12.1.0/dbhome_1/bin/dbca -silent -responseFile dbca-emrep.rsp<br />
Copying database files<br />
1% complete<br />
3% complete<br />
10% complete<br />
16% complete<br />
23% complete<br />
30% complete<br />
33% complete<br />
Creating and starting Oracle instance<br />
35% complete<br />
40% complete<br />
44% complete<br />
49% complete<br />
50% complete<br />
53% complete<br />
55% complete<br />
Completing Database Creation<br />
58% complete<br />
62% complete<br />
65% complete<br />
75% complete<br />
85% complete<br />
88% complete<br />
Running Custom Scripts<br />
100% complete<br />
Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/emrep/emrep.log" for further details.</blockquote>
</div>
<div>
Checked database after installing.<br />
<blockquote>
[oracle@em13c ~]$ . oraenv<br />
ORACLE_SID = [oracle] ? emrep<br />
The Oracle base remains unchanged with value /u01/app/oracle<br />
[oracle@em13c ~]$ sqlplus / as sysdba<br />
SQL*Plus: Release 12.1.0.2.0 Production on Wed Sep 14 14:39:32 2016<br />
Copyright (c) 1982, 2014, Oracle. All rights reserved.<br />
<br />
Connected to:<br />
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production<br />
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options<br />
SQL> select instance_name from v$instance;<br />
INSTANCE_NAME<br />
----------------<br />
emrep<br />
SQL> select name from v$datafile;<br />
NAME<br />
------------------------------------------------------------------------------------------------------------------------------------------------------<br />
/u02/oradata/emrep/system01.dbf<br />
/u02/oradata/emrep/sysaux01.dbf<br />
/u02/oradata/emrep/undotbs01.dbf<br />
/u02/oradata/emrep/users01.dbf<br />
/u02/oradata/emrep/mgmt_depot.dbf<br />
/u02/oradata/emrep/mgmt.dbf<br />
/u02/oradata/emrep/mgmt_ad4j.dbf<br />
7 rows selected.<br />
SQL> show parameter spfile<br />
NAME TYPE VALUE<br />
------------------------------------ ----------- ------------------------------<br />
spfile string /u01/app/oracle/product/12.1.0<br />
/dbhome_1/dbs/spfileemrep.ora<br />
SQL> show parameter optimizer_adaptive_features<br />
NAME TYPE VALUE<br />
------------------------------------ ----------- ------------------------------<br />
<b style="background-color: yellow;">optimizer_adaptive_features boolean FALSE</b><br />
SQL> archive log list<br />
Database log mode No Archive Mode<br />
Automatic archival Disabled<br />
Archive destination /u01/app/oracle/product/12.1.0/dbhome_1/dbs/arch<br />
Oldest online log sequence 1<br />
Current log sequence 1<br />
SQL> show parameter control_files<br />
NAME TYPE VALUE<br />
------------------------------------ ----------- ------------------------------<br />
control_files string /u02/oradata/emrep/control01.c<br />
tl, /u02/oradata/emrep/control02.ctl</blockquote>
Configured listener.</div>
<div>
<blockquote class="tr_bq">
[oracle@em13c ~]$ diff /u01/app/oracle/product/12.1.0/dbhome_1/assistants/netca/netca.rsp /home/oracle/netca.rsp<br />
46c46<br />
< #SHOW_GUI=false<br />
---<br />
> SHOW_GUI=false<br />
60c60<br />
< #LOG_FILE=""/oracle12cHome/network/tools/log/netca.log""<br />
---<br />
> LOG_FILE=""/u01/app/oracle/product/12.1.0/dbhome_1/network/tools/log/netca.log""<br />
113c113<br />
< NSN_NUMBER=1<br />
---<br />
> #NSN_NUMBER=1<br />
117c117<br />
< NSN_NAMES={"EXTPROC_CONNECTION_DATA"}<br />
---<br />
> #NSN_NAMES={"EXTPROC_CONNECTION_DATA"}<br />
121c121<br />
< NSN_SERVICE={"PLSExtProc"}<br />
---<br />
> #NSN_SERVICE={"PLSExtProc"}<br />
127c127<br />
< NSN_PROTOCOLS={"TCP;HOSTNAME;1521"}<br />
---<br />
> #NSN_PROTOCOLS={"TCP;HOSTNAME;1521"}<br />
[oracle@em13c ~]$ netca -silent -orahome /u01/app/oracle/product/12.1.0/dbhome_1 -responsefile /home/oracle/netca.rsp<br />
Wed Sep 14 15:26:52 ICT 2016 Oracle Net Configuration Assistant<br />
Parsing command line arguments:<br />
Parameter "silent" = true<br />
Parameter "orahome" = /u01/app/oracle/product/12.1.0/dbhome_1<br />
Parameter "responsefile" = /home/oracle/netca.rsp<br />
Parameter "log" = /u01/app/oracle/product/12.1.0/dbhome_1/network/tools/log/netca.log<br />
Done parsing command line arguments.<br />
Oracle Net Services Configuration:<br />
Profile configuration complete.<br />
Oracle Net Listener Startup:<br />
Running Listener Control:<br />
/u01/app/oracle/product/12.1.0/dbhome_1/bin/lsnrctl start LISTENER<br />
Listener Control complete.<br />
Listener started successfully.<br />
Listener configuration complete.<br />
Oracle Net Services configuration successful. The exit code is 0<br />
[oracle@em13c ~]$ lsnrctl status<br />
LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 14-SEP-2016 15:27:35<br />
Copyright (c) 1991, 2014, Oracle. All rights reserved.<br />
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=em13c.surachartopun.com)(PORT=1521)))<br />
STATUS of the LISTENER<br />
------------------------<br />
Alias LISTENER<br />
Version TNSLSNR for Linux: Version 12.1.0.2.0 - Production<br />
Start Date 14-SEP-2016 15:26:52<br />
Uptime 0 days 0 hr. 0 min. 42 sec<br />
Trace Level off<br />
Security ON: Local OS Authentication<br />
SNMP OFF<br />
Listener Parameter File /u01/app/oracle/product/12.1.0/dbhome_1/network/admin/listener.ora<br />
Listener Log File /u01/app/oracle/diag/tnslsnr/em13c/listener/alert/log.xml<br />
Listening Endpoints Summary...<br />
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=em13c.surachartopun.com)(PORT=1521)))<br />
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))<br />
Services Summary...<br />
Service "emrep" has 1 instance(s).<br />
Instance "emrep", status READY, has 1 handler(s) for this service...<br />
Service "emrepXDB" has 1 instance(s).<br />
Instance "emrep", status READY, has 1 handler(s) for this service...<br />
The command completed successfully</blockquote>
</div>
<div>
<b>It was time to install Oracle EM 13c Silent mode.</b> </div>
<div>
<ul>
<li><b>Uncompressed software and created response file.</b></li>
</ul>
</div>
<div>
<blockquote class="tr_bq">
[oracle@em13c scratch]$ <span style="color: blue;">ls em13100*</span><br />
em13100_linux64-2.zip em13100_linux64-3.zip em13100_linux64-4.zip em13100_linux64-5.zip em13100_linux64.bin<br />
[oracle@em13c scratch]$ <span style="color: blue;">./em13100_linux64.bin -getResponseFileTemplates -outputLoc /home/oracle/RSP</span><br />
0%...............................................................100%<br />
Launcher log file is /tmp/OraInstall2016-09-14_03-31-39PM/launcher2016-09-14_03-31-39PM.log.<br />
Copying response file template(s)<br />
to /home/oracle/RSP ...<br />
Copying response file template upgrade.rsp<br />
Copying response file template software_only.rsp<br />
Copying response file template new_install.rsp<br />
Finished copying response file template(s)</blockquote>
</div>
<div>
<ul>
<li><b>Modified response file and installed OEM13c. (I chose to use new install)</b></li>
</ul>
<div>
<blockquote>
[oracle@em13c scratch]$ <span style="color: blue;">diff /home/oracle/RSP/new_install.rsp /home/oracle/RSP/my-new_install.rsp</span><br />
38c38<br />
< UNIX_GROUP_NAME=<string><br />
---<br />
> UNIX_GROUP_NAME=dba<br />
46c46<br />
< INVENTORY_LOCATION=<string><br />
---<br />
> INVENTORY_LOCATION=/u01/app/oraInventory<br />
60c60<br />
< DECLINE_SECURITY_UPDATES=false<br />
---<br />
> DECLINE_SECURITY_UPDATES=true<br />
67c67<br />
< MYORACLESUPPORT_USERNAME=<string><br />
---<br />
> #MYORACLESUPPORT_USERNAME=<string><br />
74c74<br />
< MYORACLESUPPORT_PASSWORD=<string><br />
---<br />
> #MYORACLESUPPORT_PASSWORD=<string><br />
92c92<br />
< STAGE_LOCATION=<string><br />
---<br />
> #STAGE_LOCATION=<string><br />
101c101<br />
< MYORACLESUPPORT_USERNAME_FOR_SOFTWAREUPDATES=<string><br />
---<br />
> #MYORACLESUPPORT_USERNAME_FOR_SOFTWAREUPDATES=<string><br />
110c110<br />
< MYORACLESUPPORT_PASSWORD_FOR_SOFTWAREUPDATES=<string><br />
---<br />
> #MYORACLESUPPORT_PASSWORD_FOR_SOFTWAREUPDATES=<string><br />
117c117<br />
< PROXY_USER=<string><br />
---<br />
> #PROXY_USER=<string><br />
124c124<br />
< PROXY_PWD=<string><br />
---<br />
> #PROXY_PWD=<string><br />
131c131<br />
< PROXY_HOST=<string><br />
---<br />
> #PROXY_HOST=<string><br />
138c138<br />
< PROXY_PORT=<string><br />
---<br />
> #PROXY_PORT=<string><br />
145c145<br />
< ORACLE_MIDDLEWARE_HOME_LOCATION=<string><br />
---<br />
> ORACLE_MIDDLEWARE_HOME_LOCATION=/u01/app/oracle/mw13c<br />
153c153<br />
< ORACLE_HOSTNAME=<string><br />
---<br />
> ORACLE_HOSTNAME=em13c.surachartopun.com<br />
160c160<br />
< AGENT_BASE_DIR=<string><br />
---<br />
> AGENT_BASE_DIR=/u01/app/oracle/agent13c<br />
167c167<br />
< WLS_ADMIN_SERVER_USERNAME=<string><br />
---<br />
> WLS_ADMIN_SERVER_USERNAME=weblogic<br />
174c174<br />
< WLS_ADMIN_SERVER_PASSWORD=<string><br />
---<br />
> WLS_ADMIN_SERVER_PASSWORD=password1<br />
181c181<br />
< WLS_ADMIN_SERVER_CONFIRM_PASSWORD=<string><br />
---<br />
> WLS_ADMIN_SERVER_CONFIRM_PASSWORD=password1<br />
188c188<br />
< NODE_MANAGER_PASSWORD=<string><br />
---<br />
> NODE_MANAGER_PASSWORD=password1<br />
195c195<br />
< NODE_MANAGER_CONFIRM_PASSWORD=<string><br />
---<br />
> NODE_MANAGER_CONFIRM_PASSWORD=password1<br />
202c202<br />
< ORACLE_INSTANCE_HOME_LOCATION=<string><br />
---<br />
> ORACLE_INSTANCE_HOME_LOCATION=/u01/app/oracle/gc_inst<br />
221c221<br />
< SOFTWARE_LIBRARY_LOCATION=<string><br />
---<br />
> SOFTWARE_LIBRARY_LOCATION=/u01/app/oracle/swlib<br />
229c229<br />
< DATABASE_HOSTNAME=<string><br />
---<br />
> DATABASE_HOSTNAME=em13c.surachartopun.com<br />
237c237<br />
< LISTENER_PORT=<string><br />
---<br />
> LISTENER_PORT=1521<br />
245c245<br />
< SERVICENAME_OR_SID=<string><br />
---<br />
> SERVICENAME_OR_SID=emrep<br />
253c253<br />
< SYS_PASSWORD=<string><br />
---<br />
> SYS_PASSWORD=password1<br />
261c261<br />
< SYSMAN_PASSWORD=<string><br />
---<br />
> SYSMAN_PASSWORD=password1<br />
268c268<br />
< SYSMAN_CONFIRM_PASSWORD=<string><br />
---<br />
> SYSMAN_CONFIRM_PASSWORD=password1<br />
275c275<br />
< DEPLOYMENT_SIZE=MEDIUM<br />
---<br />
> DEPLOYMENT_SIZE=SMALL<br />
283c283<br />
< MANAGEMENT_TABLESPACE_LOCATION=<string><br />
---<br />
> #MANAGEMENT_TABLESPACE_LOCATION=<string><br />
291c291<br />
< CONFIGURATION_DATA_TABLESPACE_LOCATION=<string><br />
---<br />
> #CONFIGURATION_DATA_TABLESPACE_LOCATION=<string><br />
299c299<br />
< JVM_DIAGNOSTICS_TABLESPACE_LOCATION=<string><br />
---<br />
> #JVM_DIAGNOSTICS_TABLESPACE_LOCATION=<string><br />
306c306<br />
< AGENT_REGISTRATION_PASSWORD=<string><br />
---<br />
> AGENT_REGISTRATION_PASSWORD=password1<br />
313c313<br />
< AGENT_REGISTRATION_CONFIRM_PASSWORD=<string><br />
---<br />
> AGENT_REGISTRATION_CONFIRM_PASSWORD=password1<br />
320c320<br />
< STATIC_PORTS_FILE=<string><br />
---<br />
> #STATIC_PORTS_FILE=/u01/app/oracle/mw13c/install/portlist.ini<br />
368c368<br />
< CONFIG_LOCATION=<string><br />
---<br />
> #CONFIG_LOCATION=<string><br />
376c376<br />
< CLUSTER_LOCATION=<string><br />
---<br />
> #CLUSTER_LOCATION=<string></blockquote>
<b>Note: </b>As I created database from template. So. I didn't set *TABLESPACE_LOCATION variables. For variables, that didn't define. we should comment it.<br />
<blockquote>
[oracle@em13c scratch]$<span style="color: blue;"> ./em13100_linux64.bin -silent -ignoreSysPrereqs -responseFile /home/oracle/RSP/my-new_install.rsp</span><br />
0%...............................................................100%<br />
Launcher log file is /tmp/OraInstall2016-09-14_05-56-59PM/launcher2016-09-14_05-56-59PM.log.<br />
Starting Oracle Universal Installer<br />
Checking if CPU speed is above 300 MHz. Actual 2300.094 MHz Passed<br />
Checking swap space: must be greater than 512 MB. Actual 0 MB Failed <<<<<br />
Checking if this platform requires a 64-bit JVM. Actual 64 Passed (64-bit not required)<br />
Checking temp space: must be greater than 300 MB. Actual 32844 MB Passed<br />
>>> Ignoring failure(s) of required prerequisite checks. Continuing...<br />
<br />
Preparing to launch the Oracle Universal Installer from /tmp/OraInstall2016-09-14_05-56-59PM<br />
====Prereq Config Location main===<br />
/tmp/OraInstall2016-09-14_05-56-59PM/stage/prereq<br />
EMGCInstaller args -scratchPath<br />
EMGCInstaller args /tmp/OraInstall2016-09-14_05-56-59PM<br />
EMGCInstaller args -sourceType<br />
EMGCInstaller args network<br />
EMGCInstaller args -timestamp<br />
EMGCInstaller args 2016-09-14_05-56-59PM<br />
EMGCInstaller args -paramFile<br />
EMGCInstaller args /tmp/sfx_g7ViFx/Disk1/install/linux64/oraparam.ini<br />
EMGCInstaller args -silent<br />
EMGCInstaller args -ignoreSysPrereqs<br />
EMGCInstaller args -responseFile<br />
EMGCInstaller args /home/oracle/RSP/my-new_install.rsp<br />
EMGCInstaller args -nocleanUpOnExit<br />
DiskLoc inside SourceLoc/u02/SRC/EM13c/scratch<br />
EMFileLoc:/tmp/OraInstall2016-09-14_05-56-59PM/oui/em/<br />
ScratchPathValue :/tmp/OraInstall2016-09-14_05-56-59PM<br />
EMGCInstallUpdatesInfoOnNext:: calling actionOnClickofNext<br />
Now in EMGCInstallUpdatesInfoOnNext.actionsOnClickofNext<br />
EMGCInstallUpdatesInfoOnNext:: End of actionOnClickofNext<br />
Session log file is /tmp/OraInstall2016-09-14_05-56-59PM/install2016-09-14_05-56-59PM.log<br />
.<br />
.<br />
.<br />
Setup in progress (Wednesday, September 14, 2016 6:03:38 PM ICT)<br />
Setup successful<br />
Saving inventory (Wednesday, September 14, 2016 6:03:38 PM ICT)<br />
Saving inventory complete<br />
End of install phases.(Wednesday, September 14, 2016 6:03:39 PM ICT)<br />
&Decline License Agreement/u01/app/oracle/mw13c/sysman/install/plugins/oracle.sysman.si/13.1.1.0.0/oracle.sysman.si.discovery.plugin-13.1.1.0.0.farb<br />
Session log file is /tmp/OraInstall2016-09-14_05-56-59PM/install2016-09-14_05-56-59PM.log<br />
........................................................................<br />
Installation in progress (Wednesday, September 14, 2016 6:03:40 PM ICT)<br />
72% Done.<br />
Install successful<br />
Linking in progress (Wednesday, September 14, 2016 6:03:40 PM ICT)<br />
Link successful<br />
Setup in progress (Wednesday, September 14, 2016 6:03:40 PM ICT)<br />
Setup successful<br />
Saving inventory (Wednesday, September 14, 2016 6:03:40 PM ICT)<br />
Saving inventory complete<br />
End of install phases.(Wednesday, September 14, 2016 6:03:41 PM ICT)<br />
OMS OracleHome :/u01/app/oracle/mw13c<br />
Applying the required one-off patches.<br />
13NGCHEKAGGREGATE : oracle.sysman.top.agent<br />
13NGCHEKAGGREGATE : oracle.sysman.top.oms<br />
13NGCHEKAGGREGATE : encap_oms<br />
13NGCHEKAGGREGATE : OuiConfigVariables<br />
13NGCHEKAGGREGATE : OuiConfigVariables<br />
2016-09-14_06-07-13PM: Configuration Assistant "Plugins Prerequisites Check" is in progress.<br />
2016-09-14_06-07-32PM: Configuration Assistant "Plugins Prerequisites Check" has Succeeded.<br />
2016-09-14_06-07-32PM: Configuration Assistant "Repository Out Of Box Configuration" is in progress.<br />
2016-09-14_06-42-39PM: Configuration Assistant "Repository Out Of Box Configuration" has Succeeded.<br />
2016-09-14_06-42-39PM: Configuration Assistant "OMS Configuration" is in progress.<br />
<br />
Executing the OMSCA command...<br />
Check the log files of the OMS Configuration Assistant at: /u01/app/oracle/mw13c/cfgtoollogs/omsca<br />
<br />
<br />
OMS Configuration Assistant completed successfully.<br />
<br />
2016-09-14_06-51-03PM: Configuration Assistant "OMS Configuration" has Succeeded.<br />
2016-09-14_06-51-03PM: Configuration Assistant "Plugins Deployment and Configuration" is in progress.<br />
<br />
2016-09-14_06-59-48PM: Configuration Assistant "Plugins Deployment and Configuration" has Succeeded.<br />
2016-09-14_06-59-48PM: Configuration Assistant "BI Publisher Configuration" is in progress.<br />
2016-09-14_07-05-20PM: Configuration Assistant "BI Publisher Configuration" has Succeeded.<br />
2016-09-14_07-05-20PM: Configuration Assistant "Start Oracle Management Service" is in progress.<br />
Starting OMS ...<br />
Executing the command: /u01/app/oracle/mw13c/bin/emctl start oms<br />
Starting of OMS is successful.<br />
Starting export oms config...<br />
Executing command: /u01/app/oracle/mw13c/bin/emctl exportconfig oms -dir /u01/app/oracle/gc_inst/em/EMGC_OMS1/sysman/backup<br />
Export config of OMS is successful.<br />
2016-09-14_07-09-43PM: Configuration Assistant "Start Oracle Management Service" has Succeeded.<br />
2016-09-14_07-09-43PM: Configuration Assistant "Agent Configuration Assistant" is in progress.<br />
Getting Inet Addresses for host em13c.surachartopun.com<br />
** Agent Port Check completed successfully.**<br />
AgentConfiguration:agent configuration has been started<br />
Validating OMS_HOST and EM_UPLOAD_PORT<br />
Performing free port detection..<br />
AgentConfiguration: Executing emctl deploy agent command...<br />
AgentConfiguration: Executing emctl config agent command...<br />
AgentConfiguration:agent configuration finished with status = true<br />
2016-09-14_07-12-12PM: Configuration Assistant "Agent Configuration Assistant" has Succeeded.<br />
*** The Installation was Successful. ***<br />
<br />
This information is also available at:<br />
/u01/app/oracle/mw13c/install/setupinfo.txt<br />
See the following for information pertaining to your Enterprise Manager installation:<br />
<br />
<span style="background-color: yellow;">Use the following URL to access:<br /> 1. Enterprise Manager Cloud Control URL: https://em13c.surachartopun.com:7803/em<br /> 2. Admin Server URL: https://em13c.surachartopun.com:7102/console<br /> 3. BI Publisher URL: https://em13c.surachartopun.com:9803/xmlpserver<br />The following details need to be provided while installing an additional OMS:<br /> 1. Admin Server Host Name: em13c.surachartopun.com<br /> 2. Admin Server Port: 7102<br />You can find the details on ports used by this deployment at : /u01/app/oracle/mw13c/install/portlist.ini</span><br />
<br />
NOTE:<br />
An encryption key has been generated to encrypt sensitive data in the Management Repository. If this key is lost, all encrypted data in the Repository becomes unusable.<br />
A backup of the OMS configuration is available in /u01/app/oracle/gc_inst/em/EMGC_OMS1/sysman/backup on host em13c.surachartopun.com. See Cloud Control Administrators Guide for details on how to back up and recover an OMS.<br />
NOTE: This backup is valid only for the initial OMS configuration. For example, it will not reflect plug-ins installed later, topology changes like the addition of a load balancer, or changes to other properties made using emctl or emcli. Backups should be created on a regular basis to ensure they capture the current OMS configuration. Use the following command to backup the OMS configuration:<br />
/u01/app/oracle/mw13c/bin/emctl exportconfig oms -dir <backup dir><br />
Logs successfully copied to /u01/app/oraInventory/logs.</blockquote>
</div>
</div>
<div>
<b>Note:</b> su to "root" and run /u01/app/oracle/mw13c/allroot.sh script.<br />
<blockquote class="tr_bq">
Starting to execute allroot.sh .........<br />
Starting to execute /u01/app/oracle/mw13c/root.sh ......<br />
/etc exist<br />
Creating /etc/oragchomelist file...<br />
/u01/app/oracle/mw13c<br />
Finished product-specific root actions.<br />
/etc exist<br />
Finished execution of /u01/app/oracle/mw13c/root.sh ......<br />
<br />
Starting to execute /u01/app/oracle/agent13c/agent_13.1.0.0.0/root.sh ......<br />
Finished product-specific root actions.<br />
/etc exist<br />
Finished execution of /u01/app/oracle/agent13c/agent_13.1.0.0.0/root.sh ......<br />
<br />
[root@em13c ~]# cat /etc/oragchomelist<br />
/u01/app/oracle/mw13c<br />
/u01/app/oracle/agent13c/agent_13.1.0.0.0:/u01/app/oracle/agent13c/agent_inst<br />
[root@em13c ~]# find /etc/ -name ???gcstartup<br />
/etc/rc.d/rc2.d/S98gcstartup<br />
/etc/rc.d/rc2.d/K19gcstartup<br />
/etc/rc.d/rc3.d/S98gcstartup<br />
/etc/rc.d/rc3.d/K19gcstartup<br />
/etc/rc.d/rc5.d/S98gcstartup<br />
/etc/rc.d/rc5.d/K19gcstartup<br />
[root@em13c ~]# cat /etc/oragchomelist<br />
/u01/app/oracle/mw13c<br />
/u01/app/oracle/agent13c/agent_13.1.0.0.0:/u01/app/oracle/agent13c/agent_inst<br />
[root@em13c ~]# find /etc/ -name gcstartup<br />
/etc/rc.d/init.d/gcstartup<br />
[root@em13c ~]# find /etc/ -name ???gcstartup<br />
/etc/rc.d/rc2.d/S98gcstartup<br />
/etc/rc.d/rc2.d/K19gcstartup<br />
/etc/rc.d/rc3.d/S98gcstartup<br />
/etc/rc.d/rc3.d/K19gcstartup<br />
/etc/rc.d/rc5.d/S98gcstartup<br />
/etc/rc.d/rc5.d/K19gcstartup</blockquote>
<div>
<ul>
<li><b>After installed, I was able to check OMS and agent status.</b></li>
</ul>
<div>
<blockquote>
[oracle@em13c scratch]$ <span style="color: blue;"> /u01/app/oracle/mw13c/bin/emctl status oms -details</span><br />
Oracle Enterprise Manager Cloud Control 13c Release 1<br />
Copyright (c) 1996, 2015 Oracle Corporation. All rights reserved.<br />
Enter Enterprise Manager Root (SYSMAN) Password :<br />
Console Server Host : em13c.surachartopun.com<br />
HTTP Console Port : 7788<br />
HTTPS Console Port : 7803<br />
HTTP Upload Port : 4889<br />
HTTPS Upload Port : 4903<br />
EM Instance Home : /u01/app/oracle/gc_inst/em/EMGC_OMS1<br />
OMS Log Directory Location : /u01/app/oracle/gc_inst/em/EMGC_OMS1/sysman/log<br />
OMS is not configured with SLB or virtual hostname<br />
Agent Upload is locked.<br />
OMS Console is locked.<br />
Active CA ID: 1<br />
Console URL: https://em13c.surachartopun.com:7803/em<br />
Upload URL: https://em13c.surachartopun.com:4903/empbs/upload<br />
WLS Domain Information<br />
Domain Name : GCDomain<br />
Admin Server Host : em13c.surachartopun.com<br />
Admin Server HTTPS Port: 7102<br />
Admin Server is RUNNING<br />
Oracle Management Server Information<br />
Managed Server Instance Name: EMGC_OMS1<br />
Oracle Management Server Instance Host: em13c.surachartopun.com<br />
WebTier is Up<br />
Oracle Management Server is Up<br />
JVMD Engine is Up<br />
BI Publisher Server Information<br />
BI Publisher Managed Server Name: BIP<br />
BI Publisher Server is Up<br />
BI Publisher HTTP Managed Server Port : 9701<br />
BI Publisher HTTPS Managed Server Port : 9803<br />
BI Publisher HTTP OHS Port : 9788<br />
BI Publisher HTTPS OHS Port : 9851<br />
BI Publisher is locked.<br />
BI Publisher Server named 'BIP' running at URL: https://em13c.surachartopun.com:9851/xmlpserver<br />
BI Publisher Server Logs: /u01/app/oracle/gc_inst/user_projects/domains/GCDomain/servers/BIP/logs/<br />
BI Publisher Log : /u01/app/oracle/gc_inst/user_projects/domains/GCDomain/servers/BIP/logs/bipublisher/bipublisher.log<br />
[oracle@em13c scratch]$ <span style="color: blue;">/u01/app/oracle/agent13c/agent_13.1.0.0.0/bin/emctl status agent</span><br />
[Oracle Enterprise Manager Cloud Control 13c Release 1<br />
Copyright (c) 1996, 2015 Oracle Corporation. All rights reserved.<br />
---------------------------------------------------------------<br />
Agent Version : 13.1.0.0.0<br />
OMS Version : 13.1.0.0.0<br />
Protocol Version : 12.1.0.1.0<br />
Agent Home : /u01/app/oracle/agent13c/agent_inst<br />
Agent Log Directory : /u01/app/oracle/agent13c/agent_inst/sysman/log<br />
Agent Binaries : /u01/app/oracle/agent13c/agent_13.1.0.0.0<br />
Core JAR Location : /u01/app/oracle/agent13c/agent_13.1.0.0.0/jlib<br />
Agent Process ID : 26632<br />
Parent Process ID : 26568<br />
Agent URL : https://em13c.surachartopun.com:3872/emd/main/<br />
Local Agent URL in NAT : https://em13c.surachartopun.com:3872/emd/main/<br />
Repository URL : https://em13c.surachartopun.com:4903/empbs/upload<br />
Started at : 2016-09-14 19:11:49<br />
Started by user : oracle<br />
Operating System : Linux version 3.10.0-327.28.3.el7.x86_64 (amd64)<br />
Number of Targets : 32<br />
Last Reload : (none)<br />
Last successful upload : 2016-09-14 20:03:22<br />
Last attempted upload : 2016-09-14 20:03:22<br />
Total Megabytes of XML files uploaded so far : 1.56<br />
Number of XML files pending upload : 0<br />
Size of XML files pending upload(MB) : 0<br />
Available disk space on upload filesystem : 40.54%<br />
Collection Status : Collections enabled<br />
Heartbeat Status : Ok<br />
Last attempted heartbeat to OMS : 2016-09-14 20:05:00<br />
Last successful heartbeat to OMS : 2016-09-14 20:05:00<br />
Next scheduled heartbeat to OMS : 2016-09-14 20:06:00<br />
---------------------------------------------------------------<br />
Agent is Running and Ready</blockquote>
</div>
</div>
<div>
<ul>
<li><b>Connected OEM 13c by browser.</b></li>
</ul>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-jFUbExrTpjs/V9lVECCnCrI/AAAAAAAAC3c/diYfEoGAwBsw46VPOjfU-Ch90OXFMNCzACEw/s1600/00.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="192" src="https://4.bp.blogspot.com/-jFUbExrTpjs/V9lVECCnCrI/AAAAAAAAC3c/diYfEoGAwBsw46VPOjfU-Ch90OXFMNCzACEw/s400/00.jpg" width="400" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-Ni4CMGQI0_k/V9lVELKavSI/AAAAAAAAC3Y/-zB6n0qzf0YGKnGtO8Pi1ajWkXOmougHgCEw/s1600/01.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="197" src="https://2.bp.blogspot.com/-Ni4CMGQI0_k/V9lVELKavSI/AAAAAAAAC3Y/-zB6n0qzf0YGKnGtO8Pi1ajWkXOmougHgCEw/s400/01.jpg" width="400" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-dMAHlQpvDmw/V9lVENPkj2I/AAAAAAAAC3g/EaNBTgfZR9sXDNsLZfHHIWksCL9fZvB3ACEw/s1600/02.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="192" src="https://2.bp.blogspot.com/-dMAHlQpvDmw/V9lVENPkj2I/AAAAAAAAC3g/EaNBTgfZR9sXDNsLZfHHIWksCL9fZvB3ACEw/s400/02.jpg" width="400" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-wMLZTXPxeVw/V9lVEhC_2EI/AAAAAAAAC3k/IpBIVOwQEs8PRT5Ae-nn1ERv38gt1ngSwCEw/s1600/03.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="186" src="https://1.bp.blogspot.com/-wMLZTXPxeVw/V9lVEhC_2EI/AAAAAAAAC3k/IpBIVOwQEs8PRT5Ae-nn1ERv38gt1ngSwCEw/s400/03.jpg" width="400" /></a></div>
<div>
<br /></div>
<b>Reference:</b><br />
<a href="http://www.oracle.com/technetwork/oem/install-upgrade/pr-install-em13-2835293.pdf">http://www.oracle.com/technetwork/oem/install-upgrade/pr-install-em13-2835293.pdf</a></div>
<div>
<a href="https://docs.oracle.com/cd/E63000_01/">https://docs.oracle.com/cd/E63000_01/</a></div>
<div>
<a href="http://www.oracle.com/technetwork/oem/enterprise-manager/downloads/index.html">http://www.oracle.com/technetwork/oem/enterprise-manager/downloads/index.html</a></div>
<div>
<br /></div>
<div>
<br /></div>
</div>
<div class="blogger-post-footer">Written By: Surachart Opun
http://surachartopun.com</div>Surachart Opunhttp://www.blogger.com/profile/05646896104906516714noreply@blogger.com0tag:blogger.com,1999:blog-20612393.post-45273730516501026942016-01-23T13:01:00.003+07:002016-01-25T14:00:57.203+07:00Packt - Time to learn Oracle and LinuxWhat is your resolution for learning? Learn Oracle, Learn Linux or both. It' s a good news for people who are interested in improving Oracle and Linux skills. <b>Packt Promotional (discount of 50%) for eBooks & videos from today until 23rd Feb, 2016. </b><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://bit.ly/1KugIwC" target="_blank"><img alt="Code : XM6lxr0 for Oracle" border="0" height="150" src="http://1.bp.blogspot.com/-VegGE9hRXl0/VqXFRosc6XI/AAAAAAAAC0w/uGtGZTq4ubI/s400/Banner%2B%2528Oracle%2529.jpg" width="400" /></a></div>
<div style="text-align: center;">
<b><a href="http://bit.ly/1KugIwC" target="_blank"><span style="color: lime;">Oracle (Code:XM6lxr0) </span></a></b></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://bit.ly/1WAjwiz" target="_blank"><img alt=" Code : ILYTW for Linux" border="0" height="150" src="http://1.bp.blogspot.com/-ajS8ovWR1XE/VqXFTYL4MVI/AAAAAAAAC04/xd18fn8sGQc/s400/Banner%2B%2528Linux%2529.jpg" width="400" /></a></div>
<div style="text-align: center;">
<b><a href="http://bit.ly/1WAjwiz" target="_blank">Linux (Code:ILYTW)</a></b></div>
<div class="blogger-post-footer">Written By: Surachart Opun
http://surachartopun.com</div>Surachart Opunhttp://www.blogger.com/profile/05646896104906516714noreply@blogger.com0tag:blogger.com,1999:blog-20612393.post-24368753847808672032015-05-27T14:38:00.001+07:002015-05-27T14:38:57.707+07:00AWS EC2 API tools: Create snapshot & Check Data in snapshot<div class="tr_bq">
After <a href="http://surachartopun.com/2015/05/aws-ec2-api-tools-installation.html" target="_blank">installed AWS EC2 API tools</a>, It's time for example create/delete snapshot. </div>
<b>- Creating snapshot.</b><br />
<blockquote class="tr_bq">
ubuntu@ip-x-x-x-x~$ <span style="color: blue;">ec2-describe-volumes</span><br />VOLUME vol-41885f55 8 snap-d00ac9e4 ap-southeast-1a in-use 2015-05-26T09:07:04+0000 gp2 24<br />ATTACHMENT <b>vol-41885f55 </b> i-d6cdb71a /dev/sda1 attached 2015-05-26T09:07:04+0000 true<br />ubuntu@ip-x-x-x-x:~$ <span style="color: blue;">ec2-create-snapshot -d vol-41885f55-$(date +%Y%m%d%H%M) vol-41885f55</span><br />SNAPSHOT snap-b20a8c87 vol-41885f55 pending 2015-05-27T05:46:58+0000 843870022970 8 vol-41885f55-201505270546<br />ubuntu@ip-x-x-x-x:~$ <span style="color: blue;">ec2-describe-snapshots</span><br />SNAPSHOT snap-b20a8c87 vol-41885f55 pending 2015-05-27T05:46:58+0000 0% 843870022970 8 vol-41885f55-201505270546<br />ubuntu@ip-x-x-x-x:~$ <span style="color: blue;">ec2-create-snapshot -d vol-41885f55-$(date +%Y%m%d%H%M) vol-41885f55</span><br />SNAPSHOT snap-bea0d28b vol-41885f55 pending 2015-05-27T05:50:11+0000 843870022970 8 vol-41885f55-201505270550<br />ubuntu@ip-x-x-x-x:~$ <span style="color: blue;">ec2-describe-snapshots</span><br />SNAPSHOT snap-b20a8c87 vol-41885f55 completed 2015-05-27T05:46:58+0000 100% 843870022970 8 vol-41885f55-201505270546<br />SNAPSHOT snap-bea0d28b vol-41885f55 completed 2015-05-27T05:50:11+0000 100% 843870022970 8 vol-41885f55-201505270550</blockquote>
<b>- Deleting snapshot (delete </b>snap-b20a8c87<b>). </b><br />
<blockquote class="tr_bq">
ubuntu@ip-x-x-x-x:~$ <span style="color: blue;">ec2-describe-snapshots |head -1| awk '{print $2}'|xargs ec2-delete-snapshot</span><br />SNAPSHOT snap-b20a8c87<br />ubuntu@ip-x-x-x-x:~$ ec2-describe-snapshots<br />SNAPSHOT snap-bea0d28b vol-41885f55 completed 2015-05-27T05:50:11+0000 100% 843870022970 8 vol-41885f55-201505270550</blockquote>
<b><span style="color: blue;">How to check data in "snap-bea0d28b"? Checking idea on AWS, look like we must create Volume from snapshot and attach it to Instance</span></b>.<br />
<b>- Creating Volume > Attach to Instance and Mount.</b><br />
<blockquote>
ubuntu@ip-x-x-x-x:~$<span style="color: blue;"> ec2-describe-volumes</span><br />VOLUME <b>vol-41885f55 </b> 8 snap-d00ac9e4 ap-southeast-1a in-use 2015-05-26T09:07:04+0000 gp2 24<br />ATTACHMENT vol-41885f55 i-d6cdb71a /dev/sda1 attached 2015-05-26T09:07:04+0000 true<br />ubuntu@ip-x-x-x-x:~$ <span style="color: blue;">ec2-describe-availability-zones</span><br />AVAILABILITYZONE ap-southeast-1a available ap-southeast-1<br />AVAILABILITYZONE ap-southeast-1b available ap-southeast-1<br />ubuntu@ip-x-x-x-x:~$ <span style="color: blue;">ec2-create-volume -s 8 --snapshot snap-bea0d28b -z ap-southeast-1a</span><br />VOLUME vol-d15087c5 8 snap-bea0d28b ap-southeast-1a creating 2015-05-27T06:24:00+0000 standard<br />ubuntu@ip-x-x-x-x:~$ <span style="color: blue;">ec2-describe-volumes</span><br />VOLUME vol-41885f55 8 snap-d00ac9e4 ap-southeast-1a in-use 2015-05-26T09:07:04+0000 gp2 24<br />ATTACHMENT vol-41885f55 i-d6cdb71a /dev/sda1 attached 2015-05-26T09:07:04+0000 true<br /><b>VOLUME <span style="color: blue;">vol-d15087c5 </span> 8 snap-bea0d28b ap-southeast-1a available 2015-05-27T06:24:00+0000 standard</b><br />ubuntu@ip-x-x-x-x:~$ <span style="color: blue;">sudo fdisk -l</span><br />Disk /dev/xvda: 8589 MB, 8589934592 bytes<br />255 heads, 63 sectors/track, 1044 cylinders, total 16777216 sectors<br />Units = sectors of 1 * 512 = 512 bytes<br />Sector size (logical/physical): 512 bytes / 512 bytes<br />I/O size (minimum/optimal): 512 bytes / 512 bytes<br />Disk identifier: 0x00000000<br /> Device Boot Start End Blocks Id System<br />/dev/xvda1 * 16065 16771859 8377897+ 83 Linux<br />ubuntu@ip-x-x-x-x:~$ <span style="color: blue;">ec2-attach-volume vol-d15087c5 -i i-d6cdb71a -d sdf</span><br />ATTACHMENT vol-d15087c5 i-d6cdb71a sdf attaching 2015-05-27T06:31:16+0000<br />ubuntu@ip-x-x-x-x:~$ <span style="color: blue;">sudo fdisk -l</span><br />Disk /dev/xvda: 8589 MB, 8589934592 bytes<br />255 heads, 63 sectors/track, 1044 cylinders, total 16777216 sectors<br />Units = sectors of 1 * 512 = 512 bytes<br />Sector size (logical/physical): 512 bytes / 512 bytes<br />I/O size (minimum/optimal): 512 bytes / 512 bytes<br />Disk identifier: 0x00000000<br /> Device Boot Start End Blocks Id System<br />/dev/xvda1 * 16065 16771859 8377897+ 83 Linux<br />Disk <b>/dev/xvdf</b>: 8589 MB, 8589934592 bytes<br />255 heads, 63 sectors/track, 1044 cylinders, total 16777216 sectors<br />Units = sectors of 1 * 512 = 512 bytes<br />Sector size (logical/physical): 512 bytes / 512 bytes<br />I/O size (minimum/optimal): 512 bytes / 512 bytes<br />Disk identifier: 0x00000000<br /> Device Boot Start End Blocks Id System<br />/dev/xvdf1 * 16065 16771859 8377897+ 83 Linux<br />ubuntu@ip-x-x-x-x:~$<br /><br />ubuntu@ip-x-x-x-x:~$ <span style="color: blue;">df</span><br />Filesystem 1K-blocks Used Available Use% Mounted on<br />/dev/xvda1 8115168 1212140 6467752 16% /<br />none 4 0 4 0% /sys/fs/cgroup<br />udev 503188 12 503176 1% /dev<br />tmpfs 101632 332 101300 1% /run<br />none 5120 0 5120 0% /run/lock<br />none 508144 0 508144 0% /run/shm<br />none 102400 0 102400 0% /run/user<br />ubuntu@ip-x-x-x-x:~$ <span style="color: blue;">sudo mount /dev/xvdf1 /mnt/</span><br />ubuntu@ip-x-x-x-x:~$ <span style="color: blue;">ls -l /mnt/</span><br />total 92<br />drwxr-xr-x 2 root root 4096 May 26 09:35 bin<br />drwxr-xr-x 3 root root 4096 Mar 25 11:52 boot<br />drwxr-xr-x 5 root root 4096 Mar 25 11:53 dev<br />drwxr-xr-x 105 root root 4096 May 26 09:35 etc<br />drwxr-xr-x 3 root root 4096 May 26 09:07 home<br />lrwxrwxrwx 1 root root 33 Mar 25 11:51 initrd.img -> boot/initrd.img-3.13.0-48-generic<br />drwxr-xr-x 21 root root 4096 May 26 09:35 lib<br />drwxr-xr-x 2 root root 4096 Mar 25 11:50 lib64<br />drwx------ 2 root root 16384 Mar 25 11:53 lost+found<br />drwxr-xr-x 2 root root 4096 Mar 25 11:50 media<br />drwxr-xr-x 2 root root 4096 Apr 10 2014 mnt<br />drwxr-xr-x 2 root root 4096 Mar 25 11:50 opt<br />drwxr-xr-x 2 root root 4096 Apr 10 2014 proc<br />drwx------ 3 root root 4096 May 26 09:07 root<br />drwxr-xr-x 3 root root 4096 Mar 25 11:53 run<br />drwxr-xr-x 2 root root 4096 May 26 09:35 sbin<br />drwxr-xr-x 2 root root 4096 Mar 25 11:50 srv<br />drwxr-xr-x 2 root root 4096 Mar 13 2014 sys<br />drwxrwxrwt 6 root root 4096 May 27 05:38 tmp<br />drwxr-xr-x 10 root root 4096 Mar 25 11:50 usr<br />drwxr-xr-x 12 root root 4096 Mar 25 11:52 var<br />lrwxrwxrwx 1 root root 30 Mar 25 11:51 vmlinuz -> boot/vmlinuz-3.13.0-48-generic<br />ubuntu@ip-x-x-x-x:~$ <span style="color: blue;">ls /mnt/</span><br />bin boot dev etc home initrd.img lib lib64 lost+found media mnt opt proc root run sbin srv sys tmp usr var vmlinuz<br />ubuntu@ip-x-x-x-x:~$ <span style="color: blue;">df -h</span><br />Filesystem Size Used Avail Use% Mounted on<br />/dev/xvda1 7.8G 1.2G 6.2G 16% /<br />none 4.0K 0 4.0K 0% /sys/fs/cgroup<br />udev 492M 12K 492M 1% /dev<br />tmpfs 100M 332K 99M 1% /run<br />none 5.0M 0 5.0M 0% /run/lock<br />none 497M 0 497M 0% /run/shm<br />none 100M 0 100M 0% /run/user<br />/dev/xvdf1 7.8G 1.2G 6.2G 16% /mnt</blockquote>
<b>- After checking data, We can unmount and remove it.</b><br />
<blockquote>
ubuntu@ip-x-x-x-x:~$ <span style="color: blue;">sudo umount /mnt</span><br />ubuntu@ip-x-x-x-x:~$<br />ubuntu@ip-x-x-x-x:~$<br />ubuntu@ip-x-x-x-x:~$ <span style="color: blue;">df</span><br />Filesystem 1K-blocks Used Available Use% Mounted on<br />/dev/xvda1 8115168 1212140 6467752 16% /<br />none 4 0 4 0% /sys/fs/cgroup<br />udev 503188 12 503176 1% /dev<br />tmpfs 101632 332 101300 1% /run<br />none 5120 0 5120 0% /run/lock<br />none 508144 0 508144 0% /run/shm<br />none 102400 0 102400 0% /run/user<br /><br />ubuntu@ip-x-x-x-x:~$<span style="color: blue;"> sudo fdisk -l</span><br />Disk /dev/xvda: 8589 MB, 8589934592 bytes<br />255 heads, 63 sectors/track, 1044 cylinders, total 16777216 sectors<br />Units = sectors of 1 * 512 = 512 bytes<br />Sector size (logical/physical): 512 bytes / 512 bytes<br />I/O size (minimum/optimal): 512 bytes / 512 bytes<br />Disk identifier: 0x00000000<br /> Device Boot Start End Blocks Id System<br />/dev/xvda1 * 16065 16771859 8377897+ 83 Linux<br />Disk /dev/xvdf: 8589 MB, 8589934592 bytes<br />255 heads, 63 sectors/track, 1044 cylinders, total 16777216 sectors<br />Units = sectors of 1 * 512 = 512 bytes<br />Sector size (logical/physical): 512 bytes / 512 bytes<br />I/O size (minimum/optimal): 512 bytes / 512 bytes<br />Disk identifier: 0x00000000<br /> Device Boot Start End Blocks Id System<br />/dev/xvdf1 * 16065 16771859 8377897+ 83 Linux<br />ubuntu@ip-x-x-x-x:~$<br />ubuntu@ip-x-x-x-x:~$ <span style="color: blue;">ec2-describe-volumes</span><br />VOLUME vol-41885f55 8 snap-d00ac9e4 ap-southeast-1a in-use 2015-05-26T09:07:04+0000 gp2 24<br />ATTACHMENT vol-41885f55 i-d6cdb71a /dev/sda1 attached 2015-05-26T09:07:04+0000 true<br /><b>VOLUME vol-d15087c5 8 snap-bea0d28b ap-southeast-1a in-use 2015-05-27T06:24:00+0000 standard<br />ATTACHMENT vol-d15087c5 i-d6cdb71a sdf attached 2015-05-27T06:31:16+0000 false</b><br />ubuntu@ip-x-x-x-x:~$ <span style="color: blue;">ec2-detach-volume vol-d15087c5 -i i-d6cdb71a</span><br />ATTACHMENT vol-d15087c5 i-d6cdb71a sdf detaching 2015-05-27T06:31:16+0000<br />ubuntu@ip-x-x-x-x:~$ <span style="color: blue;">ec2-describe-volumes</span><br />VOLUME vol-41885f55 8 snap-d00ac9e4 ap-southeast-1a in-use 2015-05-26T09:07:04+0000 gp2 24<br />ATTACHMENT vol-41885f55 i-d6cdb71a /dev/sda1 attached 2015-05-26T09:07:04+0000 true<br /><b>VOLUME vol-d15087c5 8 snap-bea0d28b ap-southeast-1a in-use 2015-05-27T06:24:00+0000 standard<br />ATTACHMENT vol-d15087c5 i-d6cdb71a sdf <span style="color: blue;">detaching</span> 2015-05-27T06:31:16+0000 false</b></blockquote>
<blockquote class="tr_bq">
ubuntu@ip-x-x-x-x:~$ <span style="color: blue;">ec2-describe-volumes</span><br />VOLUME vol-41885f55 8 snap-d00ac9e4 ap-southeast-1a in-use 2015-05-26T09:07:04+0000 gp2 24<br />ATTACHMENT vol-41885f55 i-d6cdb71a /dev/sda1 attached 2015-05-26T09:07:04+0000 true<br /><b>VOLUME vol-d15087c5 8 snap-bea0d28b ap-southeast-1a available 2015-05-27T06:24:00+0000 standard</b><br />ubuntu@ip-x-x-x-x:~$<span style="color: blue;"> ec2-delete-volume vol-d15087c5</span><br />VOLUME vol-d15087c5<br />ubuntu@ip-x-x-x-x:~$ <span style="color: blue;">ec2-describe-volumes</span><br />VOLUME vol-41885f55 8 snap-d00ac9e4 ap-southeast-1a in-use 2015-05-26T09:07:04+0000 gp2 24<br />ATTACHMENT vol-41885f55 i-d6cdb71a /dev/sda1 attached 2015-05-26T09:07:04+0000 true</blockquote>
Look like it's easy to use and adapt with script.<div class="blogger-post-footer">Written By: Surachart Opun
http://surachartopun.com</div>Surachart Opunhttp://www.blogger.com/profile/05646896104906516714noreply@blogger.com2tag:blogger.com,1999:blog-20612393.post-1387669496796554432015-05-27T14:08:00.002+07:002015-06-02T14:22:12.526+07:00AWS EC2 API tools: InstallationAWS EC2 API tools help too much for Amazon EC2 to register and launch instances, manipulate security groups, and more. Someone asked me to backup EC2 instance. I thought to use it for backup script. Anyway, No need to explain more how to install Amazon EC2 API tools on Ubuntu? Just say thank for <b><a href="https://help.ubuntu.com/community/EC2StartersGuide" target="_blank">EC2StartersGuide</a></b>. I fellow this link and installed it easily. Additional, I used this <a href="http://docs.aws.amazon.com/AWSEC2/latest/CommandLineReference/set-up-ec2-cli-linux.html" target="_blank">Link</a> for more idea about java.<br />
<b>- Adding Repository and Install EC2 API tools.</b><br />
<blockquote class="tr_bq">
ubuntu@ip-x-x-x-x:~$ <span style="color: blue;">sudo apt-add-repository ppa:awstools-dev/awstools</span><br />
Up to date versions of several tools from AWS.<br />
Use this repository by:<br />
sudo apt-add-repository ppa:awstools-dev/awstools<br />
sudo apt-get update<br />
sudo apt-get install ec2-api-tools<br />
.<br />
.<br />
.<br />
ubuntu@ip-x-x-x-x:~$<span style="color: blue;"> sudo apt-get update</span><br />
ubuntu@ip-x-x-x-x:~$ <span style="color: blue;">sudo apt-get install ec2-api-tools</span><br />
ubuntu@ip-x-x-x-x:~$<span style="color: blue;"> sudo apt-get install -y openjdk-7-jre</span><br />
ubuntu@ip-x-x-x-x:~$ <span style="color: blue;">file $(which java)</span><br />
/usr/bin/java: symbolic link to `/etc/alternatives/java'<br />
ubuntu@ip-x-x-x-x:~$ <span style="color: blue;">file /etc/alternatives/java</span><br />
/etc/alternatives/java: symbolic link to <b>`/usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java'</b></blockquote>
<b>- Adding variables in ~/.bashrs file. We should have "Access Key" - <a href="https://aws-portal.amazon.com/gp/aws/developer/account?ie=UTF8&action=access-key" target="_blank">Security Credentials</a>.</b><br />
<blockquote class="tr_bq">
ubuntu@ip-x-x-x-x:~$ <span style="color: blue;">vi ~/.bashrc</span><br />
.<br />
.<br />
.<br />
<b>export EC2_KEYPAIR=***<br />export EC2_URL=https://ec2.ap-southeast-1.amazonaws.com<br />export EC2_PRIVATE_KEY=$HOME/.ec2/pk-***.pem<br />export EC2_CERT=$HOME/.ec2/cert-***.pem<br />export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64/jre</b><br />
ubuntu@ip-x-x-x-x:~$ <span style="color: blue;">source ~/.bashrc</span></blockquote>
<b>- If everything's all right. Time to use it.</b><br />
<blockquote class="tr_bq">
ubuntu@ip-x-x-x-x:~$ <span style="color: blue;">ec2-describe-regions</span><br />
REGION eu-central-1 ec2.eu-central-1.amazonaws.com<br />
REGION sa-east-1 ec2.sa-east-1.amazonaws.com<br />
REGION ap-northeast-1 ec2.ap-northeast-1.amazonaws.com<br />
REGION eu-west-1 ec2.eu-west-1.amazonaws.com<br />
REGION us-east-1 ec2.us-east-1.amazonaws.com<br />
REGION us-west-1 ec2.us-west-1.amazonaws.com<br />
REGION us-west-2 ec2.us-west-2.amazonaws.com<br />
REGION ap-southeast-2 ec2.ap-southeast-2.amazonaws.com<br />
REGION ap-southeast-1 ec2.ap-southeast-1.amazonaws.com</blockquote>
<blockquote class="tr_bq">
ubuntu@ip-x-x-x-x:~$<span style="color: blue;"> ec2-describe-availability-zones</span><br />
AVAILABILITYZONE ap-southeast-1a available ap-southeast-1<br />
AVAILABILITYZONE ap-southeast-1b available ap-southeast-1</blockquote>
<br /><div class="blogger-post-footer">Written By: Surachart Opun
http://surachartopun.com</div>Surachart Opunhttp://www.blogger.com/profile/05646896104906516714noreply@blogger.com0tag:blogger.com,1999:blog-20612393.post-18191090256186065012014-12-23T13:38:00.002+07:002014-12-23T13:38:35.152+07:00Packt - The $5 eBook Bonanza is here!<div class="separator" style="clear: both; text-align: center;">
<a href="https://www.packtpub.com/packt5dollar/?&utm_source=ReneeP&utm_medium=referral&utm_campaign=5D2014" target="_blank"><img alt=" The $5 eBook Bonanza is here!" border="0" src="http://1.bp.blogspot.com/-VoT2uSS3pX4/VJkLzGIq4NI/AAAAAAAACvU/JFMIzZxCsZA/s1600/5dollar-300px_0.png" height="204" width="320" /></a></div>
Spread out news for people who are interested in reading IT books. <b><a href="http://bit.ly/1sIKmuz" target="_blank">The $5 eBook Bonanza is here!</a></b> You will be able to get any Packt eBook or Video for just $5 until January 6th 2015.<div class="blogger-post-footer">Written By: Surachart Opun
http://surachartopun.com</div>Surachart Opunhttp://www.blogger.com/profile/05646896104906516714noreply@blogger.com0tag:blogger.com,1999:blog-20612393.post-71341971716925673102014-11-30T21:23:00.001+07:002014-11-30T21:24:18.593+07:00How Linux Works, 2nd Edition What Every Superuser Should Know by Brian Ward; No Starch Press<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-6aX-Pp45UBg/VHsg4ugQ-4I/AAAAAAAACuU/FTwaHTHhvW8/s1600/thumb.gif" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-6aX-Pp45UBg/VHsg4ugQ-4I/AAAAAAAACuU/FTwaHTHhvW8/s1600/thumb.gif" /></a></div>
Everyone knows about <a href="http://www.linuxfoundation.org/what-is-linux" target="_blank"><b>Linux</b></a>. It's a popular operating system that is the software on a computer that enables applications and the computer operator to access the devices on the computer to perform desired functions.<br />
You can read more on link what I pointed to it. For me, Linux is a great operating system that I can use it as Desktop and Server. I have used it over ten years. It's very interesting operation system. I have used/worked it with many Open Source Software such as Apache HTTP, Bind, Sendmail, Postfix, Cyrus Imap, Samba and etc. It's operating system that I can play with programming languages as C, PHP, JAVA, Python, Perl and etc. I don't wanna say "too much".<br />
Today, I have a chance to pick up some... a book that was written about Linux - <a href="http://shop.oreilly.com/product/9781593275679.do" target="_blank"><span style="color: red;"><b>How Linux Works, 2nd Edition</b> What Every Superuser Should Know</span></a> by <a href="http://www.oreilly.com/pub/au/1403" target="_blank">Brian Ward</a>. It's a cool book that you can learn about Linux as Starter and Linux Administrator. You could learn some things you have never used, but find in this book. It's fun to learn. However, A book, it's not support every skills in Linux. You will learn<br />
<ul>
<li>How Linux boots, from boot loaders to init implementations (systemd, Upstart, and System V)</li>
<li>How the kernel manages devices, device drivers, and processes</li>
<li>How networking, interfaces, firewalls, and servers work</li>
<li>How development tools work and relate to shared libraries</li>
<li>How to write effective shell scripts </li>
</ul>
It might not be something too much for learning as you are expecting. However, It 's a good book that you can enjoy to read a book about Linux. There's easy to read and understanding in a book. It's for some people who are starting with Linux and Linux Administrators who are enjoying to learn and want to get something new that can use in their fields.<br />
<br />
<div class="blogger-post-footer">Written By: Surachart Opun
http://surachartopun.com</div>Surachart Opunhttp://www.blogger.com/profile/05646896104906516714noreply@blogger.com0tag:blogger.com,1999:blog-20612393.post-43745974618134280752014-11-19T14:36:00.000+07:002014-11-19T14:38:30.722+07:00Oracle Database 12C Certified Professional SQL Foundations by Steve Ries; Infinite Skills<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-Br55odw3Haw/VGwzKngTEyI/AAAAAAAACt4/Ecqj7uR51lI/s1600/thumb-db12c.gif" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-Br55odw3Haw/VGwzKngTEyI/AAAAAAAACt4/Ecqj7uR51lI/s1600/thumb-db12c.gif" /></a></div>
<a href="http://education.oracle.com/pls/web_prod-plq-dad/db_pages.getpage?page_id=653&get_params=p_id:248" target="_blank">How to become Become an Oracle Certified Associate?</a> That's a good question for some people who want to start working on Oracle Database and get first Oracle Certification for their work life. Step 1 - Pass one SQL Exam: Oracle Database 12c: SQL Fundamentals 1Z0-061 or Oracle Database 11g: SQL Fundamentals I 1Z0-051 or Oracle Database SQL Expert 1Z0-047. Step 2 - Pass Exam Oracle Database 12c: Installation and Administration 1Z0-062.<br />
With Step 1 - Oracle Database 12c: SQL Fundamentals 1Z0-061 exam that you should have skills SQL SELECT statement, subqueries, data manipulation, and data definition language. I was not encouraging to learn SQL SELECT statement, subqueries, data manipulation, data definition language and things like that, but in the real-world for working with Oracle Database you have to know them. You can read about them in <a href="https://docs.oracle.com/en/" target="_blank">Oracle Documents</a>, <a href="https://apex.oracle.com/pls/apex/f?p=44785:1:0" target="_blank">Oracle Learning Library</a>, Oracle University and the Internet. If you are looking for some video training that instruct you for Oracle Database SQL Foundations such as sql-select, dml, ddl and etc. I mention <a href="http://shop.oreilly.com/product/0636920037002.do" target="_blank"><b><span style="color: red;">Oracle Database - 12C Certified Professional</span></b><span style="color: red;"> SQL Foundations</span></a> by <a href="http://altdotoracle.blogspot.com/" target="_blank">Steve Ries</a>. I watched it on O'reilly,that is very fast for streaming and downloading. The "Oracle Database - 12C Certified Professional SQL Foundations" video training, that helps learning Oracle Foundations looks easier (watch and do by own) and instructor spoke each topic very clear and easy for listening.<br />
<br />
FYI, You can watch <a href="http://shop.oreilly.com/product/0636920037002.do#tab_02_2" target="_blank">some free video</a>.<br />
<br />
Video Training: <a href="http://shop.oreilly.com/product/0636920037002.do" target="_blank">Oracle Database - 12C Certified Professional SQL Foundation</a><br />
Instructor: <a href="http://altdotoracle.blogspot.com/" target="_blank">Steve Ries</a><div class="blogger-post-footer">Written By: Surachart Opun
http://surachartopun.com</div>Surachart Opunhttp://www.blogger.com/profile/05646896104906516714noreply@blogger.com0tag:blogger.com,1999:blog-20612393.post-72959343203856446892014-11-17T21:15:00.000+07:002014-11-17T21:22:59.551+07:00Think Stats, 2nd Edition Exploratory Data Analysis By Allen B. Downey; O'Reilly Media<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-0emkQvZbgfQ/VGnwTxR5mCI/AAAAAAAACtg/-ngrMPwvR6Y/s1600/thumb-think-stats.gif" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-0emkQvZbgfQ/VGnwTxR5mCI/AAAAAAAACtg/-ngrMPwvR6Y/s1600/thumb-think-stats.gif" /></a></div>
Lots of Python with data analysis books. This might be a good one that is able to help readers perform statistical analysis with programs written in Python. <a href="http://shop.oreilly.com/product/0636920034094.do" target="_blank"><span style="color: red;"><b>Think Stats, 2nd Edition</b> Exploratory Data Analysis</span></a> by <a href="http://www.oreilly.com/pub/au/4828" target="_blank">Allen B. Downey</a>(<a href="https://twitter.com/allendowney" target="_blank">@allendowney</a>).<br />
This second edition of Think Stats includes the chapters from the first edition, many of them substantially revised, and new chapters on regression, time series analysis, survival analysis, and analytic methods. Additional, It uses uses pandas, SciPy, or StatsModels in Python. Author developed this book using Anaconda from Continuum Analytics. Readers should use it, that will easy from them. Anyway, I tested on Ubuntu and installed pandas, NumPy, SciPy, StatsModels, and matplotlib packages. This book has 14 chapters relate with processes that author works with a dataset. It's for intermediate reader. So, Readers should know how to program (In a book uses Python), and skill in mathematical <complete id="goog_641770936">+ statistical</complete>.<br />
Each chapter includes exercises that readers can practice and get more understood. <a href="http://cdn.oreillystatic.com/oreilly/booksamplers/9781491907337_sampler.pdf" target="_blank">Free Sampler</a><br />
<ul>
<li>Develop an understanding of probability and statistics by writing and testing code.</li>
<li>Run experiments to test statistical behavior, such as generating samples from several distributions.</li>
<li>Use simulations to understand concepts that are hard to grasp mathematically.</li>
<li>Import data from most sources with Python, rather than rely on data that’s cleaned and formatted for statistics tools.</li>
<li>Use statistical inference to answer questions about real-world data.</li>
</ul>
<blockquote class="tr_bq">
surachart@surachart:~/ThinkStats2/code$ <span style="color: blue;">pwd</span><br />
<b>/home/surachart/ThinkStats2/code</b><br />
surachart@surachart:~/ThinkStats2/code$ <span style="color: blue;">ipython notebook --ip=0.0.0.0 --pylab=inline &</span><br />
[1] 11324<br />
surachart@surachart:~/ThinkStats2/code$ 2014-11-17 19:39:43.201 [NotebookApp] Using existing profile dir: u'/home/surachart/.config/ipython/profile_default'<br />
2014-11-17 19:39:43.210 [NotebookApp] Using system MathJax<br />
2014-11-17 19:39:43.234 [NotebookApp] Serving notebooks from local directory: /home/surachart/ThinkStats2/code<br />
2014-11-17 19:39:43.235 [NotebookApp] The IPython Notebook is running at: http://0.0.0.0:8888/<br />
2014-11-17 19:39:43.236 [NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).<br />
2014-11-17 19:39:43.236 [NotebookApp] WARNING | No web browser found: could not locate runnable browser.<br />
2014-11-17 19:39:56.120 [NotebookApp] Connecting to: tcp://127.0.0.1:38872<br />
2014-11-17 19:39:56.127 [NotebookApp] Kernel started: f24554a8-539f-426e-9010-cb3aa3386613<br />
2014-11-17 19:39:56.506 [NotebookApp] Connecting to: tcp://127.0.0.1:43369<br />
2014-11-17 19:39:56.512 [NotebookApp] Connecting to: tcp://127.0.0.1:33239<br />
2014-11-17 19:39:56.516 [NotebookApp] Connecting to: tcp://127.0.0.1:54395</blockquote>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-7S5GyM_N_pc/VGnw2e3w2GI/AAAAAAAACto/Mi6Mfi1unX0/s1600/ipython-thinkstats.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-7S5GyM_N_pc/VGnw2e3w2GI/AAAAAAAACto/Mi6Mfi1unX0/s1600/ipython-thinkstats.jpg" height="223" width="400" /></a></div>
<br />
Book: <a href="http://shop.oreilly.com/product/0636920034094.do" target="_blank"><b>Think Stats, 2nd Edition</b> Exploratory Data Analysis</a><br />
<span style="background-color: white; font-family: Georgia, serif; font-size: 12.7272720336914px; line-height: 20.8000011444092px;">Author: </span><a href="http://www.oreilly.com/pub/au/4828" target="_blank">Allen B. Downey</a>(<a href="https://twitter.com/allendowney" target="_blank">@allendowney</a>)<div class="blogger-post-footer">Written By: Surachart Opun
http://surachartopun.com</div>Surachart Opunhttp://www.blogger.com/profile/05646896104906516714noreply@blogger.com0tag:blogger.com,1999:blog-20612393.post-28021230650645411442014-10-26T00:52:00.004+07:002014-10-26T00:53:16.478+07:00Getting Started with Impala Interactive SQL for Apache Hadoop by John Russell; O'Reilly Media<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-4KDxeJzznIU/VEZJkX1Nd8I/AAAAAAAACtA/a11RqxMJBEM/s1600/thumb_impala.gif" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-4KDxeJzznIU/VEZJkX1Nd8I/AAAAAAAACtA/a11RqxMJBEM/s1600/thumb_impala.gif" /></a></div>
<a href="http://impala.io/" target="_blank">Impala</a> is open source and a query engine that runs on Apache Hadoop. With Impala, you can query data, whether stored in HDFS or Apache HBase – including SELECT, JOIN, and aggregate functions – in real time. If you are looking for a book getting start with it - <a href="http://shop.oreilly.com/product/0636920033936.do" target="_blank"><span style="color: red;"><b>Getting Started with Impala</b> Interactive SQL for Apache Hadoop</span></a> by <a href="http://tahitiviews.blogspot.com/" target="_blank">John Russell</a> (<a href="https://twitter.com/max_webster" target="_blank">@max_webster</a>). Assist readers to write, tune, and port SQL queries and other statements for a Big Data environment, using Impala. The SQL examples in this book start from a simple base for easy comprehension, then build toward best practices that demonstrate high performance and scalability. For readers, you can download <a href="http://www.cloudera.com/content/cloudera/en/downloads/quickstart_vms/cdh-5-2-x.html" target="_blank">QuickStart VMs</a> and install. After that, you can use it with examples in a book. <br />
In a book, it doesn't assist readers to install Impala or how to solve the issue from installation or configuration. It has 5 chapters and not much for the number of pages, but enough to guide how to use Impala (Interactive SQL) and has good examples. With chapter 5 - Tutorials and Deep Dives, that it's highlight in a book and the example in a chapter that is very useful. <br />
<a href="http://cdn.oreillystatic.com/oreilly/booksamplers/9781491905777_sampler.pdf" target="_blank">Free Sampler</a>.<br />
<br />
This book assists readers.<br />
<ul>
<li>Learn how Impala integrates with a wide range of Hadoop components</li>
<li>Attain high performance and scalability for huge data sets on production clusters</li>
<li>Explore common developer tasks, such as porting code to Impala and optimizing performance</li>
<li>Use tutorials for working with billion-row tables, date- and time-based values, and other techniques</li>
<li>Learn how to transition from rigid schemas to a flexible model that evolves as needs change</li>
<li>Take a deep dive into joins and the roles of statistics</li>
</ul>
<blockquote class="tr_bq">
[test01:21000] > select "Surachart Opun" Name, NOW() ;<br />
Query: select "Surachart Opun" Name, NOW()<br />
+----------------+-------------------------------+<br />
| name | now() |<br />
+----------------+-------------------------------+<br />
| Surachart Opun | 2014-10-25 23:34:03.217635000 |<br />
+----------------+-------------------------------+<br />
Returned 1 row(s) in 0.14s</blockquote>
<div>
Book: <a href="http://shop.oreilly.com/product/0636920033936.do" target="_blank">Getting Started with Impala Interactive SQL for Apache Hadoop</a></div>
Author: <a href="http://tahitiviews.blogspot.com/" target="_blank">John Russell</a> (<a href="https://twitter.com/max_webster" target="_blank">@max_webster</a>)<div class="blogger-post-footer">Written By: Surachart Opun
http://surachartopun.com</div>Surachart Opunhttp://www.blogger.com/profile/05646896104906516714noreply@blogger.com0tag:blogger.com,1999:blog-20612393.post-47627664734739653882014-10-19T01:45:00.000+07:002014-10-19T01:48:10.062+07:00Learning Spark Lightning-Fast Big Data Analytics by Holden Karau, Andy Konwinski, Patrick Wendell, Matei Zaharia; O'Reilly Media<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-gg_8Z4SEmVY/VED-nKqDJXI/AAAAAAAACso/RnFYiDwmWLU/s1600/rc_thumb.gif" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-gg_8Z4SEmVY/VED-nKqDJXI/AAAAAAAACso/RnFYiDwmWLU/s1600/rc_thumb.gif" /></a></div>
<a href="https://spark.apache.org/" target="_blank">Apache Spark</a> started as a research project at UC Berkeley in the AMPLab, which focuses on big data analytics. Spark is an open source cluster computing platform designed to be fast and general-purpose for data analytics - It's both fast to run and write. Spark provides primitives for in-memory cluster computing: your job can load data into memory and query it repeatedly much quicker than with disk-based systems like Hadoop MapReduce. Users can write applications quickly in Java, Scala or Python. In additional, it's easy to run standalone or on EC2 or Mesos. It can read data from HDFS, HBase, Cassandra, and any Hadoop data source.<br />
If you would like a book about Spark - <u><a href="http://shop.oreilly.com/product/0636920028512.do" target="_blank"><span style="color: red;"><b>Learning Spark </b>Lightning-Fast Big Data Analytics</span></a></u> by <a href="http://www.oreilly.com/pub/au/6179" target="_blank">Holden Karau</a>, <a href="http://www.oreilly.com/pub/au/6180" target="_blank">Andy Konwinski</a>, <a href="http://www.oreilly.com/pub/au/6181" target="_blank">Patrick Wendell</a>, <a href="http://www.oreilly.com/pub/au/6182" target="_blank">Matei Zaharia</a>. It's a great book for who is interested in Spark development and starting with it. Readers will learn how to express MapReduce jobs with just a few simple lines of Spark code and more...<br />
<ul>
<li>Quickly dive into Spark capabilities such as collect, count, reduce, and save</li>
<li>Use one programming paradigm instead of mixing and matching tools such as Hive, Hadoop, Mahout, and S4/Storm</li>
<li>Learn how to run interactive, iterative, and incremental analyses</li>
<li>Integrate with Scala to manipulate distributed datasets like local collections</li>
<li>Tackle partitioning issues, data locality, default hash partitioning, user-defined partitioners, and custom serialization</li>
<li>Use other languages by means of pipe() to achieve the equivalent of Hadoop streaming</li>
</ul>
<div>
With Early Release - 7 chapters. Explained Apache Spark overview, downloading and commands that should know, programming with RDDS (+ more advance) as well as working with Key-Value Pairs, etc. Easy to read and Good examples in a book. For people who want to learn Apache Spark or use Spark for Data Analytic. It's a book, that should keep in shelf.<br />
<br />Book: <u><a href="http://shop.oreilly.com/product/0636920028512.do" target="_blank"><b>Learning Spark </b>Lightning-Fast Big Data Analytics</a></u><br />
Authors: <a href="http://www.oreilly.com/pub/au/6179" target="_blank">Holden Karau</a>, <a href="http://www.oreilly.com/pub/au/6180" target="_blank">Andy Konwinski</a>, <a href="http://www.oreilly.com/pub/au/6181" target="_blank">Patrick Wendell</a>, <a href="http://www.oreilly.com/pub/au/6182" target="_blank">Matei Zaharia</a></div>
<div class="blogger-post-footer">Written By: Surachart Opun
http://surachartopun.com</div>Surachart Opunhttp://www.blogger.com/profile/05646896104906516714noreply@blogger.com0tag:blogger.com,1999:blog-20612393.post-91424078219759162952014-10-09T15:37:00.001+07:002014-10-09T15:40:36.784+07:00Using Flume - Flexible, Scalable, and Reliable Data Streaming by Hari Shreedharan; O'Reilly Media<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-MiS9r8Oa_gA/VDVu5vI3fvI/AAAAAAAACrs/hfib2gCa8zA/s1600/thumb.gif" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-MiS9r8Oa_gA/VDVu5vI3fvI/AAAAAAAACrs/hfib2gCa8zA/s1600/thumb.gif" /></a></div>
Hadoop is an open-source software framework for storage and large-scale processing of data-sets on clusters of commodity hardware. How to deliver log to Hadoop HDFS. Apache Flume is open source to integrate with HDFS, HBASE and it's a good choice to implement for log data real-time collection from front end or log data system. <br />
<a href="http://flume.apache.org/" target="_blank">Apache Flume</a> is a distributed, reliable, and available service for efficiently collecting, aggregating, and moving large amounts of log data.It uses a simple data model. Source => Channel => Sink<br />
It's a good time to introduce a good book about Flume - <a href="http://shop.oreilly.com/product/0636920030348.do" target="_blank"><span style="color: red;"><b>Using Flume </b>- Flexible, Scalable, and Reliable Data Streaming</span></a> by <a href="http://www.oreilly.com/pub/au/5717" target="_blank">Hari Shreedharan</a> (<a href="https://twitter.com/harisr1234" target="_blank">@harisr1234</a>). It was written with 8 Chapters: giving basic about Apache Hadoop and Apache HBase, idea for Streaming Data Using Apache Flume, about Flume Model (Sources, Channels, Sinks), and some moew for Interceptors, Channel Selectors, Sink Groups, and Sink Processors. Additional, Getting Data into Flume* and Planning, Deploying, and Monitoring Flume.<br />
<br />
This book was written about how to use Flume. It's very good to guide about Apache Hadoop and Apache HBase before starting about Flume Data flow model. Readers should know about java code, because they will find java code example in a book and easy to understand. It's a good book for some people who want to deploy Apache Flume and custom components. <br />
Author separated each Chapter for Flume Data flow model. So, Readers can choose each chapter to read for part of Data flow model: reader would like to know about Sink, then read Chapter 5 only until get idea. In addition, Flume has a lot of features, Readers will find example for them in a book. Each chapter has references topic, that readers can use it to find out more and very easy + quick to use in Ebook. <br />
With Illustration in a book that is helpful with readers to see Big Picture using Flume and giving idea to develop it more in each System or Project.<br />
So, Readers will be able to learn about operation and how to configure, deploy, and monitor a Flume cluster, and customize examples to develop Flume plugins and custom components for their specific use-cases.<br />
<ul>
<li>Learn how Flume provides a steady rate of flow by acting as a buffer between data producers and consumers</li>
<li>Dive into key Flume components, including sources that accept data and sinks that write and deliver it</li>
<li>Write custom plugins to customize the way Flume receives, modifies, formats, and writes data</li>
<li>Explore APIs for sending data to Flume agents from your own applications</li>
<li>Plan and deploy Flume in a scalable and flexible way—and monitor your cluster once it’s running</li>
</ul>
Book: <a href="http://shop.oreilly.com/product/0636920030348.do" target="_blank"><b>Using Flume </b>- Flexible, Scalable, and Reliable Data Streaming</a><br />
Author: <a href="http://www.oreilly.com/pub/au/5717" target="_blank">Hari Shreedharan</a><div class="blogger-post-footer">Written By: Surachart Opun
http://surachartopun.com</div>Surachart Opunhttp://www.blogger.com/profile/05646896104906516714noreply@blogger.com0tag:blogger.com,1999:blog-20612393.post-19507134341548570732014-10-06T17:12:00.002+07:002014-10-06T17:12:41.385+07:00rsyslog: Send logs to FlumeGood day for learning something new. After read Flume book, that something popped up in my head. Wanted to test "rsyslog" => Flume => HDFS. As we know, forwarding log to other systems. We can set rsyslog:<br />
<blockquote class="tr_bq">
*.* @YOURSERVERADDRESS:YOURSERVERPORT ## for UDP<br />
*.* @@YOURSERVERADDRESS:YOURSERVERPORT ## for TCP</blockquote>
<b>For rsyslog:</b><br />
<blockquote class="tr_bq">
[root@centos01 ~]# <span style="color: blue;">grep centos /etc/rsyslog.conf</span><br />
<b>*.* @centos01:7777</b></blockquote>
Came back to Flume, I used <b><a href="https://flume.apache.org/FlumeUserGuide.html#a-simple-example" target="_blank">Simple Example</a> </b>for reference and changed a bit. Because I wanted it write to HDFS.<br />
<blockquote class="tr_bq">
[root@centos01 ~]# <span style="color: blue;">grep "^FLUME_AGENT_NAME\=" /etc/default/flume-agent</span><br />
<b>FLUME_AGENT_NAME=a1</b><br />
[root@centos01 ~]# <span style="color: blue;">cat /etc/flume/conf/flume.conf</span><br />
# example.conf: A single-node Flume configuration<br />
# Name the components on this agent<br />
a1.sources = r1<br />
a1.sinks = k1<br />
a1.channels = c1<br />
# Describe/configure the source<br />
#a1.sources.r1.type = netcat<br />
<b>a1.sources.r1.type = syslogudp</b><br />
<b>a1.sources.r1.bind = 0.0.0.0</b><br />
<b>a1.sources.r1.port = 7777</b><br />
# Describe the sink<br />
#a1.sinks.k1.type = logger<br />
a1.sinks.k1.type = hdfs<br />
a1.sinks.k1.hdfs.path = hdfs://localhost:8020/user/flume/syslog/%Y/%m/%d/%H/<br />
a1.sinks.k1.hdfs.fileType = DataStream<br />
a1.sinks.k1.hdfs.writeFormat = Text<br />
a1.sinks.k1.hdfs.batchSize = 10000<br />
a1.sinks.k1.hdfs.rollSize = 0<br />
a1.sinks.k1.hdfs.rollCount = 10000<br />
a1.sinks.k1.hdfs.filePrefix = syslog<br />
a1.sinks.k1.hdfs.round = true<br />
<br />
<br />
# Use a channel which buffers events in memory<br />
a1.channels.c1.type = memory<br />
a1.channels.c1.capacity = 1000<br />
a1.channels.c1.transactionCapacity = 100<br />
# Bind the source and sink to the channel<br />
a1.sources.r1.channels = c1<br />
a1.sinks.k1.channel = c1<br />
[root@centos01 ~]# /etc/init.d/flume-agent start<br />
Flume NG agent is not running [FAILED]<br />
Starting Flume NG agent daemon (flume-agent): [ OK ]</blockquote>
Tested to login by ssh.<br />
<blockquote class="tr_bq">
[root@centos01 ~]# <span style="color: blue;"> tail -0f /var/log/flume/flume.log</span><br />
06 Oct 2014 16:35:40,601 INFO [hdfs-k1-call-runner-0] (org.apache.flume.sink.hdfs.BucketWriter.doOpen:208) - Creating hdfs://localhost:8020/user/flume/syslog/2014/10/06/16//syslog.1412588139067.tmp<br />
06 Oct 2014 16:36:10,957 INFO [hdfs-k1-roll-timer-0] (org.apache.flume.sink.hdfs.BucketWriter.renameBucket:427) - Renaming hdfs://localhost:8020/user/flume/syslog/2014/10/06/16/syslog.1412588139067.tmp to <b>hdfs://localhost:8020/user/flume/syslog/2014/10/06/16/syslog.1412588139067</b><br />
[root@centos01 ~]# <span style="color: blue;">hadoop fs -ls hdfs://localhost:8020/user/flume/syslog/2014/10/06/16/syslog.1412588139067</span><br />
14/10/06 16:37:31 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable<br />
Found 1 items<br />
-rw-r--r-- 1 flume supergroup 299 2014-10-06 16:36 hdfs://localhost:8020/user/flume/syslog/2014/10/06/16/syslog.1412588139067<br />
[root@centos01 ~]#<br />
[root@centos01 ~]#<br />
[root@centos01 ~]# <span style="color: blue;">hadoop fs -cat hdfs://localhost:8020/user/flume/syslog/2014/10/06/16/syslog.1412588139067</span><br />
14/10/06 16:37:40 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable<br />
sshd[20235]: Accepted password for surachart from 192.168.111.16 port 65068 ssh2<br />
sshd[20235]: pam_unix(sshd:session): session opened for user surachart by (uid=0)<br />
su: pam_unix(su-l:session): session opened for user root by surachart(uid=500)<br />
su: pam_unix(su-l:session): session closed for user root</blockquote>
Look good... Anyway, It needs to adapt more...<br />
<br />
<br />
<br /><div class="blogger-post-footer">Written By: Surachart Opun
http://surachartopun.com</div>Surachart Opunhttp://www.blogger.com/profile/05646896104906516714noreply@blogger.com0tag:blogger.com,1999:blog-20612393.post-12749869556074675292014-09-30T23:36:00.002+07:002014-09-30T23:37:09.624+07:00Packt Publishing - ALL eBooks and Videos are just $10 each or less until the 2nd of October<div class="separator" style="clear: both; text-align: center;">
<a href="https://www.packtpub.com/packt/offers/levelup" target="_blank"><img border="0" src="http://2.bp.blogspot.com/-HKgANug9Kwg/VCrYWz9sd5I/AAAAAAAACrQ/1p-C0A4Z4s4/s1600/LU%2B-%2BMRE%2B-%2BSocial%2BMedia.png" height="320" width="640" /></a></div>
Just spread good campaign from Packt Publishing - It's a good news for people who love to learn something new - <b><span style="color: red;"><a href="https://www.packtpub.com/packt/offers/levelup?utm_source=packtlevelup&utm_medium=Surachart%20Opun%20&utm_campaign=packtlevelup" target="_blank"><span style="color: red;">ALL eBooks and Videos are just $10 or less</span></a></span></b> -- the more you choose to learn, the more you save:<br />
<ul>
<li>Any 1 or 2 eBooks/Videos -- $10 each</li>
<li>Any 3-5 eBooks/Videos -- $8 each</li>
<li>Any 6 or more eBooks/Videos -- $6 each</li>
</ul>
<br />
<br /><div class="blogger-post-footer">Written By: Surachart Opun
http://surachartopun.com</div>Surachart Opunhttp://www.blogger.com/profile/05646896104906516714noreply@blogger.com0tag:blogger.com,1999:blog-20612393.post-3637033753574654602014-09-27T12:01:00.001+07:002014-09-27T12:19:09.606+07:00I Heart Logs - Event Data, Stream Processing, and Data Integration by Jay Kreps; O'Reilly Media<a href="http://3.bp.blogspot.com/-y5783sDBBWg/VCRWWWZ2TQI/AAAAAAAACq8/-AmWgdDrL04/s1600/thumb.gif" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-y5783sDBBWg/VCRWWWZ2TQI/AAAAAAAACq8/-AmWgdDrL04/s1600/thumb.gif" /></a>As I have worked in server-side a long time as System Administrator. I must spend with logs. To use it for checking and investigation in issue. As some policies in some Companies, they want to keep logs over year or over ten years. So, it is not unusual to find out idea to store, integrate logs and do something.<br />
A book tittle <a href="http://shop.oreilly.com/product/0636920034339.do" target="_blank">"<b>I Heart Logs</b> - Event Data, Stream Processing, and Data Integration"</a> by <a href="http://blog.empathybox.com/" target="_blank">Jay Kreps</a>. It's very interesting. I'd like to know what I can learn from it, how logs work in distributed systems and learn from author who works at LinkedIn. A book! Not much for the number of pages. However, it gives much more for data flow idea, how logs work and author still shows readers why logs are worthy of reader's attention. In a book, that has only 4 chapters, but readers will get concept and idea about Data integration (Making all of an organization’s data easily available in all its storage and processing systems), Real-time data processing (Computing derived data streams) and Distributed system design (How practical systems can by simplified with a log-centric design). In addition, I like it. because author wrote from his experience at LinkedIn.<br />
<br />
After reviewing: A book refers a lot of information(It's easy on ebook to click links) that's useful. Readers can use them and find out more on the Internet and use. For Data integration, It's focused to <b><a href="http://kafka.apache.org/" target="_blank">Kafka</a></b> software that is a distributed, partitioned, replicated commit log service. It provides the functionality of a messaging system. Additional, It gave why <a href="http://lambda-architecture.net/" target="_blank">the Big Data Lambda Architecture</a> is good for batch system and a stream processing system and point about things a log can do.<br />
<br />
So, Readers will be able to learn:<br />
<ul>
<li>Learn how logs are used for programmatic access in databases and distributed systems</li>
<li>Discover solutions to the huge data integration problem when more data of more varieties meet more systems</li>
<li>Understand why logs are at the heart of real-time stream processing</li>
<li>Learn the role of a log in the internals of online data systems</li>
<li>Explore how Jay Kreps applies these ideas to his own work on data infrastructure systems at LinkedIn</li>
</ul>
Book - <a href="http://shop.oreilly.com/product/0636920034339.do" target="_blank"><b>I Heart Logs</b> - Event Data, Stream Processing, and Data Integration</a><br />
Author: <a href="https://twitter.com/jaykreps" target="_blank">Jay Kreps</a><div class="blogger-post-footer">Written By: Surachart Opun
http://surachartopun.com</div>Surachart Opunhttp://www.blogger.com/profile/05646896104906516714noreply@blogger.com0tag:blogger.com,1999:blog-20612393.post-954381812868479432014-09-22T18:06:00.001+07:002014-09-22T18:06:28.565+07:00Where is my space on Linux filesystem?Not Often, I checked about my space after made filesystem on Linux. Today, I have made Ext4 filesystem around 460GB, I found it 437GB only. Some path should be 50GB, but it was available only 47GB.<br />
Thank You <a href="https://twitter.com/OracleAlchemis" target="_blank">@OracleAlchemist</a> and <a href="https://twitter.com/gokhanatil" target="_blank">@gokhanatil</a> for good information about it.<br />
<blockquote class="tr_bq">
Filesystem Size Used Avail Use% Mounted on<br /><span style="background-color: yellow;">/dev/mapper/VolGroup0-U01LV <b>50G</b> 52M <span style="color: red;"> 47G</span> 1% /u01</span></blockquote>
<br />
<blockquote class="tr_bq">
<b><a href="http://linux.die.net/man/8/tune2fs" target="_blank">Reference</a> </b> -<i> It's for specify the percentage of the filesystem blocks reserved for the super-user. This avoids fragmentation, and allows root-owned daemons, such as syslogd(8), to continue to function correctly after non-privileged processes are prevented from writing to the filesystem. The default percentage is 5%.</i></blockquote>
<div>
After I found out more information. Look like we can set it to zero, but we should not set it to zero for /,/var,/tmp or which path has lots of file creates and deletes.</div>
<div>
<b><a href="https://www.redhat.com/archives/ext3-users/2009-January/msg00026.html" target="_blank">Reference on RedHat</a></b></div>
<div>
<blockquote class="tr_bq">
If you set the reserved block count to zero, it won't affect<br />performance much except if you run for long periods of time (with lots<br />of file creates and deletes) while the filesystem is almost full<br />(i.e., say above 95%), at which point you'll be subject to<br />fragmentation problems. Ext4's multi-block allocator is much more<br />fragmentation resistant, because it tries much harder to find<br />contiguous blocks, so even if you don't enable the other ext4<br />features, you'll see better results simply mounting an ext3 filesystem<br />using ext4 before the filesystem gets completely full.<br />If you are just using the filesystem for long-term archive, where<br />files aren't changing very often (i.e., a huge mp3 or video store), it<br />obviously won't matter.<br /><span class="Apple-tab-span" style="white-space: pre;"> </span>- Ted</blockquote>
<div>
<b>Example: Changed reserved-blocks-percentage </b></div>
<blockquote class="tr_bq">
[root@mytest01 u01]# <span style="color: blue;">df -h /u01</span><br />Filesystem Size Used Avail Use% Mounted on<br /><b>/dev/mapper/VolGroup0-U01LV 50G 52M <span style="color: red;">47G</span> 1% /u01</b><br />[root@mytest01 u01]# <span style="color: blue;">tune2fs -m 1 /dev/mapper/VolGroup0-U01LV</span><br />tune2fs 1.43-WIP (20-Jun-2013)<br />Setting reserved blocks percentage to 1% (131072 blocks)<br />[root@mytest01 u01]# <span style="color: blue;">df -h /u01</span><br />Filesystem Size Used Avail Use% Mounted on<br /><b>/dev/mapper/VolGroup0-U01LV 50G 52M <span style="color: blue;">49G</span><span style="color: lime;"> </span> 1% /u01</b><br />[root@mytest01 u01]# <span style="color: blue;">tune2fs -m 5 /dev/mapper/VolGroup0-U01LV</span><br />tune2fs 1.43-WIP (20-Jun-2013)<br />Setting reserved blocks percentage to 5% (655360 blocks)<br />[root@mytest01 u01]# <span style="color: blue;">df -h /u01</span><br />Filesystem Size Used Avail Use% Mounted on<br />/dev/mapper/VolGroup0-U01LV 50G 52M 47G 1% /u01</blockquote>
Finally, I knew it was reserved for super-user. Checked more for calculation.<br />
<blockquote class="tr_bq">
[root@ottuatdb01 ~]# <span style="color: blue;">df -m /u01</span><br />Filesystem 1M-blocks Used Available Use% Mounted on<br />/dev/mapper/VolGroup0-U01LV <b>50269</b> 52 47657 1% /u01<br />[root@ottuatdb01 ~]# <span style="color: blue;">tune2fs -l /dev/mapper/VolGroup0-U01LV |egrep 'Block size|Reserved block count'</span><br /><b style="background-color: yellow;">Reserved block count: 655360<br />Block size: 4096</b></blockquote>
<br />
<b>Available = 47657MB</b><br />
<b>Used = 52M</b><br />
<b>Reserved Space = (655360 x 4096) / 1024 /1024 = 2560MB </b><br />
<b>Total = 47657 + 2560 + 52 = <span style="color: blue;">50269 </span></b><br />
<br />
OK.. I felt good after it cleared for me. Somehow, I believe On Hug space, 5% of the filesystem blocks reserved that's too much. We can reduce it.<br />
<br />
<b>Other Links:</b><br />
<a href="https://www.redhat.com/archives/ext3-users/2009-January/msg00026.html">https://www.redhat.com/archives/ext3-users/2009-January/msg00026.html</a><br />
<a href="http://unix.stackexchange.com/questions/7950/reserved-space-for-root-on-a-filesystem-why">http://unix.stackexchange.com/questions/7950/reserved-space-for-root-on-a-filesystem-why</a><br />
<a href="http://linux.die.net/man/8/tune2fs">http://linux.die.net/man/8/tune2fs</a><br />
<a href="https://wiki.archlinux.org/index.php/ext4#Remove_reserved_blocks">https://wiki.archlinux.org/index.php/ext4#Remove_reserved_blocks</a><br />
<div>
<br /></div>
</div>
<div class="blogger-post-footer">Written By: Surachart Opun
http://surachartopun.com</div>Surachart Opunhttp://www.blogger.com/profile/05646896104906516714noreply@blogger.com0tag:blogger.com,1999:blog-20612393.post-65950130058571713712014-09-22T15:24:00.000+07:002014-09-22T15:24:25.344+07:00Extend linux partition on vmwareIt was a quiet day, I worked as System Administrator and installed Oracle Linux on Virtual Machine guest. After installed Operating System, I wanted to extend disk on guest. So, I extended disk on guest. Anyway, I came back in my head what I was supposed to do on Linux then ? <div>
<b>- Create new disk (and Physical Volume) and then add in Volume Group.</b></div>
<div>
<a href="http://surachartopun.com/2012/01/just-add-disk-to-volume-group-linux.html">http://surachartopun.com/2012/01/just-add-disk-to-volume-group-linux.html</a></div>
<div>
Checked my partition:</div>
<div>
<blockquote class="tr_bq">
[root@mytest01 ~]# <span style="color: blue;">fdisk -l /dev/sda</span><br /><b>Disk /dev/sda: 697.9 GB</b>, 697932185600 bytes<br />255 heads, 63 sectors/track, 84852 cylinders<br />Units = cylinders of 16065 * 512 = 8225280 bytes<br />Sector size (logical/physical): 512 bytes / 512 bytes<br />I/O size (minimum/optimal): 512 bytes / 512 bytes<br />Disk identifier: 0x00061d87<br /> Device Boot Start End Blocks Id System<br />/dev/sda1 * 1 131 1048576 83 Linux<br />Partition 1 does not end on cylinder boundary.<br /><b><span style="color: red;">/dev/sda2 131 78326 628096000 8e Linux LVM</span></b><br />[root@mytest01 ~]# <span style="color: blue;">pvdisplay</span><br /> --- Physical volume ---<br /> PV Name /dev/sda2<br /> VG Name VolGroup0<br /> PV Size 599.00 GiB / not usable 3.00 MiB<br /> Allocatable yes (but full)<br /> PE Size 4.00 MiB<br /> Total PE 153343<br /> Free PE 0<br /> Allocated PE 153343<br /> PV UUID AcujnG-5XVc-TWWl-O4Oe-Nv03-rJtc-b5jUlW</blockquote>
</div>
<div>
I thought I should be able to extend (resize) /dev/sda2 - Found out on the Internet, get some example.</div>
<div>
<a href="http://unix.stackexchange.com/questions/42857/how-to-extend-centos-5-partition-on-vmware">http://unix.stackexchange.com/questions/42857/how-to-extend-centos-5-partition-on-vmware</a></div>
<div>
<br /></div>
<div>
<b>- Extend Physical Volume (Chose this idea)</b><br />Started to do it: Idea is Deleting/Recreating/run "pvresize".</div>
<div>
<blockquote>
[root@mytest01 ~]# <span style="color: blue;">fdisk /dev/sda</span><br />WARNING: DOS-compatible mode is deprecated. It's strongly recommended to<br /> switch off the mode (command 'c') and change display units to<br /> sectors (command 'u').<br />Command (m for help): <span style="color: blue;">p</span><br />Disk /dev/sda: 697.9 GB, 697932185600 bytes<br />255 heads, 63 sectors/track, 84852 cylinders<br />Units = cylinders of 16065 * 512 = 8225280 bytes<br />Sector size (logical/physical): 512 bytes / 512 bytes<br />I/O size (minimum/optimal): 512 bytes / 512 bytes<br />Disk identifier: 0x00061d87<br /> Device Boot Start End Blocks Id System<br />/dev/sda1 * 1 131 1048576 83 Linux<br />Partition 1 does not end on cylinder boundary.<br /><b>/dev/sda2 131 78326 628096000 8e Linux LVM</b><br />Command (m for help): <span style="color: blue;">d</span><br />Partition number (1-4): <span style="color: blue;">2</span><br />Command (m for help): <span style="color: blue;">p</span><br />Disk /dev/sda: 697.9 GB, 697932185600 bytes<br />255 heads, 63 sectors/track, 84852 cylinders<br />Units = cylinders of 16065 * 512 = 8225280 bytes<br />Sector size (logical/physical): 512 bytes / 512 bytes<br />I/O size (minimum/optimal): 512 bytes / 512 bytes<br />Disk identifier: 0x00061d87<br /> Device Boot Start End Blocks Id System<br />/dev/sda1 * 1 131 1048576 83 Linux<br />Partition 1 does not end on cylinder boundary.<br />Command (m for help): n<br />Command action<br /> e extended<br /> p primary partition (1-4)<br />p<br />Partition number (1-4): <span style="color: blue;">2</span><br />First cylinder (131-84852, default 131):<br /><b>Using default value 131</b><br />Last cylinder, +cylinders or +size{K,M,G} (131-84852, default 84852):<br /><b>Using default value 84852</b><br />Command (m for help): <span style="color: blue;">p</span><br />Disk /dev/sda: 697.9 GB, 697932185600 bytes<br />255 heads, 63 sectors/track, 84852 cylinders<br />Units = cylinders of 16065 * 512 = 8225280 bytes<br />Sector size (logical/physical): 512 bytes / 512 bytes<br />I/O size (minimum/optimal): 512 bytes / 512 bytes<br />Disk identifier: 0x00061d87<br /> Device Boot Start End Blocks Id System<br />/dev/sda1 * 1 131 1048576 83 Linux<br />Partition 1 does not end on cylinder boundary.<br /><b>/dev/sda2 131 84852 680524090 83 Linux</b><br />Command (m for help): <span style="color: blue;">t</span><br />Partition number (1-4): <span style="color: blue;">2</span><br />Hex code (type L to list codes): <span style="color: blue;">L</span><br /> 0 Empty 24 NEC DOS 81 Minix / old Lin bf Solaris<br /> 1 FAT12 39 Plan 9 82 Linux swap / So c1 DRDOS/sec (FAT-<br /> 2 XENIX root 3c PartitionMagic 83 Linux c4 DRDOS/sec (FAT-<br /> 3 XENIX usr 40 Venix 80286 84 OS/2 hidden C: c6 DRDOS/sec (FAT-<br /> 4 FAT16 <32m 85="" boot="" br="" c7="" extended="" inux="" nbsp="" prep="" yrinx=""> 5 Extended 42 SFS 86 NTFS volume set da Non-FS data<br /> 6 FAT16 4d QNX4.x 87 NTFS volume set db CP/M / CTOS / .<br /> 7 HPFS/NTFS 4e QNX4.x 2nd part 88 Linux plaintext de Dell Utility<br /> 8 AIX 4f QNX4.x 3rd part <b style="background-color: yellow;">8e Linux LVM </b> df BootIt<br /> 9 AIX bootable 50 OnTrack DM 93 Amoeba e1 DOS access<br /> a OS/2 Boot Manag 51 OnTrack DM6 Aux 94 Amoeba BBT e3 DOS R/O<br /> b W95 FAT32 52 CP/M 9f BSD/OS e4 SpeedStor<br /> c W95 FAT32 (LBA) 53 OnTrack DM6 Aux a0 IBM Thinkpad hi eb BeOS fs<br /> e W95 FAT16 (LBA) 54 OnTrackDM6 a5 FreeBSD ee GPT<br /> f W95 Ext'd (LBA) 55 EZ-Drive a6 OpenBSD ef EFI (FAT-12/16/<br />10 OPUS 56 Golden Bow a7 NeXTSTEP f0 Linux/PA-RISC b<br />11 Hidden FAT12 5c Priam Edisk a8 Darwin UFS f1 SpeedStor<br />12 Compaq diagnost 61 SpeedStor a9 NetBSD f4 SpeedStor<br />14 Hidden FAT16 <3 63="" ab="" arwin="" boot="" br="" f2="" hurd="" nbsp="" or="" secondary="" sys="">16 Hidden FAT16 64 Novell Netware af HFS / HFS+ fb VMware VMFS<br />17 Hidden HPFS/NTF 65 Novell Netware b7 BSDI fs fc VMware VMKCORE<br />18 AST SmartSleep 70 DiskSecure Mult b8 BSDI swap fd Linux raid auto<br />1b Hidden W95 FAT3 75 PC/IX bb Boot Wizard hid fe LANstep<br />1c Hidden W95 FAT3 80 Old Minix be Solaris boot ff BBT<br />1e Hidden W95 FAT1<br />Hex code (type L to list codes): <span style="color: blue;">8e</span><br />Changed system type of partition 2 to 8e (Linux LVM)<br />Command (m for help): <span style="color: blue;">p</span><br />Disk /dev/sda: 697.9 GB, 697932185600 bytes<br />255 heads, 63 sectors/track, 84852 cylinders<br />Units = cylinders of 16065 * 512 = 8225280 bytes<br />Sector size (logical/physical): 512 bytes / 512 bytes<br />I/O size (minimum/optimal): 512 bytes / 512 bytes<br />Disk identifier: 0x00061d87<br /> Device Boot Start End Blocks Id System<br />/dev/sda1 * 1 131 1048576 83 Linux<br />Partition 1 does not end on cylinder boundary.<br />/dev/sda2 131 84852 680524090 8e Linux LVM<br />Command (m for help): <span style="color: red;">w</span><br />The partition table has been altered!<br />Calling ioctl() to re-read partition table.<br /><span style="color: red;">WARNING: Re-reading the partition table failed with error 16: Device or resource busy.<br />The kernel still uses the old table. The new table will be used at<br />the next reboot or after you run <b style="background-color: yellow;">partprobe</b>(8) or <b style="background-color: yellow;">kpartx</b>(8)</span><br />Syncing disks. </3></32m></blockquote>
<blockquote>
<b><u>-- I chose to "Reboot" :-) --</u></b></blockquote>
<blockquote>
[root@mytest01 ~]# <span style="color: blue;">pvdisplay</span><br /> --- Physical volume ---<br /> PV Name /dev/sda2<br /> VG Name VolGroup0<br /> PV Size 599.00 GiB / not usable 3.00 MiB<br /> Allocatable yes (but full)<br /> PE Size 4.00 MiB<br /> Total PE 153343<br /> Free PE 0<br /> Allocated PE 153343<br /> PV UUID AcujnG-5XVc-TWWl-O4Oe-Nv03-rJtc-b5jUlW<br />[root@mytest01 ~]# <span style="color: blue;">pvresize /dev/sda2</span><br /> Physical volume "/dev/sda2" changed<br /> 1 physical volume(s) resized / 0 physical volume(s) not resized<br />[root@mytest01 ~]# <span style="color: blue;">pvdisplay</span><br /> --- Physical volume ---<br /> PV Name /dev/sda2<br /> VG Name VolGroup0<br /> PV Size 599.00 GiB / not usable 2.00 MiB<br /> Allocatable yes (but full)<br /> PE Size 4.00 MiB<br /> Total PE 153343<br /> Free PE 0<br /> Allocated PE 153343<br /> PV UUID AcujnG-5XVc-TWWl-O4Oe-Nv03-rJtc-b5jUlW<br />[root@mytest01 ~]#<br />[root@mytest01 ~]# <span style="color: blue;"><b>reboot</b></span><br />.<br />.<br />.<br />[root@mytest01 ~]# <span style="color: blue;">pvdisplay</span><br /> --- Physical volume ---<br /> PV Name /dev/sda2<br /> VG Name VolGroup0<br /> PV Size <b>599.00 GiB</b> / not usable 2.00 MiB<br /> Allocatable yes (but full)<br /> PE Size 4.00 MiB<br /> Total PE 153343<br /> Free PE 0<br /> Allocated PE 153343<br /> PV UUID AcujnG-5XVc-TWWl-O4Oe-Nv03-rJtc-b5jUlW<br />[root@mytest01 ~]# <span style="color: blue;">pvresize /dev/sda2</span><br /> Physical volume "/dev/sda2" changed<br /> 1 physical volume(s) resized / 0 physical volume(s) not resized<br />[root@mytest01 ~]# <span style="color: blue;">pvdisplay</span><br /> --- Physical volume ---<br /> PV Name /dev/sda2<br /> VG Name VolGroup0<br /> PV Size <b>649.00 GiB</b> / not usable 1.31 MiB<br /> Allocatable yes<br /> PE Size 4.00 MiB<br /> Total PE 166143<br /> Free PE 12800<br /> Allocated PE 153343<br /> PV UUID AcujnG-5XVc-TWWl-O4Oe-Nv03-rJtc-b5jUlW</blockquote>
</div>
<div>
<b>Note:</b> This case I had 2 partitions (/dev/sda1, /dev/sda2). So, it was a good idea extending Physical Disk. However, I thought creating physical volume and adding in Volume Group, that might be safer. </div>
<div>
<br />Finally, I had VolGroup0 with new size, then extended Logical Volume.</div>
<div>
<blockquote class="tr_bq">
[root@mytest01 ~]# <span style="color: blue;">df -h /u02</span><br />Filesystem Size Used Avail Use% Mounted on<br /><b>/dev/mapper/VolGroup0-U02LV 460G 70M 437G 1% /u02</b><br />[root@mytest01 ~]# <span style="color: blue;">lvdisplay /dev/mapper/VolGroup0-U02LV</span><br /> --- Logical volume ---<br /> LV Path /dev/VolGroup0/U02LV<br /> LV Name U02LV<br /> VG Name VolGroup0<br /> LV UUID 8Gdt6C-ZXQe-dPYi-21yj-Fs0i-6uvE-vzrCbc<br /> LV Write Access read/write<br /> LV Creation host, time mytest01.pythian.com, 2014-09-21 16:43:50 -0400<br /> LV Status available<br /> # open 1<br /> <b>LV Size 467.00 GiB</b><br /> Current LE 119551<br /> Segments 1<br /> Allocation inherit<br /> Read ahead sectors auto<br /> - currently set to 256<br /> Block device 252:2<br /><br />[root@mytest01 ~]#<br />[root@mytest01 ~]# <span style="color: blue;">vgdisplay</span><br /> --- Volume group ---<br /> VG Name VolGroup0<br /> System ID<br /> Format lvm2<br /> Metadata Areas 1<br /> Metadata Sequence No 7<br /> VG Access read/write<br /> VG Status resizable<br /> MAX LV 0<br /> Cur LV 4<br /> Open LV 3<br /> Max PV 0<br /> Cur PV 1<br /> Act PV 1<br /> <b>VG Size 649.00 GiB</b><br /> PE Size 4.00 MiB<br /> Total PE 166143<br /> Alloc PE / Size 153343 / 599.00 GiB<br /> Free PE / Size 12800 / 50.00 GiB<br /> VG UUID thGxdJ-pCi2-18S0-mrZc-cCJM-2SH2-JRpfQ5<br />[root@mytest01 ~]#<br />[root@mytest01 ~]# -- Should use "e2fsck" in case resize (shrink). This case no need.<br />[root@mytest01 ~]#<span style="color: blue;"> e2fsck -f /dev/mapper/VolGroup0-U02LV </span><br />e2fsck 1.43-WIP (20-Jun-2013)<br />Pass 1: Checking inodes, blocks, and sizes<br />Pass 2: Checking directory structure<br />Pass 3: Checking directory connectivity<br />Pass 4: Checking reference counts<br />Pass 5: Checking group summary information<br />/dev/mapper/VolGroup0-U02LV: 11/30605312 files (0.0% non-contiguous), 1971528/122420224 blocks<br />[root@mytest01 ~]#<br />[root@mytest01 ~]# <span style="color: blue;">pvscan</span><br /> <b> PV /dev/sda2 VG VolGroup0 lvm2 [649.00 GiB / <span style="color: red;">50.00 GiB free</span>]</b><br /> Total: 1 [649.00 GiB] / in use: 1 [649.00 GiB] / in no VG: 0 [0 ]<br />[root@mytest01 ~]#<br />[root@mytest01 ~]#<br />[root@mytest01 ~]#<span style="color: blue;"> lvextend -L +50G /dev/mapper/VolGroup0-U02LV</span><br /> Extending logical volume U02LV to 517.00 GiB<br /> Logical volume U02LV successfully resized<br />[root@mytest01 ~]#<br />[root@mytest01 ~]# <span style="color: blue;">resize2fs /dev/mapper/VolGroup0-U02LV</span><br />resize2fs 1.43-WIP (20-Jun-2013)<br />Resizing the filesystem on /dev/mapper/VolGroup0-U02LV to 135527424 (4k) blocks.<br />The filesystem on /dev/mapper/VolGroup0-U02LV is now 135527424 blocks long.<br />[root@mytest01 ~]#<br />[root@mytest01 ~]#<br />[root@mytest01 ~]#<span style="color: blue;"> lvdisplay /dev/mapper/VolGroup0-U02LV</span><br /> --- Logical volume ---<br /> LV Path /dev/VolGroup0/U02LV<br /> LV Name U02LV<br /> VG Name VolGroup0<br /> LV UUID 8Gdt6C-ZXQe-dPYi-21yj-Fs0i-6uvE-vzrCbc<br /> LV Write Access read/write<br /> LV Creation host, time mytest01.pythian.com, 2014-09-21 16:43:50 -0400<br /> LV Status available<br /> # open 0<br /> <b>LV Size <span style="color: red;">517.00 GiB</span></b><br /> Current LE 132351<br /> Segments 2<br /> Allocation inherit<br /> Read ahead sectors auto<br /> - currently set to 256<br /> Block device 252:2<br />[root@mytest01 ~]#<br /><br />[root@mytest01 ~]# <span style="color: blue;">df -h /u02</span><br />Filesystem Size Used Avail Use% Mounted on<br /><b>/dev/mapper/VolGroup0-U02LV 509G 70M 483G 1% /u02</b></blockquote>
<div>
<a href="https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Storage_Administration_Guide/ext4grow.html">https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Storage_Administration_Guide/ext4grow.html</a></div>
<div>
<br /></div>
</div>
<div>
<b>Note:</b> resize2fs can use online, <i><b>If the filesystem is mounted, it can be used to expand the size of the mounted filesystem, assuming the kernel supports on-line resizing. (As of this writing, the Linux 2.6 kernel supports on-line resize for filesystems mounted using ext3 and ext4.).</b></i></div>
<div>
<br /></div>
<div>
Look like today, I learned too much about linux partitioning. </div>
<div class="blogger-post-footer">Written By: Surachart Opun
http://surachartopun.com</div>Surachart Opunhttp://www.blogger.com/profile/05646896104906516714noreply@blogger.com1tag:blogger.com,1999:blog-20612393.post-43246650185584947712014-09-19T17:15:00.000+07:002014-09-19T17:15:43.216+07:00Switch CentOS to Oracle Linux - centos2ol.sh <div class="tr_bq">
My time has used much with Linux. Some people asked to move from CentOS to Oracle Linux somehow. I used to believe it easy to do like that. Anyway, It'd better to test. </div>
I focused on 2 links.<br />
<a href="https://linux.oracle.com/switch/centos/">https://linux.oracle.com/switch/centos/</a><br />
<a href="http://docs.oracle.com/cd/E37670_01/E37355/html/ol_switch_yum.html">http://docs.oracle.com/cd/E37670_01/E37355/html/ol_switch_yum.html</a><br />
<br />
Oracle introduces centos2ol.sh script that can convert CentOS 5 and 6 systems to Oracle Linux. After that run <b>"yum upgrade"</b> again.<br />
<blockquote>
[root@test-centos ~]# <span style="color: blue;">uname -r</span><br /><b>2.6.32-431.29.2.el6.x86_64</b><br />[root@test-centos ~]# <span style="color: blue;">cat /etc/centos-release</span><br /><b>CentOS release 6.5 (Final)</b><br />[root@test-centos ~]#<span style="color: blue;"> curl -O https://linux.oracle.com/switch/centos2ol.sh</span><br /> % Total % Received % Xferd Average Speed Time Time Time Current<br /> Dload Upload Total Spent Left Speed<br />100 6523 100 6523 0 0 3453 0 0:00:01 0:00:01 --:--:-- 17534<br />[root@test-centos ~]#<span style="color: blue;"> sh centos2ol.sh</span><br />Checking for required packages...<br />Checking your distribution...<br />Looking for yumdownloader...<br />Finding your repository directory...<br />Downloading Oracle Linux yum repository file...<br /> % Total % Received % Xferd Average Speed Time Time Time Current<br /> Dload Upload Total Spent Left Speed<br />100 4233 100 4233 0 0 3507 0 0:00:01 0:00:01 --:--:-- 4724<br />Removing unsupported packages...<br />Loaded plugins: fastestmirror, security<br />Setting up Remove Process<br />Resolving Dependencies<br />--> Running transaction check<br />---> Package libreport-plugin-rhtsupport.x86_64 0:2.0.9-19.el6.centos will be erased<br />--> Processing Dependency: libreport-plugin-rhtsupport = 2.0.9-19.el6.centos for package: libreport-compat-2.0.9-19.el6.centos.x86_64<br />--> Processing Dependency: libreport-plugin-rhtsupport for package: abrt-cli-2.0.8-21.el6.centos.x86_64<br />--> Processing Dependency: libreport-plugin-rhtsupport = 2.0.9-19.el6.centos for package: libreport-python-2.0.9-19.el6.centos.x86_64<br />--> Running transaction check<br />---> Package abrt-cli.x86_64 0:2.0.8-21.el6.centos will be erased<br />---> Package libreport-compat.x86_64 0:2.0.9-19.el6.centos will be erased<br />--> Processing Dependency: libreport-compat = 2.0.9-19.el6.centos for package: libreport-2.0.9-19.el6.centos.x86_64<br />---> Package libreport-python.x86_64 0:2.0.9-19.el6.centos will be erased<br />--> Running transaction check<br />---> Package libreport.x86_64 0:2.0.9-19.el6.centos will be erased<br />--> Processing Dependency: libabrt_dbus.so.0()(64bit) for package: abrt-2.0.8-21.el6.centos.x86_64<br />--> Processing Dependency: libabrt_web.so.0()(64bit) for package: libreport-plugin-kerneloops-2.0.9-19.el6.centos.x86_64<br />--> Processing Dependency: libabrt_web.so.0()(64bit) for package: libreport-plugin-reportuploader-2.0.9-19.el6.centos.x86_64<br />--> Processing Dependency: libreport.so.0()(64bit) for package: libreport-plugin-logger-2.0.9-19.el6.centos.x86_64<br />--> Processing Dependency: libreport.so.0()(64bit) for package: libreport-plugin-kerneloops-2.0.9-19.el6.centos.x86_64<br />--> Processing Dependency: libreport.so.0()(64bit) for package: abrt-libs-2.0.8-21.el6.centos.x86_64<br />--> Processing Dependency: libreport.so.0()(64bit) for package: abrt-addon-python-2.0.8-21.el6.centos.x86_64<br />--> Processing Dependency: libreport.so.0()(64bit) for package: libreport-cli-2.0.9-19.el6.centos.x86_64<br />--> Processing Dependency: libreport.so.0()(64bit) for package: abrt-2.0.8-21.el6.centos.x86_64<br />--> Processing Dependency: libreport.so.0()(64bit) for package: abrt-tui-2.0.8-21.el6.centos.x86_64<br />--> Processing Dependency: libreport.so.0()(64bit) for package: abrt-addon-ccpp-2.0.8-21.el6.centos.x86_64<br />--> Processing Dependency: libreport.so.0()(64bit) for package: libreport-plugin-mailx-2.0.9-19.el6.centos.x86_64<br />--> Processing Dependency: libreport.so.0()(64bit) for package: libreport-plugin-reportuploader-2.0.9-19.el6.centos.x86_64<br />--> Processing Dependency: libreport.so.0()(64bit) for package: abrt-addon-kerneloops-2.0.8-21.el6.centos.x86_64<br />--> Processing Dependency: libreport = 2.0.9-19.el6.centos for package: libreport-plugin-logger-2.0.9-19.el6.centos.x86_64<br />--> Processing Dependency: libreport = 2.0.9-19.el6.centos for package: libreport-plugin-kerneloops-2.0.9-19.el6.centos.x86_64<br />--> Processing Dependency: libreport = 2.0.9-19.el6.centos for package: libreport-cli-2.0.9-19.el6.centos.x86_64<br />--> Processing Dependency: libreport >= 2.0.9-16 for package: abrt-2.0.8-21.el6.centos.x86_64<br />--> Processing Dependency: libreport = 2.0.9-19.el6.centos for package: libreport-plugin-mailx-2.0.9-19.el6.centos.x86_64<br />--> Processing Dependency: libreport = 2.0.9-19.el6.centos for package: libreport-plugin-reportuploader-2.0.9-19.el6.centos.x86_64<br />--> Running transaction check<br />---> Package abrt.x86_64 0:2.0.8-21.el6.centos will be erased<br />---> Package abrt-addon-ccpp.x86_64 0:2.0.8-21.el6.centos will be erased<br />---> Package abrt-addon-kerneloops.x86_64 0:2.0.8-21.el6.centos will be erased<br />---> Package abrt-addon-python.x86_64 0:2.0.8-21.el6.centos will be erased<br />---> Package abrt-libs.x86_64 0:2.0.8-21.el6.centos will be erased<br />---> Package abrt-tui.x86_64 0:2.0.8-21.el6.centos will be erased<br />---> Package libreport-cli.x86_64 0:2.0.9-19.el6.centos will be erased<br />---> Package libreport-plugin-kerneloops.x86_64 0:2.0.9-19.el6.centos will be erased<br />---> Package libreport-plugin-logger.x86_64 0:2.0.9-19.el6.centos will be erased<br />---> Package libreport-plugin-mailx.x86_64 0:2.0.9-19.el6.centos will be erased<br />---> Package libreport-plugin-reportuploader.x86_64 0:2.0.9-19.el6.centos will be erased<br />--> Finished Dependency Resolution<br />ol6_UEK_latest | 1.2 kB 00:00<br />ol6_UEK_latest/primary | 16 MB 00:08<br />ol6_latest | 1.4 kB 00:00<br />ol6_latest/primary | 41 MB 00:21<br />Dependencies Resolved<br />========================================================================================================================================================================<br /> Package Arch Version Repository Size<br />========================================================================================================================================================================<br />Removing:<br /> libreport-plugin-rhtsupport x86_64 2.0.9-19.el6.centos @anaconda-CentOS-201311272149.x86_64/6.5 74 k<br />Removing for dependencies:<br /> abrt x86_64 2.0.8-21.el6.centos @anaconda-CentOS-201311272149.x86_64/6.5 706 k<br /> abrt-addon-ccpp x86_64 2.0.8-21.el6.centos @anaconda-CentOS-201311272149.x86_64/6.5 189 k<br /> abrt-addon-kerneloops x86_64 2.0.8-21.el6.centos @anaconda-CentOS-201311272149.x86_64/6.5 25 k<br /> abrt-addon-python x86_64 2.0.8-21.el6.centos @anaconda-CentOS-201311272149.x86_64/6.5 20 k<br /> abrt-cli x86_64 2.0.8-21.el6.centos @anaconda-CentOS-201311272149.x86_64/6.5 0.0<br /> abrt-libs x86_64 2.0.8-21.el6.centos @anaconda-CentOS-201311272149.x86_64/6.5 24 k<br /> abrt-tui x86_64 2.0.8-21.el6.centos @anaconda-CentOS-201311272149.x86_64/6.5 15 k<br /> libreport x86_64 2.0.9-19.el6.centos @anaconda-CentOS-201311272149.x86_64/6.5 1.2 M<br /> libreport-cli x86_64 2.0.9-19.el6.centos @anaconda-CentOS-201311272149.x86_64/6.5 26 k<br /> libreport-compat x86_64 2.0.9-19.el6.centos @anaconda-CentOS-201311272149.x86_64/6.5 7.4 k<br /> libreport-plugin-kerneloops x86_64 2.0.9-19.el6.centos @anaconda-CentOS-201311272149.x86_64/6.5 18 k<br /> libreport-plugin-logger x86_64 2.0.9-19.el6.centos @anaconda-CentOS-201311272149.x86_64/6.5 23 k<br /> libreport-plugin-mailx x86_64 2.0.9-19.el6.centos @anaconda-CentOS-201311272149.x86_64/6.5 32 k<br /> libreport-plugin-reportuploader x86_64 2.0.9-19.el6.centos @anaconda-CentOS-201311272149.x86_64/6.5 32 k<br /> libreport-python x86_64 2.0.9-19.el6.centos @anaconda-CentOS-201311272149.x86_64/6.5 72 k<br />Transaction Summary<br />========================================================================================================================================================================<br />Remove 16 Package(s)<br />Installed size: 2.4 M<br />Is this ok [y/N]: y<br />Downloading Packages:<br />Running rpm_check_debug<br />Running Transaction Test<br />Transaction Test Succeeded<br />Running Transaction<br /> Erasing : abrt-cli-2.0.8-21.el6.centos.x86_64 1/16<br /> Erasing : abrt-addon-kerneloops-2.0.8-21.el6.centos.x86_64 2/16<br /> Erasing : abrt-addon-ccpp-2.0.8-21.el6.centos.x86_64 3/16<br /> Erasing : abrt-tui-2.0.8-21.el6.centos.x86_64 4/16<br /> Erasing : abrt-addon-python-2.0.8-21.el6.centos.x86_64 5/16<br /> Erasing : abrt-2.0.8-21.el6.centos.x86_64 6/16<br /> Erasing : abrt-libs-2.0.8-21.el6.centos.x86_64 7/16<br /> Erasing : libreport-plugin-kerneloops-2.0.9-19.el6.centos.x86_64 8/16<br /> Erasing : libreport-cli-2.0.9-19.el6.centos.x86_64 9/16<br /> Erasing : libreport-plugin-logger-2.0.9-19.el6.centos.x86_64 10/16<br /> Erasing : libreport-plugin-mailx-2.0.9-19.el6.centos.x86_64 11/16<br /> Erasing : libreport-compat-2.0.9-19.el6.centos.x86_64 12/16<br /> Erasing : libreport-plugin-reportuploader-2.0.9-19.el6.centos.x86_64 13/16<br /> Erasing : libreport-plugin-rhtsupport-2.0.9-19.el6.centos.x86_64 14/16<br /> Erasing : libreport-python-2.0.9-19.el6.centos.x86_64 15/16<br /> Erasing : libreport-2.0.9-19.el6.centos.x86_64 16/16<br /> Verifying : libreport-plugin-mailx-2.0.9-19.el6.centos.x86_64 1/16<br /> Verifying : libreport-2.0.9-19.el6.centos.x86_64 2/16<br /> Verifying : libreport-plugin-logger-2.0.9-19.el6.centos.x86_64 3/16<br /> Verifying : abrt-tui-2.0.8-21.el6.centos.x86_64 4/16<br /> Verifying : libreport-plugin-kerneloops-2.0.9-19.el6.centos.x86_64 5/16<br /> Verifying : libreport-plugin-rhtsupport-2.0.9-19.el6.centos.x86_64 6/16<br /> Verifying : abrt-addon-kerneloops-2.0.8-21.el6.centos.x86_64 7/16<br /> Verifying : libreport-compat-2.0.9-19.el6.centos.x86_64 8/16<br /> Verifying : abrt-2.0.8-21.el6.centos.x86_64 9/16<br /> Verifying : abrt-libs-2.0.8-21.el6.centos.x86_64 10/16<br /> Verifying : libreport-python-2.0.9-19.el6.centos.x86_64 11/16<br /> Verifying : abrt-addon-python-2.0.8-21.el6.centos.x86_64 12/16<br /> Verifying : libreport-plugin-reportuploader-2.0.9-19.el6.centos.x86_64 13/16<br /> Verifying : abrt-cli-2.0.8-21.el6.centos.x86_64 14/16<br /> Verifying : libreport-cli-2.0.9-19.el6.centos.x86_64 15/16<br /> Verifying : abrt-addon-ccpp-2.0.8-21.el6.centos.x86_64 16/16<br />Removed:<br /> libreport-plugin-rhtsupport.x86_64 0:2.0.9-19.el6.centos<br />Dependency Removed:<br /> abrt.x86_64 0:2.0.8-21.el6.centos abrt-addon-ccpp.x86_64 0:2.0.8-21.el6.centos abrt-addon-kerneloops.x86_64 0:2.0.8-21.el6.centos<br /> abrt-addon-python.x86_64 0:2.0.8-21.el6.centos abrt-cli.x86_64 0:2.0.8-21.el6.centos abrt-libs.x86_64 0:2.0.8-21.el6.centos<br /> abrt-tui.x86_64 0:2.0.8-21.el6.centos libreport.x86_64 0:2.0.9-19.el6.centos libreport-cli.x86_64 0:2.0.9-19.el6.centos<br /> libreport-compat.x86_64 0:2.0.9-19.el6.centos libreport-plugin-kerneloops.x86_64 0:2.0.9-19.el6.centos libreport-plugin-logger.x86_64 0:2.0.9-19.el6.centos<br /> libreport-plugin-mailx.x86_64 0:2.0.9-19.el6.centos libreport-plugin-reportuploader.x86_64 0:2.0.9-19.el6.centos libreport-python.x86_64 0:2.0.9-19.el6.centos<br />Complete!<br />Backing up and removing old repository files...<br />Downloading Oracle Linux release package...<br />Loaded plugins: fastestmirror<br />Determining fastest mirrors<br />ol6_UEK_latest 351/351<br />ol6_latest 26103/26103<br />oraclelinux-release-6Server-5.0.2.x86_64.rpm | 22 kB 00:00<br />redhat-release-server-6Server-6.5.0.1.0.1.el6.x86_64.rpm | 2.6 kB 00:00<br />Switching old release package with Oracle Linux...<br />warning: oraclelinux-release-6Server-5.0.2.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY<br />Installing base packages for Oracle Linux...<br />Loaded plugins: fastestmirror, security<br />Determining fastest mirrors<br />ol6_UEK_latest | 1.2 kB 00:00<br />ol6_UEK_latest/primary | 16 MB 00:09<br />ol6_UEK_latest 351/351<br />ol6_latest | 1.4 kB 00:00<br />ol6_latest/primary | 41 MB 00:21<br />ol6_latest 26103/26103<br />Setting up Install Process<br />Resolving Dependencies<br />--> Running transaction check<br />---> Package basesystem.noarch 0:10.0-4.el6 will be updated<br />---> Package basesystem.noarch 0:10.0-4.0.1.el6 will be an update<br />---> Package grub.x86_64 1:0.97-84.el6_5 will be updated<br />---> Package grub.x86_64 1:0.97-84.0.1.el6_5 will be an update<br />---> Package grubby.x86_64 0:7.0.15-5.el6 will be updated<br />---> Package grubby.x86_64 0:7.0.15-5.0.4.el6 will be an update<br />---> Package initscripts.x86_64 0:9.03.40-2.el6.centos.4 will be updated<br />---> Package initscripts.x86_64 0:9.03.40-2.0.1.el6_5.4 will be an update<br />---> Package oracle-logos.noarch 0:60.0.14-1.0.1.el6 will be obsoleting<br />---> Package oraclelinux-release-notes.x86_64 0:6Server-11 will be installed<br />---> Package plymouth.x86_64 0:0.8.3-27.el6.centos.1 will be updated<br />---> Package plymouth.x86_64 0:0.8.3-27.0.1.el6_5.1 will be an update<br />--> Processing Dependency: plymouth-core-libs = 0.8.3-27.0.1.el6_5.1 for package: plymouth-0.8.3-27.0.1.el6_5.1.x86_64<br />---> Package redhat-logos.noarch 0:60.0.14-12.el6.centos will be obsoleted<br />--> Running transaction check<br />---> Package plymouth-core-libs.x86_64 0:0.8.3-27.el6.centos.1 will be updated<br />---> Package plymouth-core-libs.x86_64 0:0.8.3-27.0.1.el6_5.1 will be an update<br />--> Finished Dependency Resolution<br />Dependencies Resolved<br />========================================================================================================================================================================<br /> Package Arch Version Repository Size<br />========================================================================================================================================================================<br />Installing:<br /> oracle-logos noarch 60.0.14-1.0.1.el6 ol6_latest 12 M<br /> replacing redhat-logos.noarch 60.0.14-12.el6.centos<br /> oraclelinux-release-notes x86_64 6Server-11 ol6_latest 77 k<br />Updating:<br /> basesystem noarch 10.0-4.0.1.el6 ol6_latest 4.3 k<br /> grub x86_64 1:0.97-84.0.1.el6_5 ol6_latest 932 k<br /> grubby x86_64 7.0.15-5.0.4.el6 ol6_latest 43 k<br /> initscripts x86_64 9.03.40-2.0.1.el6_5.4 ol6_latest 940 k<br /> plymouth x86_64 0.8.3-27.0.1.el6_5.1 ol6_latest 89 k<br />Updating for dependencies:<br /> plymouth-core-libs x86_64 0.8.3-27.0.1.el6_5.1 ol6_latest 88 k<br />Transaction Summary<br />========================================================================================================================================================================<br />Install 2 Package(s)<br />Upgrade 6 Package(s)<br />Total download size: 14 M<br />Downloading Packages:<br />(1/8): basesystem-10.0-4.0.1.el6.noarch.rpm | 4.3 kB 00:00<br />(2/8): grub-0.97-84.0.1.el6_5.x86_64.rpm | 932 kB 00:00<br />(3/8): grubby-7.0.15-5.0.4.el6.x86_64.rpm | 43 kB 00:00<br />(4/8): initscripts-9.03.40-2.0.1.el6_5.4.x86_64.rpm | 940 kB 00:00<br />(5/8): oracle-logos-60.0.14-1.0.1.el6.noarch.rpm | 12 MB 00:06<br />(6/8): oraclelinux-release-notes-6Server-11.x86_64.rpm | 77 kB 00:00<br />(7/8): plymouth-0.8.3-27.0.1.el6_5.1.x86_64.rpm | 89 kB 00:00<br />(8/8): plymouth-core-libs-0.8.3-27.0.1.el6_5.1.x86_64.rpm | 88 kB 00:00<br />------------------------------------------------------------------------------------------------------------------------------------------------------------------------<br />Total 1.5 MB/s | 14 MB 00:09<br />warning: rpmts_HdrFromFdno: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY<br />Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle<br />Importing GPG key 0xEC551F03:<br /> Userid : Oracle OSS group (Open Source Software group) <build@oss.oracle.com><br /> Package: 6:oraclelinux-release-6Server-5.0.2.x86_64 (installed)<br /> From : /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle<br />Running rpm_check_debug<br />Running Transaction Test<br />Transaction Test Succeeded<br />Running Transaction<br />Warning: RPMDB altered outside of yum.<br /> Installing : oracle-logos-60.0.14-1.0.1.el6.noarch 1/15<br /> Updating : initscripts-9.03.40-2.0.1.el6_5.4.x86_64 2/15<br /> Updating : plymouth-core-libs-0.8.3-27.0.1.el6_5.1.x86_64 3/15<br /> Updating : plymouth-0.8.3-27.0.1.el6_5.1.x86_64 4/15<br /> Updating : 1:grub-0.97-84.0.1.el6_5.x86_64 5/15<br /> Updating : basesystem-10.0-4.0.1.el6.noarch 6/15<br /> Installing : oraclelinux-release-notes-6Server-11.x86_64 7/15<br /> Updating : grubby-7.0.15-5.0.4.el6.x86_64 8/15<br /> Cleanup : 1:grub-0.97-84.el6_5.x86_64 9/15<br /> Cleanup : plymouth-0.8.3-27.el6.centos.1.x86_64 10/15<br /> Erasing : redhat-logos-60.0.14-12.el6.centos.noarch 11/15<br /> Cleanup : basesystem-10.0-4.el6.noarch 12/15<br /> Cleanup : initscripts-9.03.40-2.el6.centos.4.x86_64 13/15<br /> Cleanup : plymouth-core-libs-0.8.3-27.el6.centos.1.x86_64 14/15<br /> Cleanup : grubby-7.0.15-5.el6.x86_64 15/15<br /> Verifying : grubby-7.0.15-5.0.4.el6.x86_64 1/15<br /> Verifying : 1:grub-0.97-84.0.1.el6_5.x86_64 2/15<br /> Verifying : plymouth-0.8.3-27.0.1.el6_5.1.x86_64 3/15<br /> Verifying : initscripts-9.03.40-2.0.1.el6_5.4.x86_64 4/15<br /> Verifying : oracle-logos-60.0.14-1.0.1.el6.noarch 5/15<br /> Verifying : oraclelinux-release-notes-6Server-11.x86_64 6/15<br /> Verifying : basesystem-10.0-4.0.1.el6.noarch 7/15<br /> Verifying : plymouth-core-libs-0.8.3-27.0.1.el6_5.1.x86_64 8/15<br /> Verifying : plymouth-0.8.3-27.el6.centos.1.x86_64 9/15<br /> Verifying : initscripts-9.03.40-2.el6.centos.4.x86_64 10/15<br /> Verifying : plymouth-core-libs-0.8.3-27.el6.centos.1.x86_64 11/15<br /> Verifying : grubby-7.0.15-5.el6.x86_64 12/15<br /> Verifying : redhat-logos-60.0.14-12.el6.centos.noarch 13/15<br /> Verifying : 1:grub-0.97-84.el6_5.x86_64 14/15<br /> Verifying : basesystem-10.0-4.el6.noarch 15/15<br />Installed:<br /> oracle-logos.noarch 0:60.0.14-1.0.1.el6 oraclelinux-release-notes.x86_64 0:6Server-11<br />Updated:<br /> basesystem.noarch 0:10.0-4.0.1.el6 grub.x86_64 1:0.97-84.0.1.el6_5 grubby.x86_64 0:7.0.15-5.0.4.el6 initscripts.x86_64 0:9.03.40-2.0.1.el6_5.4<br /> plymouth.x86_64 0:0.8.3-27.0.1.el6_5.1<br />Dependency Updated:<br /> plymouth-core-libs.x86_64 0:0.8.3-27.0.1.el6_5.1<br />Replaced:<br /> redhat-logos.noarch 0:60.0.14-12.el6.centos<br />Complete!<br />Updating initrd...<br />Installation successful!<br /><b><span style="background-color: yellow; color: blue;">Run 'yum upgrade' to synchronize your installed packages</span></b><br />with the Oracle Linux repository.<br />[root@test-centos ~]# <span style="color: blue;">yum upgrade</span><br />.<br />.<br />.<br />Installed:<br /> kernel-uek-headers.x86_64 0:2.6.32-400.36.8.el6uek<br />Updated:<br /> autofs.x86_64 1:5.0.5-89.0.1.el6_5.2 bfa-firmware.noarch 0:3.2.23.0-1.0.1.el6 certmonger.x86_64 0:0.61-3.0.1.el6<br /> coreutils.x86_64 0:8.4-31.0.1.el6_5.2 coreutils-libs.x86_64 0:8.4-31.0.1.el6_5.2 cpuspeed.x86_64 1:1.5-20.0.1.el6_4<br /> crash.x86_64 0:6.1.0-5.0.1.el6 dbus.x86_64 1:1.2.24-7.0.1.el6_3 dbus-glib.x86_64 0:0.86-6.el6_4<br /> dbus-libs.x86_64 1:1.2.24-7.0.1.el6_3 dhclient.x86_64 12:4.1.1-38.P1.0.1.el6 dhcp-common.x86_64 12:4.1.1-38.P1.0.1.el6<br /> dracut.noarch 0:004-336.0.1.el6_5.2 dracut-kernel.noarch 0:004-336.0.1.el6_5.2 e2fsprogs.x86_64 0:1.42.8-1.0.1.el6<br /> e2fsprogs-libs.x86_64 0:1.42.8-1.0.1.el6 gstreamer.x86_64 0:0.10.29-1.0.1.el6 gstreamer-tools.x86_64 0:0.10.29-1.0.1.el6<br /> iptables.x86_64 0:1.4.7-11.0.1.el6 iptables-ipv6.x86_64 0:1.4.7-11.0.1.el6 irqbalance.x86_64 2:1.0.4-9.0.1.el6_5<br /> java-1.7.0-openjdk.x86_64 1:1.7.0.65-2.5.1.2.0.1.el6_5 kexec-tools.x86_64 0:2.0.3-3.0.10.el6 kpartx.x86_64 0:0.4.9-72.0.1.el6_5.3<br /> libcom_err.x86_64 0:1.42.8-1.0.1.el6 libgudev1.x86_64 0:147-2.51.0.3.el6 libss.x86_64 0:1.42.8-1.0.1.el6<br /> libudev.x86_64 0:147-2.51.0.3.el6 libxml2.x86_64 0:2.7.6-14.0.1.el6_5.2 libxml2-python.x86_64 0:2.7.6-14.0.1.el6_5.2<br /> libxslt.x86_64 0:1.1.26-2.0.2.el6_3.1 module-init-tools.x86_64 0:3.9-21.0.1.el6_4 nss.x86_64 0:3.16.1-4.0.1.el6_5<br /> nss-sysinit.x86_64 0:3.16.1-4.0.1.el6_5 nss-tools.x86_64 0:3.16.1-4.0.1.el6_5 oprofile.x86_64 0:0.9.7-1.0.1.el6<br /> pango.x86_64 0:1.28.1-7.0.1.el6_3 plymouth-scripts.x86_64 0:0.8.3-27.0.1.el6_5.1 policycoreutils.x86_64 0:2.0.83-19.39.0.1.el6<br /> ql2400-firmware.noarch 0:7.03.00-1.0.1.el6 ql2500-firmware.noarch 0:7.03.00-1.0.1.el6 redhat-lsb.x86_64 0:4.0-7.0.1.el6<br /> redhat-lsb-compat.x86_64 0:4.0-7.0.1.el6 redhat-lsb-core.x86_64 0:4.0-7.0.1.el6 redhat-lsb-graphics.x86_64 0:4.0-7.0.1.el6<br /> redhat-lsb-printing.x86_64 0:4.0-7.0.1.el6 rsyslog.x86_64 0:5.8.10-8.0.1.el6 selinux-policy.noarch 0:3.7.19-231.0.1.el6_5.3<br /> selinux-policy-targeted.noarch 0:3.7.19-231.0.1.el6_5.3 sos.noarch 0:2.2-47.0.1.el6_5.7 system-config-network-tui.noarch 0:1.6.0.el6.3-1.0.1.el6<br /> systemtap-runtime.x86_64 0:2.3-4.0.1.el6_5 udev.x86_64 0:147-2.51.0.3.el6 yum.noarch 0:3.2.29-43.0.1.el6_5<br /> yum-plugin-fastestmirror.noarch 0:1.1.30-17.0.1.el6_5 yum-plugin-security.noarch 0:1.1.30-17.0.1.el6_5 yum-utils.noarch 0:1.1.30-17.0.1.el6_5<br />Replaced:<br /> kernel-headers.x86_64 0:2.6.32-431.29.2.el6<br />Complete!<br /><br />[root@test-centos ~]#<span style="color: blue;"> cat /etc/oracle-release</span><br /><b>Oracle Linux Server release 6.5</b><br />[root@test-centos ~]#<span style="color: blue;"> rpm -qi --info "oraclelinux-release"</span><br />Name : oraclelinux-release Relocations: (not relocatable)<br />Version : 6Server Vendor: Oracle America<br />Release : 5.0.2 Build Date: Sat 23 Nov 2013 02:14:50 AM ICT<br />Install Date: Fri 19 Sep 2014 03:54:33 PM ICT Build Host: ca-build44.us.oracle.com<br />Group : System Environment/Base Source RPM: oraclelinux-release-6Server-5.0.2.src.rpm<br />Size : 49559 License: GPL<br />Signature : RSA/8, Sat 23 Nov 2013 02:14:56 AM ICT, Key ID 72f97b74ec551f03<br />Summary : Oracle Linux 6 release file<br />Description :<br />System release and information files<br />Name : oraclelinux-release Relocations: (not relocatable)<br />Version : 6Server Vendor: Oracle America<br />Release : 5.0.2 Build Date: Sat 23 Nov 2013 02:14:50 AM ICT<br />Install Date: Fri 19 Sep 2014 03:54:33 PM ICT Build Host: ca-build44.us.oracle.com<br />Group : System Environment/Base Source RPM: oraclelinux-release-6Server-5.0.2.src.rpm<br />Size : 49559 License: GPL<br />Signature : RSA/8, Sat 23 Nov 2013 02:14:56 AM ICT, Key ID 72f97b74ec551f03<br />Summary : Oracle Linux 6 release file<br />Description :<br />System release and information files<br />[root@test-centos ~]#</blockquote>
<div>
It's very fast... </div>
<div class="blogger-post-footer">Written By: Surachart Opun
http://surachartopun.com</div>Surachart Opunhttp://www.blogger.com/profile/05646896104906516714noreply@blogger.com1tag:blogger.com,1999:blog-20612393.post-64903441067510368042014-09-10T18:55:00.000+07:002014-09-10T18:56:15.167+07:00Getting Started with Windows VDI by Andrew Fryer<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-8eGfidycgUo/VBAnekb_e4I/AAAAAAAACpo/-i6D25K9VLg/s1600/s.gif" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-8eGfidycgUo/VBAnekb_e4I/AAAAAAAACpo/-i6D25K9VLg/s1600/s.gif" /></a></div>
<a href="http://searchservervirtualization.techtarget.com/definition/virtual-desktop-infrastructure-VDI" target="_blank">Virtual desktop infrastructure (VDI)</a> is the practice of hosting a desktop operating system within a virtual machine (VM) running on a centralized server. VDI is a variation on the client/server computing model, sometimes referred to as server-based computing.<br />
VDI is the new technology that gives lots of benefits.<br />
• Efficient use of CPU and memory resources<br />
• Reduced desktop downtime and increased availability<br />
• Patches and upgrades performed in data center<br />
• New users can be up and running quickly<br />
• Data and applications reside in secure data centers<br />
• Centralized management reduces operational expenses<br />
<b><a href="http://www.vmware.com/pdf/virtual_desktop_infrastructure_wp.pdf" target="_blank">Reference</a></b><br />
Additional, VDI can be deployed with Microsoft Windows and suggest to learn <a href="http://www.microsoftvirtualacademy.com/training-courses/what-s-new-in-vdi-for-windows-server-2012-r2-and-8-1" target="_blank">What’s New in VDI for Windows Server 2012 R2 and 8.1</a><br />
Anyway, I explained much more before starting to mention a book that was written by <a href="http://blogs.technet.com/b/andrew/" target="_blank">Andrew Fryer</a>. <b><a href="http://shop.oreilly.com/product/9781782171461.do" target="_blank"><span style="color: red;">Getting Started with Windows VDI</span></a></b> - This book guides readers to build VDI by using Windows Server 2012 R2 and 8.1 quickly and easy to follow each chapter.<br />
<br />
<b>What Readers Will Learn:</b><br />
<ul>
<li>Explore the various server roles and features that provide Microsoft's VDI solution</li>
<li>Virtualize desktops and the other infrastructure servers required for VDI using server virtualization in Windows Server Hyper-V</li>
<li>Build high availability clusters for VDI with techniques such as failover clustering and load balancing</li>
<li>Provide secure VDI to remote users over the Internet</li>
<li>Use Microsoft's Deployment Toolkit and Windows Server Update Services to automate the creation and maintenance of virtual desktops</li>
<li>Carry out performance tuning and monitoring</li>
<li>Understand the complexities of VDI licensing irrespective of the VDI solution you have opted for</li>
<li>Deploy PowerShell to automate all of the above techniques</li>
</ul>
<br /><div class="blogger-post-footer">Written By: Surachart Opun
http://surachartopun.com</div>Surachart Opunhttp://www.blogger.com/profile/05646896104906516714noreply@blogger.com0tag:blogger.com,1999:blog-20612393.post-29397075391375384922014-08-30T16:30:00.000+07:002014-08-30T16:30:19.045+07:00OSCON 2014: Complete Video Compilation<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-qP9DSVbJ1Sc/VAGVN6e5PII/AAAAAAAACns/dGo9pn_rmIQ/s1600/bkt.gif" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-qP9DSVbJ1Sc/VAGVN6e5PII/AAAAAAAACns/dGo9pn_rmIQ/s1600/bkt.gif" /></a></div>
<a href="http://www.oscon.com/oscon2014" target="_blank">OSCON 2014</a> - Today, it's not only developers, system administrators or organizations have use the Open Source. Businesses have established to use the Open Source as well. So, you can not ignore about Open Source. At OSCON, you'll encounter the open source ecosystem. It helps digging deep into the business of open source.<br /><br />
Five Reasons to Attend OSCON: Get straight to the epicenter of all things open source and get better at what you do, Learn from the best and make valuable connections, Get solutions to your biggest challenges that you can apply today, See the latest developments, products, services, and career trends and Hear it first at OSCON.<br />
<br />It's very good idea to attend the OSCON, if you missed OSCON2014. I mention <b><u><a href="http://shop.oreilly.com/product/110000793.do" target="_blank">OSCON 2014: Complete Video Compilation</a></u></b>. You can download these videos or view them through our HD player, and learn about open source with more than 350 presenters, including Matthew McCullough (GitHub), Leslie Hawthorn (Elasticsearch), James Turnbull (Docker), Andrei Alexandrescu (Facebook), Tim Berglund (DataStax), Paco Nathan (Zettacap), Kirsten Hunter (Akamai), Matt Ray (Chef Software, Inc.), and Damian Conway (Thoughtstream) among them. In these videos, you are able to see a lot of tracks (Business,Cloud,Community,Computational Thinking,Databases & Datastores,Education,Emerging anguages,Geek Lifestyle,Java & JVM,JavaScript - HTML5 - Web,Mobile Platforms,Open Hardware,Operations & System Admin,Perl,PHP,Python,Security,Tools & Techniques,User Experience).<br /><br />
You will able to learn many tracks as I told you. Anyway, Oreilly has improved video streaming and downloading. Additional, it's very useful for playback speed control and mobile viewing.<br />
<br /><div class="blogger-post-footer">Written By: Surachart Opun
http://surachartopun.com</div>Surachart Opunhttp://www.blogger.com/profile/05646896104906516714noreply@blogger.com0tag:blogger.com,1999:blog-20612393.post-75214818032892394552014-08-27T15:42:00.002+07:002014-08-27T15:51:57.218+07:00Hands-On Programming with R by Garrett Grolemund<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-TyYa755AVMM/U_jF-W6JctI/AAAAAAAACkc/eH5YmwnvHLc/s1600/thumb.gif" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-TyYa755AVMM/U_jF-W6JctI/AAAAAAAACkc/eH5YmwnvHLc/s1600/thumb.gif" /></a></div>
<span style="background-color: white;"><b><a href="http://www.r-project.org/" target="_blank">R</a></b> is a free software environment for statistical computing and graphics. It compiles and runs on a wide variety of UNIX platforms, Windows and MacOS.</span><br />
<span style="background-color: white;">R language is useful to become a data scientist, as well as a computer scientist. I mention a book that points about a data science with R. A </span><a href="http://shop.oreilly.com/product/0636920028574.do" target="_blank"><b>Hands-On Programming with R</b> Write Your Own Functions and Simulations</a><span style="background-color: white;"> By <a href="http://www.oreilly.com/pub/au/5570" target="_blank">Garrett Grolemund</a>. It was written how to solve the logistical problems of data science. Additional, How to write our own functions and simulations with R. In a book, readers are able to learn in </span>practical data analysis projects (Weighted Dice, Playing Cards, Slot Machine) and understand more in R. Additional, Appendix A-E will help to install/update R and R packages as well as loading Data and debugging in R code.<br />
<a href="http://blog.rstudio.org/author/garrettgman/" target="_blank">Garrett Grolemund</a> maintains shiny.rstudio.com, the development center for the Shiny R package.<br />
<a href="http://cdn.oreillystatic.com/oreilly/booksamplers/9781449359010_sampler.pdf" target="_blank">Free Sampler</a>.<div class="blogger-post-footer">Written By: Surachart Opun
http://surachartopun.com</div>Surachart Opunhttp://www.blogger.com/profile/05646896104906516714noreply@blogger.com0tag:blogger.com,1999:blog-20612393.post-39119738877558554972014-07-29T21:17:00.000+07:002014-07-29T21:17:48.410+07:00Solid Conference San Francisco 2014: Complete Video Compilation<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-3S5NXQ3uKhU/U8FLqj7KHEI/AAAAAAAACjI/s25EGzV2CGc/s1600/thumb.gif" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-3S5NXQ3uKhU/U8FLqj7KHEI/AAAAAAAACjI/s25EGzV2CGc/s1600/thumb.gif" /></a></div>
<a href="http://solidcon.com/solid2014" target="_blank">Solid Conference</a> focused on the intersection of software and hardware. It's great community with Software and Hardware. Audiences will be able to learn new idea to combine software and hardware. It gathered idea from engineers, researchers, roboticists, artists, founders of startups, and innovators.<br />
Oreilly launched HD videos (<a href="http://shop.oreilly.com/product/110000531.do" target="_blank"><b>Solid Conference San Francisco 2014: Complete Video Compilation</b> Experience the revolution at the intersection of hardware and software—and imagine the future</a>) for this conference. Video files might huge for download. It will spend much time. Please Use some download manager programs for help.<br />
After watched, I excited to learn some things new with it (Run times: 36 hours 8 minutes): machines, devices, components and etc.<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.youtube.com/embed/ZFTUPoeup4M?feature=player_embedded' frameborder='0'></iframe></div>
<br /><div class="blogger-post-footer">Written By: Surachart Opun
http://surachartopun.com</div>Surachart Opunhttp://www.blogger.com/profile/05646896104906516714noreply@blogger.com0