1. Getting all the domain account information from Plesk
------------------------------------------------------------------------
mysql -uadmin -p`cat /etc/psa/.psa.shadow` -D psa -e "select
login,password,home from sys_users INNER JOIN accounts on
accounts.id=sys_users.account_id;"
2. Get client login details from Plesk.
-----------------------------------------------
mysql -uadmin -p`cat /etc/psa/.psa.shadow` -D psa -e "select
login,password from clients INNER JOIN accounts on
accounts.id=clients.account_id;"
3. Getting all mail account login information
--------------------------------------------------------
mysql -uadmin -p`cat /etc/psa/.psa.shadow` -D psa -e "SELECT
CONCAT_WS('@',mail.mail_name,domains.name) as email ,accounts.password
FROM domains,mail,accounts WHERE domains.id=mail.dom_id AND
accounts.id=mail.account_id ORDER BY domains.name ASC,mail.mail_name ASC;"
4. Creating/deleting/updating mail accounts using command line
---------------------------------------------------------------------------------
create mail account
/usr/local/psa/bin/mail -c USER@DOMAIN.COM -passwd PASSWORD -mailbox
true -cp-access true
update mail account
/usr/local/psa/bin/mail -u USER@DOMAIN.COM -passwd NEWPASS
remove mail account
/usr/local/psa/bin/mail --remove USER@DOMAIN.COM
5. Mailing list management
----------------------------------
creating mailing list
/usr/local/psa/bin/maillist --create MYLIST -domain DOMAIN.COM
-passwd_type plain -passwd PASS -notify false -email LISTADMIN@DOMAIN.COM
Adding/removing members to the mailing list.
/usr/local/psa/bin/maillist -u MYLIST -domain DOMAIN.COM -members
add:NEW@DOMAIN.COM
/usr/local/psa/bin/maillist -u MYLIST -domain DOMAIN.COM -members
del:NEW@DOMAIN.COM
Getting list members
/usr/local/psa/bin/maillist -i MYLIST -domain DOMAIN.COM
Removing list
/usr/local/psa/bin/maillist -r MYLIST -domain DOMAIN.COM
6. Managing databases.
------------------------------
create database
/usr/local/psa/bin/database --create DBNAME -domain DOMAIN.COM -server
localhost:3306 -add_user DBUSER -passwd PASS
remove database
/usr/local/psa/bin/database -r DBNAME
Wednesday, July 7, 2010
Tuesday, July 6, 2010
OpenVZ Commands
Introduction
====================
vz -> recommends ext3 file system
PIM -> IP:4643
PMC -> mangaing h/w node
PPP -> for managing a single container
All the above things need a license from parallel
====================
Templates
====================
OS template -> vzpkg (cache needs to created before creating the container)
EZ template -> points to the repository that contains packages that constitute the template
Application template -> mysql template
====================
To create a container
====================
vzctl create
the container ID > 100
32 -bit integer
ID - 0 -> h/w node
ID -1 -> service container
/etc/vz/conf -> for the sample file names (only use the main part of the file name)
vzctl set - configure the container
vzctl exec - run anything on the container
vzctl status/vzlist 101
vzpkg - for adding application templates on h/w node (/vz/templates)
- the same command can be used for installing/removing the template into a the container.
Virtuozzo - User's guide
OS virtualization - (1-2% of is spent on the virtualization s/w)
VZFS - allows sharing of common files among containers
Hardware node & Containers
/etc/vz/vz.conf
/etc/vz/conf/
/etc/vzbackup.conf
Standard migration
vzmigrate
Zero downtime migration
vzmigrate --online --require-realtime my_node.com 101
Move the container within the h/w node
vzmlocal
Backup & restore
vzabackup/vzarestore
Reinstall container
vzctl recover -> restores the VZFS symlinks
vzctl reinstall -> creates new private area for the container, copies the old private area to /old dir
- vps.configure, vps.reinstall
Delete the container
vzctl destroy
Disabling the container
vzctl set
Suspending the container
vzctl suspend
Setting up resources
disk quotas - first level(how much files or disk space the container can use) and second level (quotaugidlimit > no of entries in /etc/passwd or group files)
Container must be restarted to come this changes into effect
vzquota - to check the status of the quota info
Cleaning up containers - to move identical files from contrainers to /vz/template/vc folder
vzcache
Linking container files with application templates
vzpkg link
vzpkglink
vzpkgls
Managing CPU - cpu share and the number of processors the node can make use of.
vzcpucheck
Network traffic
/etc/vz/conf/networks_classes - after any changes, you need to service vz accrestart
class 0 - no accounting will be performed
class 1 - defined by containers to match any IP address
vznetstat
Bandwidth management (outgoing traffic)
service vz shaperon, shaperrestart, shaperoff
BANDWIDTH -> kilobites per second
TOTALRATE ->::
For container
RATE ->::
RATEBOUND -> to specify if the bandwidth is limited to the RATEBOUND
====================
Monitoring tools
====================
vzstat
vzps
vzpid
vztop
vzsetxinetd
Virtuozzo networks
vznetcfg if list
vznetcfg vlan add eth0 5
vznetcfg vlan del eth0.5
vznetcfg net addif vznetwork1 eth0
vznetcfg net delif eth0
vznetcfg net new vznetwork1
vznetcfg net del vznetwork1
vznetcfg net list
venet0 --?
License
vzlicload
vzlicupdate
vzlicview
Keeping system up2date
The h/w node can be updated using the normal update procedures without affecting virtuozzo
vzup2date - /etc/sysconfig/vzup2date/vzup2date.conf
vzup2date -m batch install --core
vzup2date -t -m batch install --all-os
Updating the containers
vzpkg update 101 redhat-el5-x86
vzpkg update 101
vzpkg update cache fedora-core-8-x86
Loading iptables modules
/etc/sysconfig/iptables-config
/etc/vz/vz.conf
/etc/vz/conf/.conf
VZFS-v2
Virtuozzo - Templates management guide
/vz/template
/vz/private/
/vz/root/
vzpkg - for managing VZ template
vzpkgls - for listing standard template
vzpkg install -p 110 yum
Virtuozzo - Managing UBC Resources
vzcfgvalidate
VE0CPUUNITS
SLM parameters
i-node setups
ext3 - 1 inode per every 4K
====================
vz -> recommends ext3 file system
PIM -> IP:4643
PMC -> mangaing h/w node
PPP -> for managing a single container
All the above things need a license from parallel
====================
Templates
====================
OS template -> vzpkg (cache needs to created before creating the container)
EZ template -> points to the repository that contains packages that constitute the template
Application template -> mysql template
====================
To create a container
====================
vzctl create
the container ID > 100
32 -bit integer
ID - 0 -> h/w node
ID -1 -> service container
/etc/vz/conf -> for the sample file names (only use the main part of the file name)
vzctl set - configure the container
vzctl exec - run anything on the container
vzctl status/vzlist 101
vzpkg - for adding application templates on h/w node (/vz/templates)
- the same command can be used for installing/removing the template into a the container.
Virtuozzo - User's guide
OS virtualization - (1-2% of is spent on the virtualization s/w)
VZFS - allows sharing of common files among containers
Hardware node & Containers
/etc/vz/vz.conf
/etc/vz/conf/
/etc/vzbackup.conf
Standard migration
vzmigrate
Zero downtime migration
vzmigrate --online --require-realtime my_node.com 101
Move the container within the h/w node
vzmlocal
Backup & restore
vzabackup/vzarestore
Reinstall container
vzctl recover -> restores the VZFS symlinks
vzctl reinstall -> creates new private area for the container, copies the old private area to /old dir
- vps.configure, vps.reinstall
Delete the container
vzctl destroy
Disabling the container
vzctl set
Suspending the container
vzctl suspend
Setting up resources
disk quotas - first level(how much files or disk space the container can use) and second level (quotaugidlimit > no of entries in /etc/passwd or group files)
Container must be restarted to come this changes into effect
vzquota - to check the status of the quota info
Cleaning up containers - to move identical files from contrainers to /vz/template/vc folder
vzcache
Linking container files with application templates
vzpkg link
vzpkglink
vzpkgls
Managing CPU - cpu share and the number of processors the node can make use of.
vzcpucheck
Network traffic
/etc/vz/conf/networks_classes - after any changes, you need to service vz accrestart
class 0 - no accounting will be performed
class 1 - defined by containers to match any IP address
vznetstat
Bandwidth management (outgoing traffic)
service vz shaperon, shaperrestart, shaperoff
BANDWIDTH -> kilobites per second
TOTALRATE ->
For container
RATE ->
RATEBOUND -> to specify if the bandwidth is limited to the RATEBOUND
====================
Monitoring tools
====================
vzstat
vzps
vzpid
vztop
vzsetxinetd
Virtuozzo networks
vznetcfg if list
vznetcfg vlan add eth0 5
vznetcfg vlan del eth0.5
vznetcfg net addif vznetwork1 eth0
vznetcfg net delif eth0
vznetcfg net new vznetwork1
vznetcfg net del vznetwork1
vznetcfg net list
venet0 --?
License
vzlicload
vzlicupdate
vzlicview
Keeping system up2date
The h/w node can be updated using the normal update procedures without affecting virtuozzo
vzup2date - /etc/sysconfig/vzup2date/vzup2date.conf
vzup2date -m batch install --core
vzup2date -t -m batch install --all-os
Updating the containers
vzpkg update 101 redhat-el5-x86
vzpkg update 101
vzpkg update cache fedora-core-8-x86
Loading iptables modules
/etc/sysconfig/iptables-config
/etc/vz/vz.conf
/etc/vz/conf/
VZFS-v2
Virtuozzo - Templates management guide
/vz/template
/vz/private/
/vz/root/
vzpkg - for managing VZ template
vzpkgls - for listing standard template
vzpkg install -p 110 yum
Virtuozzo - Managing UBC Resources
vzcfgvalidate
VE0CPUUNITS
SLM parameters
i-node setups
ext3 - 1 inode per every 4K
Subscribe to:
Posts (Atom)