content_image/676540.jpg
The sequence for installation from a compressed tar  file or Zip archive source distribution is similar to the process for installing from a generic binary distribution (see Section 2.2, “Installing MySQL on Unix/Linux Using Generic Binaries” ), except that it is used on all platforms and includes steps to configure and compile the distribution. For example, with a compressed tar  file source distribution on Unix, the basic installation command sequence looks like this: 

# Preconfiguration setup shell> groupadd mysql shell> useradd -r -g mysql -s /bin/false mysql # Beginning of source-build specific instructions shell> tar zxvf mysql- VERSION .tar.gz shell> cd mysql- VERSION shell> mkdir bld shell> cd bld shell> cmake .. shell> make shell> make install # End of source-build specific instructions # Postinstallation setup shell> cd /usr/local/mysql shell> mkdir mysql-files shell> chown mysql:mysql mysql-files shell> chmod 750 mysql-files shell> bin/mysqld --initialize --user=mysql shell> bin/mysql_ssl_rsa_setup shell> bin/mysqld_safe --user=mysql & # Next command is optional shell> cp support-files/mysql.server /etc/init.d/mysql.server 

A more detailed version of the source-build specific instructions is shown following. 

## Perform Preconfiguration Setup 

<img src='content_image/676540.jpg'>

•Perform Preconfiguration Setup 

•Obtain and Unpack the Distribution 

•Configure the Distribution 

•Build the Distribution 

•Install the Distribution 

•Perform Postinstallation Setup 

## Note 

The procedure shown here does not set up any passwords for MySQL accounts. After following the procedure, proceed to Section 2.10, “Postinstallation Setup and Testing” , for postinstallation setup and testing. 

On Unix, set up the mysql  user and group that should be used to run and execute the MySQL server, and own the database directory. For details, see Create a mysql User and Group. Then perform the following steps as the mysql  user, except as noted. 

## Obtain and Unpack the Distribution 

Pick the directory under which you want to unpack the distribution and change location into it. 

Obtain a distribution file using the instructions in Section 2.1.3, “How to Get MySQL” . 

Unpack the distribution into the current directory: 

