Thursday, May 31, 2012

UBUNTU: Add New Hard Disk in Virtual Server

Case: In Unlicensed vmware 

1. Power off the server
2. Right Click on server -> Edit Setting
3. Add New Hard Disk  ->  Next > Next
4. Disk Size: 25 GB  -> Case for db server(don't click thin provisioning)
5. Specify Datastore  ->  Datastore01
6. Next  ->  Next  ->  Finish  -> Ok

** Power on the server back.

How to present/mount New Hard Disk in Ubuntu? 
1. To list the HD in server
# fdisk -l /dev/sdb/ .......... 
2. To Format the new Hard Disk
# mkfs.ext3 /dev/sdb
# Yes: Y  ->  Enter
# cd /
3. To Mount New HD in Ubuntu Server
# mkdir data && mount /dev/sdb/ /data/
# df -h
4. Configure/edit fstab file
# nano /etc/fstab

**Add line under the last row:(Can also refer to existing ubuntu server) /dev/sdb /data/ ext3 noatime 0 0 Ctrl X   ->   Y  ->  Enter (to save  ->  exit).

Wednesday, May 30, 2012

Storage - DELL equallogic/ modular disk storage

Another revision... May be can be use if I left from this company :) hehehe..

What is the different between Equallogic and MD ? Equallogic got space and CPU while MD got only space...

Equallogic designed to meet the performance and availability needs of virtualization environments in medium to large enterprises. These virtualized iSCSI storage area networks (SANs) combine intelligence and automation with fault tolerance to provide simplified administration, enterprise performance and reliability, and seamless scalability.

MD can simplify IT by optimizing your data storage architecture and ensuring the availability of your data. This frees up valuable resources to help make innovation a daily practice.


Storage - NetApss

Some revision :) 
Term in storage : 
1. NAS - Network attach Storage
2. DAS - Direct attach Storage
3. SAN - Storage attach Network

3 types of hardisk that I know : 
1. SATA - Serial AT attachment
2. SSD - SSD - Solid state drive -> yang ni lg laju tapi mahal
3. SAS - Serial attach SCSI -> yang nih capacity besar... nih kita biasa guna.

  
iSCSI - internet Small Computer Software Interface

If you are using windows server 2003, you need to install Ascsi initiator.(download first). 
  1. Initiate iSCSI 
    • General 
      • copy  -> initiator node name (iqn...)
    • Discovery
      • add target portal -> ip netapps
  2. NetApss
    • initiator groups
      • Manage 
        • add initiator groups
          • groupname : PM-S-CONTOSO
          • type : iSCSI
          • OS : Windows (or any OS)
          • Initiator : initiator route name (iqn...)
          • add
        • check manage
    • Volumes
      • add new volumes
      • new -> flexible
      • volume image : CONTOSOvol01
      • language : posix
      • UTF-8 -> disable
      • next -> content agregate + left
      • next -> total size 
        • volume size -> ____ Gb
        • snapshot -> reserve 10%
        • next -> commits
      • Manage
    • LUN (logical unit number)
      • add LUN 
      • path -> vol/CONTOSOvol01/CONTOSOlun01
      • lun protocol -> windows
      • description -> apa2 laa.. 
      • size -> smaller than volume size
      • unit : ___Gb
      • space reserved (tick)
      • Manage (map group)
        • map 
        • LUN ID : 01 
        • add group to map 
          • PM-S-CONTOSO
          • done
      • Server CONTOSO
        • my computer -> manage
        • computer management 
          • disk management 
            • rescan disk
            • initial disk (tick) 
Thin provision : not recommended to use for database server.

Tuesday, May 22, 2012

apache cannot restart because of libphp5.so

I've got this error after upgrading apache from  apache-2.2.19 to 2.2.22_5





Performing sanity check on apache22 configuration:
httpd: Syntax error on line 104 of /usr/local/etc/apache22/httpd.conf: Cannot load /usr/local/libexec/apache22/libphp5.so into server: Cannot open "/usr/local/libexec/apache22/libphp5.so"
Starting apache22.
httpd: Syntax error on line 104 of /usr/local/etc/apache22/httpd.conf: Cannot load /usr/local/libexec/apache22/libphp5.so into server: Cannot open "/usr/local/libexec/apache22/libphp5.so"


It is resolved after I upgrade the php....

