sureshmsi.co.nr

Archive for the ‘Linux’ Category

Root password of MySQL in Ensim linux

Posted by: sureshm on: February 21, 2008

Login to the server as root and run the script
ensim-python -c “import sys;sys.path.append(\”/usr/lib/opcenter/mysql\”);import mysqlbe;print mysqlbe.read_mysqlpass()”
OR
ensim-python -c “from vh3 import virthost; from vh3.modules import mysql; print mysql.GetMySQLRootPass()”

Synchronize VPFS of Ensim

Posted by: sureshm on: February 13, 2008

How to Synchronize Virtual Private File System of Ensim Servers
VPFS means Virtual Private File System. Each domain (site) has its own system files and this is populated with a default set of service files from the template.
The template directory is located in the ‘/home/virtual/FILESYSTEMTEMPLATE’.
When a service RPM is upgraded or installed in the server, say [...]

Customize Ensim X Pro configuration

Posted by: sureshm on: February 13, 2008

The configuration files are located at:
# /etc/ensim/epl.conf [ Main Configuration: Don't edit ]
# /etc/appliance/customization/epl.conf
This can be done easily with an utility ‘eplconf’
The usage is given below.
Path of binary :
# /usr/local/sbin/eplconf
Display the List of Directives of configuration
# /usr/local/sbin/eplconf get
OR simply,
# /usr/local/sbin/eplconf
Retrieve the value of selected directive
# /usr/local/sbin/eplconf get <DIRECTIVE_NAME>
Change the value of selected directive
# [...]

Convert IP based site to namebased and vice-versa in Ensim

Posted by: sureshm on: February 13, 2008

01) IP-based to name-based
# EditVirtDomain -c ipinfo,namebased=1,ipadrs=\[IP\] nbaddrs=\[domain_name.com\]
02) Name-based to IP-based
# EditVirtDomain -c ipinfo,namebased=0,ipadrs=\[IP\] nbaddrs=\[domain_name.com\]
where IP = IP of the site and domain_name.com = domainname

Ensim Maintenance Mode

Posted by: sureshm on: February 13, 2008

To run Ensim through maintenance, follow the steps.
# /usr/local/sbin/set_maintenance
# /usr/local/sbin/set_pre_maintenance
# /usr/local/sbin/set_post_maintenance
# /etc/init.d/webppliance restart OR /etc/init.d/epld restart (for EnsimPro)
Please note, during the maintenance mode, the sites hosted on the server are inaccessible.

Re-run analog stats in Ensim

Posted by: sureshm on: February 13, 2008

Inorder to re-run the analog status in Ensim, run the following from the shell.
# /usr/lib/opcenter/analog/genAnalogHTML.py >/dev/null 2>/dev/null

Rotate logs for a domain in Ensim Servers

Posted by: sureshm on: February 13, 2008

To rotate the logs of a single domain in the Ensim server, run logrotate as
chroot /home/virtual/site#/fst/ logrotate -c /etc/logrotate.conf ; service httpd restart

SMBIOS/DMI information in the Linux server

Posted by: sureshm on: February 13, 2008

Run this command from shell
$ dmidecode -q | less
OR
$ /usr/local/sbin/dmidecode -q | less
To install dmidecode:
$ wget http://download.savannah.gnu.org/releases/dmidecode/dmidecode-2.10.tar.gz
$ tar xzvf dmidecode-2.10.tar.gz ; cd dmidecode-2.10
$ make ; make install

List all domain names with IP addresses in Ensim

Posted by: sureshm on: February 13, 2008

Inorder to view the domains in the server with their corresponding ips:
ListAllVirtDomains | awk ‘{print $1, $3}’

How to list only directories in linux console

Posted by: sureshm on: December 2, 2007

Well, we know how to list files and directories in console. Yes ‘ls’ is enough.
The ‘ls’ will display all files and directories. To list only directories use :
[ myEmpire$]: ls -d */
This will do the trick.
To list only directories, use any one of the following commands.
# ls -d [...]