Archive for the ‘Plesk’ Category

Installation of Plesk in CloudLinux

Monday, July 5th, 2010

Glad to submit the result of our recent workshop with CloudLinux. The key is to disable SELinux.

1.Login to the CloudLinux as root.

# uname -i

i586

2.Check SELinux status, we have it disabled but still… execute “getenforce” it should say “Disabled” or “Not enforcing”. If it’s enforcing, disable it by executing: “setenforce 0″.

# getenforce

Disabled

3. Update yum

# yum update –exclude=xorg* –exclude=kernel* –exclude=cloudlinux-release*

4.Change your working directory to where you want to download the Auto-installer utility:

# mkdir /root/plesk

# cd /root/plesk

5.Once done, download the Auto-installer utility that suits your operating system and save it on your server’s hard drive :

# wget http://download1.parallels.com/Plesk/PPP9/CloudLinux5/parallels_installer_v3.6.0_build100407.15_os_CloudLinux_5_i386

6 Set the execution permission for Auto-installer:

# chmod +x parallels_installer_v3.6.0_build100407.15_os_CloudLinux_5_i386

7.Run the Auto-installer:

# ./parallels_installer_v3.6.0_build100407.15_os_CloudLinux_5_i386

8.Read installation notes displayed on the screen and type ‘n’ to proceed to the next screen. Press ENTER.

Select the product versions that you want to install: type the number corresponding to the product version you need and press ENTER, then type ‘n’ and press ENTER to continueThe packages will be downloaded and installed. When the installation is finished, Parallels Plesk Panel will start automatically.

9.Now to complete the initial configuration, log in to the Parallels Plesk Panel running on your host at https://machine.domain.name:8443/ or https://IP-address:8443/. Use the username ‘admin‘ and password ‘setup‘ (both are case sensitive). For security reasons, change the password upon initial login.

Next week, we will have something interesting to show in the Linux HA segment.

Plesk User Detail

Monday, March 29th, 2010

Here is how you can find your users email , database and ftp details from psa database .

mysql> use psa ;

Database changed

EMAIL ACCOUNT DETAILS

mysql> SELECT mail.mail_name, accounts.password, domains.name FROM mail, accounts, domains WHERE domains.id=mail.dom_id AND mail.account_id=accounts.id;

DATABASE USER DETAILS

mysql> SELECT domains.name, data_bases.name, data_bases.type , db_users.login,accounts.password FROM domains, data_bases, db_users, accounts WHERE domains.id=data_bases.dom_id AND data_bases.id=db_users.db_id AND db_users.account_id=accounts.id;

FTP / SYSTEM USER DETAILS

mysql> SELECT domains.name, sys_users.login, accounts.password, sys_users.home, sys_users.shell, sys_users.quota FROM domains, accounts, hosting, sys_users WHERE domains.id=hosting.dom_id AND hosting.sys_user_id=sys_users.id AND sys_users.account_id=accounts.id;

Enjoy!

How to install software’s using Plesk Autoinstaller

Friday, November 27th, 2009

Plesk Auto-Installer is a utility used by Plesk control panel for retrieving and installing software updates and upgrades . This article describes how to install software’s from back-end .

Lets see how to install webmail using autoinstaller . Control Panel shows webmail is not installed and is grayed out .

webmail

1) Ssh to your server .

2) Search for the binary autoinstaller. Most probably it should be under /usr/local/psa/bin/

# cd /usr/local/psa/bin/

3) Check for various options available .

[root@admin /usr/local/psa/admin/bin]# ./autoinstaller –help

It should list something like

Usage: parallels_installer [OPTIONS]

Product and operating system updates source:

–source <URL or absolute path to .inf3 file>

