Get and install MySQL software

Source: Internet
Author: User
MySQL This appendix describes how to obtain and install the software required to run MySQL and the third party software described in this book, such as Perl DBI and CGI.PM support environments, PHP, Apache, and so on. This appendix also explains how to obtain files related to the SAMP_DB database sample used in this book.
The purpose of this chapter is to bring together installation instructions for all packages, but not to replace the installation instructions that are included with each package. In fact, we encourage reading the instructions that came with the package. This appendix provides a description that satisfies most situations, but each software distribution package also contains instructions on how to troubleshoot the failure of a stand-alone installation process. For example, there are a number of chapters in the MySQL manual that describe the installation process, including  executive file, a low-definition badger 饩 bared pepper ā?br>
Select the contents of MySQL installation

If you have not installed MySQL, you must install it, but you will need to install the following three tools:
If you want to write scripts that access the MySQL database, you must install the MySQL client programming support environment and the DBI module. If you intend to write a DBI script that provides Web access to your database, you should also install the CGI.PM module and require a Web server. This book uses the Apache server, but it can also use some other servers.
If you want to write PHP scripts, you must install the MySQL client programming support environment and PHP. General PHP is used for web scripting, which means that a Web server is also required. This book uses the Apache server, because the Apache server has the PHP module support environment. This means that PHP can be installed as an internal component of the Apache system. If you cannot modify your Apache copy (for example, if you are working on an ISP host and Apache is controlled by your ISP), or if you are running a different Web server, you can set PHP as a standalone program and run the PHP script as a standard CGI script. Installing PHP as a module of Apache provides better performance than running it as a stand-alone program.
Many installer packages can get precompiled programs. L i n UX offers a variety of RPM files. If you prefer to compile the source program, or if the program distribution is not available on your platform, you need a C compiler (MySQL requires C + +). MySQL developers recommend using GCC 2.95.1 or newer versions to build MySQL. Egcs in more than 1.03 of the version can be used.
Other tools required include Gunzip and t a R (if you are installing with a compressed tar file) or RPM (if you are installing with an RPM file).

Get MySQL Software

The main distribution points for each package are shown in the following table. Some packages can be obtained from multiple locations:

Program Package Position
Mysql http://www.mysql.com/ftp://ftp.mysql.com/pub/mysql/
Dbi http://www.symbolstone.org/technology/perl/DBI/
Http://www.mysql. com/contrib/
Php http://www.php.net/
ftp://ftp.php.net/
Apache http://www.apache.org/ftp://ftp.apache.org/
cgi.pm http://stein.cshl.org/WWW/software/CGI/

If you use FTP to transfer files, you should send them in binary form to avoid errors.
There are many MySQL mirroring sites. W W.mysql.com is located in S c a n d i n a v i A, so if you choose a site closest to you, you can shorten the download time. The following addresses list the mirror sites:
Http://www.mysql.com/mirrors.html
For Perl software, you can use H t T P://C p a N. Per L. o rg/find the mirror of the desired module.
Select the version to install
Which package version should be installed depends on requirements:
If you need great stability, be old-fashioned and use the latest stable (non-B) version of the package. This will not only be able to get newer features, but not like the B version of many problems.
If you like adventure, or a developer, you may want to use the latest version B. Of course, if some of the features that are most needed are available only in version B, there is no choice but to use that version.
For MySQL, precompiled systems and RPM distributions are typically optimized and are better done by themselves than by using the configuration script in the source package. MySQL developers also use some of the commercially optimized compilers that make MySQL faster to build distribution packages. Therefore, the programs in these distribution packages may be faster than the programs that you compile yourself. If you want the best performance, you should try to use a precompiled distribution package.
Each package's Web site indicates which versions are the latest stable distributions and which versions are the latest B distributions. They also provide a checklist of functional changes to previous versions to help determine which version is best for you.
If you are using binary code or RPM distribution, unlocking the distribution package equals installing it, because the unpacked files go into the appropriate directory. If you load a file into the protection directory in the distribution package, you may need to open the distribution package as root.
For a source program distribution, you can untie it where it is used for compilation, and then install the software to the destination address. You may need to complete the installation steps as root (but not complete the configuration or compilation steps).
Subscribe to help mailing list
When you install the package, it is a good idea to subscribe to the consolidated discussion table for the package, as it is possible to ask questions and get answers. If you are installing a B release, you should be prepared to attend and read the messages associated with the software so that you can get error reporting and resolution at any time. If you do not participate in a comprehensive discussion, you should at least subscribe to its announcements so that you can receive notification of a new release. Booking mailing lists and instructions for using them are introduced in the introduction. The Web site for each package also provides subscription information.
If you use the source program to install, several packages are configured with the Configure utility, which makes it easy to set up and build software on a variety of systems. If the build fails, you may need to provide different options to configure for the options you originally gave. This is necessary because you want to prevent configure from using the information that you saved when you last ran it. You can purge the previously saved configuration information as follows:
% make Distclean
You can also clear the following ways:
% RM Config.cache
% make clean
Whichever way you choose, you can now rerun the Configure.



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.