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?
 21 Mar 2016 @ 2:35 PM 

If you need master-master replication for your MySQL server. This example is for Centos 6 x64 but on other Linux OS the process is similar.

 

For example we have two following servers with IPs:
1.1.1.1 SERVER_A
2.2.2.2 SERVER_B

  1. Install MySQL server on both servers.yum -y install mysql-server
  2. By default, MySQL works only with localhost (127.0.0.1), so we need to edit MySQL config file /etc/my.cnf and add followingon SERVER_A:
    server-id = 1
    bind-address = 1.1.1.1
    log_bin = /var/log/mysql/mysql-bin.log
    binlog_do_db = database_for_replication
    #replicate-do-table = database_for_replication.table_for_replication (You can replicate only some table(s))
    More »
Posted By: lvlind
Last Edit: 06 Oct 2016 @ 03:51 PM

EmailPermalinkComments (0)
Tags
 22 Oct 2015 @ 11:07 AM 

If you need fast and stable VPN server – I can recommend SoftEther VPN, installation and usage are pretty simple.

1. Install Development packages:
yum -y groupinstall "Development Tools"

2. Download server installation package here

wget http://www.softether-download.com/files/softether/v4.10-9473-beta-2014.07.12-tree/Linux/SoftEther_VPN_Server/64bit_-_Intel_x64_or_AMD64/softether-vpnserver-v4.10-9473-beta-2014.07.12-linux-x64-64bit.tar.gz

or from my source

3. Unpack into /usr/local/
tar -xvzf softether-vpnserver-v4.10-9473-beta-2014.07.12-linux-x64-64bit.tar.gz -C /usr/local/ More »

Posted By: lvlind
Last Edit: 17 Jan 2017 @ 03:23 PM

EmailPermalinkComments Off on SoftEther VPN server
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.