2017年06月08日

CentOS7 PostgreSQL9.2.18 (バンドル)

cat /etc/redhat-release
arch
 psql --version
Screenshot from 2017-06-07 14-15-34.png


postgresql-setup initdb


Screenshot from 2017-06-08 11-58-18.png




systemctl start postgresql.service
su postgres
psql

psql: サーバに接続できませんでした: そのようなファイルやディレクトリはありません
                              ローカルにサーバが稼動していますか?
                              Unixドメインソケット"/var/run/postgresql/.s.PGSQL.5432"で通信を受け付けていますか?
Screenshot from 2017-06-08 12-41-15.png




systemctl start postgresql.service
su postgres

psql
\l
Screenshot from 2017-06-08 12-44-47.png





Firewall 5432 port をopen
firewall-cmd --add-port=5432/tcp --zone=public --permanent
firewall-cmd --reload            
posted by a23 at 12:36| Comment(0) | PostgreSQL

2017年06月07日

CentOS7 MariaDB 5.5.52 (バンドル)


vi /etc/my.cnf

systemctl enable mariadb.service

systemctl start mariadb.service

mysql_secure_installation


mysql -u root -p

Screenshot from 2017-06-07 14-34-48.png

SHOW variables like 'character_set%';
Screenshot from 2017-06-07 14-34-48.png
文字コードりセットは、最初にやっておく。


Screenshot from 2017-06-08 13-17-58.png

ls /usr/share/mysql/my*.cnf
Screenshot from 2017-06-07 16-35-13.png



/usr/share/mysql/my-huge.cnf
/usr/share/mysql/my-medium.cnf
/usr/share/mysql/my-innodb-heavy-4G.cnf
/usr/share/mysql/my-small.cnf
/usr/share/mysql/my-large.cnf

cp /usr/share/mysql/my-lage.cnf /etc/my.cnf.d/server.cnf
cp /usr/share/mysql/my-huge.cnf /etc/my.cnf.d/server.cnf
cp /usr/share/mysql/my-large.cnf /etc/my.cnf.d/server.cnf
cp /usr/share/mysql/my-innodb-heavy-4G.cnf /etc/my.cnf.d/server.cnf

vi /etc/my.cnf.d/server.cnf
[client]
default-character-set = utf8
[mysqld]
character-set-server = utf8






https://downloads.mariadb.org/mariadb/repositories/#mirror=yamagata-university&distro=CentOS&distro_release=centos7-amd64--centos7&version=10.1

CentOS7のMariaDB5.5を10.1にアップグレードする
http://qiita.com/egnr-in-6matroom/items/6dbb684ff03a228947bd



/etc/yum.repos.d/MariaDB.repo
-------------------------------------------------------------------------------------
# MariaDB 10.1 CentOS repository list

[mariadb]
name = MariaDB
gpgcheck=1
-------------------------------------------------------------------------------------
sudo systemctl stop mariadb
sudo yum update mariadb-server -y
sudo systemctl start mysql


SHOW variables like 'character_set%';
Screenshot from 2017-06-07 17-12-18.png



posted by a23 at 14:30| Comment(0) | MySQL

CentOS7 PostgreSQL9.2.18 (バンドル)


cat /etc/redhat-release
arch
 psql --version
Screenshot from 2017-06-07 14-15-34.png




cd /var/lib/pgsql
su postgres
initdb --encoding=UTF8 --locale=C --pgdata=/var/lib/pgsql/data
initdb --encoding=UTF8 --no-locale --pgdata=/var/lib/pgsql/data
Screenshot from 2017-06-08 16-00-29.png

---------------------------------
///postgresql-setup initdb
---------------------------------

Screenshot from 2017-06-08 11-58-18.png



systemctl start postgresql.service
su - postgres
psql
\l
Screenshot from 2017-06-07 14-19-04.png

Firewall 5432 port をopen
firewall-cmd --add-port=5432/tcp --zone=public --permanent
firewall-cmd --reload             
Screenshot from 2017-06-09 11-15-31.png






posted by a23 at 14:18| Comment(0) | PostgreSQL