How to update server’s time

I did it on OpenVZ server and it works like a charm

rm -fv /etc/localtime
ln -s /usr/share/zoneinfo/GMT /etc/localtime
or
ln -s /usr/share/zoneinfo/CST6CDT /etc/localtime

Note the sym link may not work, so just copy file physically

Set date and sync it on hardware

date 081209312016
hwclock --systohc

The syntax is `date MMDDhhmmYYYY`.… Read the rest

How to install CSF firewall on CentOS cPanel server

Download and install using:

wget https://download.configserver.com/csf.tgz
tar xfz csf.tgz
cd csf
sh install.sh

Update the following file with a trusted IP addresses

/etc/csf/csf.allow

Go ahead and disable testing mode

sed -i -e 's/TESTING = "1"/TESTING = "0"/g' /etc/csf/csf.conf

Once done, restart your firewall

csf -r

To add your IP address to a permanent allow list use:

csf -a 11.22.33.44

To block an IP address:

csf -d 11.22.33.44

Use following to see the lfd logs

tail -f /var/log/lfd.log
Read the rest

Xubuntu fixing Skype video upside down

To check how its going close your Skype session and run the following from the inside your command line:

bash -c 'LD_PRELOAD=/usr/lib/i386-linux-gnu/libv4l/v4l1compat.so skype'

Its working…

Go ahead and update your Skype luncher on you panel with this line to start fixed Skype

You may create executable file to run Skype session

#!/bin/bashRead the rest

CloudLinux, lveinfo issue

Problem when lveinfo reflects an empty or error results

root@server[~]# lveinfo -u username 

Error while reading lve_version from database

root@server [~]# lveinfo -u username 

+—-+–+—-+—-+—-+—+—+—+—+

|From|To|aCPU|mCPU|lCPU|aEP|mEP|lEP|EPf|

+—-+–+—-+—-+—-+—+—+—+—+

To fix this out:

/etc/init.d/lvestats stop 

mv /var/lve/lveinfo.db /var/lve/lveinfo.db_old 

/etc/init.d/lvestats start 

Stats should start showing in ~1 minute

root@server [~]# lveinfo -u username 

+———–+———–+—-+—-+—-+—+—+—-+—+—+—+—–+—–+—–+—–+—–+——+—+—–+—–+—–+—–+—–+
| From | To |aCPU|mCPU|lCPU|aIO|mIO|lIO |aEP|mEP|lEP|aVMem|mVMem|lVMem|aPMem|mPMem|lPMem |EPf|VMemF|PMemF|aIOPS|mIOPS|lIOPS|
+———–+———–+—-+—-+—-+—+—+—-+—+—+—+—–+—–+—–+—–+—–+——+—+—–+—–+—–+—–+—–+
|07-28 12:35|07-28 12:36| 0 | 1 | 9 | 0 | 3 |3072| 0 | 0 | 20| 0 | 0 | 1.0G| 6.3M| 6.5M|256.0M| 0 | 0 | 0 | 0 | 0 | 1024|
+———–+———–+—-+—-+—-+—+—+—-+—+—+—+—–+—–+—–+—–+—–+——+—+—–+—–+—–+—–+—–+

Done!… Read the rest

Update curl on Centos to the latest version

Find the latest version under the following link:

http://curl.haxx.se/download/?C=M;O=D

For instance curl-7.46.0 version

Download and install it

cd /usr/local/src/
curl http://curl.haxx.se/download/curl-7.46.0.tar.gz | tar xvz
cd curl-7.46.0/
./configure && make && make install
curl -V
Read the rest

How to upgrade ClientExec to the latest version

The update process is really simple

1. Backup your MySQL Database

2. Backup your files

3. Remove from folder where the ClientExec installation is located all except config.php and uploads/ folder

4. Download the latest version from https://www.clientexec.com/download.php?fuse=files&view=FileList

5. Place all files from zip except config.phpRead the rest

How to mount your Android device over WiFi

Install on your android device Samba Server (I believe this best one)

https://play.google.com/store/apps/details?id=com.icecoldapps.sambaserver&hl=en

There is not additional configuration on Windows 7,8. Simply run Windows+R and type here \\XX.XX.XX.XX

Where XX.XX.XX.XX is your device's local IP address

Xubuntu:

Ensure XX.XX.XX.XX is pinging, if not try to either restart WiFi or reboot your phone

Try to mount your device

sudo mkdir /mnt/android/

sudo mount -t cifs //XX.XX.XX.XX/storage
Read the rest

Changing Drupal’s theme via mysql command line

Download for example "garland" theme to ./sites/all/themes folder from

https://www.drupal.org/project/garland

Then:

UPDATE dr_system SET status=1 WHERE name = 'garland';

Then:

UPDATE dr_variable SET value='s:7:"garland"' WHERE name = 'theme_default';
TRUNCATE dr_cache;
TRUNCATE dr_cache_bootstrap;
TRUNCATE dr_cache_block;

Here is Drush method

drush vset theme_default garland
Read the rest