URL (http://your-mirror.com/) or absolute path

to an .inf3 file on your hard disk.

Examples:

‘http://autoinstall-ctp.plesk.com/’

‘/root/parallels/PSA_8.1.0/plesk-8.1.0-deb3.1-i386.inf3′

–disable-plesk-sys-updates

Do not use operating system updates shipped

with Plesk and other product(s)

–add-source <type,priority,url[,username,environment variable with password]>

Specify the additional source of packages.

You can specify either of the following source

types: repodata, directory.

Examples:

‘repomd,500,http://download.fedora.redhat.com/fedora/updates/2/i386′

‘directory,500,/mnt/updates’

–show-additional-source-types

Show possible source types for –add-source

–show-additional-sources

Show the additional sources you configured

Proxy server options:

–proxy-host <host> When using a proxy server or a firewall, use this

option to specify the proxy server’s domain name

or IP address.

–proxy-port <port> Default port for connecting to proxy server is 3128.

If your proxy server uses a different port number,

you should specify it using this option.

–proxy-user <user> Set username for authorization at the proxy server

–proxy-password <password>

Set password for authorization at the proxy server

Select a product version:

–select-product-id <product id>

Select the product name

(‘plesk’ (by default) or ‘sitebuilder’)

–select-release-id <release id>

Use this option to specify the product version that you

want to install or whose properties you want to view.

–select-release-latest

Select the latest product version available for

your operating system

–select-release-current

Select the same product version as the one installed

on your machine

Options for selecting components:

–install-component <component id>

Install the product component with specified

identifier

–install-everything

Install all components of the selected product version

–upgrade-installed-components

Upgrade all installed components of the selected

product version

Installer options:

–allow-kernel-install

Allow kernel upgrade. By default, the auto-installer

does not make any kernel upgrades.

Note that auto-installer installs new kernels to the system, leaving the older

kernel aside so that you can revert to it at any time.

–ignore-key-errors

Allow upgrading product even if upgrade of the license

key fails.

–use-existing-ports

FreeBSD specific option

(You may want to use this to prepare the machine for installing the product.)

–no-space-check Install packages even if you are low on disk space.

Use the following options for selecting and installing packages,

and setting up mirrors:

–show-releases Specify this option to retrieve a list of available

product versions for the operating system where the

auto-installer is executed. You will be given a list

of release identifiers and release descriptions.

The release identifiers are what you will need to

deal with.

–show-all-releases This option shows all product versions available from

the official product updates server.

–show-os-list Use this option to find out on which operating systems

the product version you selected can run.

–show-components Use this option to obtain the information on the

components available for the selected product version.

Components descriptions and names will be displayed.

The component names are what you need to specify when

selecting additional components to install.

–show-packages Show additional packages required for installation of

selected components.

–mirror-os <id> This option activates the mirroring feature in

auto-installer. If you want to mirror product versions

for different operating systems, you should specify

this option per each operating system.

–install-package <name>

Install package with specified name

Options for interaction with other software:

–enable-xml-output Specify this option to have all output of

auto-installer in XML format. Note that this option

disallows auto-installer to report errors by exit code.

Exit code is always zero and all errors are reported

inside XML output.

–query-status Use this option to find out if auto-installer is

active. This will return either an exit code

(0 – auto-installer is idle, 1 – auto-installer is

running and busy), or XML-formatted output.

–check-updates Specify this option to check the updates server for

updates applicable to your product version.

A list of releases that you can update or upgrade to

will be shown.

–no-daemon Perform installation process in the foreground

–web-interface Opens the Web-based installation wizard in

a Web browser.

–ssl-cert <file.pem>

Specifies the path to the SSL certificate file that

should be used for securing connections.

–without-ssl Specifies that connections to the Web-based

installation wizard will not be secured.

FreeBSD specific options:

–cvsup-host <hostname>

Hostname of CVS server for retrieving updates for

FreeBSD ports

Override operating system detection results:

–override-os-name <arg>

Override detected operating system name

–override-os-vendor <arg>

Override detected operating system vendor

–override-os-version <arg>

Override detected operating system version

–override-os-arch <arg>

Override detected operating system architecture

–override-environment <arg>

Override detected environment

(possible values are ‘dedicated’, ‘vz’, ‘vserver’)

Interactive user interface options:

–no-clear Do not clear screen when moving between wizard’s pages

General options:

–target <dir> The directory where downloaded files must be stored.

–notify-email <email>

Use this option to have the auto-installer send you

status reports by e-mail. A successful completion

report includes a list of installed or upgraded

packages with a detailed log.

–truncate-log Clear log file on auto-installer start

–separate-log Use new log file for each start of auto-installer

–debug Turn on detailed output into log file

–version Show auto-installer’s version

–usage,

–help Show this help page

That clearly shows what does each option do .

You can see all the product versions using :-

[root@admin /usr/local/psa/admin/bin]# ./autoinstaller –show-all-releases

Downloading the file products.inf3: 100% done.

Downloading the file plesk.inf3: 10%..21%..30%..41%..50%..61%..70%..81%..90%..100% done.

Downloading the file ppsmbe.inf3: 76%..100% done.

Downloading the file sitebuilder.inf3: 15%..35%..55%..96%..100% done.

Downloading the file sso.inf3: 10%..24%..37%..51%..64%..78%..91%..100% done.

Downloading the file setemplates.inf3: 38%..87%..100% done.

— prod_id release_id (description) —

plesk PLESK_9_2_3 (Parallels Plesk Panel 9.2.3)

plesk PLESK_9_2_2 (Parallels Plesk Panel 9.2.2)

plesk PLESK_9_2_1 (Parallels Plesk Panel 9.2.1)

plesk PLESK_9_0_1 (Parallels Plesk Panel 9.0.1)

plesk PLESK_9_0_0 (Parallels Plesk Panel 9.0.0)

plesk PLESK_8_6_0 (Plesk 8.6.0)

plesk PLESK_7_5_4 (Plesk 7.5.4)

plesk PLESK_8_0_0 (Plesk 8.0.0)

plesk PLESK_8_0_1 (Plesk 8.0.1)

plesk PLESK_8_1_0 (Plesk 8.1.0)

plesk PLESK_8_1_1 (Plesk 8.1.1)

plesk PLESK_8_2_0 (Plesk 8.2.0)

plesk PLESK_8_2_1 (Plesk 8.2.1)

plesk PLESK_8_3_0 (Plesk 8.3.0)

plesk PLESK_8_4_0 (Plesk 8.4.0)

ppsmbe PPSMBE_10_0_0 (Parallels Small Business Panel 10.0.0)

sitebuilder SB_4_5_0 (Sitebuilder 4.5.0)

sso SSO_2_0 (SSO 2.0)

sso SSO_2_1 (SSO 2.1)

To retrieve a list of components for the “selected product version”, you can use

[root@admin /usr/local/psa/admin/bin]# ./autoinstaller –select-release-id PLESK_8_6_0 –show-components

Here I have selected product version as PLESK_8_6_0 Or else with the current release if I need to see what all components can be installed and what are already installed .

4 ) [root@admin /usr/local/psa/admin/bin]# ./autoinstaller –select-release-current –show-components

