You are not logged in.

#1 2011-01-06 23:22:24

art84
Member
Registered: 2010-12-05
Posts: 41

MySQL custom build from sources best practices advices

Hi,

These days I'm setting up something that could be called a home server, basically a web server with DB support.
Of course it's based on Arch Linux (probably not the best choice while everyone around is speaking about CentOS, RHLE, Debian, etc as server-oriented linuxes, anyway I hope Arch is not worse).
Every application I need is available in packages, but the idea is to build every app to a custom and better organized location.

I'm not a fan of the applications' distribuition in  /bin  /sbin  /lib  /var  /etc ...
I embrace the philosophy of "one application in one place" with a structure similar to

/appdir
  |---/app1
       |---/bin
       |---/lib
       |---/conf
       |---/docs
       |---/logs
       |---/tmp
       ...

that's why I would like to build all my applications using the same pattern.

Now I want to build the MySQL database server, but the process it's not straightforward like for other applications.
I use the following configure inspired from --help, MySQL docs and PKGBUILD provided by the Arch mysql package:

CFLAGS="-fPIC -march=amdfam10 -mtune=amdfam10 -O2 -pipe -fno-strict-aliasing -DBIG_JOINS=1 -fomit-frame-pointer" \
CXXFLAGS="-fPIC -march=amdfam10 -mtune=amdfam10 -O2 -pipe -fno-strict-aliasing -DBIG_JOINS=1 -felide-constructors -fno-exceptions -fno-rtti" \
./configure \
    --sysconfdir=/usr/local/apps/mysql/conf \
    --prefix=/usr/local/apps/mysql       \
    --exec-prefix=/usr/local/apps/mysql  \
    --sbindir=/usr/local/apps/mysql/sbin \
    --docdir=/usr/local/apps/mysql/docs  \
    --mandir=/usr/local/apps/mysql/man   \
    --datarootdir=/usr/local/apps/mysql/share  \
    --libexecdir=/usr/local/apps/mysql/sbin    \
    --localstatedir=/usr/local/apps/mysql/data \
    --with-mysqld-ldflags=-all-static \
    --with-zlib-dir=bundled \
    --enable-assembler \
    --without-debug    \
    --without-docs     \
    --without-readline \
    --with-mysqld-user=mysql \
    --with-libwrap \
    --with-charset=utf8 \
    --with-collation=utf8_general_ci \
    --with-extra-charsets=binary,ascii,cp1250,cp1251,koi8r,latin1,latin2,latin5,utf8 \
    --with-embedded-server \
    --with-unix-socket-path=/var/run/mysqld.sock \
    --enable-local-infile \
    --with-plugins=partition,ftexample,blackhole,csv,heap,innobase,innodb_plugin

Could someone with a deeper understanding of the process to give me some advices about optimization, plugins, etc, please?
I want to build a fast server without unnecessary stuff.

Some questions are about paths and directories:
1) is it possible to get the pattern described above without having paths like  mysql/mysql/..., mysql/lib/mysql/<files>, mysql/include/mysql/<files>  but  mysql/lib/<files>, etc  ?
2) is it OK to delete  mysql-test  and  sql-bench  directories if I don't need them ?

Offline

Board footer

Powered by FluxBB