Archive for May, 2010

How to extract web files, databases etc from Plesk backup manually?

If you have not so big dump file, for example 100-200MB, you can unzip it and open in any local Email client. Paths of the dump will be shown as attachments. Choose and save needed one then unzip it.

Other Way - It can be done using mpack tools to work with MIME files. This packet is included into Debian:

# apt-get install mpack

For other Linux systems you can try to use RPM from ALT Linux:

ftp://ftp.pbone.net/mirror/ftp.altlinux.ru/pub/distributions/ALTLinux/Sisyphus/files/i586/RPMS/mpack-1.6-alt1.i586.rpm

or compile mpack from the sources: http://ftp.andrew.cmu.edu/pub/mpack/.
- Create an empty directory to extract the back up file:

# mkdir recover
# cd recover

and copy backup into it.By default Plesk backup is gzipped (if not, use cat), so run zcat to pass data to munpack to extract content of directories from the backup file:

# zcat DUMP_FILE.gz > DUMP_FILE
# cat DUMP_FILE | munpack

In result you get the set of tar and sql files that contain domains’ directories and databases. Untar the needed directory. For example if you need to restore the httpdocs folder for the DOMAIN.TLD domain:

# tar xvf DOMAIN.TLD.htdocs

Reference: http://parallels.com/

How to protect one Yum repo’s packages from being replaced by packages from another source?

If we use two different repositories, each holding a different version of the same package, only the latest of the two will be installed if you use yum to update that package. This can lead to problems if the third party repository contains a newer version of a core system package than the Red Hat repository.

The yum-protectbase plugin will protect files of the base repository from being replaced by packages from a third party repository.

To install the plugin, use this command:

yum install yum-protectbase

This will install the plugin and its basic configuration file, /etc/yum/pluginconf.d/protectbase.conf

Setting are stored under /etc/yum/pluginconf.d/rhnplugin.conf with a section name matching the repo.id of the channel. You need to add :

protect = yes

To protect a different repository, go to its configuration file in /etc/yum.repos.d/repository.repo and add this line to its configuration

/etc/yum.repos.d/repository.repo

Add

[repository]

protect = 1

You will need to add this for each repository which needs to be protected.

Email notification everytime users run “sudo” on Linux

For Redhat, Centos Systems make sure that sendmail is running on the machine and configured to send out emails.

Run

visudo

Add the following configuration in /etc/sudoers

visudo parses the sudoers file after the edit and will not save the changes if there is a syntax error.

Defaults mail_always
Defaults mailerpath=/usr/sbin/sendmail
Defaults mailto=”root@serverbuddies.com”
Defaults mailsub=”*** Command run via sudo on %h ***”
Defaults mailerflags=”-t”

Enable Alternate Port other than 25 or 587 (via SSH) in Plesk

Make a copy of /etc/xinetd.d/smtp_psa. For this walkthrough the new filename created is smtp_nonstandard. A command like this should work:

cp /etc/xinetd.d/smtp_psa /etc/xinetd.d/smtp_nonstandard

Add these lines to the copy you just made:

vi /etc/xinetd.d/smtp_nonstandard

type = UNLISTED
port = 2525

and change the service name to match the name of the file. A sample smtp_nonstandard looks like this:

service = smtp_nonstandard
type = UNLISTED
socket_type = stream
protocol = tcp
port = 2525
wait = no
disable = no
user = root
instances = UNLIMITED
server = /var/qmail/bin/tcp-env
server_args = -Rt0 /var/qmail/bin/relaylock /var/qmail/bin/qmail-smtpd /var/qmail/bin/smtp_auth /var/qmail/bin/true /var/qmail/bin/cmd5checkpw /var/qmail/bin/true

# Restart xinetd:

/etc/init.d/xinetd restart

# You should now be able to send mail through your server on port 2525. You may pick a different port if you use this method. We suggest choosing a high port number to avoid using commonly used ports on the internet.

SBDavid

Enabling the additional Plesk add-on

Enabling the additional Plesk add-on

There are many feature that can be added on to your Plesk install such as Help Desk, Dr. Web, etc… these features are not available in the default install, but you can easily activate then by buying them from parallels.com.

1. Log into Plesk
2. Click “Server” on the left hand side
3. Click the “License Management” icon
4. Click the “Order Control Panel Add-Ons” icon

Next »