Downloading the file products.inf3: 100% done.

Downloading the file plesk.inf3: 10%..21%..30%..41%..50%..61%..70%..81%..90%..100% done.

Downloading the file ppsmbe.inf3: 33%..76%..100% done.

Downloading the file sitebuilder.inf3: 15%..35%..55%..96%..100% done.

Downloading the file sso.inf3: 10%..24%..37%..64%..78%..100% done.

Downloading the file setemplates.inf3: 38%..87%..100% done.

Checking for installed packages…

Downloading the file PSA_9.2.3/plesk-9.2.3-fr6.1-i386.inf3: 12%..21%..30%..44%..53%..71%..80%..93%..100% done.

Preparing ports for product installation:

Removing unnecessary packages from the system.

done

Preparing ports for product installation:

Deploying product ports…

Downloading the file PSA_9.2.3/dist-pkg-FreeBSD-6.1-i386/ports/ports-common.tar.gz: 10%..20%..30%..40%..50%..60%..70%..80%..90%..100% done.

Downloading the file PSA_9.2.3/dist-pkg-FreeBSD-6.1-i386/ports/psa-ports-9.2.3.tar.gz: 10%..20%..30%..40%..50%..60%..70%..80%..90%..100% done.

done

Re-installing port ‘swsoft/ports-common’…done

Detecting installed product components.

Detecting installed product components.

base [up2date] – Base packages of Plesk

psa-autoinstaller [up2date] – Plesk Updater

postgresql [up2date] – PostgreSQL server support

vault [install] – Application vault packages

ppwse [install] – Plesk Professional Web Site Editor

