Plesk: Difference between revisions
Line 29: | Line 29: | ||
=== Running Awstats in plesk === | === Running Awstats in plesk === | ||
{{Notice|Aquired from the following:}} | {{Notice|Aquired from the following:}} | ||
[http://forum.parallels.com/showthread.php?t=91843 Parallels Forum] | |||
update all domains | update all domains | ||
/usr/local/psa/admin/sbin/statistics --calculate-all | /usr/local/psa/admin/sbin/statistics --calculate-all |
Revision as of 18:17, 11 June 2011
Plesk
Location of the vhost in plesk
/var/www/vhosts/HoudiniESQ.com/conf
Turn off Safe_mode in plesk
NOTE-dont forget to replace <domain name>, with the actual domain name.
Create a “vhost.conf” file in “/var/www/vhosts/<domain name>/conf/”
cd /var/www/vhosts/<domain name>/conf/ vim vhost.conf
Insert the following into it.
<Directory /var/www/vhosts/<domain name>/httpdocs> php_admin_value safe_mode off php_admin_value open_basedir none </Directory>
Now run the following to update the conf.
/usr/local/psa/admin/sbin/websrvmng -u --vhost-name=<domain name>
Now restart httpd
service httpd reload
Dumping Databases in Plesk
mysqldump -u admin -p database > .sql
Running Awstats in plesk
Parallels Forum
update all domains
/usr/local/psa/admin/sbin/statistics --calculate-all
Update a single domain
/usr/local/psa/admin/sbin/statistics --calculate-one --domain-name=domain.tld
Email issues
If you ever find that emails are throwing this error on a plesk server while trying to be sent follow the steps below.
tail -f /usr/local/psa/var/log/maillog
I see this:
Nov 29 20:34:15 host X-Qmail-Scanner-2.08st: [host.dokuga.com12910808557906501] clamdscan: corrupt or unknown clamd scanner error or memory/resource/perms problem - exit status 512/2
Nov 29 20:34:15 host X-Qmail-Scanner-2.08st: [host.dokuga.com12910808557906508] clamdscan: corrupt or unknown clamd scanner error or memory/resource/perms problem - exit status 512/2
Nov 29 20:34:15 host X-Qmail-Scanner-2.08st: [host.dokuga.com12910808557906516] clamdscan: corrupt or unknown clamd scanner error or memory/resource/perms problem - exit status 512/2
Nov 29 20:34:15 host X-Qmail-Scanner-2.08st: [host.dokuga.com12910808557906523] clamdscan: corrupt or unknown clamd scanner error or memory/resource/perms problem - exit status 512/2
Then try to update clamd with the following.
freshclam
If that returns this error do the next part if not find another solution.
ClamAV update process started at Mon Nov 29 21:04:07 2010 main.cld is up to date (version: 53, sigs: 846214, f-level: 53, builder: sven) WARNING: Current functionality level = 44, recommended = 53 Please check if ClamAV tools are linked against the proper version of libclamav DON'T PANIC! Read http://www.clamav.net/support/faq ERROR: chdir_tmp: Can't create directory ./clamav-ba29cb18cefd7655eebdcc82d2f7401d WARNING: Incremental update failed, trying to download daily.cvd ERROR: getfile: Can't create new file /var/clamav/clamav-08bf3637d601dae2695c04b7fc08d9ea in /var/clamav Hint: The database directory must be writable for UID 111 or GID 105 WARNING: Can't download daily.cvd from db.us.clamav.net
now do this
cd /var ll | grep clamav
if the results look like this:
drwxr-xr-x 2 qscand qscand 4096 Nov 29 04:34 clamav
You will need to do the following
chown -R qscand. clamav chmod 777 clamav/ freshclam /etc/init.d/clamd restart
Now you should have the following:
drwxrwxrwx 2 qscand qscand 4096 Nov 29 21:22 clamav
And this should solve the problem, as well as have all up to date virus stuff's.
upgrade php in plesk
{notice|Due to recent changes at atomic repos this might not work, proceed to the does not work steps.}
All you have to do is the following.
wget -q -O - http://www.atomicorp.com/installers/atomic.sh | sh yum upgrade php /etc/init.d/httpd restart php -v
After you restart if the output gives you an error about ioncube just reinstall it.
yum search ioncube
now install whatever package it lists, make sure it matched your distro system bit (uname -a)
yum install php-ioncube-loader.x86_64 /etc/init.d/httpd restart php -v
Now everything should work for you, and if this does not work for you do the following.
After you add the atomic repo, just run a:
yum update -y
now all of your php should be version 5.3, at this point if you need to install more modules please do them now.
EXAMPLE mcrypt.
yum search mcrypt
this provides me with this list.
libmcrypt.x86_64 : Encryption algorithms library libmcrypt-devel.x86_64 : Development libraries and headers for libmcrypt php-mcrypt.i386 : Standard PHP module provides mcrypt library support php-mcrypt.x86_64 : Standard PHP module provides mcrypt library support
if you have trouble with mcrypt this is what saved me. http://www.kelvinwong.ca/2009/12/06/install-libmcrypt-and-php-mcrypt-on-centos-5-3-without-losing-too-much-hair/
Now run a uname -a and install all packages that match your systems bit.
yum install libmcrypt.x86_64 libmcrypt-devel.x86_64 php-mcrypt.x86_64
once this has completed you are ready to switch to php 5.2 assuming that you only need to add mcrypt.
now do the following.
rpm -qa | grep php- php-common-5.3-1.el5.art php-devel-5.3-1.el5.art php-xml-5.3-1.el5.art php-pdo-5.3-1.el5.art php-5.3-1.el5.art php-mbstring-5.3-1.el5.art php-imap-5.3-1.el5.art php-mcrypt-5.3-1.el5.art php-cli-5.3-1.el5.art php-mysql-5.3-1.el5.art php-gd-5.3-1.el5.art
you should get the output of all the system php modules, now run the following to complete this task. List everything in the above output in your DOWNGRADE COMMAND.
yum downgrade php php-common php-devel php-xml php-pdo php-mbstring php-imap php-mcrypt php-cli php-mysql php-gd
After this fail of a method has completed please check you php -v and make sure everthing looks correct.