mysql源代码安装细说(三)

2015-01-25 19:47:03 · 作者: · 浏览: 17
option was added in MySQL 5.6.3.
?
-DWITH_ASAN=bool
Whether to enable AddressSanitizer, for compilers that support it. The default is off. This option was added in MySQL 5.6.15.
?
-DWITH_DEBUG=bool
Whether to include debugging support.
Configuring MySQL with debugging support enables you to use the --debug="d,parser_debug" option when you start the server. This causes the Bison parser that is used to process SQL statements to dump a parser trace to the server's standard error output. Typically, this output is written to the error log.

?
-DWITH_DEFAULT_FEATURE_SET=bool
Whether to use the flags from cmake/build_configurations/feature_set.cmake. This
option was added in MySQL 5.6.6.
?
-DWITH_EDITLINE=value
Which libedit/editline library to use. The permitted values are bundled (the default) and
system.
WITH_EDITLINE was added in MySQL 5.6.12. It replaces WITH_LIBEDIT, which has been
removed.
?
-DWITH_EMBEDDED_SERVER=bool
Whether to build the libmysqld embedded server library.

?
-DWITH_EXTRA_CHARSETS=name
Which extra character sets to include:
? all: All character sets. This is the default.
? complex: Complex character sets.
? none: No extra character sets.
?
-DWITH_INNODB_MEMCACHED=bool
Whether to generate memcached shared libraries (libmemcached.so and innodb_engine.so).

?
-DWITH_LIBEVENT=string
Which libevent library to use. Permitted values are bundled (default), system, and yes. If
you specify system or yes, the system libevent library is used if present. If the system library
is not found, the bundled libevent library is used. The libevent library is required by InnoDB
memcached.

-DWITH_LIBEDIT=bool
Whether to use the libedit library bundled with the distribution.
WITH_LIBEDIT was removed in MySQL 5.6.12. Use WITH_EDITLINE instead.
?
-DWITH_LIBWRAP=bool
Whether to include libwrap (TCP wrappers) support.
?
-DWITH_READLINE=bool
Whether to use the readline library bundled with the distribution. This option was removed in
MySQL 5.6.5 because readline is no longer bundled.

?
-DWITH_UNIXODBC=1
Enables unixODBC support, for Connector/ODBC.

?
-DWITH_ZLIB=zlib_type
Some features require that the server be built with compression library support, such as the
COMPRESS() and UNCOMPRESS() functions, and compression of the client/server protocol. The
WITH_ZLIB indicates the source of zlib support:
? bundled: Use the zlib library bundled with the distribution.
? system: Use the system zlib library. This is the default.
?
-DWITHOUT_SERVER=bool
Whether to build without the MySQL server. The default is OFF, which does build the server.

了解了各个选项的意义,下面就可以执行安装了

# Preconfiguration setup
shell> groupadd mysql
shell> useradd -r -g mysql mysql
# Beginning of source-build specific instructions
shell> tar zxvf mysql-VERSION.tar.gz
shell> cd mysql-VERSION
shell> cmake .
shell> make
shell> make install
# End of source-build specific instructions
# Postinstallation setup
shell> cd /usr/local/mysql
shell> chown -R mysql .
shell> chgrp -R mysql .
shell> scripts/mysql_install_db --user=mysql
shell> chown -R root .
shell> chown -R mysql data
shell> bin/mysqld_safe --user=mysql &
# Next command is optional
shell> cp support-files/mysql.server /etc/init.d/mysql.server