api [up2date] – Plesk API [former Plesk Agent]

pmm-ded [install] – Plesk migration manager

sb-publish [install] – SiteBuilder publishing support for Plesk

sbm [install] – SiteBuilder module migration suite

miva [install] – Miva Empresa support

billing [install] – Plesk billing

mod-bw [install] – Bandwidth Limiter For Apache support (mod_bw)

asp [install] – Apache ASP support

java [install] – Tomcat Java Servlets support

mod_python [install] – Apache mod_python module

ruby [install] – Ruby on Rails support

php4 [install] – PHP4 support

php5 [up2date] – PHP5 support

qmail [up2date] – Qmail mailserver

postfix [install] – Postfix mailserver

psa-firewall [install] – Plesk Firewall module

psa-vpn [install] – Plesk VPN module

psa-fileserver [install] – Plesk Fileserver module and SMB file server package

sshterm [install] – SSHTerm – SSH Terminal java applet

watchdog [install] – Watchdog (System monitoring module)

mailman [up2date] – Mailman mailing list manager support

kav [install] – Kaspersky antivirus module

drweb [up2date] – Dr. Web antivirus

spamassassin [install] – SpamAssassin support

backup-ded [install] – Plesk Backup Manager

de-DE-locale [install] – German language pack

ja-JP-locale [install] – Japanese language pack

es-ES-locale [install] – Spanish language pack

ru-RU-locale [install] – Russian language pack

fr-FR-locale [install] – French language pack

it-IT-locale [install] – Italian language pack

zh-CN-locale [install] – Chinese language pack for China

zh-TW-locale [install] – Chinese language pack for Taiwan

nl-NL-locale [install] – Dutch language pack for Netherlands

horde [install] – Horde webmail support

atmail [install] – AtMail webmail support

If you want to install backup for the selected product version PLESK_8_6_0 , use

./autoinstaller –select-release-id PLESK_8_6_0 –install-component backup-ded

(Give the correct component name shown under show-components.It may vary)

Or for the current release if you need webmail

5) [root@admin /usr/local/psa/admin/bin]# ./autoinstaller –select-release-current –install-component horde

After this completes you should be able to access webmail .

webmail2

More details on downloading the auto-installer binary can be found here .

P.S Before you start , always take the backup of plesk psa database , just in case if anything went wrong . ‘Better safe than sorry’ ;)

cd /var/lib/mysql

mysqldump -uadmin -p`cat /etc/psa/.psa.shadow` psa > psabackup.sql

How to manage Qmail queue in Linux Plesk

Tuesday, October 20th, 2009

Plesk server uses qmail as a mail server. Following are some of the qmail commands for Plesk server.

1) To check the mail queue in plesk from command line, you can use the command :

# /var/qmail/bin/qmail-qstat

messages in queue: 10

messages in queue but not yet preprocessed: 0

2) You can examine the queue with qmail-qread.

# /var/qmail/bin/qmail-qread

q1

3) From the qread command you get the message’s id . In the above example , one of the id is 524514 . Now you can find the file holding the email in/var/qmail/queue with “find “command.

# find /var/qmail/queue -iname 524514

/var/qmail/queue/remote/22/524514

/var/qmail/queue/mess/22/524514

/var/qmail/queue/info/22/524514

4) From the mail header you get the IP address.

# vi /var/qmail/queue/mess/22/524514

q2

5) If you wish to remove the emails with some patterns , you can use qmail-remove ( You can download it from http://www.linuxmagic.com/opensource/qmail/qmail-remove )

# /etc/init.d/qmail stop (Stop qmail before removing)

# /var/qmail/bin/qmail-remove -r -p “Time Passing”

(considering that “Time Passing” was the subject of the email )

The above steps can be used to track Spammers .

Do you wish to completely remove all the mails from queue? Just run the below commands.

find /var/qmail/queue/mess -type f -exec rm {} \;

find /var/qmail/queue/info -type f -exec rm {} \;

find /var/qmail/queue/local -type f -exec rm {} \;

find /var/qmail/queue/intd -type f -exec rm {} \;

find /var/qmail/queue/todo -type f -exec rm {} \;

find /var/qmail/queue/remote -type f -exec rm {} \;