Reset the AdminServer Password in WebLogic 11g and 12c

If you forget the AdminServer password for your WebLogic 11g domain, you can reset it from the command line using the following process.
  • Set up the following environment variables. They are not necessary for the process itself, but will help you navigate. In this case my domain is called "ClassicDomain". Remember to change the value to match your domain.
    export MW_HOME=/u01/app/oracle/middleware
    export DOMAIN_HOME=$MW_HOME/user_projects/domains/ClassicDomain
  • Shut down the WebLogic domain.
    $ $DOMAIN_HOME/bin/stopWebLogic.sh
  • Rename the data folder.
    $ mv $DOMAIN_HOME/servers/AdminServer/data $DOMAIN_HOME/servers/AdminServer/data-old
  • Set the environment variables.
    $ . $DOMAIN_HOME/bin/setDomainEnv.sh
  • Reset the password using the following command. Remember to substitute the appropriate username and password.
    $ cd $DOMAIN_HOME/security
    $ java weblogic.security.utils.AdminAccount <username> <password> .
  • Update the "$DOMAIN_HOME/servers/AdminServer/security/boot.properties" file with the new username and password. The file format is shown below.
    username=<username>
    password=<password>
  • Start the WebLogic domain.
    $ $DOMAIN_HOME/bin/startWebLogic.sh
For more information see:

Determining the amount of memory installed from the ESXi command line (2005821)

Purpose

This article provides a command to determine the amount of memory installed on an ESXi host.

Resolution

To determine the amount of memory installed on an ESXi host, run this command on the host ESXi host through an SSH session:

cim-diagnostic.sh > mem.out 
 
Where mem.out is the file in which the command output is stored.

After you have determined the amount of memory installed on the host, run this command to determine how much memory each slot of physical RAM is reporting.

less -i mem.out
To jump to the memory specific output, run this command from within the less session:

/CIM_Mem
The output appears similar to:

Dumping instances of CIM_Memory
Dumping instances of CIM_PhysicalMemory

OMC_PhysicalMemory.CreationClassName="OMC_PhysicalMemory",Tag="32.0"
Tag = 32.0
CreationClassName = OMC_PhysicalMemory
MaxMemorySpeed = (NULL)
IsSpeedInMhz = false
InterleavePosition = 255
PositionInRow = 255
TotalWidth = 32
Speed = (NULL)
SerialNumber = (NULL)
RemovalConditions = (NULL)
PartNumber = (NULL)
OperationalStatus = { 0, }
MemoryType = 2
Manufacturer = (NULL)
HealthState = (NULL)
FormFactor = 8
ElementName = RAM slot #0
Description = RAM slot #0
DataWidth = 32
Caption = RAM slot #0
Capacity = 2147483648

Note: The capacity of the RAM is in bytes.

Alternate:

#cim-diagnostic.sh | grep -i capacity  will return capacity.

Basic Enterprise Manager Troubleshooting

The web-based Enterprise Manager tool was introduced in Oracle 10g and has significant functionality improvements over previous versions. Even so, it seems there is not a day goes by without someone asking how to solve an Enterprise Manager configuration issue, so this article explains the first things you should look at. It's not meant to be an all encompassing guide. Just a first shot.
Make sure the "/etc/hosts" file contains at least the loopback address and preferably the machine definition also.
127.0.0.1       localhost.localdomain  localhost
192.168.0.181   myserver.localdomain   myserver
If you are using 11g, make sure the ORACLE_HOSTNAME and ORACLE_UNQNAME environment variables are set correctly.
ORACLE_HOSTNAME=myserver.localdomain; export ORACLE_HOSTNAME
ORACLE_UNQNAME=DB11G; export ORACLE_UNQNAME
Check the listener is running correctly.
lsnrctl status

Upgrade Oracle Database 12c with Manual

Manual Upgrades

Backup the database before starting the upgrade process. In the event of a failure, you will need this backup to allow you to recreate your starting point.
To run the new Pre-Upgrade Information Tool, copy the "preupgrd.sql" and "utluppkg.sql" scripts from the 12c home to a location accessible by the database that needs upgrading. In this example I used a directory under "/tmp".
$ mkdir -p /tmp/upgrade
$ cp /u01/app/oracle/product/12.1.0.1/db_1/rdbms/admin/preupgrd.sql /tmp/upgrade
$ cp /u01/app/oracle/product/12.1.0.1/db_1/rdbms/admin/utluppkg.sql /tmp/upgrade
Make sure the ORACLE_BASE is set and run the "preupgrd.sql" script from SQL*Plus.
$ export ORACLE_SID=orcl
$ ORAENV_ASK=NO
$ . oraenv
$ ORAENV_ASK=YES
$ cd /tmp/upgrade
$ sqlplus / as sysdba

SQL> @preupgrd.sql
Loading Pre-Upgrade Package...
Executing Pre-Upgrade Checks...
Pre-Upgrade Checks Complete.
      ************************************************************

Upgrading to Oracle Database 12c with DBUA

Supported Upgrade Paths

