ผลต่างระหว่างรุ่นของ "2. ขั้นตอนการติดตั้งและตั้งค่า mariadb , Postfix , Dovecot"
ไปยังการนำทาง
ไปยังการค้นหา
Tanagan (คุย | มีส่วนร่วม) |
Tanagan (คุย | มีส่วนร่วม) |
||
แถว 12: | แถว 12: | ||
− | 3. | + | 3. ดูสถานะการทำงานของ postfix , dovecot , maridb |
'''# systemctl status postfix''' | '''# systemctl status postfix''' | ||
'''# systemctl status dovecot''' | '''# systemctl status dovecot''' | ||
แถว 20: | แถว 20: | ||
4. ตั้งค่า UTF8 ให้กับ mysql เพื่อให้รองรับภาษาไทย โดยเพิ่มคำสั่งด้าล่างลงใน /etc/my.cnf.d/maridb-server.cnf ใต้ [mysqld] | 4. ตั้งค่า UTF8 ให้กับ mysql เพื่อให้รองรับภาษาไทย โดยเพิ่มคำสั่งด้าล่างลงใน /etc/my.cnf.d/maridb-server.cnf ใต้ [mysqld] | ||
'''# vi /etc/my.cnf.d/mariadb-server.cnf''' | '''# vi /etc/my.cnf.d/mariadb-server.cnf''' | ||
+ | |||
+ | # | ||
+ | # These groups are read by MariaDB server. | ||
+ | # Use it for options that only the server (but not clients) should see | ||
+ | # | ||
+ | # See the examples of server my.cnf files in /usr/share/mysql/ | ||
+ | # | ||
+ | |||
+ | # this is read by the standalone daemon and embedded servers | ||
+ | [server] | ||
+ | |||
+ | # this is only for the mysqld standalone daemon | ||
+ | # Settings user and group are ignored when systemd is used. | ||
+ | # If you need to run mysqld under a different user or group, | ||
+ | # customize your systemd unit file for mysqld/mariadb according to the | ||
+ | # instructions in http://fedoraproject.org/wiki/Systemd | ||
+ | [mysqld] | ||
+ | character-set-server = utf8 | ||
+ | collation-server = utf8_general_ci | ||
+ | skip-character-set-client-handshake | ||
+ | bind-address=127.0.0.1 | ||
+ | datadir=/var/lib/mysql | ||
+ | socket=/var/lib/mysql/mysql.sock | ||
+ | log-error=/var/log/mariadb/mariadb.log | ||
+ | pid-file=/run/mariadb/mariadb.pid | ||
+ | |||
+ | # | ||
+ | # * Galera-related settings | ||
+ | # | ||
+ | [galera] | ||
+ | # Mandatory settings | ||
+ | #wsrep_on=ON | ||
+ | #wsrep_provider= | ||
+ | #wsrep_cluster_address= | ||
+ | #binlog_format=row | ||
+ | #default_storage_engine=InnoDB | ||
+ | #innodb_autoinc_lock_mode=2 | ||
+ | # | ||
+ | # Allow server to accept connections on all interfaces. | ||
+ | # | ||
+ | #bind-address=0.0.0.0 | ||
+ | # | ||
+ | # Optional setting | ||
+ | #wsrep_slave_threads=1 | ||
+ | #innodb_flush_log_at_trx_commit=0 | ||
+ | |||
+ | # this is only for embedded server | ||
+ | [embedded] | ||
+ | |||
+ | # This group is only read by MariaDB servers, not by MySQL. | ||
+ | # If you use the same .cnf file for MySQL and MariaDB, | ||
+ | # you can put MariaDB-only options here | ||
+ | [mariadb] | ||
+ | |||
+ | # This group is only read by MariaDB-10.3 servers. | ||
+ | # If you use the same .cnf file for MariaDB of different versions, | ||
+ | # use this group for options that older servers don't understand | ||
+ | [mariadb-10.3] |
รุ่นแก้ไขเมื่อ 16:24, 3 ธันวาคม 2562
1. ติดตั้ง mariadb , Postfix , Dovecot และ Packet ที่จำเป็นกับ Server
# yum install postfix dovecot mariadb-server dovecot-mysql postfix-mysql
2. สั่ง start service ของ postfix , dovecot , mariadb ทุกครั้งที่เปิด Server
# systemctl start postfix # systemctl start dovecot # systemctl start mariadb # systemctl enable postfix # systemctl enable dovecot # systemctl enable mariadb
3. ดูสถานะการทำงานของ postfix , dovecot , maridb
# systemctl status postfix # systemctl status dovecot # systemctl status mariadb
4. ตั้งค่า UTF8 ให้กับ mysql เพื่อให้รองรับภาษาไทย โดยเพิ่มคำสั่งด้าล่างลงใน /etc/my.cnf.d/maridb-server.cnf ใต้ [mysqld]
# vi /etc/my.cnf.d/mariadb-server.cnf
# # These groups are read by MariaDB server. # Use it for options that only the server (but not clients) should see # # See the examples of server my.cnf files in /usr/share/mysql/ #
# this is read by the standalone daemon and embedded servers [server]
# this is only for the mysqld standalone daemon # Settings user and group are ignored when systemd is used. # If you need to run mysqld under a different user or group, # customize your systemd unit file for mysqld/mariadb according to the # instructions in http://fedoraproject.org/wiki/Systemd [mysqld] character-set-server = utf8 collation-server = utf8_general_ci skip-character-set-client-handshake bind-address=127.0.0.1 datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock log-error=/var/log/mariadb/mariadb.log pid-file=/run/mariadb/mariadb.pid
# # * Galera-related settings # [galera] # Mandatory settings #wsrep_on=ON #wsrep_provider= #wsrep_cluster_address= #binlog_format=row #default_storage_engine=InnoDB #innodb_autoinc_lock_mode=2 # # Allow server to accept connections on all interfaces. # #bind-address=0.0.0.0 # # Optional setting #wsrep_slave_threads=1 #innodb_flush_log_at_trx_commit=0
# this is only for embedded server [embedded]
# This group is only read by MariaDB servers, not by MySQL. # If you use the same .cnf file for MySQL and MariaDB, # you can put MariaDB-only options here [mariadb]
# This group is only read by MariaDB-10.3 servers. # If you use the same .cnf file for MariaDB of different versions, # use this group for options that older servers don't understand [mariadb-10.3]