My Cluster Crash :(

Ok.. today is my bad day.. This is the first time that my snapshot doesn't work... You know why??? It is because the server is cluster.. We cannot simply revert your snapshot for cluster server. 

What you should do actually you should copy the folder and move to the current server. This is for moodle application. 


WARGH...keja dah aaa menimbun.. tambah lg satu masalah.. :( sedih... Tapi, it is a process of learning... Go shariha go..

Wednesday, May 9, 2012

Upgrade Moodle 2.1 to 2.2

Okay.. waiting for snapshot VM..


Then keep reading... lalala.. 


  • Do a full database backup! 
  • Do a full moodledata backup 
  • Check your backups carefully
ok.. done all backup thing.. 

now.. do the step.. copy current moodle to moodle.old

Then.. copy new moodle to current path.

Take config.php old one.. to new moodle. 

Then.. go to admin page.. Follow upgrade instruction. 

Problem
1. Coding changes that already made in old version should be recheck again. 
Solution
1. Developer have to use CVS may be or other tool to check the different in the new code. 

Restore Image In Lab

Today we are testing to broadcast an image to multiple PCs. In this case my sifu show our team member how to use clonezilla (Clone and restore OS over network). There will be 1 server which will save the image where we use mode clonezilla-save-disk. The image is come from 1 PC which already install with OS and other default application.

Check clonezilla-start by "space" key, various modes will be shown:
clonezilla-save-disk: clonezilla save disk mode
clonezilla-restore-disk: clonezilla restore disk mode
clonezilla-save-parts: clonezilla save partitions mode
clonezilla-restore-parts: clonezilla restore partitions mode

Then, the PC that we want to clone need to talk via network with the server.

After finish.. We choose clonezilla-restore-disk. Here we can choose either to make it multicase, unicast or broadcast.

In this testing we manage to restore 2 PCs in 4 minutes via network.

Well done.. The step is already simplified... Choose default setting... :)

Read more here..



There will be more testing where we can Automatically set hostname, group and SID of cloned Ms Windows Machine .

Monday, May 7, 2012

Reverse Copy

I nearly forget about reverse copy. Yasterday sis Salina have problem to copy file for Server Source to Server Destination.

Here is the way where we can pull the data ( reverse copy )
Normal copy ( copy command at source server ) source -> destination
Reverse copy ( copy command at destination server ) destination  <- source

For example you want to copy DATA from Server S (source) to Server D (destination):

Normally at Server S
# scp /path/to/DATA aminah@ipServerD:   -> file akan ada kat home/aminah/
# scp /path/to/copyDATA aminah@ipServerD:/path/to/save/  -file akan ada kat /path/to/save/

But for reverse copy, we copy DATA to our home at server S.
-> so at server S we have /home/aminah/DATA

At Server D 
# scp aminah@ServerS.contoso.com.my:DATA ./

Reverse SCP for amazon
#scp -i mykey.pem root@ec2-184-73-72-150.compute-1.amazonaws.com:/file/path/filename ./

./ -> mean current directory 

Normal SCP for amazon
#scp -i mykey.pem filename root@ec2-184-73-72-150.compute-1.amazonaws.com:/path/to/save/ 



hehehe... done..  

Upgrade Exchange 2010 SP1

Ok.. today I have to review all important thing for upgrading Exchange 2010 to SP1... I really hate in upgrading microsoft product since there will be a lot of forum and blog that I need to read to solved minor problem.. From my reading I should not only upgrade to SP1 but also SP2 since there are bugs already resolved in SP1... Ok.. time to read and later will update you the outcomes..

Peace... :)

Thursday, May 3, 2012

Setup SSL Server - Apache SSL

First of all, I would like to give full of thanks to Bro Saufi for transferring this knowledge :)

Ok.. Here we already subscribe Digicert.. You can choose any SSL certificate provider such as www.verisign.com, www.godaddy.com and etc...

There is wildcard cert and standart cer.. Later I will discuss on this issues. In this case, we are using wildcard cert where the cert will start with *.contoso.com

A) SSL Certificate CSR Creation
ref : http://www.digicert.com/csr-creation.htm

Before you can order your SSL Certificates, you must first generate a CSR (Certificate Signing Request) on your server:

Distinguished Name or DN
  1. The Country (C) is a two-digit code -- for the United States, it's 'US'. For countries outside of the United States, see our listing of SSL Certificate Country Codes. 
  2. State (S) and Locality (L) are full names, i.e. 'California', 'Los Angeles'. 
  3. The Organization Name (O) is your Full Legal Company or Personal Name, as legally registered in your locality. 
  4. The Organizational Unit (OU) is whichever branch of your company is ordering the certificate such as accounting, marketing, etc. -nil-
  5. The Common Name (CN) is the Fully Qualified Domain Name (FQDN) for which you are requesting the ssl certificate. (*.contoso.com.my)
  6. email - nil ; password -nil 
B) OpenSSL CSR Creation for Apache SSL
1. Login to your server via your terminal client (ssh).
At the prompt, type:
# openssl req -new -newkey rsa:2048 -nodes -keyout server.key -out server.csr
where server is the name of your server.

You will get 2 files :
1. server.csr - this will be used/ copy to digicert
2. server.key - this will be used in client server. Put this files same path as stated in ee /usr/local/etc/apache22/extra/httpd-ssl.conf (search for : SSLCertificateKeyFile "/usr/local/etc/apache22/path/server.key")

C) Reissues Action
- applicable if we use wild card registration
1. Get duplicate
  • Enter Your CSR
    • paste key file server.csr (we get from before step)
  • Select Your Server Software
    • eg: Apache, IIS Microsoft, etc..
  • Note
    • purpose of server as note
  • Click Button Process
    • proceed the step
2. Then wait to download the files or you can received it through email notification. ( You will get zip files content :  star_contoso_com_my .crt  DigiCertCA.crt and INSTALL_INSTRUCTIONS.txt

SSLCertificateFile /your/path/to/star_contoso_com_my.crt
SSLCertificateKeyFile /your/path/to/star_contoso_com_my.key
SSLCertificateChainFile /your/path/to/DigiCertCA.crt

3. Check apache configuration
# apachectl configtest

4. Check httpd.conf
# ee /usr/local/etc/apache22/httpd.conf

uncomment
# Secure (SSL/TLS) connections
Include etc/apache22/extra/httpd-ssl.conf


5. Stop & Start Apache
#/usr/local/etc/rc.d/apache22 stop
#/usr/local/etc/rc.d/apache22 start

6. Now you should able to access you CAS server

https://servername/login

Done.