mirror of
https://github.com/Zeckmathederg/glfs.git
synced 2025-01-23 22:42:14 +08:00
Adding MySQl-3.23.51.
git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@94 af4574ff-66df-0310-9fd7-8a98e5e911e0
This commit is contained in:
parent
ce404c1f97
commit
c30b739080
@ -34,6 +34,13 @@
|
||||
<entry>Shut down Postfix MTA: <xref linkend="postfix"/></entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>K26</entry>
|
||||
<entry>mysql</entry>
|
||||
<entry><filename>../init.d/mysql</filename></entry>
|
||||
<entry>Shut down MySQL Daeomon: <xref linkend="mysql"/></entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>K30</entry>
|
||||
<entry>sshd</entry>
|
||||
|
@ -34,6 +34,13 @@
|
||||
<entry>Shut down Postfix MTA: <xref linkend="postfix"/></entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>K26</entry>
|
||||
<entry>mysql</entry>
|
||||
<entry><filename>../init.d/mysql</filename></entry>
|
||||
<entry>Shut down MySQL Daemon: <xref linkend="mysql"/></entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>K30</entry>
|
||||
<entry>sshd</entry>
|
||||
|
@ -34,6 +34,13 @@
|
||||
<entry>Shut down Postfix MTA: <xref linkend="postfix"/></entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>K26</entry>
|
||||
<entry>mysql</entry>
|
||||
<entry><filename>../init.d/mysql</filename></entry>
|
||||
<entry>Shut down MySQL Daemon: <xref linkend="mysql"/></entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>K30</entry>
|
||||
<entry>sshd</entry>
|
||||
|
@ -48,6 +48,13 @@
|
||||
<entry>Start Secure Shell Daemon: <xref linkend="openssh"/></entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>S34</entry>
|
||||
<entry>mysql</entry>
|
||||
<entry><filename>../init.d/mysql</filename></entry>
|
||||
<entry>Start MySQL Daemon: <xref linkend="mysql"/></entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>S35</entry>
|
||||
<entry>postfix</entry>
|
||||
|
@ -48,6 +48,13 @@
|
||||
<entry>Start Secure Shell Daemon: <xref linkend="openssh"/></entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>S34</entry>
|
||||
<entry>mysql</entry>
|
||||
<entry><filename>../init.d/mysql</filename></entry>
|
||||
<entry>Start MySQL Daemon: <xref linkend="mysql"/></entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>S35</entry>
|
||||
<entry>postfix</entry>
|
||||
|
@ -48,6 +48,13 @@
|
||||
<entry>Start Secure Shell Daemon: <xref linkend="openssh"/></entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>S34</entry>
|
||||
<entry>mysql</entry>
|
||||
<entry><filename>../init.d/mysql</filename></entry>
|
||||
<entry>Start MySQL Daemon: <xref linkend="mysql"/></entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>S35</entry>
|
||||
<entry>postfix</entry>
|
||||
|
@ -34,6 +34,13 @@
|
||||
<entry>Shut down Postfix MTA: <xref linkend="postfix"/></entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>K26</entry>
|
||||
<entry>mysql</entry>
|
||||
<entry><filename>../init.d/mysql</filename></entry>
|
||||
<entry>Shut down MySQL Daemon: <xref linkend="mysql"/></entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>K30</entry>
|
||||
<entry>sshd</entry>
|
||||
|
@ -1,8 +1,11 @@
|
||||
<sect1 id="mysql" xreflabel="mysql">
|
||||
<sect1 id="mysql" xreflabel="MySQL-&mysql-version;">
|
||||
<?dbhtml filename="mysql.html" dir="content"?>
|
||||
<title>mysql</title>
|
||||
<title>MySQL-&mysql-version;</title>
|
||||
|
||||
<para>TO BE DONE</para>
|
||||
&mysql-intro;
|
||||
&mysql-inst;
|
||||
&mysql-exp;
|
||||
&mysql-config;
|
||||
&mysql-desc;
|
||||
|
||||
</sect1>
|
||||
|
||||
|
121
content/databases/mysql/mysql-config.xml
Normal file
121
content/databases/mysql/mysql-config.xml
Normal file
@ -0,0 +1,121 @@
|
||||
<sect2>
|
||||
<title>Configuring mysql</title>
|
||||
|
||||
<sect3>
|
||||
<title>Config files</title>
|
||||
|
||||
<para><userinput>/etc/my.cnf, ~/.my.cnf</userinput></para>
|
||||
|
||||
</sect3>
|
||||
|
||||
<sect3>
|
||||
<title>Configuration Information</title>
|
||||
|
||||
<para>There are several default configurations file available in
|
||||
/usr/share/mysql which you can use.</para>
|
||||
|
||||
<screen><userinput>cp /usr/share/mysql/my-medium.cnf /etc/my.cnf</userinput></screen>
|
||||
|
||||
<para>We can now install a database and change the ownership to the
|
||||
unpriviledged user and group.</para>
|
||||
|
||||
<screen><userinput>mysql_install_db
|
||||
chown -R mysql:mysql /var/mysql</userinput></screen>
|
||||
|
||||
<para>Further configuration requires that the mysql server be running:</para>
|
||||
|
||||
<screen><userinput>safe_mysqld 2>&1 >/dev/null &</userinput></screen>
|
||||
|
||||
<para>A default installation, does not setup a password for the administrator.
|
||||
So here we will login and set one. We strongly suggest changing
|
||||
'new-password' to your own.</para>
|
||||
|
||||
<screen><userinput>mysql -uroot mysql</userinput>
|
||||
Welcome to the MySQL monitor. Commands end with ; or \g.
|
||||
Your MySQL connection id is 2 to server version: 3.23.51-log
|
||||
|
||||
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
|
||||
|
||||
mysql> <userinput>UPDATE user SET password=password('new-password') WHERE user='root';</userinput>
|
||||
Query OK, 2 rows affected (0.00 sec)
|
||||
Rows matched: 2 Changed: 2 Warnings: 0
|
||||
|
||||
mysql> <userinput>FLUSH PRIVILEGES;</userinput>
|
||||
Query OK, 0 rows affected (0.00 sec)
|
||||
|
||||
mysql> <userinput>EXIT;</userinput>
|
||||
bye
|
||||
</screen>
|
||||
|
||||
<para>Now that we are done with the configuration of the server, we can
|
||||
shut it down.</para>
|
||||
|
||||
<screen><userinput>kill `pidof -x safe_mysqld mysqld`</userinput></screen>
|
||||
|
||||
|
||||
<sect4>
|
||||
<title>mysql init.d script</title>
|
||||
|
||||
<para>To automate the running of mysql, use the following command to create
|
||||
the init.d script:</para>
|
||||
|
||||
<screen><userinput>cat > /etc/rc.d/init.d/mysql << "EOF"</userinput>
|
||||
#!/bin/bash
|
||||
# Begin $rc_base/init.d/
|
||||
|
||||
# Based on sysklogd script from LFS-3.1 and earlier.
|
||||
# Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org
|
||||
|
||||
source /etc/sysconfig/rc
|
||||
source $rc_functions
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
echo "Starting MySQL daemon..."
|
||||
/usr/bin/safe_mysqld 2>&1 >/dev/null &
|
||||
evaluate_retval
|
||||
;;
|
||||
|
||||
stop)
|
||||
echo "Stopping MySQL daemon..."
|
||||
killproc mysqld
|
||||
;;
|
||||
|
||||
restart)
|
||||
$0 stop
|
||||
sleep 1
|
||||
$0 start
|
||||
;;
|
||||
|
||||
status)
|
||||
statusproc /usr/sbin/mysqld
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart|status}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# End $rc_base/init.d/
|
||||
<userinput>EOF
|
||||
chmod 755 /etc/rc.d/init.d/mysql</userinput></screen>
|
||||
|
||||
<para>Create the symbolic links to this file in the relevant rc.d directory
|
||||
with the following commands:</para>
|
||||
|
||||
<screen><userinput>cd /etc/rc.d/init.d &&
|
||||
ln -sf ../init.d/mysql ../rc0.d/K26mysql &&
|
||||
ln -sf ../init.d/mysql ../rc1.d/K26mysql &&
|
||||
ln -sf ../init.d/mysql ../rc2.d/K26mysql &&
|
||||
ln -sf ../init.d/mysql ../rc3.d/S34mysql &&
|
||||
ln -sf ../init.d/mysql ../rc4.d/S34mysql &&
|
||||
ln -sf ../init.d/mysql ../rc5.d/S34mysql &&
|
||||
ln -sf ../init.d/mysql ../rc6.d/K26mysql</userinput></screen>
|
||||
|
||||
</sect4>
|
||||
|
||||
</sect3>
|
||||
|
||||
</sect2>
|
||||
|
14
content/databases/mysql/mysql-desc.xml
Normal file
14
content/databases/mysql/mysql-desc.xml
Normal file
@ -0,0 +1,14 @@
|
||||
<sect2>
|
||||
<title>Contents</title>
|
||||
|
||||
<para>The mysql package contains <userinput>mysql mysqladmin mysqlcheck mysqlshow mysqldump mysqlimport mysqltest mysqlbinlog replace comp_err perror resolveip my_print_defaults resolve_stack_dump isamchk isamlog pack_isam myisamchk myisamlog myisampack safe_mysqld mysql_install_db msql2mysql mysql_config mysql_fix_privilege_tables mysql_setpermission mysql_zap mysqlacess mysqlbug mysql_convert_table_format mysql_find_rows mysqlhotcopy mysqldumbslow mysqld_multi mysqld</userinput></para>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2><title>Description</title>
|
||||
|
||||
<para>A full package listing would be several pages long, for that reason, we suggest consulting the mysql documetation for full details, instead.</para>
|
||||
|
||||
<para>Certain mysql support programs may require the perl DBI modules to be installed to function properly.</para>
|
||||
|
||||
</sect2>
|
7
content/databases/mysql/mysql-exp.xml
Normal file
7
content/databases/mysql/mysql-exp.xml
Normal file
@ -0,0 +1,7 @@
|
||||
<sect2>
|
||||
<title>Command explanations</title>
|
||||
|
||||
<para><userinput>sed -e "s%mysql-test/Makefile%%" -e "s% mysql-test%%" configure.old > configure</userinput>:
|
||||
This sed is used to disable the mysql test suite.</para>
|
||||
|
||||
</sect2>
|
23
content/databases/mysql/mysql-inst.xml
Normal file
23
content/databases/mysql/mysql-inst.xml
Normal file
@ -0,0 +1,23 @@
|
||||
<sect2>
|
||||
<title>Installation of mysql</title>
|
||||
|
||||
<para>For security reasons, running the server as an unpriviledged user and group is strongly encouraged:</para>
|
||||
|
||||
<screen><userinput>groupadd mysql &&
|
||||
useradd -c mysql -d /dev/null -g mysql -s /bin/false mysql</userinput></screen>
|
||||
|
||||
<para>Build and install mysql by running the following commands:</para>
|
||||
|
||||
<screen><userinput>cp configure configure.old &&
|
||||
sed -e "s%mysql-test/Makefile%%" -e "s% mysql-test%%" configure.old > configure &&
|
||||
./configure --prefix=/usr \
|
||||
--sysconfdir=/etc \
|
||||
--libexecdir=/usr/sbin \
|
||||
--localstatedir=/var/mysql \
|
||||
--enable-thread-safe-client \
|
||||
--without-debug \
|
||||
--without-bench &&
|
||||
make &&
|
||||
make install</userinput></screen>
|
||||
|
||||
</sect2>
|
12
content/databases/mysql/mysql-intro.xml
Normal file
12
content/databases/mysql/mysql-intro.xml
Normal file
@ -0,0 +1,12 @@
|
||||
<sect2>
|
||||
<title>Introduction to MySQL</title>
|
||||
|
||||
<screen>Download location (HTTP): <ulink url="&mysql-download-http;" />
|
||||
Download location (FTP): <ulink url="&mysql-download-ftp;" />
|
||||
Version used: &mysql-version;
|
||||
Package size: &mysql-size;
|
||||
Estimated Disk space required: &mysql-buildsize;</screen>
|
||||
|
||||
<para>The MySQL package contains the mysql library, server and client utilities.</para>
|
||||
|
||||
</sect2>
|
@ -1 +1,11 @@
|
||||
<!ENTITY mysql SYSTEM "../mysql.xml">
|
||||
<!ENTITY mysql-intro SYSTEM "mysql-intro.xml">
|
||||
<!ENTITY mysql-inst SYSTEM "mysql-inst.xml">
|
||||
<!ENTITY mysql-exp SYSTEM "mysql-exp.xml">
|
||||
<!ENTITY mysql-config SYSTEM "mysql-config.xml">
|
||||
<!ENTITY mysql-desc SYSTEM "mysql-desc.xml">
|
||||
<!ENTITY mysql-version "3.23.51">
|
||||
<!ENTITY mysql-download-http "http://mysql.he.net/Downloads/MySQL-3.23/mysql-3.23.51.tar.gz">
|
||||
<!ENTITY mysql-download-ftp "ftp://mirror.mcs.anl.gov/pub/mysql/Downloads/MySQL-3.23/mysql-3.23.51.tar.gz">
|
||||
<!ENTITY mysql-size "11 MB">
|
||||
<!ENTITY mysql-buildsize "68 MB">
|
||||
|
@ -2,8 +2,8 @@
|
||||
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
|
||||
"/usr/share/docbook/docbookx.dtd" [
|
||||
|
||||
<!ENTITY version "20020813">
|
||||
<!ENTITY releasedate "August 13th, 2002">
|
||||
<!ENTITY version "20020815">
|
||||
<!ENTITY releasedate "August 15th, 2002">
|
||||
|
||||
<!ENTITY % book SYSTEM "book/book.ent">
|
||||
<!ENTITY % preface SYSTEM "preface/preface.ent">
|
||||
|
@ -10,6 +10,9 @@ page in Chapter 1 for details on who wrote what.</para>
|
||||
|
||||
<itemizedlist>
|
||||
|
||||
<listitem><para>August 15th, 2002 [highos]: Content Databases: Added
|
||||
MySQL-3.23.51.</para></listitem>
|
||||
|
||||
<listitem><para>August 13th, 2002 [larry]: X: updated to
|
||||
qt-3.0.5.</para></listitem>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user