This is happening in one of servers, my colleagues used it as an experiment, install webmin and plesk at once. Plesk wasn’t perfectly install, so i have to clean this up.
Use deinstall plesk command
# /usr/local/psa/admin/bin/deinstall.sh deinstall
Since plesk isn’t a clean and perfect installation (too many components missing), then above command doesn’t work at all. Perhaps this is a special case, in normal situation above command probably work
So use ‘manual’ removal.
Look in to system startup to check whether there are any services belongs to plesk
# chkconfig --list
If there are no services status ‘on’ in system startup, let’s remove plesk (if there is services status ‘on’, stop services)
Since I don’t know what components (the titles of RPM packages) from plesk in the system, find that first
# yum search psa
Now removal process :
# rpm -e psa psa-qmail psa-proftpd psa-autoinstaller psa-hotfix2 psa-pylibplesk psa-proftpd-xinetd psa-selinux psa-courier-imap-add psa-libpam psa-api psa-imp psa-mailman-configurator psa-tomcat-configurator psa-spamassassin psa-locale-base-en-US psa-logrotate psa-php4-configurator psa-horde
There are dependencies error, removal process stop
# rpm -e --nodeps psa
The –nodeps option tells the rpm command to skip the test of dependencies. Only psa removed in command, since dependencies error said psa needed by all components, and psa removed first. Then there is error: %trigger scriptlet failed warning, use :
rpm -q psa --triggers
this –triggers check what happen
then remove using :
rpm -e psa --notriggers
–notriggers ask rpm to remove psa without running the triggers
Plesk is really messed, above command doesn’t work also (i don’t know what my colleague did when he handled that server) so:
rpm --force -e psa
PSA removed, then remove other components (packages)
rpm -e psa-qmail psa-proftpd psa-autoinstaller psa-hotfix2 psa-pylibplesk psa-proftpd-xinetd psa-selinux psa-courier-imap-add psa-libpam psa-api psa-imp psa-mailman-configurator psa-tomcat-configurator psa-spamassassin psa-locale-base-en-US psa-logrotate psa-php4-configurator psa-horde
Shows up %preun and %postun scriptlets error, then
rpm -e --noscripts psa-qmail psa-proftpd psa-autoinstaller psa-hotfix2 psa-pylibplesk psa-proftpd-xinetd psa-selinux psa-courier-imap-add psa-libpam psa-api psa-imp psa-mailman-configurator psa-tomcat-configurator psa-spamassassin psa-locale-base-en-US psa-logrotate psa-php4-configurator psa-horde
Plesk components or packages removed
In normal situation, according to SWSOFT, to deinstall plesk just do following :
1. Need to know the titles of RPM packages
2. To deinstall run the command rpm -e
Now after plesk components removed,
1. Check and delete all databases and database tables used by Plesk
drop database psa;
drop database horde;
2. Open /etc/psa/psa.conf and look up the value assigned to the ‘HTTPD_VHOSTS_D’ variable, and delete : # rm-rf /directory-name/*
3. Delete all data related to mailboxes
# rm -rf /var/qmail/mailnames/*
4. Delete other directories used by plesk
# rm -rf /usr/local/psa
# rm -rf /etc/psa
# rm -rf /var/mailman
# rm -rf /var/drweb
# rm -rf /var/lib/wabalizer
# rm -rf /var/tomcat4 or # rm -rf /var/tomcat5
Plesk have DNS Zone template to setup DNS Zone when you create a domain.
DNS Zone template located in System > Server Administration > Services > DNS.
. NS ns.. . A . MX (10) mail.. / 24 PTR . ftp.. CNAME . mail.. A ns.. A webmail.. A
DNS Zone Template only have one ns (nameserver) by default. Changes template for 2 nameserver, for example
. NS ns1.. . NS ns2.. . A . MX (10) mail.. / 24 PTR . ftp.. CNAME . mail.. A ns1.. A ns2.. A webmail.. A
DNS Zone can be seen in General > Domains > Domain Name > DNS. If you want to change values, just do it in a domain DNS Zone, not in DNS Zone template.
Chrooted DNS doesn’t work with Plesk. That’s why chrooted DNS must remove from CentOS after Plesk installation. Plesk have its own DNS. It’s better not to install chrooted DNS in CentOS, if you are using Plesk
Remove Chrooted DNS
# rpm -e bind-chroot
Chrooted DNS make DNS service in Plesk looks failed, but it’s not (Server > Service Management > DNS Server (Bind)).
Setup Plesk DNS manually.
DNS files is in /var/named, /var/named/run-root/etc, /var/named/run-root/var/named, /var/named/run-root/var directory.
In this case, /var/named and /var/named/run-root/var/named directory have same content (below), except file named.pid in /var/named :
localdomain.zone
localhost.zone
named.broadcast
named.ca
named.ip6.local
named.local
named.zero
DNS configuration (named.conf) in /var/named/run-root/etc must same�with rndc-key , for example :
# Start of rndc.conf
key "rndc-key" {
algorithm hmac-md5;
secret "CeMgS23y0oWE20nyv0x40Q==";
};options {
default-key "rndc-key";
default-server 127.0.0.1;
# default-port 953;
};
# End of rndc.conf# Use with the following in named.conf, adjusting the allow list as needed:
# key "rndc-key" {
# algorithm hmac-md5;
# secret "CeMgS23y0oWE20nyv0x40Q==";
# };
#
# controls {
# inet 127.0.0.1 port 953
# allow { 127.0.0.1; } keys { "rndc-key"; };
# };
Generate rndc-key
# rndc-confgen
Generate rndc-keyStop/Start/Restart BIND
# /etc/init.d/named stop
# /etc/init.d/named start
# /etc/init.d/named restart
Meanwhile, Plesk DNS Zone is in /var/named/run-root/var. Setup Plesk DNS Zone using Plesk Administration Site
Related Topics
Setup Plesk DNS Zone
Setup/Add IP in Plesk is quite simple :
1. Sign On to Plesk Administration Site
2. Choose Server in System Menu (reside in left bar)
3. Choose IP Addresses in System
4. Choose New IP Addresses in IP Adresses management, plesk will show ‘IP Address form’ :
- leave out interface to eth0 (eth0 is a default. If there’s another interface/ethernet card in the system, choose other using a drop down menu)
- fill in an ip address and a subnet mask with to-be ip address and subnet mask
- choose an ip type, shared ip type means that one ip address can be used by one or more domain, exclusive means that one ip address can only be used by one domain
- leave out SSL certificate to a default certificate
- choose OK
Note : Plesk has a based IP already, which is set up in the installation process, do not change this, unless you need to change it. This additional IP can be use as a name server, or an alternative IP for a domain hosted in server
Change IP address :
Using Reconfigurator utility.
This utility allows you to change IPs in Plesk based and reconfigure domain settings with new IPs.
Plesk root directory usually in /usr/local/psa
$Plesk_ROOT_D/bin/reconfigurator.pl
The new IP addresses must NOT exist in Server > IP Addresses list in Plesk control panel before replacement, they may be added on system level only. If IP addresses do not exist in the system, the utility will add new IPs to the system as well.
Instruction :
1 Run the command to create a template file.
2. Edit the file to set an appropriate IP mapping
3. Run the command (number 1) once again.
Map File
The map file will contain the list of your current IP addresses of the
following format, e.g:
eth0:192.168.15.01 255.255.255.0 -> eth0:192.168.15.01 255.255.255.0
Edit the file with to-be IP addresses (please, note that to-be ones come on the right of an arrow sign),e g
eth0:192.168.15.01 255.255.255.0 -> eth0:your_ip_address_to_be 255.255.255.0
For example:
1. $PLESK_ROOT_D/bin/reconfigurator.pl ip_map.txt
2. Modify ip_map.txt file
3. $PLESK_ROOT_D/bin/reconfigurator.pl ip_map.txt
Manual IP Change
IP Setting is saved in /etc/sysconfig/network-scripts directory with ifcfg-eth0 as a configuration file for eth0 interface. This eth0 interface configuration has been set up at centos installation
Open using vi or other text editor
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
If ip address is setup using Plesk Administration site and using same eth0 as a interface (virtual interface), the configuration file will be saved in ifcfg-eth0:1. If base ip in ifcfg-eth0, second ip with same interface will be in ifcfg-eth0:1, and third or fourth, so on will be in ifcfg-eth0:x.
Open using vi or other text editor
# vi /etc/sysconfig/network-scripts/ifcfg-eth0:1
# vi /etc/sysconfig/network-scripts/ifcfg-eth0:2
Change ip address and subnet mask with to-be ip address
Restart the Network
# /etc/init.d/network restart
Log On to Plesk Administration Site
1. Choose Server in System Menu (reside in left bar)
2. Choose IP Addresses in System
3. Choose Re-read IP in IP Addresses Management
We’re running AutoInstaller from Plesk Site.
But before going through that phase, we should change redhat-release content in etc directory
[root@ ~] vi /etc/redhat-release
You’ll see in a redhat-release file, CentOS release 4.4 (Final). Change it to RedHat Enterprise Linux 4
RedHat Enterprise Linux 4
~
~
~
"/etc/redhat-release" 1L, 26C
Run AutoInstaller
Go to where Plesk AutoInstaller reside, e.g root (~) directory, then
# ./psa_redhat
Follow Plesk AutoInstaller instructions
- Set plesk directory,for example /root/psa or /tmp/psa. Plesk directory is a place for keeping software packages, needed by installation.
- Set plesk source to Plesk Site. I suggest Plesk Site as a source, since AutoInstaller need to download software packages. Except if you’re already download all of software packages, and if you get some problem in the end of installation, you can set to Local Source
- Huge download around 100 MB. I suggest reliable Internet Connection
- Choose whatever packages you need for your Plesk Administration in Package Selection. If you want base PSA/Centos Installation, you can desellect all. By Default, Plesk sellect all packages. I have problem with tomcat package, they need a gpg key, which i can’t find anywhere. So i don’t include tomcat package in my selections. Tomcat package isn’t essential, you can deselect them
- Plesk will download software packages and install them for you. If you have a problem, look at installation logs
- Try open Plesk Administrator Site in your browser. You will be asking for license agreement, then domain name, default ip, e-mail, and finally…Finished
We are using an original autoinstaller from Plesk Site to install Plesk 7.5. Download Plesk 7.5 Reloaded here. If you already have an account in Plesk,sign in with your account, but if you don’t, please register
After sign in, choose Red Hat Enterprise Linux 4 (AS/ES) for i 586 distribution, and download Autoinstaller build 75050908.11. Download it to your computer.
Plesk only have a license key for 1 domain. If you want more than 1 domain, you can buy an upgrade license key here after installation
Rename Plesk autoinstaller into a simple name, e.g psa_redhat.
Then upload it to your online repository, e.g your web site (if you don’t have it you can use services like Box)
Download it to your server using wget and put into ~ (root directory)
[root@ ~]# wget url_of_your_psa_autoinstaller
[root@ ~]# chmod +x your_psa_autoinstaller
Then, You Must Install CentOS PGP Key(tutorial here) and Install RedHat GPG Key(tutorial here)
Step 1 is finish for now, we’ll go to step 2 in the next post where we are preparing CentOS and run autoinstaller
UPDATE
CentOS Firewall needs to be disabled. Plesk has its own firewall, and CentOS firewall can interfere, blocking an access to Plesk Administrator Site . I suggest to run it before install Plesk (pre-install)
To disabled it, run :
# system-config-securitylevel
Select disabled and press OK
To check that CentOS firewall has been disabled, run :
# iptables -L
Output :
Chain INPUT (policy ACCEPT)
target prot opt source destinationChain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
SELinux is a security extension of CentOS that should provide extended security. SELinux needs to be disabled
Edit /etc/selinux/config
# vi /etc/selinux/config
Set SELINUX=disabled
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - SELinux is fully disabled.
SELINUX=disabled
# SELINUXTYPE= type of policy in use. Possible values are:
# targeted - Only targeted network daemons are protected.
# strict - Full SELinux protection.
SELINUXTYPE=targeted
Reboot CentOS
# reboot
or
# shutdown -r now
UPDATE
I didn’t succesful install plesk 7.5 reloaded in CentOS 4.x using Plesk 7.5 CentOS 3.3 rpm files.
There is another way to install Plesk 7.5 Reloaded in CentOS 4.x
What you need is :
1. Basic knowledge of Linux (to help a little, i’ll give you a basic linux tutorials in between)
2. CentOS 4.x with minimal configuration
3. Internet Connection (you need this to download source files needed to complete installations)
4. A lot of patient and spirit
I’ll give tutorials in separate posting, so we can easily look every step we’ve made. If you have question, just leave a message or comment
Tutorial :
Pre-Install
Step 1
Step 2
YUM Installation
Step 3