Socialabel

Wednesday, May 30, 2018

Time Zone Centos 7

timedatectl set-timezone Asia/Jakarta

Tuesday, May 29, 2018

Install MySQLdb Module Mysql Database di Python

You need to use one of the following commands. Which one depends on what OS and software you have and use.
  1. easy_install mysql-python (mix os)
  2. pip install mysql-python (mix os/ python 2)
  3. pip install mysqlclient (mix os/ python 3)
  4. apt-get install python-mysqldb (Linux Ubuntu, ...)
  5. cd /usr/ports/databases/py-MySQLdb && make install clean (FreeBSD)
  6. yum install MySQL-python (Linux Fedora, CentOS ...)

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