& Lt; upgrade of mysql under postfix Mail Service & gt;

Source: Internet
Author: User
Tags tidy

The Enterprise Edition 6.5 of the Red Hat service environment in this film may have slightly different tests, but the methods are roughly the same.

 

The current system's postfix version is postfix-2.6.6-2.2.el6_1.x86_64

 

To use the latest version, go to dow to download the latest version. Get the package postfix-2.11.0.tar.gz for the new postfix

After decompression, a directory is generated and switched to this directory. Cd postfix-2.11.0

 

As mentioned in our previous article, if a. spec file can be installed as an installation package, you can easily find-name '*. spec' and find that there is no file such as. spec.

We know that many source code packages are compiled and installed with help from the INSTALL file.

 

Vim INSTALL // you can view the help for installation and upgrade. The following is the key line template in the file.

$ Make-f Makefile. init makefiles

Find the key line, generate the compilation file, and compile make-f Makefile. init makefiles. The library file is missing and the library file is installed.

 

Mysql-devel 6.3. If it is 6.5, install yum install db *-devel-y.

 

Then re-compile make-f Makefile. init makefiles. After compilation, the mysql plug-in disappears. Obviously this is not the expected result.

You can view the services and plug-ins supported by the mail service.

Postconf-

Postconf-

Postconf-m

Make tidy // when compilation is complete or fails, many temporary files will be generated, which will cause obstacles to other services in the future and clear the temporary files generated by compilation.

 

Cd README_FILES // We also know that many source code packages are the same. Apart from installing, we can get help. The next one is the README_FILES Directory, which contains a lot of update solutions for other mail plug-ins.

 

Less MYSQL_README // view mysql compilation help under mail

Find the following line: He will prompt that if you use the above line in other linux versions, Solaris will use the following line. Of course, the following is only a template.

/*

In order to build Postfix with mysql map support, you will need to add-DHAS_MYSQL and-I for the directory containing the mysql headers, and the mysqlclient library (and libm) to AUXLIBS, for example:

Make-f Makefile. init makefiles \ 'ccargs =-DHAS_MYSQL-I/usr/local/mysql/include '\ 'auxlibs =-L/usr/local/mysql/lib-lmysqlclient-lz-lm'

On Solaris, use this instead:

Make-f Makefile. init makefiles \ 'ccargs =-DHAS_MYSQL-I/usr/local/mysql/include '\ 'auxlibs =-L/usr/local/mysql/lib-R/usr/local/ mysql/lib \-lmysqlclient-lz-lm'

*/

 

 

The following versions are 6.5 and 6.3 are slightly different, but the method is the same.

Rpm-ql mysql-devel // check the mysql compilation/library path. Why do we need the following path? The above compilation will call gcc and library files. Many software is written in c, it needs to find the header file of c and library .. C files start with h.

This is 6.5, mysql compilation above, paste the two paths to the past and it will be OK,

/Usr/include/mysql/sslopt-case.h.

/Usr/lib64/mysql/libmysqlclient. so

6.3

/Usr/include/mysql/typelib. h
/Usr/lib/mysql/libmysqlclient. so
Is as follows:

 

Mkae tidy // clear the file that failed the last compilation,

Make-f Makefile. init makefiles

CCARGS indicates a macro. Replace the default value 'ccargs =-DHAS_MYSQL-I/usr/include/mysql' in makefile to search for the header file in the specified path.

-Lz indicates to search for libz. so or libz. a. Only one z is written. Similarly, lmysqlclient indicates libmysqlclient. so/libmysqlclient..

'Auxlibs =-L/usr/lib64/mysql-lmysqlclient-lz-lm'

Make upgrade // upgrade after compilation

Postconf-m // you can see the mysql plug-in this time.

Which of the following is a test?

Postconf-n // you can view some mail parameters.

Postconf-e inet_interfaces = all // all users can use the mail service postfix reload // re-Load

Postfix stop postfix start netstat-antple

 

 

 

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.