Entries tagged as ‘WHM’
Issue 1
When I am trying to create Postgre DB using Cpanel, I get the following error:
Error from postgres wrapper: PostgreSQL has not been configured by the administrator. Unable to locate pgpass file.
Fix 1
You need to install a Postgres authentication configuration file that uses md5 passwords which works with cPanel. You can do this through WHM.
Login to WHM >> SQL Services >> Postgres Config >> Click on “Install Config”.
Issue 2
Okie now I can create databases with new accounts. But already created accounts have issues. It says database created but it actually not creates and shows the following error in cPanel logs
tail -f /usr/local/cpanel/logs/error_log
ERROR: role “username” does not exist
ERROR: role “username” does not exist
Fix 2
Login to the server as “root” and execute the following command.
cd /var/cpanel/users && for x in *; do su -c “createuser -S -D -R $x” postgres; done
Categories: cPanel
Tagged: cPanel, ERROR: role "username" does not exist, Postgre DB, postgres, Postgresql, Unable to locate pgpass file, WHM
In cPanel servers, the safest way to install PHP modules is to use the cPanel script for Apache-PHP compilation. You can do this as follows.
WHM login >> Main >> Software >> Apache Update
Or from the console execute /scripts/easyapache
Go through each step as follows.
1. Click “start customizing based on profile”
2. Select Apache Version – Click Next to proceed with the current version.
3. Select PHP Major Version – Click Next to proceed with the current version.
4. Select PHP Minor version – Click Next to proceed with the current version.
5. Short option list – Click Exhaustive Options List to view full options.
6 Exhaustive Options List – From here you can select the PHP modules you needed
In this case you need to select ‘GD’ and/or ‘CURL’
7. Click Save & Build to start apache-php compilation.
Once the compilation over you can verify the installed modules using the following command.
[root@servername ~]# php -m
Categories: Linux tutorials · cPanel
Tagged: Apache, cPanel, Curl, easyapache, GD, PHP, WHM
You should able to transfer accounts from your old server to this via WHM as follows. To work this properly you should able to SSH from this sever to the old server without any issue.
WHM login >> Main >> Transfers >> Copy multiple accounts/packages from another server
Here you need to provide the old server IP, SSH port, and root password.
If the above method fails you can transfer accounts manually as follows.
1. Take backup of the accounts using the following script: ( in source server)
# /scripts/pkgacct <account username>
This will create a backup file under /home with name cpmove-<username>.tar.gz
2. Copy(use scp) this file into the target server: (say 99..99.99.99)
# scp cpmove-<username>.tar.gz root@99..99.99.99:/home
3. Restore accounts using the following script:
# /scripts/restorepkg <account username>
Categories: Linux tutorials · cPanel
Tagged: cPanel account transfer, cpmove, pkgacct, scp, WHM