Posted by: Master Will | November 23, 2017

Forcing FTP SolusVM backups to run on a SolusVM slave

TP SolusVM backups can get stuck on a SolusVM slave. The way SolusVM backups run is it creates an image of the server whilst it’s still running then places that image into a dump file where it stays whilst it is uploaded to your backup server. If the upload is interrupted then the image will stay in the dump file and take up space. You should remove this file and follow the below to restart the SolusVM backups.

First, let’s remove the file that the server uses to run backups

rm -rf /usr/local/solusvm/tmp/ftpbackup.pid

Then you need to restart the FTP service again by issuing;

php /usr/local/solusvm/includes/autoftpbackup.php
or
/usr/bin/php /usr/local/solusvm/includes/autoftpbackup.php --debug=1
If you see errors you can run this command with debugging to find out what is causing them;
php /usr/local/solusvm/includes/autoftpbackup.php --mode=all --debug=1
Advertisements
Posted by: Master Will | October 21, 2017

IMAP on DirectAdmin

If you need imap compiled into php, run these pre-install commands:
CentOS

yum -y install pam-devel

Debian

apt-get install libc-client-dev

Once pre-install is done for your OS, run the following:

cd /root
wget files.directadmin.com/services/all/imap_php.sh
chmod 755 imap_php.sh
./imap_php.sh

supports both CustomBuild 1.x and 2.x.
For CB2, it will automatically detect the configure.phpX path.

Posted by: Master Will | October 4, 2017

Speed Test CLI on Linux

#### Install software
wget -O speedtest-cli https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py
chmod +x speedtest-cli

#### Run speed test
./speedtest-cli –server 2953 –share

 

Credit: https://www.cyberciti.biz/faq/install-speedtest-cli-on-centos-redhat-fedoa-scientific-to-measure-internetspeed/

Posted by: Master Will | October 2, 2017

Using Curl to upload file instead of FTP

curl -T /vz/dump/vzdump-001.tgz ftp://yourhostname.com/backups/ –user root:yourrootpass

Posted by: Master Will | October 2, 2017

Let’s encrypt SSL on DirectAdmin

yum -y update
/usr/bin/openssl req -x509 -newkey rsa:2048 -keyout /usr/local/directadmin/conf/cakey.pem -out /usr/local/directadmin/conf/cacert.pem -days 9000 -nodes
chown diradmin:diradmin /usr/local/directadmin/conf/cakey.pem
chmod 400 /usr/local/directadmin/conf/cakey.pem

cd /usr/local/directadmin/conf/
perl -pi -e ‘s/SSL=0/SSL=1/’ directadmin.conf
service directadmin restart

echo “letsencrypt=1” >> directadmin.conf
echo “enable_ssl_sni=1” >> directadmin.conf
cd /usr/local/directadmin/custombuild
./build update
./build rewrite_confs
./build letsencrypt
vi /etc/httpd/conf/extra/httpd-alias.conf
###### And make sure you see this line
Alias /.well-known “/var/www/html/.well-known”
service httpd restart
service directadmin restart

 

Then login to DirectAdmin UI and select menu named “SSL Certificates” at the user level.

Note: If you want the server hostname using LetsEncrypt then do below:
cd /usr/local/directadmin/scripts
./letsencrypt.sh request your.hostname.com 4096
cd /usr/local/directadmin/conf
perl -pi -e ‘s/SSL=0/SSL=1/’ directadmin.conf
echo “carootcert=/usr/local/directadmin/conf/carootcert.pem” >> directadmin.conf
echo “force_hostname=your.hostname.com” >> directadmin.conf
echo “ssl_redirect_host=your.hostname.com” >> directadmin.conf
service directadmin restart

 

—– Troubleshoot —-

Cannot Execute Your Request

Details

Getting challenge for parniagroup.com from acme-server…
User let’s encrypt key has been found, but not registered. Registering…
Account registration error. Response: HTTP/1.1 100 Continue
Expires: Wed, 03 Aug 2016 08:08:26 GMT
Cache-Control: max-age=0, no-cache, no-store
Pragma: no-cache

HTTP/1.1 400 Bad Request
Server: nginx
Content-Type: application/problem+json
Content-Length: 265
Boulder-Request-Id: vdS0ublv2yTS3g8BkAW4mjM9f-HCiYV6DgYrfCkaLqI
Replay-Nonce: QUnGB2x_ZY1sJRrGG3MgS9fwtegzDawR8xj1uJ4E50o
Expires: Wed, 03 Aug 2016 08:08:27 GMT
Cache-Control: max-age=0, no-cache, no-store
Pragma: no-cache
Date: Wed, 03 Aug 2016 08:08:27 GMT
Connection: close

{
“type”: “urn:acme:error:malformed”,
“detail”: “Provided agreement URL [https://letsencrypt.org/documents/LE-SA-v1.0.1-July-27-2015.pdf] does not match current agreement URL [https://letsencrypt.org/documents/LE-SA-v1.1.1-August-1-2016.pdf]”,
“status”: 400
}.

———————————————-

Well, they have changed their license agreement and that broke the Let’s Encrypt client used in DA. Please use CustomBuild 2.0 (at least rev. 1572) to update letsencrypt.sh script:

cd /usr/local/directadmin/custombuild
./build update
./build letsencrypt

Alternatively, “./build update_versions” can be used as well. The newest version of CustomBuild 2.0 is only available on files1.directadmin.com and files2.directadmin.com fileservers at the moment, other mirrors might take up to 24 hours to update.

To download the file manually (without CustomBuild), just execute:

wget -O /usr/local/directadmin/scripts/letsencrypt.sh http://files1.directadmin.com/services/all/letsencrypt.sh

Posted by: Master Will | April 8, 2017

Solusvm auto FTP backup shown ftpbackup.pid already exists

If you see error like below in “Auto FTP backup” feature

/usr/local/solusvm/tmp/ftpbackup.pid already exists. Is backup already runing?

 

Just delete the file /usr/local/solusvm/tmp/ftpbackup.pid and the SolusVM backup will run fine.

rm -rf /usr/local/solusvm/tmp/ftpbackup.pid

Posted by: Master Will | April 2, 2017

Auto FTP backup — debug

Run this command on solusvm master node.

/usr/bin/php /usr/local/solusvm/includes/autoftpbackup.php –debug=1

Posted by: Master Will | July 14, 2016

SolusVM – Moving the SolusVM Master

Moving the SolusVM Master

Posted by: Master Will | July 14, 2016

SolusVM – Change to Standard Web Ports

Change to Standard Web Ports

Posted by: Master Will | April 20, 2016

NetworkManager for CentOS

yum install system-config-network-tui
system-config-network

Older Posts »

Categories