$ tar xvfz postfix-1.1.11.tar.gz $ cd postfix-1.1.11 $ make -f Makefile.init makefiles \ CCARGS="-DHAS_PCRE -DHAS_LDAP -I/usr/local/include" \ AUXLIBS="-L/usr/local/lib -lpcre -lldap -llber" $ make |
$ su # groupadd -g 80 postfix # groupadd -g 81 postdrop # useradd -s /bin/false -d /var/spool/postfix -u 80 -g postfix \ -c 'Postfix pseudo-user' postfix |
# ldconfig # make install (snip) Please specify the destination directory for installed Postfix daemon programs. This directory should not be in the command search path of any users. daemon_directory: [/usr/libexec/postfix] /usr/local/postfix Please specify the destination directory for installed Postfix administrative commands. This directory should be in the command search path of adminstrative users. command_directory: [/usr/sbin] /usr/local/postfix (snip) Please specify the full destination pathname for the installed Postfix sendmail command. This is the Sendmail-compatible mail posting interface. sendmail_path: [/usr/sbin/sendmail] /usr/local/postfix/sendmail Please specify the full destination pathname for the installed Postfix newaliases command. This is the Sendmail-compatible command to build alias databases for the Postfix local delivery agent. newaliases_path: [/usr/bin/newaliases] /usr/local/postfix/newaliases Please specify the full destination pathname for the installed Postfix mailq command. This is the Sendmail-compatible mail queue listing command. mailq_path: [/usr/bin/mailq] /usr/local/postfix/mailq # cd /usr/sbin # mv sendmail sendmail.org # ln -s /usr/local/postfix/sendmail sendmail # cd /usr/bin # mv mailq mailq.org # ln -s /usr/local/postfix/mailq mailq # mv newaliases newaliases.org # ln -s /usr/local/postfix/newaliases newaliases # exit $ make clean |
$ tar xvfz postfix-1.1.12.tar.gz $ cd postfix-1.1.12 $ make -f Makefile.init makefiles \ CCARGS="-DHAS_PCRE -DHAS_LDAP -I/usr/local/include" \ AUXLIBS="-L/usr/local/lib -lpcre -lldap -llber" (snip) [src/util] (set -e; echo "# DO NOT EDIT"; /bin/sh ../../makedefs && cat Makefile.in) >Makefile No |
$ make -f Makefile.init makefiles \ CCARGS="-DHAS_PCRE -DHAS_LDAP -I/usr/local/include -I/usr/local/BerkeleyDB.4.1/include" \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 追加 AUXLIBS="-L/usr/local/lib -L/usr/local/BerkeleyDB.4.1/lib -lpcre -lldap -llber" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 追加 |
Building Postfix on Linux with a specific Berkeley DB version ============================================================= Some Linux systems ship with multiple Berkeley DB implementations. Normally, Postfix builds with the default DB version that ships with the system. On Linux, you need to edit the makedefs script in order to specify a non-default DB library. |
Linux.2*) SYSTYPE=LINUX2 # Postfix no longer needs DB 1.85 compatibility if [ -f /usr/include/db.h ] then : we are all set elif [ -f /usr/include/db/db.h ] then CCARGS="$CCARGS -I/usr/include/db" elif [ -f /usr/local/BerkeleyDB.4.1/include/db.h ] <-- 追加 then <-- 追加 CCARGS="$CCARGS -I/usr/local/BerkeleyDB.4.1/include" <-- 追加 else # No, we're not going to try db1 db2 db3 etc. # On a properly installed system, Postfix builds # by including <db.h> and by linking with -ldb echo "No <db.h> include file found." 1>&2 echo "Install the appropriate db*-devel package first." 1>&2 echo "See the RELEASE_NOTES file for more information." 1>&2 exit 1 fi |
$ make tidy $ make -f Makefile.init makefiles \ CCARGS="-DHAS_PCRE -DHAS_LDAP -I/usr/local/include -I/usr/local/BerkeleyDB.4.1/include" \ AUXLIBS="-L/usr/local/lib -L/usr/local/BerkeleyDB.4.1/lib -lpcre -lldap -llber" $ make (snip) gcc -Wmissing-prototypes -Wformat -DHAS_PCRE -DHAS_LDAP -I/usr/local/include \ -I/usr/local/BerkeleyDB.4.1/include -I/usr/local/BerkeleyDB.4.1/include -g -O \ -I. -DLINUX2 -c dict_db.c dict_db.c: In function `dict_db_open': dict_db.c:523: warning: passing arg 2 of pointer to function from incompatible pointer type dict_db.c:523: warning: passing arg 4 of pointer to function makes pointer from integer without a cast dict_db.c:523: too few arguments to function make: *** [dict_db.o] エラー 1 make: *** [update] エラー 1 |
$ make tidy $ make -f Makefile.init makefiles \ CCARGS="-DHAS_PCRE -DHAS_LDAP -I/usr/local/include" \ AUXLIBS="-L/usr/local/lib -lpcre -lldap -llber" $ make gcc -Wmissing-prototypes -Wformat -DHAS_PCRE -DHAS_LDAP -I/usr/local/include -g -O \ -I. -I../../include -DLINUX2 -o error error.o ../../lib/libmaster.a ../../lib/libglobal.a \ ../../lib/libutil.a -L/usr/local/lib -lpcre -lldap -llber -ldb -lnsl -lresolv ../../lib/libutil.a(dict_ldap.o): In function `dict_ldap_get_values': /usr/local/src/postfix-1.1.12/src/util/dict_ldap.c:404: undefined reference to `ldap_url_search_st' collect2: ld returned 1 exit status make: *** [error] エラー 1 make: *** [update] エラー 1 |
$ make tidy $ make -f Makefile.init makefiles \ CCARGS="-DHAS_PCRE -I/usr/local/include" \ AUXLIBS="-L/usr/local/lib -lpcre" $ make $ su # make install # exit |
$ tar xvfz postfix-2.1.3.tar.gz $ cd postfix-2.1.3 $ make $ su # make install (snip) postfix: warning: My hostname jevex is not a fully qualified name - set myhostname or mydomain in /etc/postfix/main.cf |