Tuesday, September 25, 2012

Ubuntu: Install & Configure Backuppc

** For Backup Data in Ubuntu Server, Need to mount new volume/hd first to locate the backup files.


  1. Add New Volume or Hard disk to backup server.
  2. SSH to the server using putty.exe
  3. Reboot server
    #reboot
  4. SSH again  and  run
    #fdisk -l
  5. Run command
     # mkfs.ext3  /dev/sdh
     # df -h
     # cd /mnt/
     # mkdir backup
     # chown -R backuppc:backuppc
  6. Mount new volume/hd to backup
     # mount /dev/sdh backup/
     # df -h
    *To check if the volume mount to backup/
BACKUPPC INSTALLATION

    1. Verifying that your server’s time and date are correct
         # date
           Thu Sep 20 03:48:04 UTC 2012

            2. Update & upgrade ubuntu(if needed)
                 # sudo apt-get update && sudo apt-get upgrade

                  3. Install backuppc
                       # sudo apt-get install backuppc

                        4. By default config file located here:
                             # nano /etc/backuppc/config.pl

                              5. Copy backuppc root dir ke /mnt/backup/
                                   # cd /var/lib/backuppc
                                     # cp -Rp /var/lib/backuppc /mnt/backup/

                                      6. Backup & Edit config.pl
                                           # cd /etc/backuppc/
                                             # cp config.pl config.pl.ORI
                                               # nano /etc/backuppc/config.pl

                                                7. Change $Conf{TopDir}
                                                     $Conf{TopDir} = '/mnt/backup/backuppc';

                                                      8. Restart service backuppc
                                                           # /etc/init.d/backuppc restart

                                                            9. Open from browser
                                                                 http://yourdomain.com/backuppc
                                                                 login & start config.

                                                              Hyper V 2012: Can’t delete Virtual Machine

                                                              Issue: Try to import new CRM2011 machine to Hyper V, some problem occur. But the VM can't be deleted.

                                                              There are many reasons why your VM is no longer needed such as you’ve moved to another farm or you simply don’t need the virtual machine. 

                                                              Delete Fails in MMC & Hyper-V-VMMS Source Errors in Event Viewer

                                                              You’ve noticed a “straggler” left behind in your SCVMM console and you attempt to delete it and VMM says no thank you.  You can’t repair (which you expected since the files are gone, etc.) nor can you force it to delete. But error message appear.

                                                              View the Event Viewer (Custom Views –> Roles –> Hyper-V.)  You immediately notice a lot of errors similar to the following for the VM you are attempting to delete
                                                              Clean Up
                                                              To resolve this problem, do the following:
                                                              1. Connect to your Hyper-V Server
                                                              2. Open Windows Explorer
                                                              3. Open the path %systemroot%\ProgramData\Microsoft\Windows\Hyper-V\Virtual Machines (NOTE:  This is a hidden folder and requires Operating System files to be displayed)
                                                              4. You will notice a set of XML documents, one for each Virtual Machine on this host.  locate the one with the same matching GUID from your event viewer message as outlined below -


                                                              5. Right-click on the XML file with the same GUID, and select delete
                                                              6. Close Windows Explorer
                                                              7. Open Hyper-V MMC console
                                                              8. Notice that the virtual machine is gone…

                                                              Cleaning up Virtual Machine Manager

                                                              VMM will almost instantly determine that this virtual machine is now missing and you can do the famous delete and it will succeed.
                                                              Simply right-click and select delete. Finish. 

                                                              Thursday, September 13, 2012

                                                              UBUNTU: OPENLDAP INSTALLATION on UBUNTU SERVER


                                                              LDAP INSTALLATION ON UBUNTU SERVER
                                                              ----------------------------------

                                                              Login to ubuntu server as root

                                                              1. Run update
                                                                 # apt-get update

                                                              2. Install ldap
                                                                 # apt-get install slapd ldap-utils

                                                              3. Create Administrator password
                                                                 Password: XXXXXX
                                                                 Confirm Password: XXXXXX

                                                              4. Change/Edit ldap.conf
                                                                 # cd /etc/ldap/
                                                                 # nano ldap.conf

                                                              5. Add this 2 line:
                                                                 BASE    dc=staff,dc=domain,dc=com,dc=my
                                                                 URI     ldap://localhost


                                                              6. Copy ldap.sh dari existing ldap server student ke staff server
                                                                 # cd /root/
                                                                 # scp name@www.mediu.edu.my:ldap.sh  ./

                                                              7. #nano ldap.sh

                                                                 Change passwd and first dc for staff
                                                                  passwd=XXXXXX
                                                                  dc1=staff
                                                                  dc2=domain
                                                                  dc3=com
                                                                  dc4=my

                                                                 Save

                                                              8. Run script
                                                                  #sh ldap.sh

                                                                 **If ldap ON
                                                                 # ldapadd -x -D cn=admin,dc=staff,dc=domain,dc=com,dc=my -W -f /tmp/database.ldif

                                                                 ** This script can be found in last line inside ldap.sh file. It will add the new schema to the

                                                                 **If ldap STOP/OFF
                                                                 # slapadd -x -D cn=admin,dc=staff,dc=domain,dc=com,dc=my -W -f /tmp/database.ldif

                                                              9. Check Database
                                                                 # more /tmp/database.ldif

                                                              10.Run slapcat
                                                                 # slapcat

                                                              11.If tak jadi, run dpkg-reconfigure slapd
                                                                 # dpkg-reconfigure slapd

                                                              12. Restart ldap
                                                                 # /etc/init.d/slapd restart

                                                              13. #slapcat
                                                                  #more /tmp/database.ldif

                                                              14. Add User in ldap
                                                                  # pico t
                                                                  ** Copy add user section from ldap.sh paste here:

                                                              #Adding user
                                                              dn: uid=ldap1,ou=people,dc=staff,dc=domain,dc=com,dc=my
                                                              objectClass: inetOrgPerson
                                                              objectClass: posixAccount
                                                              objectClass: shadowAccount
                                                              uid: ldap1
                                                              sn: Asdasd
                                                              givenName: ldap1
                                                              cn: ldap1 Asdasd
                                                              displayName: ldap1 asdasd
                                                              uidNumber: 1002
                                                              gidNumber: 1000
                                                              userPassword: $hash_pw
                                                              gecos: ldap1 asdasd
                                                              loginShell: /bin/bash
                                                              homeDirectory: /home/ldap1
                                                              shadowExpire: -1
                                                              shadowFlag: 0
                                                              shadowWarning: 7
                                                              shadowMin: 8
                                                              shadowMax: 999999
                                                              shadowLastChange: 10877
                                                              mail: aw@$dc1.$dc2
                                                              postalCode: 31000
                                                              l: Mysity
                                                              o: $dc1
                                                              mobile: +33 (0)6 22 22 22 22 22
                                                              homePhone: +33 (0)5 33 22 33 22
                                                              title: System Administrator
                                                              postalAddress:
                                                              initials: LP

                                                              Save

                                                              15. Create $hash password
                                                              # slappasswd
                                                              New password; ####
                                                              Confirm new password: ####

                                                              {SSHA}zQgJa0DFgsUa2Myd3z8Z08SsWOaOgkAS

                                                              Copy SSHA password and copy in pico t
                                                              -------------------------------------------------------------
                                                              dn: uid=ldap1,ou=people,dc=staff,dc=domain,dc=com,dc=my
                                                              objectClass: inetOrgPerson
                                                              objectClass: posixAccount
                                                              objectClass: shadowAccount
                                                              uid: ldap1
                                                              sn: Asdasd
                                                              givenName: ldap1
                                                              cn: ldap1 Asdasd
                                                              displayName: ldap1 asdasd
                                                              uidNumber: 1002
                                                              gidNumber: 1000
                                                              userPassword: {SSHA}zQgJa0DFgsUa2Myd3z8Z08SsWOaOgkAS
                                                              gecos: ldap1 asdasd
                                                              loginShell: /bin/bash
                                                              homeDirectory: /home/ldap1
                                                              shadowExpire: -1
                                                              shadowFlag: 0
                                                              shadowWarning: 7
                                                              shadowMin: 8
                                                              shadowMax: 999999
                                                              shadowLastChange: 10877
                                                              mail: aw@$dc1.$dc2
                                                              postalCode: 31000
                                                              l: Mysity
                                                              o: $dc1
                                                              mobile: +33 (0)6 22 22 22 22 22
                                                              homePhone: +33 (0)5 33 22 33 22
                                                              title: System Administrator
                                                              postalAddress:
                                                              initials: LP
                                                              ---------------------------------------------------------------

                                                              Save

                                                              16.Then run script:
                                                                 # slapadd -l t
                                                                 # more /tmp/database.ldif
                                                                 # slapcat

                                                              17.Command to start & stop ldap

                                                                 # /etc/init.d/slapd stop
                                                                 # /etc/init.d/slapd start

                                                              18.Search ldap info
                                                                 # ldapsearch -x

                                                              Reference site:
                                                              https://help.ubuntu.com/11.04/serverguide/openldap-server.html
                                                              http://www.zarafa.com/wiki/index.php/Zarafa_LDAP_cn_config_How_To



                                                              *** If you have existing ldap server running, you might be compared the configuration between two server, old and new one. Good luck!

                                                              Additional command:
                                                              ------------------

                                                              Check current Ubuntu version

                                                              #cat /etc/issue
                                                              Ubuntu 12.04 LTS \n \l

                                                              .


                                                              Liferay: Beginner & Overview

                                                              Reference:

                                                              In short, Liferay Portal is more than a development platform, more than a content management system, more than a social network, and more than a set of collaboration tools. It’s the best way to build a web site.
                                                              http://www.liferay.com/documentation/liferay-portal/6.1/user-guide/-/ai/lp-6-1-ugen01-using-liferay-portal-as-a-content-management-system-1

                                                              How Can Liferay’s WCM Help You?


                                                              With Liferay’s WCM you have the ability to create, edit, stage, publish and approve content with easy to learn yet powerful tools. Liferay’s WCM streamlines the content creation process for end users. It’s much faster to use Liferay’s WCM than it would be to create all the content for your site in HTML. Some ways Liferay WCM makes this possible include:
                                                              • Once set up, non-technical users can manage the site.
                                                              • Liferay’s fine-grained permissions system ensures your content gets to the right users.
                                                              • To manage the site, no programming is required.
                                                              • Content can be staged.
                                                              • Content can be passed through a workflow.
                                                              • Content can be published on a schedule.
                                                              • WCM is integrated with Liferay’s services so advanced template developers can use them to query for data stored elsewhere in Liferay.
                                                              Once you get familiar with Liferay WCM you’ll wonder how you ever got along without it.

                                                              Read more

                                                              Wednesday, September 12, 2012

                                                              Drupal: Webservice data cannot display in portal

                                                              Case:
                                                              We using php code to display webservice(.wsdl) data in drupal portal. But failed.. we get blank page. What happen??

                                                              Solution:

                                                              1. Check application log in portal server
                                                                # tail -f /data/log/httpd-error.log
                                                              2. Increase max_execution_time limit in php.ini
                                                                max_execution_time = 500
                                                              3. Increase memory_limit in php.ini
                                                                memory_limit= 512M
                                                              4. Restart apache
                                                                # /etc/rc.d/apache2  restart


                                                                .

                                                              Tuesday, September 11, 2012

                                                              UBUNTU: Configuration KOHA in Ubuntu Server

                                                              KOHA CONFIGURATION 
                                                              ------------------
                                                              AFTER DONE UPLOADE THE IMAGE TO NEW SERVER..

                                                               1) Change hostname
                                                                   # nano /etc/hostname

                                                               2) Change new IP in vhost file
                                                                   # /etc/koha/koha-httpd.conf

                                                               3) Reboot server
                                                                   # reboot

                                                               4) Change binding ip in my.cnf
                                                                   # /etc/mysql/my.cnf
                                                                   ** can use this command to compare the different between files
                                                                   # diff my.cnf my.cnf.save

                                                               5) Restart the mysql service
                                                                   # service mysql stop
                                                                   # service mysql start
                                                                   # ps ax | grep mysql

                                                                  **should get something like this
                                                               22823 ? Ssl 0:01 /usr/sbin/mysqld
                                                               22841 ? S 0:00 /bin/bash /etc/mysql/debian-start
                                                               22859 ? S 0:00 xargs -i /usr/bin/mysql --defaults-file=/etc/mysql/debian.cnf --skip-column-names --silent --batch --force -e {}
                                                               22928 pts/0 S+ 0:00 grep --color=auto mysql
                                                               22929 ? R 0:00 /usr/bin/mysql --defaults-file=/etc/mysql/debian.cnf --skip-column-names --silent --batch --force -e select count(*) into @discard from `initial-koha`.`reserves`

                                                               6) Try run koha in browser
                                                                    http://domain.com/

                                                               .