20 Apr 2017 @ 9:18 AM 

The most common problem with postgresql – it uses ASCII charset by default, and if you want to create database in UTF8, you can see the error “(UTF8) is incompatible with the encoding of the template database”.

Use these few easy steps to solve it:

  1. su - postgres
  2. psql
  3. UPDATE pg_database SET datistemplate = FALSE WHERE datname = 'template1';
  4. DROP DATABASE template1;
  5. CREATE DATABASE template1 WITH TEMPLATE = template0 ENCODING = 'UTF8';
  6. UPDATE pg_database SET datistemplate = TRUE WHERE datname = 'template1';
  7. \c template1
  8. VACUUM FREEZE;

Now you can use template1 for creation of your database.

Posted By: lvlind
Last Edit: 20 Apr 2017 @ 09:18 AM

EmailPermalinkComments (0)
Tags
Tags: , , , ,
Categories: How to?
 15 Nov 2012 @ 9:09 AM 

Building FFmpeg on CentOS:

1. Update and install build environment:

yum update
yum install make automake autoconf libtool gcc-c++

2. Install YASM:

cd /tmp
wget http://pkgs.repoforge.org/yasm/yasm-1.1.0-1.el5.rf.x86_64.rpm
rpm -ivh yasm-1.1.0-1.el6.rf.x86_64.rpm

More »

Posted By: lvlind
Last Edit: 06 Oct 2016 @ 03:54 PM

EmailPermalinkComments Off on Centos 5 FFmpeg
Tags
Tags: , ,
Categories: How to?
 07 May 2012 @ 2:49 PM 

Check what the current timezone is:

date

For example, the result is:

Mon May 7 17:42:57 EEST 2012

To change the timezone first look at what timezones are available by running the following command on the command line interface:

ls /usr/share/zoneinfo/

As a result you’ll see:


[root@host1 ~]# ls /usr/share/zoneinfo
Africa Australia Cuba Etc GMT0 Iceland Japan MST Poland right Universal Zulu
America Brazil EET Europe GMT-0 Indian Kwajalein MST7MDT Portugal ROC US
Antarctica Canada Egypt Factory GMT+0 Iran Libya Navajo posix ROK UTC
Arctic CET Eire GB Greenwich iso3166.tab MET NZ posixrules Singapore WET
Asia Chile EST GB-Eire Hongkong Israel Mexico NZ-CHAT PRC Turkey W-SU
Atlantic CST6CDT EST5EDT GMT HST Jamaica Mideast Pacific PST8PDT UCT zone.tab

Simply import new timezone:

cat /usr/share/zoneinfo/Europe/Kiev > /etc/localtime

or

rm /etc/localtime
ln –s /usr/share/zoneinfo/Europe/Kiev /etc/localtime

More »

Posted By: lvlind
Last Edit: 06 Oct 2016 @ 04:13 PM

EmailPermalinkComments Off on How to set date or change timezone on CentoS
Tags
Tags: ,
Categories: How to?

 Last 50 Posts
Change Theme...
  • Users » 1
  • Posts/Pages » 34
  • Comments » 0
Change Theme...
  • VoidVoid « Default
  • LifeLife
  • EarthEarth
  • WindWind
  • WaterWater
  • FireFire
  • LightLight

About



    No Child Pages.

Need Help?



    No Child Pages.

Check your IP



    No Child Pages.