Skip to main content

Posts

Showing posts from May, 2016

How to Reset the Root Password of RHEL-7 / systemd

1) Boot your system and wait until the GRUB2 menu appears. 2) In the boot loader menu, highlight any entry and press e . 3) Find the line beginning with linux. At the end of this line, append the following: init=/bin/sh Or if you face a panic, instead of "ro" change to "rw" to sysroot as example below: rw init=/sysroot/bin/sh 4) Press F10 or Ctrl+X to boot the system using the options you just edited. Once the system boots, you will be presented with a shell prompt without having to enter any user name or password: sh-4.2# 5) Load the installed SELinux policy: sh-4.2# /usr/sbin/load_policy -i 6) Execute the following command to remount your root partition: sh4.2# mount -o remount,rw / 7) Reset the root password: Raw sh4.2# passwd root 9) Reboot the system. From now on, you will be able to log in as the root user using the new password set up during this procedure.  

How to duplicate a database FROM ACTIVE DATABASE with rman for 11g version without backup with different directories.

Sumary: With this method we do not need a previous backup from the source database. The database cloning is performed through the network using rman script. Is important that source database be in archive mode and both databases (source and target databases) are of 11g version onwards. For this scenario the source database and destination database will have differents directories for control file, datafiles, redologs and tempfiles. 1- This is the information for two database environtments : Primary server    : 10.1.0.1 target server     : 10.1.0.2 (Destiny server) Primary DB        : TST Target DB         : TSTAUX  (Database to be copied) 2- In both servers under $ORACLE_HOME/network/admin in tnsnames.ora set the following entries : TST_DB=     (DESCRIPTION =     (ADDRESS = (PROTOCOL = TCP)(HOST = 10.1.0.1)(PORT = 1529))     (CONNECT_DATA =     (SID = tst)     )      ) TSTAUX_DB=      (DESCRIPTION =     (ADDRESS = (PROTOCOL = TCP)(HOST = 10.

How to duplicate a database FROM ACTIVE DATABASE with rman for 11g version without backup.

      Sumary: With this method we do not need a previous backup from the source database. The database cloning is performed through the network using rman script. Is important that source database be in archive mode and both databases (source and target databases) are of 11g version onwards. For this scenario the source database and destination database will have the same directory structure for control file, datafiles, redologs and tempfiles. 1- This is the information for two database environtments : Primary server : 10.1.0.1 target server     : 10.1.0.2 (Destiny server) Primary DB     : TST Target DB        : TSTAUX  (Database to be copied) 2- In both servers under $ORACLE_HOME/network/admin in tnsnames.ora set the following entries : TST_DB=   (DESCRIPTION =     (ADDRESS = (PROTOCOL = TCP)(HOST = 10.1.0.1)(PORT = 1529))     (CONNECT_DATA =       (SID = tst)     )   ) TSTAUX_DB=   (DESCRIPTION =     (ADDRESS = (PROTOCOL = TCP)(HOST = 10.1.0.2)

How to tie a system to a specific update Red Hat

1.Update Subscription Manager Package, validate first that system is registered   #yum -y update subscription-manager* 2.-Delete the Yum Cache   rm –rf /var/cache/yum/* 3.-Clean with command to be sure that it was cleaned correctly #yum clean all 4.-Set the release to tie teh Red Hat OS, where  you are working to the specific release to avoid to update for example from 6.6 to 6.8 Stable in this case.   These is usable if you need to have support and the application is only supported in a specific release #subscription-manager release --set=6.7 --proxy=http://<ipaddress_proxy>:8080 --proxyuser=<proxyuser> -proxypass=<proxypassword> or if you have Access directly to internet #subscription-manager release --set=6.7 5.-Update the OS   yum -y update    

How to duplicate from active database database to stand by with rman 11gr2

Oracle 11g introduces the "duplicate from active database database to stand by". This feature allows the creation of a stand by database without need a previous backup. The primary database need to be in archive mode. This is possible by using one RMAN script. It will copy the server parameter file to the standby host, start the auxiliary instance using the server parameter file and will copy control, redologs  and datafiles over the network to the stand by host. 1- Create a single instance database (for this case, our primary database will be tst).    Primary server     : 10.1.0.1    Secondary server   : 10.1.0.2       TNS alias for Primary – TST_PR    TNS alias for standby – TST_DRP       Primary DB_NAME Parameter=tst      Primary DB_UNIQUE_NAME Parameter=tst_pri    Standby DB_NAME Parameter=tst      Standby DB_UNIQUE_NAME Parameter=tst_drp       ALTER SYSTEM SET LOG_ARCHIVE_CONFIG='DG_CONFIG=(ep0_pri,tst_drp)';    alter system set db_unique_name

Updating Solaris 11.X to 11.3 and SRU to 11.3.2.4.0

Updating Solaris 11.X to 11.3 Download Repository Certificate s accessing with MOS user https://pkg-register.oracle.com/register/certificate/ Upload them to the server and rename as below pkg.oracle.com.certificate.perm pkg.oracle.com.key.perm root@:~# pkg unset-publisher This option below delete the currently repository and add the new one root@:~# pkg set-publisher -k  /root/pkg.oracle.com.key.pem -c /root/pkg.oracle.com.certificate.pem -G "*" -g https://pkg.oracle.com/solaris/support/ solaris root@:~# pkg publisher PUBLISHER                   TYPE     STATUS P LOCATION solaris                     origin   online F http://pkg.oracle.com/solaris/support/ root@# pkg update Validate previous boot environment root@:~# beadm list BE      Flags Mountpoint Space  Policy Created --      ----- ---------- -----  ------ ------- solaris NR    /          12.58G static 2016-03-15 07:11 root@:~# root@:~# PHASE             

Solaris SunFreeware Mirrors Download

  Solaris SunFreeware Mirrors Download If you need to download packages for Solaris 9/10, you can use those links in order to download package that you need for your Solaris OS http://ftp.ntua.gr/mirror/sun-freeware/ http://ftp.telfort.nl/pub/mirror/sunfreeware/sparc/5.9/  

How to break a bonded network interface red hat

1.- Bonding device called bond0 which aggregated by eth0 and eth1 # ifconfig bond0     Link encap:Ethernet  HWaddr 44:a8:42:5d:6d:5d           inet addr:192.168.1.51  Bcast:192.168.1.255  Mask:255.255.255.0           inet6 addr: fe80::5054:ff:fe4d:9004/64 Scope:Link           UP BROADCAST RUNNING MASTER MULTICAST  MTU:1500  Metric:1 eth0      Link encap:Ethernet  HWaddr 44:a8:42:5d:6d:5d           UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1 eth2      Link encap:Ethernet  HWaddr 44:a8:42:5d:76:29           UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1           RX packets:6 errors:0 dropped:0 overruns:0 frame:0 # cat /proc/net/bonding/bond0 Ethernet Channel Bonding Driver: v3.6.0 (September 26, 2009) Bonding Mode: fault-tolerance (active-backup) Primary Slave: em1 (primary_reselect always) Currently Active Slave: em1 MII Status: up MII Polling Interval (ms): 50 Up Delay (ms): 0 Down Delay (ms): 0 Slave Interface: eth0 MII Status: up Speed: 10000

HOW TO SET KERNEL VALUES TO IMPROVE PERFORMANCE IN SOLARIS SERVERS

  (A) set maxphys  To improve basic disk performance  maxphys is the maximum size of physical I/O requests. If a driver sees a request larger than this size, the driver breaks the request into maxphys size chunks. File systems can and do impose their own limit. This value should be higher than all other settings (vol_maxio, vol_maxspecialio etc) such as in Filesystems/Volume Manager etc. maxphys is set in bytes.  Maximum number of page I/O requests that can be queued by the paging system. This number is divided by 4 to get the actual maximum used by the paging system. It is used to throttle the number of requests as well as to control process swapping. maxpgio is in I/O's.  C)Set FastScan  (Is Calculated by Multipliying 32678 for Physical Memory D)Set Handspreadpages(Is Calculated by Multipliying 32678 for Physical Memory  The Solaris environment uses a two-handed clock algorithm to look for pages that are candidates for reclaiming when memory is low. The first hand o

HOW TO INSTALL APACHE 2.4 on Red Hat 6

1.- We will need to enable the following Repository rhel-server-rhscl-6-rpms   server1# subscription-manager repos --enable rhel-server-rhscl-6-rpms     If you do not have internet Access and you are using a proxy you will need to  set the proxy,before activate the repository.       server1# subscription-manager repos --enable=rhel-server-rhscl-6-rpms --proxy=192.1.1.3 --proxyuser=user1 --proxypass=password365   2.-Proceed to install the package   server1# yum install httpd24-httpd           After finishing we have installed Apache 2.4 with all the dependencies.   3.- Finally you can install the other packages  that you need separately as :   httpd24-mod-auth httpd24-mod-ldap httpd24-mod-sesiĆ³n httpd24-mod-ssl   Depending of the application you will need to install openssl (n order to have security socket layer)   4.- Now you can start the apache 2.4   # service httpd24-httpd start     Validate errors in the log