Socialabel

Monday, July 10, 2017

FTP Client Console Linux Centos

You can use ncftpput. Do the following:
  1. Install ncftp:
    Yum install ncftp
    
    Alternatively:
    apt-get install ncftp
    
  2. Execute the following command:
    ncftpput -R -v -u "ftp-username" ftp.website.com ftp-upload-path local-path/*

Saturday, July 8, 2017

Troubleshoot Postgres

##Backup Seluruh Database
$ pg_dumpall > all.backup.out
OR
$ pg_dumpall | gzip -c > all.backup.out.gz

#Import file dump postgres
psql -U postgres -f backup.out zipruz

#Melihat error pada saat proses import
psql -U postgres -f backup.out zipruz -v ON_ERROR_STOP=1


#CWP postgres
yum install postgresql-contrib

Saturday, April 22, 2017

Troubleshooting Galera

cd /var/lib/mysql

cd /var/lib/mysql

sudo mv  grastate.bat    grastate.bat.bck

sudo mv  gvwstate.bat   gvwstate.bat.bck

Saturday, March 18, 2017

Clear Memory di Linux

Pada sistem operasi linux terdapat 3 cara untuk menghapus memori yang digunakan oleh aplikasi
1. Clear PageCache only.
# sync; echo 1 > /proc/sys/vm/drop_caches

2. Clear dentries and inodes.
# sync; echo 2 > /proc/sys/vm/drop_caches

3. Clear PageCache, dentries and inodes.
# sync; echo 3 > /proc/sys/vm/drop_caches

Thursday, March 9, 2017

Python SMTP Client Pada Google

First, you'll want to allow less secure apps to access your account. For detailed instructions on how to do this, you should check out this page:
  1. Go to the "Less secure apps" section in My Account.
  2. Next to "Access for less secure apps," select Turn on. (Note to G Suite users: This setting is hidden if your administrator has locked less secure app account access.)

If you have 2-step verification enabled on your account, then you'll need to create an app-specific password for less secure apps like this. In that case, you'll need to follow the instructions here:
And finally, if you're still getting an SMTPAuthenticationError with an error code of 534, then you'll need to do yet another step for this to work.
I haven't had to do this last step for my own accounts, but I've read that it doesn't actually work right away. Apparently after you enable less secure apps, you may need to wait a few minutes before trying the 'Display Unlock Captcha' link. If you run in to this problem and find a good way around it, please let us know in the comments!