- 追加された行はこの色です。
- 削除された行はこの色です。
*Fedora15 [#h0aa557d]
**SELinux停止 [#da71e5d6]
/etc/sysconfig/selinux ファイルを編集
#SELINUX=enforcing
SELINUX=disabled
**パッケージインストール [#s0a3ea12]
# yum -y install php-mysql
# yum -y install php-pgsql
# yum -y install php-pdo
# yum -y install php-mbstring
# yum -y install php-gd
**サービス自動起動 [#mfb113e6]
# chkconfig httpd on
# chkconfig mysqld on
# chkconfig postgresql on
**PostgreSQL初期化 [#c47e1f03]
-PostgreSQL初期化
# service postgresql initdb
-PHPからのローカルの接続を許可~
/var/lib/pgsql/data/pg_hba.conf ファイルの編集
# "local" is for Unix domain socket connections only
#local all all ident
local all all trust
# IPv4 local connections:
#host all all 127.0.0.1/32 ident
host all all 127.0.0.1/32 trust
# IPv6 local connections:
#host all all ::1/128 ident
host all all ::1/128 trust
**MySQL初期化 [#a4a20381]
-UTF-8対応~
/etc/my.cnf ファイルの編集
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
character_set_server=utf8mb4
[mysql]
default-character-set=utf8mb4
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
**システム再起動 [#g6254538]
# shutdown -r now
**PostgreSQL環境 [#tb592d0a]
# psql -V
psql (PostgreSQL) 9.0.4
コマンドライン編集機能のサポートが組み込まれています。
# su - postgres
-bash-4.2$ psql
postgres=# \l
データベース一覧
名前 | 所有者 | エンコーディング | 照合順序 | Ctype(変換演算子) | アクセス権
-----------+----------+------------------+-------------+-------------------+-----------------------
postgres | postgres | UTF8 | ja_JP.UTF-8 | ja_JP.UTF-8 |
template0 | postgres | UTF8 | ja_JP.UTF-8 | ja_JP.UTF-8 | =c/postgres +
| | | | | postgres=CTc/postgres
template1 | postgres | UTF8 | ja_JP.UTF-8 | ja_JP.UTF-8 | =c/postgres +
| | | | | postgres=CTc/postgres
(3 行)
-[[phpPgAdminのインストール]]
**MySQL環境 [#i1706091]
# mysql -V
mysql Ver 14.14 Distrib 5.5.12, for Linux (i686) using readline 5.1
# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.5.12 MySQL Community Server (GPL)
Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> show variables like 'character\_set\_%';
+--------------------------+---------+
| Variable_name | Value |
+--------------------------+---------+
| character_set_client | utf8mb4 |
| character_set_connection | utf8mb4 |
| character_set_database | utf8mb4 |
| character_set_filesystem | binary |
| character_set_results | utf8mb4 |
| character_set_server | utf8mb4 |
| character_set_system | utf8 |
+--------------------------+---------+
7 rows in set (0.01 sec)
-[[phpMyAdminのインストール]]
-DBの新規作成は「utf8mb4-unicode-ci」で作成