Skip to content

Commit bd54c64

Browse files
committed
Add sample MariaDB and Memcached configs
1 parent 35f87ef commit bd54c64

File tree

3 files changed

+37
-3
lines changed

3 files changed

+37
-3
lines changed

CONTRIBUTING.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,15 @@ Configure these such that nginx is a fastcgi proxy to php-fpm. You'll then run
9191

9292
You should point nginx/php-fpm at the `/main.php` file for all requests.
9393

94-
MariaDB can be seeded by importing the contents of: `/etc/database.sample.sql`
95-
96-
Memcached memory could be increased in: `/etc/sysconfig/memcached`
94+
MariaDB should be configured with the `TRADITIONAL,NO_AUTO_VALUE_ON_ZERO` modes.
95+
A sample configuration can be found `etc/mysql-server.sample.cnf`. MariaDB data
96+
can be seeded by importing the contents of: `/etc/database.sample.sql`
97+
98+
Memcached does not require extra configuration from its package defaults, but
99+
a sample configuration is available at `etc/memcached.sample.conf`. Memcached
100+
settings typically are saved to `/etc/sysconfig/memcached` and increasing the
101+
memory Memcached can use is typically recommended but not required for a
102+
development environment.
97103

98104
The PHP date timezone should be in UTC, though the code will configure PHP for
99105
this on its own.

etc/memcached.sample.conf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
PORT="11211"
2+
USER="memcached"
3+
MAXCONN="1024"
4+
CACHESIZE="256"
5+
OPTIONS="-l 127.0.0.1,::1"

etc/mysql-server.sample.cnf

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
[mysqld]
2+
bind-address=*
3+
binlog-format=row
4+
character-set-server=utf8
5+
collation-server=utf8_unicode_ci
6+
datadir=/var/lib/mysql
7+
default-storage-engine=InnoDB
8+
innodb-buffer-pool-size=640M
9+
innodb_buffer_pool_instances=1
10+
innodb_file_per_table=ON
11+
innodb_log_file_size=80M
12+
log-bin=/var/lib/mysql/mysql-log-bin
13+
max-allowed-packet=512M
14+
max-connections=160
15+
max-heap-table-size=32M
16+
performance_schema=ON
17+
query_cache_size=16M
18+
query_cache_type=1
19+
server-id=1
20+
socket=/var/lib/mysql/mysql.sock
21+
sql-mode=TRADITIONAL,NO_AUTO_VALUE_ON_ZERO
22+
thread_cache_size=4
23+
tmp-table-size=32M

0 commit comments

Comments
 (0)