Direct upgrades to 12c are possible from existing databases with versions 10.2.0.5+, 11.1.0.7+, or release 11.2.0.2+. Upgrades from other versions are supported only via intermediate upgrades to a supported upgrade version.
When you are using the DBUA or performing a manual upgrade, you will need both versions of the database present to complete the operation. Typically, you will be installing Oracle 12c into a new ORACLE_HOME on the existing server.

Database Upgrade Assistant (DBUA)

The preferred upgrade method is to use the Database Upgrade Assistant (DBUA), a GUI tool that performs all necessary prerequisite checks and operations before upgrading the specified instances. The DBUA can be started directly from the Oracle Universal Installer (OUI) during installation, or separately after the software installation is complete.
Make sure the database is started and run the database upgrade assistant.
$ export ORACLE_HOME=/u01/app/oracle/product/12.1.0.1/db_1
$ export PATH=$ORACLE_HOME/bin:$PATH
$ dbua
Select the "Upgrade Oracle Database" option, then click the "Next" button.
Select Operation

Powering on a virtual machine from the command line when the host cannot be managed using vSphere Client (1038043)

Purpose

This article provides steps to power on virtual machines from the command line (either through the ESX host console or through the RCLI/vSphere CLI) if the host cannot be managed from vCenter Server or from vSphere Client.

Resolution

Note: The steps in this article require root access to the host, either at the physical console or using SSH. For more information on enabling root access, see:

ESXi 5.x

To power on a virtual machine from the command line:
  1. List the inventory ID of the virtual machine with the command:

    vim-cmd vmsvc/getallvms |grep <vm name>
    Note: The first column of the output shows the vmid.

  2. Check the power state of the virtual machine with the command:

    vim-cmd vmsvc/power.getstate <vmid>
  3. Power-on the virtual machine with the command:

    vim-cmd vmsvc/power.on <vmid>

Sharing Files between RHEL 6 and Windows Systems with Samba

Samba and Samba Client
Samba allows both RHEL resources to be shared with Windows systems and Windows resources to be shared with RHEL systems. RHEL accesses Windows resources using a package named samba-client. RHEL resources, on the other hand, are shared with Windows systems using a package named samba. Typically, the samba-client is installed and configured by default allowing you to browse available Windows resources without any additional work (this is covered later in the chapter). In order to allow an RHEL 6 system to share resources with Windows systems, however, some more work is required.
Installing Samba on an RHEL 6 System
The default settings used during the RHEL 6 installation process do not install the samba package. Unless you specifically requested that Samba be installed it is unlikely that you have Samba installed on your system. To check whether Samba is installed, open a terminal window (Applications -> System Tools -> Terminal) and run the following rpm command:
rpm -q samba
If Samba is installed, the rpm command will generate output similar to the following:
samba-3.5.4-68.el6_0.1.x86_64
If Samba is not installed, rpm will return with "package samba is not installed". That being the case, it can be installed using the yum command-line tool:

Install Vsftpd to configure FTP server to transfer files.


 [1] Install Vsftpd 

[root@www ~]#  yum -y install vsftpd

[root@www ~]#  vi /etc/vsftpd/vsftpd.conf
# line 12: no anonymous
anonymous_enable=NO
# line 80,81: uncomment ( allow ascii mode )
ascii_upload_enable=YES
ascii_download_enable=YES
# line 95, 96: uncomment ( enable chroot )
chroot_local_user=YES
chroot_list_enable=YES
# line 98: uncomment ( specify chroot list )
chroot_list_file=/etc/vsftpd/chroot_list
# line 104: uncomment
ls_recurse_enable=YES
# add at the last line
# specify root directory ( if don't specify, users' home directory become FTP home directory)
local_root=public_html
# use localtime
use_localtime=YES
[root@www ~]# vi /etc/vsftpd/chroot_list
# add users you allow to move over their home directory
oracle
[root@www ~]# /etc/rc.d/init.d/vsftpd start

Starting vsftpd for vsftpd: [  OK  ]
[root@www ~]#
chkconfig vsftpd on 

Disable SELinux on Server
[root@www ~]# setenforce 0

Convert a virtual machine from VMware workstation to ESXi (vSphere)



VMware Workstation is a great product, but there will often be times where you need to move up to the next level, and start using VMware ESXi or vSphere. Thankfully VMware have a software program that makes the transition process painless. The VMware vCenter Converter provides the ability to convert between an existing virtual machine image, a physical PC, or a hard disk image. The converter is compatable with virtual machine images created with VMware Workstation, VMware Infrustructure, Microsoft Virtual PC, Parallels, Acronis True Image, Symantec LiveState and more.

VMware vCenter Converter is available as a free download from the VMware website, but you do need to register to be able to access it.


This guide will step through the process of converting an existing VMware Workstation virtual image of Windows 2008 server, to a ESXi 4 server. It assumes you have downloaded and installed the VMware converter.
Start by loading the VMware Converter application.

The main screen will look similar to the image below.

How do I disable a firewall in RedHat Enterprise Linux / RHEL?




A. A Linux firewall is an integrated collection of security measures designed to prevent unauthorized electronic access to a networked computer system. Red hat Linux kernel has firewall called iptables.

It can be disabled by typing following command (login as root user):

# service iptables stop

To turn it on type the following command:

# service iptables start

To disable firewall permanently, enter:

# chkconfig iptables off
# service iptables stop