sureshmsi.co.nr

  • co.nr

Archive for the ‘Technical’ 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()"
Advertisements

Posted in Control Panels, Ensim, Linux, Technical | Tagged: | Leave a Comment »

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 you have installed ‘php-mbstring’ in the server, the VPFS needs to be updated so that it will get updated for all domains hosted in the server.

The command used is synchronizeFST.

To run it manually:

# /usr/local/sbin/synchronizeFST -Sv

The switches of synchronizeFST are :

# /usr/local/sbin/synchronizeFST

-h : –help
-v : –verbose
-p : –previous | the time when the script was last executed successfully.
-l : –listrpms | lists the RPMs that were updated since the script was last executed successfully.
-R : –rpmformat | format in which you want RPM names to be displayed.
-T : –timeformat | format in which you want the time to display for all time-related information.
-t : –touch | shows the time you want the script to assume for the last successful run.
-S : –synchronize

Commonly used switches:

To synchronize FST of all sites:

# /usr/local/sbin/synchronizeFST -Sv

View the time when this was last run successfully:

# /usr/local/sbin/synchronizeFST -p
# usr/local/sbin/synchronizeFST -p -T ‘%A’

Automate the process

The script at ‘/usr/local/sbin/scheduleMaintenance’ will help to automate the process. You can check more information about this script with -h or –help command.

Posted in Control Panels, Ensim, Linux, Technical | Tagged: , | Leave a Comment »

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

# /usr/local/sbin/eplconf set <DIRECTIVE_NAME> <VALUE>

Undo the changes of selected directive

# /usr/local/sbin/eplconf unset <DIRECTIVE_NAME> <VALUE>

Posted in Control Panels, Ensim, Linux, Technical | Tagged: | Leave a Comment »

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

Posted in Control Panels, Ensim, Linux, Technical | Tagged: | Leave a Comment »

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.

Posted in Control Panels, Ensim, Linux, Technical | Tagged: | Leave a Comment »

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

Posted in Control Panels, Ensim, Linux, Technical | Tagged: | Leave a Comment »

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

Posted in Control Panels, Ensim, Linux, Technical | Tagged: , | Leave a Comment »

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

Posted in Linux, Technical | Leave a Comment »

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}’

Posted in Control Panels, Ensim, Linux, Technical | Tagged: , , , | Leave a Comment »

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 */
# ls -l | grep ‘^d’
# ls -p |grep “/”

# find . -type d (Show full hierarchy)
# find . -type d -maxdepth 1 -mindepth 1

# echo */
# echo */ */ (dig deeper)

# tree -d (Show full hierarchy)
# tree -d -L 1
# tree -fid

Posted in Linux, Technical | Tagged: , , | Leave a Comment »