11.1 LAMP架構介紹
11.2 MySQL、MariaDB介紹
11.3/11.4/11.5 MySQL安裝
11.6 MariaDB安裝
11.7/11.8/11.9 Apache安裝
11.10/11.11/11.12 安裝PHP5
11.13 安裝PHP7
11.14/11.15 Apache和PHP結合
擴展
mysql5.5源碼編譯安裝 http://www.aminglinux.com/bbs/thread-1059-1-1.html
mysql5.7二進制包安裝(變化較大) http://www.apelearn.com/bbs/thread-10105-1-1.html
apache dso https://yq.aliyun.com/articles/6298
apache apxs https://wizardforcel.gitbooks.io/apache-doc/content/51.html
apache工做模式 http://www.cnblogs.com/fnng/archive/2012/11/20/2779977.html
php中mysql,mysqli,mysqlnd,pdo究竟是什麼 http://blog.csdn.net/u013785951/article/details/60876816
查看編譯參數 http://ask.apelearn.com/question/1295php
LAMP:Linux+Apache(httpd)+Maridb(Mysql)+PHP,經常使用來搭建動態網站或者服務器的開源軟件。
html
習慣上,apache通常是指httpd,固然Apache還有不少的其餘軟件。Appache是最經常使用的web服務軟件,而MYSQL是比較小型的數據庫軟件,MySQL存儲用戶名;密碼和數據、圖片之類的放在靜態文件裏。 這兩個軟件及PHP均可以安裝到windows機器上。mysql
Apache和PHP須要安裝到同一臺機器上,由於PHP是做爲Apache的一個模塊存在的,兩個必須在一塊兒。
linux
LAMP架構介紹git
[root@linux-001 ~]# cd /usr/local/src/ [root@linux-001 src]# wget http://mirrors.163.com/mysql/Downloads/MySQL-5.6/mysql-5.6.43-linux-glibc2.12-x86_64.tar.gz --2019-05-06 19:29:15-- http://mirrors.163.com/mysql/Downloads/MySQL-5.6/mysql-5.6.43-linux-glibc2.12-x86_64.tar.gz 正在解析主機 mirrors.163.com (mirrors.163.com)... 59.111.0.251 正在鏈接 mirrors.163.com (mirrors.163.com)|59.111.0.251|:80... 已鏈接。 已發出 HTTP 請求,正在等待迴應... 200 OK 長度:328740156 (314M) [application/octet-stream] 正在保存至: 「mysql-5.6.43-linux-glibc2.12-x86_64.tar.gz」 100%[===========================================================================================>] 328,740,156 4.66MB/s 用時 2m 8s 2019-05-06 19:31:23 (2.44 MB/s) - 已保存 「mysql-5.6.43-linux-glibc2.12-x86_64.tar.gz」 [328740156/328740156])
[root@linux-001 src]# tar -zxvf mysql-5.6.43-linux-glibc2.12-x86_64.tar.gz ………… mysql-5.6.43-linux-glibc2.12-x86_64/man/man1/mysql_install_db.1 mysql-5.6.43-linux-glibc2.12-x86_64/man/man1/mysqld_safe.1 mysql-5.6.43-linux-glibc2.12-x86_64/man/man1/mysqlimport.1 mysql-5.6.43-linux-glibc2.12-x86_64/man/man1/mysql_waitpid.1 mysql-5.6.43-linux-glibc2.12-x86_64/man/man1/mysql_config_editor.1 mysql-5.6.43-linux-glibc2.12-x86_64/man/man1/mysqldump.1 mysql-5.6.43-linux-glibc2.12-x86_64/man/man1/mysql_plugin.1 mysql-5.6.43-linux-glibc2.12-x86_64/man/man1/mysql_find_rows.1
[root@linux-001 src]# mv mysql-5.6.43-linux-glibc2.12-x86_64 /usr/local/mysql
[root@linux-001 mysql]# useradd mysql [root@linux-001 mysql]# mkdir /data/
## 此處報錯,缺乏perl模塊和dumper的支持 ## [root@linux-001 mysql]# ./scripts/mysql_install_db --user=mysql --datadir=/data/mysql FATAL ERROR: please install the following Perl modules before executing ./scripts/mysql_install_db: Data::Dumper [root@linux-001 mysql]# [root@linux-001 mysql]# yum list | grep perl |grep -i dumper Repository base is listed more than once in the configuration Repository updates is listed more than once in the configuration Repository extras is listed more than once in the configuration Repository centosplus is listed more than once in the configuration perl-Data-Dumper.x86_64 2.145-3.el7 base perl-Data-Dumper-Concise.noarch 2.020-6.el7 epel perl-Data-Dumper-Names.noarch 0.03-17.el7 epel perl-Data-TreeDumper.noarch 0.40-19.el7 epel perl-XML-Dumper.noarch 0.81-17.el7 base [root@linux-001 mysql]# [root@linux-001 mysql]# yum install -y perl-Data-Dumper.x86_64 已加載插件:fastestmirror Repository base is listed more than once in the configuration Repository updates is listed more than once in the configuration Repository extras is listed more than once in the configuration Repository centosplus is listed more than once in the configuration Loading mirror speeds from cached hostfile epel/x86_64/metalink | 6.7 kB 00:00:00 * base: mirrors.163.com * epel: fedora.cs.nctu.edu.tw * extras: ap.stykers.moe * updates: mirrors.163.com base | 3.6 kB 00:00:00 epel | 4.7 kB 00:00:00 extras | 3.4 kB 00:00:00 updates | 3.4 kB 00:00:00 (1/4): extras/7/x86_64/primary_db | 201 kB 00:00:00 (2/4): updates/7/x86_64/primary_db | 4.2 MB 00:00:00 (3/4): epel/x86_64/updateinfo | 992 kB 00:00:05 (4/4): epel/x86_64/primary_db | 6.7 MB 00:02:24 正在解決依賴關係 --> 正在檢查事務 ---> 軟件包 perl-Data-Dumper.x86_64.0.2.145-3.el7 將被 安裝 --> 解決依賴關係完成 依賴關係解決 ===================================================================================================================================== Package 架構 版本 源 大小 ===================================================================================================================================== 正在安裝: perl-Data-Dumper x86_64 2.145-3.el7 base 47 k 事務概要 ===================================================================================================================================== 安裝 1 軟件包 總下載量:47 k 安裝大小:97 k Downloading packages: Delta RPMs disabled because /usr/bin/applydeltarpm not installed. perl-Data-Dumper-2.145-3.el7.x86_64.rpm | 47 kB 00:00:00 Running transaction check Running transaction test Transaction test succeeded Running transaction 正在安裝 : perl-Data-Dumper-2.145-3.el7.x86_64 1/1 驗證中 : perl-Data-Dumper-2.145-3.el7.x86_64 1/1 已安裝: perl-Data-Dumper.x86_64 0:2.145-3.el7 完畢! [root@linux-001 mysql]# ./scripts/mysql_install_db --user=mysql --datadir=/data/mysql Installing MySQL system tables...2019-05-06 19:42:37 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). 2019-05-06 19:42:37 0 [Note] Ignoring --secure-file-priv value as server is running with --bootstrap. 2019-05-06 19:42:37 0 [Note] ./bin/mysqld (mysqld 5.6.43) starting as process 84040 ... 2019-05-06 19:42:37 84040 [Note] InnoDB: Using atomics to ref count buffer pool pages 2019-05-06 19:42:37 84040 [Note] InnoDB: The InnoDB memory heap is disabled 2019-05-06 19:42:37 84040 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins 2019-05-06 19:42:37 84040 [Note] InnoDB: Memory barrier is not used 2019-05-06 19:42:37 84040 [Note] InnoDB: Compressed tables use zlib 1.2.11 2019-05-06 19:42:37 84040 [Note] InnoDB: Using Linux native AIO 2019-05-06 19:42:37 84040 [Note] InnoDB: Using CPU crc32 instructions 2019-05-06 19:42:37 84040 [Note] InnoDB: Initializing buffer pool, size = 128.0M 2019-05-06 19:42:37 84040 [Note] InnoDB: Completed initialization of buffer pool 2019-05-06 19:42:37 84040 [Note] InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created! 2019-05-06 19:42:37 84040 [Note] InnoDB: Setting file ./ibdata1 size to 12 MB 2019-05-06 19:42:37 84040 [Note] InnoDB: Database physically writes the file full: wait... 2019-05-06 19:42:37 84040 [Note] InnoDB: Setting log file ./ib_logfile101 size to 48 MB 2019-05-06 19:42:37 84040 [Note] InnoDB: Setting log file ./ib_logfile1 size to 48 MB 2019-05-06 19:42:37 84040 [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0 2019-05-06 19:42:37 84040 [Warning] InnoDB: New log files created, LSN=45781 2019-05-06 19:42:37 84040 [Note] InnoDB: Doublewrite buffer not found: creating new 2019-05-06 19:42:37 84040 [Note] InnoDB: Doublewrite buffer created 2019-05-06 19:42:37 84040 [Note] InnoDB: 128 rollback segment(s) are active. 2019-05-06 19:42:37 84040 [Warning] InnoDB: Creating foreign key constraint system tables. 2019-05-06 19:42:37 84040 [Note] InnoDB: Foreign key constraint system tables created 2019-05-06 19:42:37 84040 [Note] InnoDB: Creating tablespace and datafile system tables. 2019-05-06 19:42:37 84040 [Note] InnoDB: Tablespace and datafile system tables created. 2019-05-06 19:42:37 84040 [Note] InnoDB: Waiting for purge to start 2019-05-06 19:42:37 84040 [Note] InnoDB: 5.6.43 started; log sequence number 0 2019-05-06 19:42:38 84040 [Note] Binlog end 2019-05-06 19:42:38 84040 [Note] InnoDB: FTS optimize thread exiting. 2019-05-06 19:42:38 84040 [Note] InnoDB: Starting shutdown... 2019-05-06 19:42:39 84040 [Note] InnoDB: Shutdown completed; log sequence number 1625977 OK Filling help tables...2019-05-06 19:42:40 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). 2019-05-06 19:42:40 0 [Note] Ignoring --secure-file-priv value as server is running with --bootstrap. 2019-05-06 19:42:40 0 [Note] ./bin/mysqld (mysqld 5.6.43) starting as process 84064 ... 2019-05-06 19:42:40 84064 [Note] InnoDB: Using atomics to ref count buffer pool pages 2019-05-06 19:42:40 84064 [Note] InnoDB: The InnoDB memory heap is disabled 2019-05-06 19:42:40 84064 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins 2019-05-06 19:42:40 84064 [Note] InnoDB: Memory barrier is not used 2019-05-06 19:42:40 84064 [Note] InnoDB: Compressed tables use zlib 1.2.11 2019-05-06 19:42:40 84064 [Note] InnoDB: Using Linux native AIO 2019-05-06 19:42:40 84064 [Note] InnoDB: Using CPU crc32 instructions 2019-05-06 19:42:40 84064 [Note] InnoDB: Initializing buffer pool, size = 128.0M 2019-05-06 19:42:40 84064 [Note] InnoDB: Completed initialization of buffer pool 2019-05-06 19:42:40 84064 [Note] InnoDB: Highest supported file format is Barracuda. 2019-05-06 19:42:40 84064 [Note] InnoDB: 128 rollback segment(s) are active. 2019-05-06 19:42:40 84064 [Note] InnoDB: Waiting for purge to start 2019-05-06 19:42:40 84064 [Note] InnoDB: 5.6.43 started; log sequence number 1625977 2019-05-06 19:42:40 84064 [Note] Binlog end 2019-05-06 19:42:40 84064 [Note] InnoDB: FTS optimize thread exiting. 2019-05-06 19:42:40 84064 [Note] InnoDB: Starting shutdown... 2019-05-06 19:42:42 84064 [Note] InnoDB: Shutdown completed; log sequence number 1625987 OK To start mysqld at boot time you have to copy support-files/mysql.server to the right place for your system PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER ! To do so, start the server, then issue the following commands: ./bin/mysqladmin -u root password 'new-password' ./bin/mysqladmin -u root -h linux-001 password 'new-password' Alternatively you can run: ./bin/mysql_secure_installation which will also give you the option of removing the test databases and anonymous user created by default. This is strongly recommended for production servers. See the manual for more instructions. You can start the MySQL daemon with: cd . ; ./bin/mysqld_safe & You can test the MySQL daemon with mysql-test-run.pl cd mysql-test ; perl mysql-test-run.pl Please report any problems at http://bugs.mysql.com/ The latest information about MySQL is available on the web at http://www.mysql.com Support MySQL by buying support/licenses at http://shop.mysql.com New default config file was created as ./my.cnf and will be used by default by the server when you start it. You may edit this file to change server settings WARNING: Default config file /etc/my.cnf exists on the system This file will be read by default by the MySQL server If you do not want to use this, either remove it, or use the --defaults-file argument to mysqld_safe when starting the server [root@linux-001 mysql]# [root@linux-001 mysql]# echo $? 0
能夠複製 support-files/my-default.cnf 文件到 /etc/my.cnf ,也能夠直接編輯my.cnf,系統中默認安裝了mariadb-libs包。web
[root@linux-001 mysql]# ls support-files/ binary-configure magic my-default.cnf mysqld_multi.server mysql-log-rotate mysql.server [root@linux-001 mysql]# vim support-files/my-default.cnf [root@linux-001 mysql]# ls /etc/my.cnf /etc/my.cnf [root@linux-001 mysql]# rpm -qf /etc/my.cnf mariadb-libs-5.5.60-1.el7_5.x86_64 [root@linux-001 mysql]# vim /etc/my.cnf [mysqld] datadir=/data/mysql socket=/tmp/mysql.sock # Disabling symbolic-links is recommended to prevent assorted security risks symbolic-links=0 # Settings user and group are ignored when systemd is used. # If you need to run mysqld under a different user or group, # customize your systemd unit file for mariadb according to the # instructions in http://fedoraproject.org/wiki/Systemd [mysqld_safe] #log-error=/var/log/mariadb/mariadb.log #pid-file=/var/run/mariadb/mariadb.pid # # include all files from the config directory # #!includedir /etc/my.cnf.d
[root@linux-001 mysql]# cp support-files/mysql.server /etc/init.d/mysql [root@linux-001 mysql]# vim !$ vim /etc/init.d/mysql ..... basedir=/usr/local/mysql //指定mysql 的程序目錄 datadir=/data/mysql //指定日期目錄 ..... [root@linux-001 mysql]# ll /etc/init.d/mysql -rwxr-xr-x 1 root root 10592 5月 6 19:49 /etc/init.d/mysql
[root@linux-001 mysql]# chkconfig --add mysql [root@linux-001 mysql]# chkconfig --list 注:該輸出結果只顯示 SysV 服務,並不包含 原生 systemd 服務。SysV 配置數據 可能被原生 systemd 配置覆蓋。 要列出 systemd 服務,請執行 'systemctl list-unit-files'。 查看在具體 target 啓用的服務請執行 'systemctl list-dependencies [target]'。 mysql 0:關 1:關 2:開 3:開 4:開 5:開 6:關 netconsole 0:關 1:關 2:關 3:關 4:關 5:關 6:關 network 0:關 1:關 2:開 3:開 4:開 5:開 6:關 [root@linux-001 mysql]#
[root@linux-001 mysql]# service mysql start Starting MySQL.Logging to '/data/mysql/linux-001.err'. . SUCCESS! [root@linux-001 mysql]# ps aux|grep mysql root 84848 0.0 0.0 11816 1628 pts/0 S 19:53 0:00 /bin/sh /usr/local/mysql/bin/mysqld_safe --datadir=/data/mysql --pid-file=/data/mysql/linux-001.pid mysql 84986 7.0 24.1 1302736 449796 pts/0 Sl 19:53 0:00 /usr/local/mysql/bin/mysqld --basedir=/usr/local/mysql --datadir=/data/mysql --plugin-dir=/usr/local/mysql/lib/plugin --user=mysql --log-error=linux-001.err --pid-file=/data/mysql/linux-001.pid --socket=/tmp/mysql.sock root 85029 0.0 0.0 112724 984 pts/0 R+ 19:53 0:00 grep --color=auto mysql [root@linux-001 mysql]# service mysql stop Shutting down MySQL..190506 20:01:01 mysqld_safe mysqld from pid file /data/mysql/linux-001.pid ended SUCCESS! [1]+ 完成 /usr/local/mysql/bin/mysqld_safe --defaults-file=/etc/my.cnf --user=mysql --datadir=/data/mysql/ [root@linux-001 mysql]# !ps ps aux |grep mysql root 85893 0.0 0.0 112724 984 pts/1 R+ 20:01 0:00 grep --color=auto mysql [root@linux-001 mysql]#
/usr/local/mysql/bin/mysqld_safe --defaults-file=/etc/my.cnf --user=mysql --datadir=/data/mysql/ &
–defaults-file=/etc/my.cnf 指定啓動的配置文件
–user=mysql 指定啓動用戶
–datadir=/data/mysql/ 指定啓動數據存儲位置redis
[root@linux-001 mysql]# /usr/local/mysql/bin/mysqld_safe --defaults-file=/etc/my.cnf --user=mysql --datadir=/data/mysql/ & [1] 85529 [root@linux-001 mysql]# 190506 19:58:20 mysqld_safe Logging to '/data/mysql/linux-001.err'. 190506 19:58:20 mysqld_safe Starting mysqld daemon with databases from /data/mysql [root@linux-001 mysql]# !ps ps aux |grep mysql root 85529 0.0 0.0 113308 1640 pts/1 S 19:58 0:00 /bin/sh /usr/local/mysql/bin/mysqld_safe --defaults-file=/etc/my.cnf --user=mysql --datadir=/data/mysql/ mysql 85663 0.4 24.1 1302736 449780 pts/1 Sl 19:58 0:00 /usr/local/mysql/bin/mysqld --defaults-file=/etc/my.cnf --basedir=/usr/local/mysql --datadir=/data/mysql --plugin-dir=/usr/local/mysql/lib/plugin --user=mysql --log-error=linux-001.err --pid-file=linux-001.pid --socket=/tmp/mysql.sock root 85806 0.0 0.0 112724 988 pts/1 R+ 20:00 0:00 grep --color=auto mysql [root@linux-001 mysql]# [root@linux-001 mysql]# netstat -lntp Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 27416/sshd tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 7003/master tcp6 0 0 :::3306 :::* LISTEN 86158/mysqld tcp6 0 0 :::22 :::* LISTEN 27416/sshd tcp6 0 0 ::1:25 :::* LISTEN 7003/master [root@linux-001 mysql]# [root@linux-001 mysql]# killall mysqld [root@linux-001 mysql]# ps aux|grep mysql root 85098 0.0 0.0 112724 988 pts/0 R+ 19:54 0:00 grep --color=auto mysql
補充:mysql的引擎innodb和 myisam 先了解sql
mariadb的二進制安裝和配置說明shell
在mariadb官網找mariadb二進制編譯包(10.2版本的二進制編譯包包含配置文件,10.3的包不包含配置文件);下載二進制編譯包到 /usr/local/src/ 下數據庫
[root@linux-001 ~]# cd /usr/local/src/ [root@linux-001 src]# wget https://mirrors.tuna.tsinghua.edu.cn/mariadb//mariadb-10.2.23/bintar-linux-glibc_214-x86_64/mariadb-10.2.23-linux-glibc_214-x86_64.tar.gz --2019-05-06 21:20:25-- https://mirrors.tuna.tsinghua.edu.cn/mariadb//mariadb-10.2.23/bintar-linux-glibc_214-x86_64/mariadb-10.2.23-linux-glibc_214-x86_64.tar.gz 正在解析主機 mirrors.tuna.tsinghua.edu.cn (mirrors.tuna.tsinghua.edu.cn)... 101.6.8.193, 2402:f000:1:408:8100::1 正在鏈接 mirrors.tuna.tsinghua.edu.cn (mirrors.tuna.tsinghua.edu.cn)|101.6.8.193|:443... 已鏈接。 已發出 HTTP 請求,正在等待迴應... 200 OK 長度:610755981 (582M) [application/x-gzip] 正在保存至: 「mariadb-10.2.23-linux-glibc_214-x86_64.tar.gz」 100%[===========================================================================================>] 610,755,981 1.67MB/s 用時 6m 43s 2019-05-06 21:27:13 (1.45 MB/s) - 已保存 「mariadb-10.2.23-linux-glibc_214-x86_64.tar.gz」 [610755981/610755981])
[root@linux-001 src]# tar -zxvf mariadb-10.2.23-linux-glibc_214-x86_64.tar.gz …… mariadb-10.2.23-linux-glibc_214-x86_64/README-wsrep mariadb-10.2.23-linux-glibc_214-x86_64/INSTALL-BINARY mariadb-10.2.23-linux-glibc_214-x86_64/EXCEPTIONS-CLIENT mariadb-10.2.23-linux-glibc_214-x86_64/COPYING.thirdparty mariadb-10.2.23-linux-glibc_214-x86_64/COPYING mariadb-10.2.23-linux-glibc_214-x86_64/CREDITS mariadb-10.2.23-linux-glibc_214-x86_64/README.md
[root@linux-001 src]# mv mariadb-10.2.23-linux-glibc_214-x86_64 /usr/local/mariadb [root@linux-001 src]# cd !$ cd /usr/local/mariadb
因爲系統已經安裝mysql,因此複製 support-files文件夾下的配置文件到 /usr/local/mariadb/my.cnf 下,若未安裝mysql,能夠複製配置文件到 /etc/my.cnf ,修改此配置文件,在mysqld配置段添加一行配置 datadir = /data/mariadb,否則啓動mariadb服務,會自動找到mysql的datadir下,能夠先不添加試試。
[root@linux-001 mariadb]# cp support-files/my-small.cnf /usr/local/mariadb/my.cnf [root@linux-001 mariadb]# vim /usr/local/mariadb/my.cnf
複製 support-files文件夾下mysql.service 到 /etc/init.d/mariadb ,須要修改配置文件中的basedir和datadir,須要添加一行conf =/usr/local/mariadb/my.cnf ,而且須要把start的位置處加–defaults-file="$conf" ;
[root@linux-001 mariadb]# cp support-files/mysql.server /etc/init.d/mariadb [root@linux-001 mariadb]# vim /etc/init.d/mariadb …… basedir=/usr/local/mariadb datadir=/data/mariadb conf=/usr/local/mariadb/my.cnf …… case "$mode" in 'start') # Start daemon # Safeguard (relative paths, core dumps..) cd $basedir echo $echo_n "Starting MariaDB" if test -x $bindir/mysqld_safe then # Give extra arguments to mysqld with the my.cnf file. This script # may be overwritten at next upgrade. $bindir/mysqld_safe --defaults-file="$conf" --datadir="$datadir" --pid-file="$mysqld_pid_file_path" "$@" & wait_for_ready; return_value=$? ……
[root@linux-001 mariadb]# ./scripts/mysql_install_db --user=mysql --datadir=/data/mariadb Installing MariaDB/MySQL system tables in '/data/mariadb' ... OK To start mysqld at boot time you have to copy support-files/mysql.server to the right place for your system PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER ! To do so, start the server, then issue the following commands: './bin/mysqladmin' -u root password 'new-password' './bin/mysqladmin' -u root -h linux-001 password 'new-password' Alternatively you can run: './bin/mysql_secure_installation' which will also give you the option of removing the test databases and anonymous user created by default. This is strongly recommended for production servers. See the MariaDB Knowledgebase at http://mariadb.com/kb or the MySQL manual for more instructions. You can start the MariaDB daemon with: cd '.' ; ./bin/mysqld_safe --datadir='/data/mariadb' You can test the MariaDB daemon with mysql-test-run.pl cd './mysql-test' ; perl mysql-test-run.pl Please report any problems at http://mariadb.org/jira The latest information about MariaDB is available at http://mariadb.org/. You can find additional information about the MySQL part at: http://dev.mysql.com Consider joining MariaDB's strong and vibrant community: https://mariadb.org/get-involved/ [root@linux-001 mariadb]# echo $? 0
[root@linux-001 mariadb]# service mariadb start Reloading systemd: [ 肯定 ] Starting mariadb (via systemctl): [ 肯定 ] [root@linux-001 mariadb]# ps aux |grep mysql root 8247 0.0 0.0 115436 1760 ? S 06:53 0:00 /bin/sh /usr/local/mariadb/bin/mysqld_safe --defaults-file=/usr/local/mariadb/my.cnf --datadir=/data/mariadb --pid-file=/data/mariadb/linux-001.pid mysql 8359 3.2 3.1 1124476 58668 ? Sl 06:53 0:00 /usr/local/mariadb/bin/mysqld --defaults-file=/usr/local/mariadb/my.cnf --basedir=/usr/local/mariadb --datadir=/data/mariadb --plugin-dir=/usr/local/mariadb/lib/plugin --user=mysql --log-error=/data/mariadb/linux-001.err --pid-file=/data/mariadb/linux-001.pid --socket=/tmp/mysql.sock --port=3306 root 8401 0.0 0.0 112724 988 pts/0 R+ 06:53 0:00 grep --color=auto mysql
沒有在my.cnf配置文件中添加datadir的位置,會致使以下圖中,數據存儲位置是 /data/mysql/,而不是/data/mariadb。
[root@linux-01 ~]# cd /usr/local/src/ [root@linux-01 src]# ls [root@linux-01 src]# [root@linux-01 src]# wget http://archive.apache.org/dist/apr/apr-1.7.0.tar.gz --2019-05-07 00:37:35-- http://archive.apache.org/dist/apr/apr-1.7.0.tar.gz 正在解析主機 archive.apache.org (archive.apache.org)... 163.172.17.199 正在鏈接 archive.apache.org (archive.apache.org)|163.172.17.199|:80... 已鏈接。 已發出 HTTP 請求,正在等待迴應... 200 OK 長度:1093896 (1.0M) [application/x-gzip] 正在保存至: 「apr-1.7.0.tar.gz」 100%[========================================================================================================>] 1,093,896 21.9KB/s 用時 59s 2019-05-07 00:38:35 (18.2 KB/s) - 已保存 「apr-1.7.0.tar.gz」 [1093896/1093896]) [root@linux-01 src]# wget http://archive.apache.org/dist/apr/apr-util-1.6.1.tar.gz --2019-05-07 00:38:41-- http://archive.apache.org/dist/apr/apr-util-1.6.1.tar.gz 正在解析主機 archive.apache.org (archive.apache.org)... 163.172.17.199 正在鏈接 archive.apache.org (archive.apache.org)|163.172.17.199|:80... 已鏈接。 已發出 HTTP 請求,正在等待迴應... 200 OK 長度:554301 (541K) [application/x-gzip] 正在保存至: 「apr-util-1.6.1.tar.gz」 100%[========================================================================================================>] 554,301 28.3KB/s 用時 28s 2019-05-07 00:39:09 (19.4 KB/s) - 已保存 「apr-util-1.6.1.tar.gz」 [554301/554301]) [root@linux-01 src]# wget https://mirrors.cnnic.cn/apache/httpd/httpd-2.4.39.tar.gz --2019-05-07 00:39:30-- https://mirrors.cnnic.cn/apache/httpd/httpd-2.4.39.tar.gz 正在解析主機 mirrors.cnnic.cn (mirrors.cnnic.cn)... 101.6.8.193, 2402:f000:1:408:8100::1 正在鏈接 mirrors.cnnic.cn (mirrors.cnnic.cn)|101.6.8.193|:443... 已鏈接。 已發出 HTTP 請求,正在等待迴應... 200 OK 長度:9199150 (8.8M) [application/x-gzip] 正在保存至: 「httpd-2.4.39.tar.gz」 100%[========================================================================================================>] 9,199,150 1.05MB/s 用時 11s 2019-05-07 00:39:41 (834 KB/s) - 已保存 「httpd-2.4.39.tar.gz」 [9199150/9199150])
[root@linux-01 src]# tar -zxvf httpd-2.4.39.tar.gz …… httpd-2.4.39/docs/manual/ssl/ssl_intro.html.fr.utf8 httpd-2.4.39/docs/manual/ssl/ssl_intro.html.en httpd-2.4.39/docs/manual/ssl/ssl_compat.html.fr.utf8 httpd-2.4.39/docs/manual/glossary.html.fr.utf8 httpd-2.4.39/docs/manual/caching.html httpd-2.4.39/docs/manual/custom-error.html.ja.utf8 httpd-2.4.39/docs/manual/new_features_2_2.html.tr.utf8 httpd-2.4.39/docs/manual/stopping.html.es httpd-2.4.39/docs/manual/new_features_2_0.html.fr.utf8 httpd-2.4.39/docs/manual/new_features_2_0.html httpd-2.4.39/docs/manual/urlmapping.html httpd-2.4.39/buildconf httpd-2.4.39/Makefile.in httpd-2.4.39/srclib/ httpd-2.4.39/srclib/Makefile.in [root@linux-01 src]# tar -zxvf apr-1.7.0.tar.gz …… apr-1.7.0/build/aprapp.dep apr-1.7.0/build/libtool.m4 apr-1.7.0/build/preaprapp.dsp apr-1.7.0/build/get-version.sh apr-1.7.0/build/cvtdsp.pl apr-1.7.0/build/buildcheck.sh apr-1.7.0/build/libaprapp.dep apr-1.7.0/build/ltmain.sh apr-1.7.0/build/PrintPath apr-1.7.0/build/libaprapp.dsp apr-1.7.0/apr.dsw apr-1.7.0/libapr.dep [root@linux-01 src]# tar -zxvf apr-util-1.6.1.tar.gz …… apr-util-1.6.1/dbm/NWGNUmakefile apr-util-1.6.1/dbm/apr_dbm_db.mak apr-util-1.6.1/dbm/NWGNUdbmgdbm apr-util-1.6.1/dbm/apr_dbm.c apr-util-1.6.1/dbm/apr_dbm_sdbm.c apr-util-1.6.1/dbm/apr_dbm_db.dsp apr-util-1.6.1/dbm/apr_dbm_db.dep apr-util-1.6.1/dbm/apr_dbm_berkeleydb.c apr-util-1.6.1/dbm/apr_dbm_gdbm.dsp apr-util-1.6.1/dbm/NWGNUdbmdb apr-util-1.6.1/dbm/apr_dbm_gdbm.mak
[root@linux-01 apr-1.7.0]# ls apr-config.in apr.pc.in build.conf configure encoding libapr.dsp Makefile.in network_io random support tools apr.dep apr.spec build-outputs.mk configure.in file_io libapr.mak Makefile.win NOTICE README tables user apr.dsp atomic CHANGES docs helpers libapr.rc memory NWGNUmakefile README.cmake test apr.dsw build CMakeLists.txt dso include LICENSE misc passwd shmem threadproc apr.mak buildconf config.layout emacs-mode libapr.dep locks mmap poll strings time [root@linux-01 apr-1.7.0]# ./configure --prefix=/usr/local/apr checking build system type... x86_64-pc-linux-gnu checking host system type... x86_64-pc-linux-gnu checking target system type... x86_64-pc-linux-gnu Configuring APR library Platform: x86_64-pc-linux-gnu checking for working mkdir -p... yes APR Version: 1.7.0 checking for chosen layout... apr checking for gcc... no checking for cc... no checking for cl.exe... no configure: error: in `/usr/local/src/apr-1.7.0': configure: error: no acceptable C compiler found in $PATH See `config.log' for more details
安裝apr的時候會提示如上的錯誤,說明缺乏gcc,能夠使用yum install -y gcc來安裝gcc。
[root@linux-01 apr-1.7.0]# yum install -y gcc 已加載插件:fastestmirror, langpacks Determining fastest mirrors * base: mirrors.aliyun.com * extras: mirrors.163.com * updates: mirrors.aliyun.com base | 3.6 kB 00:00:00 extras | 3.4 kB 00:00:00 updates | 3.4 kB 00:00:00 (1/2): extras/7/x86_64/primary_db | 201 kB 00:00:01 (2/2): updates/7/x86_64/primary_db | 4.2 MB 00:00:05 正在解決依賴關係 --> 正在檢查事務 ---> 軟件包 gcc.x86_64.0.4.8.5-36.el7_6.2 將被 安裝 --> 正在處理依賴關係 libgomp = 4.8.5-36.el7_6.2,它被軟件包 gcc-4.8.5-36.el7_6.2.x86_64 須要 --> 正在處理依賴關係 cpp = 4.8.5-36.el7_6.2,它被軟件包 gcc-4.8.5-36.el7_6.2.x86_64 須要 --> 正在處理依賴關係 libgcc >= 4.8.5-36.el7_6.2,它被軟件包 gcc-4.8.5-36.el7_6.2.x86_64 須要 --> 正在處理依賴關係 glibc-devel >= 2.2.90-12,它被軟件包 gcc-4.8.5-36.el7_6.2.x86_64 須要 --> 正在檢查事務 ---> 軟件包 cpp.x86_64.0.4.8.5-36.el7_6.2 將被 安裝 ---> 軟件包 glibc-devel.x86_64.0.2.17-260.el7_6.4 將被 安裝 --> 正在處理依賴關係 glibc-headers = 2.17-260.el7_6.4,它被軟件包 glibc-devel-2.17-260.el7_6.4.x86_64 須要 --> 正在處理依賴關係 glibc = 2.17-260.el7_6.4,它被軟件包 glibc-devel-2.17-260.el7_6.4.x86_64 須要 --> 正在處理依賴關係 glibc-headers,它被軟件包 glibc-devel-2.17-260.el7_6.4.x86_64 須要 ---> 軟件包 libgcc.x86_64.0.4.8.5-36.el7 將被 升級 ---> 軟件包 libgcc.x86_64.0.4.8.5-36.el7_6.2 將被 更新 ---> 軟件包 libgomp.x86_64.0.4.8.5-36.el7 將被 升級 ---> 軟件包 libgomp.x86_64.0.4.8.5-36.el7_6.2 將被 更新 --> 正在檢查事務 ---> 軟件包 glibc.x86_64.0.2.17-260.el7 將被 升級 --> 正在處理依賴關係 glibc = 2.17-260.el7,它被軟件包 glibc-common-2.17-260.el7.x86_64 須要 ---> 軟件包 glibc.x86_64.0.2.17-260.el7_6.4 將被 更新 ---> 軟件包 glibc-headers.x86_64.0.2.17-260.el7_6.4 將被 安裝 --> 正在處理依賴關係 kernel-headers >= 2.2.1,它被軟件包 glibc-headers-2.17-260.el7_6.4.x86_64 須要 --> 正在處理依賴關係 kernel-headers,它被軟件包 glibc-headers-2.17-260.el7_6.4.x86_64 須要 --> 正在檢查事務 ---> 軟件包 glibc-common.x86_64.0.2.17-260.el7 將被 升級 ---> 軟件包 glibc-common.x86_64.0.2.17-260.el7_6.4 將被 更新 ---> 軟件包 kernel-headers.x86_64.0.3.10.0-957.12.1.el7 將被 安裝 --> 解決依賴關係完成 依賴關係解決 ================================================================================================================================================== Package 架構 版本 源 大小 ================================================================================================================================================== 正在安裝: gcc x86_64 4.8.5-36.el7_6.2 updates 16 M 爲依賴而安裝: cpp x86_64 4.8.5-36.el7_6.2 updates 5.9 M glibc-devel x86_64 2.17-260.el7_6.4 updates 1.1 M glibc-headers x86_64 2.17-260.el7_6.4 updates 683 k kernel-headers x86_64 3.10.0-957.12.1.el7 updates 8.0 M 爲依賴而更新: glibc x86_64 2.17-260.el7_6.4 updates 3.7 M glibc-common x86_64 2.17-260.el7_6.4 updates 12 M libgcc x86_64 4.8.5-36.el7_6.2 updates 102 k libgomp x86_64 4.8.5-36.el7_6.2 updates 158 k 事務概要 ================================================================================================================================================== 安裝 1 軟件包 (+4 依賴軟件包) 升級 ( 4 依賴軟件包) 總下載量:47 M Downloading packages: updates/7/x86_64/prestodelta | 623 kB 00:00:02 Delta RPMs reduced 3.9 M of updates to 823 k (79% saved) (1/9): libgcc-4.8.5-36.el7_4.8.5-36.el7_6.2.x86_64.drpm | 44 kB 00:00:00 (2/9): libgomp-4.8.5-36.el7_4.8.5-36.el7_6.2.x86_64.drpm | 45 kB 00:00:00 (3/9): glibc-2.17-260.el7_2.17-260.el7_6.4.x86_64.drpm | 734 kB 00:00:01 (4/9): glibc-headers-2.17-260.el7_6.4.x86_64.rpm | 683 kB 00:00:01 (5/9): glibc-devel-2.17-260.el7_6.4.x86_64.rpm | 1.1 MB 00:00:13 (6/9): cpp-4.8.5-36.el7_6.2.x86_64.rpm | 5.9 MB 00:00:17 (7/9): kernel-headers-3.10.0-957.12.1.el7.x86_64.rpm | 8.0 MB 00:00:23 (8/9): gcc-4.8.5-36.el7_6.2.x86_64.rpm | 16 MB 00:00:39 (9/9): glibc-common-2.17-260.el7_6.4.x86_64.rpm | 12 MB 00:00:39 -------------------------------------------------------------------------------------------------------------------------------------------------- 總計 1.1 MB/s | 44 MB 00:00:40 Running transaction check Running transaction test Transaction test succeeded Running transaction 正在更新 : libgcc-4.8.5-36.el7_6.2.x86_64 1/13 正在更新 : glibc-common-2.17-260.el7_6.4.x86_64 2/13 正在更新 : glibc-2.17-260.el7_6.4.x86_64 3/13 正在更新 : libgomp-4.8.5-36.el7_6.2.x86_64 4/13 正在安裝 : cpp-4.8.5-36.el7_6.2.x86_64 5/13 正在安裝 : kernel-headers-3.10.0-957.12.1.el7.x86_64 6/13 正在安裝 : glibc-headers-2.17-260.el7_6.4.x86_64 7/13 正在安裝 : glibc-devel-2.17-260.el7_6.4.x86_64 8/13 正在安裝 : gcc-4.8.5-36.el7_6.2.x86_64 9/13 清理 : libgomp-4.8.5-36.el7.x86_64 10/13 清理 : glibc-common-2.17-260.el7.x86_64 11/13 清理 : glibc-2.17-260.el7.x86_64 12/13 清理 : libgcc-4.8.5-36.el7.x86_64 13/13 驗證中 : glibc-2.17-260.el7_6.4.x86_64 1/13 驗證中 : glibc-devel-2.17-260.el7_6.4.x86_64 2/13 驗證中 : glibc-headers-2.17-260.el7_6.4.x86_64 3/13 驗證中 : glibc-common-2.17-260.el7_6.4.x86_64 4/13 驗證中 : libgcc-4.8.5-36.el7_6.2.x86_64 5/13 驗證中 : libgomp-4.8.5-36.el7_6.2.x86_64 6/13 驗證中 : cpp-4.8.5-36.el7_6.2.x86_64 7/13 驗證中 : gcc-4.8.5-36.el7_6.2.x86_64 8/13 驗證中 : kernel-headers-3.10.0-957.12.1.el7.x86_64 9/13 驗證中 : glibc-2.17-260.el7.x86_64 10/13 驗證中 : libgomp-4.8.5-36.el7.x86_64 11/13 驗證中 : glibc-common-2.17-260.el7.x86_64 12/13 驗證中 : libgcc-4.8.5-36.el7.x86_64 13/13 已安裝: gcc.x86_64 0:4.8.5-36.el7_6.2 做爲依賴被安裝: cpp.x86_64 0:4.8.5-36.el7_6.2 glibc-devel.x86_64 0:2.17-260.el7_6.4 glibc-headers.x86_64 0:2.17-260.el7_6.4 kernel-headers.x86_64 0:3.10.0-957.12.1.el7 做爲依賴被升級: glibc.x86_64 0:2.17-260.el7_6.4 glibc-common.x86_64 0:2.17-260.el7_6.4 libgcc.x86_64 0:4.8.5-36.el7_6.2 libgomp.x86_64 0:4.8.5-36.el7_6.2 完畢!
gcc安裝好以後,須要對apr進行從新編譯安裝。
[root@linux-01 apr-1.7.0]# ./configure --prefix=/usr/local/apr …… configure: creating ./config.status config.status: creating Makefile config.status: creating include/apr.h config.status: creating build/apr_rules.mk config.status: creating build/pkg/pkginfo config.status: creating apr-1-config config.status: creating apr.pc config.status: creating test/Makefile config.status: creating test/internal/Makefile config.status: creating include/arch/unix/apr_private.h config.status: executing libtool commands rm: cannot remove 'libtoolT': No such file or directory config.status: executing default commands [root@linux-01 apr-1.7.0]# echo $? 0 [root@linux-01 apr-1.7.0]# make && make install …… ---------------------------------------------------------------------- /usr/bin/install -c -m 644 apr.exp /usr/local/apr/lib/apr.exp /usr/bin/install -c -m 644 apr.pc /usr/local/apr/lib/pkgconfig/apr-1.pc for f in libtool shlibtool; do \ if test -f ${f}; then /usr/bin/install -c -m 755 ${f} /usr/local/apr/build-1; fi; \ done /usr/bin/install -c -m 755 /usr/local/src/apr-1.7.0/build/mkdir.sh /usr/local/apr/build-1 for f in make_exports.awk make_var_export.awk; do \ /usr/bin/install -c -m 644 /usr/local/src/apr-1.7.0/build/${f} /usr/local/apr/build-1; \ done /usr/bin/install -c -m 644 build/apr_rules.out /usr/local/apr/build-1/apr_rules.mk /usr/bin/install -c -m 755 apr-config.out /usr/local/apr/bin/apr-1-config [root@linux-01 apr-1.7.0]# echo $? 0 [root@linux-01 apr-util-1.6.1]# ls /usr/local/apr/ bin build-1 include lib
[root@linux-01 apr-1.7.0]# cd ../apr-util-1.6.1/ [root@linux-01 apr-util-1.6.1]# ls aprutil.dep apu-config.in CHANGES dbd include LICENSE NWGNUmakefile strmatch aprutil.dsp buckets CMakeLists.txt dbm ldap Makefile.in README test aprutil.dsw build config.layout docs libaprutil.dep Makefile.win README.cmake uri aprutil.mak buildconf configure encoding libaprutil.dsp memcache README.FREETDS xlate apr-util.pc.in build.conf configure.in export_vars.sh.in libaprutil.mak misc redis xml apr-util.spec build-outputs.mk crypto hooks libaprutil.rc NOTICE renames_pending [root@linux-01 apr-util-1.6.1]# ./configure --with-apr=/usr/local/apr --prefix=/usr/local/apr-util checking build system type... x86_64-pc-linux-gnu checking host system type... x86_64-pc-linux-gnu checking target system type... x86_64-pc-linux-gnu checking for a BSD-compatible install... /usr/bin/install -c checking for working mkdir -p... yes APR-util Version: 1.6.1 checking for chosen layout... apr-util checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed Applying apr-util hints file rules for x86_64-pc-linux-gnu checking for APR... yes setting CPP to "gcc -E" adding "-pthread" to CFLAGS setting CPPFLAGS to " -DLINUX -D_REENTRANT -D_GNU_SOURCE" checking how to run the C preprocessor... gcc -E checking for grep that handles long lines and -e... /usr/bin/grep checking for egrep... /usr/bin/grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking for ldap support... checking for default DBM... sdbm (default) checking for pg_config... no checking libpq-fe.h usability... no checking libpq-fe.h presence... no checking for libpq-fe.h... no checking postgresql/libpq-fe.h usability... no checking postgresql/libpq-fe.h presence... no checking for postgresql/libpq-fe.h... no checking sqlite3.h usability... no checking sqlite3.h presence... no checking for sqlite3.h... no checking sqlite.h usability... no checking sqlite.h presence... no checking for sqlite.h... no checking for odbc_config... no checking sql.h usability... no checking sql.h presence... no checking for sql.h... no checking odbc/sql.h usability... no checking odbc/sql.h presence... no checking for odbc/sql.h... no checking Expat 1.95.x... no checking old Debian-packaged expat... no checking old FreeBSD-packaged expat... no checking Expat 1.0/1.1... no setting LDFLAGS to "-L/usr/local/lib" adding "-I/usr/local/include" to CPPFLAGS checking Expat 1.95.x in /usr/local... no nulling LDFLAGS removed "-I/usr/local/include" from CPPFLAGS setting APRUTIL_EXPORT_LIBS to "" setting APRUTIL_LIBS to "" checking iconv.h usability... yes checking iconv.h presence... yes checking for iconv.h... yes checking for type of inbuf parameter to iconv... char ** checking for iconv.h... (cached) yes checking langinfo.h usability... yes checking langinfo.h presence... yes checking for langinfo.h... yes checking for nl_langinfo... yes checking for CODESET in langinfo.h... yes checking whether APR has DSO support... yes checking for library containing crypt... -lcrypt checking if system crypt() function is threadsafe... no checking for crypt_r... yes checking style of crypt_r... struct_crypt_data checking whether the compiler handles weak symbols... yes checking for memset_s support... no checking for explicit_bzero support... no setting APRUTIL_LIBS to " /usr/local/apr/lib/libapr-1.la -lrt -lcrypt -lpthread -ldl" configure: creating ./config.status config.status: creating Makefile config.status: creating export_vars.sh config.status: creating build/pkg/pkginfo config.status: creating apr-util.pc config.status: creating apu-1-config config.status: creating include/private/apu_select_dbm.h config.status: creating include/apr_ldap.h config.status: creating include/apu.h config.status: creating include/apu_want.h config.status: creating test/Makefile config.status: creating include/private/apu_config.h config.status: include/private/apu_config.h is unchanged config.status: executing default commands [root@linux-01 apr-util-1.6.1]# echo $? 0 [root@linux-01 apr-util-1.6.1]# make && make install make[1]: 進入目錄「/usr/local/src/apr-util-1.6.1」 /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o buckets/apr_brigade.lo -c buckets/apr_brigade.c && touch buckets/apr_brigade.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o buckets/apr_buckets.lo -c buckets/apr_buckets.c && touch buckets/apr_buckets.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o buckets/apr_buckets_alloc.lo -c buckets/apr_buckets_alloc.c && touch buckets/apr_buckets_alloc.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o buckets/apr_buckets_eos.lo -c buckets/apr_buckets_eos.c && touch buckets/apr_buckets_eos.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o buckets/apr_buckets_file.lo -c buckets/apr_buckets_file.c && touch buckets/apr_buckets_file.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o buckets/apr_buckets_flush.lo -c buckets/apr_buckets_flush.c && touch buckets/apr_buckets_flush.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o buckets/apr_buckets_heap.lo -c buckets/apr_buckets_heap.c && touch buckets/apr_buckets_heap.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o buckets/apr_buckets_mmap.lo -c buckets/apr_buckets_mmap.c && touch buckets/apr_buckets_mmap.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o buckets/apr_buckets_pipe.lo -c buckets/apr_buckets_pipe.c && touch buckets/apr_buckets_pipe.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o buckets/apr_buckets_pool.lo -c buckets/apr_buckets_pool.c && touch buckets/apr_buckets_pool.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o buckets/apr_buckets_refcount.lo -c buckets/apr_buckets_refcount.c && touch buckets/apr_buckets_refcount.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o buckets/apr_buckets_simple.lo -c buckets/apr_buckets_simple.c && touch buckets/apr_buckets_simple.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o buckets/apr_buckets_socket.lo -c buckets/apr_buckets_socket.c && touch buckets/apr_buckets_socket.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o crypto/apr_crypto.lo -c crypto/apr_crypto.c && touch crypto/apr_crypto.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o crypto/apr_md4.lo -c crypto/apr_md4.c && touch crypto/apr_md4.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o crypto/apr_md5.lo -c crypto/apr_md5.c && touch crypto/apr_md5.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o crypto/apr_passwd.lo -c crypto/apr_passwd.c && touch crypto/apr_passwd.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o crypto/apr_sha1.lo -c crypto/apr_sha1.c && touch crypto/apr_sha1.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o crypto/apr_siphash.lo -c crypto/apr_siphash.c && touch crypto/apr_siphash.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o crypto/crypt_blowfish.lo -c crypto/crypt_blowfish.c && touch crypto/crypt_blowfish.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o crypto/getuuid.lo -c crypto/getuuid.c && touch crypto/getuuid.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o crypto/uuid.lo -c crypto/uuid.c && touch crypto/uuid.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o dbd/apr_dbd.lo -c dbd/apr_dbd.c && touch dbd/apr_dbd.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o dbm/apr_dbm.lo -c dbm/apr_dbm.c && touch dbm/apr_dbm.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o dbm/apr_dbm_sdbm.lo -c dbm/apr_dbm_sdbm.c && touch dbm/apr_dbm_sdbm.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o dbm/sdbm/sdbm.lo -c dbm/sdbm/sdbm.c && touch dbm/sdbm/sdbm.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o dbm/sdbm/sdbm_hash.lo -c dbm/sdbm/sdbm_hash.c && touch dbm/sdbm/sdbm_hash.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o dbm/sdbm/sdbm_lock.lo -c dbm/sdbm/sdbm_lock.c && touch dbm/sdbm/sdbm_lock.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o dbm/sdbm/sdbm_pair.lo -c dbm/sdbm/sdbm_pair.c && touch dbm/sdbm/sdbm_pair.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o encoding/apr_base64.lo -c encoding/apr_base64.c && touch encoding/apr_base64.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o hooks/apr_hooks.lo -c hooks/apr_hooks.c && touch hooks/apr_hooks.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o ldap/apr_ldap_stub.lo -c ldap/apr_ldap_stub.c && touch ldap/apr_ldap_stub.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o ldap/apr_ldap_url.lo -c ldap/apr_ldap_url.c && touch ldap/apr_ldap_url.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o memcache/apr_memcache.lo -c memcache/apr_memcache.c && touch memcache/apr_memcache.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o misc/apr_date.lo -c misc/apr_date.c && touch misc/apr_date.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o misc/apr_queue.lo -c misc/apr_queue.c && touch misc/apr_queue.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o misc/apr_reslist.lo -c misc/apr_reslist.c && touch misc/apr_reslist.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o misc/apr_rmm.lo -c misc/apr_rmm.c && touch misc/apr_rmm.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o misc/apr_thread_pool.lo -c misc/apr_thread_pool.c && touch misc/apr_thread_pool.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o misc/apu_dso.lo -c misc/apu_dso.c && touch misc/apu_dso.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o misc/apu_version.lo -c misc/apu_version.c && touch misc/apu_version.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o redis/apr_redis.lo -c redis/apr_redis.c && touch redis/apr_redis.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o strmatch/apr_strmatch.lo -c strmatch/apr_strmatch.c && touch strmatch/apr_strmatch.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o uri/apr_uri.lo -c uri/apr_uri.c && touch uri/apr_uri.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o xlate/xlate.lo -c xlate/xlate.c && touch xlate/xlate.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o xml/apr_xml.lo -c xml/apr_xml.c && touch xml/apr_xml.lo xml/apr_xml.c:35:19: 致命錯誤:expat.h:沒有那個文件或目錄 #include <expat.h> ^ 編譯中斷。 make[1]: *** [xml/apr_xml.lo] 錯誤 1 make[1]: 離開目錄「/usr/local/src/apr-util-1.6.1」 make: *** [all-recursive] 錯誤 1
缺乏依賴expat,致使報錯,安裝expat的包。
[root@linux-01 apr-util-1.6.1]# yum install -y expat-devel 已加載插件:fastestmirror, langpacks Loading mirror speeds from cached hostfile * base: mirrors.aliyun.com * extras: mirrors.163.com * updates: mirrors.aliyun.com 正在解決依賴關係 --> 正在檢查事務 ---> 軟件包 expat-devel.x86_64.0.2.1.0-10.el7_3 將被 安裝 --> 解決依賴關係完成 依賴關係解決 ================================================================================================================================================== Package 架構 版本 源 大小 ================================================================================================================================================== 正在安裝: expat-devel x86_64 2.1.0-10.el7_3 base 57 k 事務概要 ================================================================================================================================================== 安裝 1 軟件包 總下載量:57 k 安裝大小:178 k Downloading packages: expat-devel-2.1.0-10.el7_3.x86_64.rpm | 57 kB 00:00:00 Running transaction check Running transaction test Transaction test succeeded Running transaction 正在安裝 : expat-devel-2.1.0-10.el7_3.x86_64 1/1 驗證中 : expat-devel-2.1.0-10.el7_3.x86_64 1/1 已安裝: expat-devel.x86_64 0:2.1.0-10.el7_3 完畢! [root@linux-01 apr-util-1.6.1]#
[root@linux-01 apr-1.7.0]# cd ../apr-util-1.6.1/ [root@linux-01 apr-util-1.6.1]# [root@linux-01 apr-util-1.6.1]# ./configure --with-apr=/usr/local/apr --prefix=/usr/local/apr-util checking build system type... x86_64-pc-linux-gnu checking host system type... x86_64-pc-linux-gnu checking target system type... x86_64-pc-linux-gnu checking for a BSD-compatible install... /usr/bin/install -c checking for working mkdir -p... yes APR-util Version: 1.6.1 checking for chosen layout... apr-util checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed Applying apr-util hints file rules for x86_64-pc-linux-gnu checking for APR... yes setting CPP to "gcc -E" adding "-pthread" to CFLAGS setting CPPFLAGS to " -DLINUX -D_REENTRANT -D_GNU_SOURCE" checking how to run the C preprocessor... gcc -E checking for grep that handles long lines and -e... /usr/bin/grep checking for egrep... /usr/bin/grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking for ldap support... checking for default DBM... sdbm (default) checking for pg_config... no checking libpq-fe.h usability... no checking libpq-fe.h presence... no checking for libpq-fe.h... no checking postgresql/libpq-fe.h usability... no checking postgresql/libpq-fe.h presence... no checking for postgresql/libpq-fe.h... no checking sqlite3.h usability... no checking sqlite3.h presence... no checking for sqlite3.h... no checking sqlite.h usability... no checking sqlite.h presence... no checking for sqlite.h... no checking for odbc_config... no checking sql.h usability... no checking sql.h presence... no checking for sql.h... no checking odbc/sql.h usability... no checking odbc/sql.h presence... no checking for odbc/sql.h... no checking Expat 1.95.x... yes setting APRUTIL_EXPORT_LIBS to "-lexpat" setting APRUTIL_LIBS to "-lexpat" checking iconv.h usability... yes checking iconv.h presence... yes checking for iconv.h... yes checking for type of inbuf parameter to iconv... char ** checking for iconv.h... (cached) yes checking langinfo.h usability... yes checking langinfo.h presence... yes checking for langinfo.h... yes checking for nl_langinfo... yes checking for CODESET in langinfo.h... yes checking whether APR has DSO support... yes checking for library containing crypt... -lcrypt checking if system crypt() function is threadsafe... no checking for crypt_r... yes checking style of crypt_r... struct_crypt_data checking whether the compiler handles weak symbols... yes checking for memset_s support... no checking for explicit_bzero support... no adding "/usr/local/apr/lib/libapr-1.la" to APRUTIL_LIBS adding "-lrt" to APRUTIL_LIBS adding "-lcrypt" to APRUTIL_LIBS adding "-lpthread" to APRUTIL_LIBS adding "-ldl" to APRUTIL_LIBS configure: creating ./config.status config.status: creating Makefile config.status: creating export_vars.sh config.status: creating build/pkg/pkginfo config.status: creating apr-util.pc config.status: creating apu-1-config config.status: creating include/private/apu_select_dbm.h config.status: creating include/apr_ldap.h config.status: creating include/apu.h config.status: creating include/apu_want.h config.status: creating test/Makefile config.status: creating include/private/apu_config.h config.status: executing default commands [root@linux-01 apr-util-1.6.1]# echo $? 0 [root@linux-01 apr-util-1.6.1]# [root@linux-01 apr-util-1.6.1]# make && make install make[1]: 進入目錄「/usr/local/src/apr-util-1.6.1」 /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o buckets/apr_brigade.lo -c buckets/apr_brigade.c && touch buckets/apr_brigade.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o buckets/apr_buckets.lo -c buckets/apr_buckets.c && touch buckets/apr_buckets.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o buckets/apr_buckets_alloc.lo -c buckets/apr_buckets_alloc.c && touch buckets/apr_buckets_alloc.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o buckets/apr_buckets_eos.lo -c buckets/apr_buckets_eos.c && touch buckets/apr_buckets_eos.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o buckets/apr_buckets_file.lo -c buckets/apr_buckets_file.c && touch buckets/apr_buckets_file.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o buckets/apr_buckets_flush.lo -c buckets/apr_buckets_flush.c && touch buckets/apr_buckets_flush.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o buckets/apr_buckets_heap.lo -c buckets/apr_buckets_heap.c && touch buckets/apr_buckets_heap.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o buckets/apr_buckets_mmap.lo -c buckets/apr_buckets_mmap.c && touch buckets/apr_buckets_mmap.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o buckets/apr_buckets_pipe.lo -c buckets/apr_buckets_pipe.c && touch buckets/apr_buckets_pipe.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o buckets/apr_buckets_pool.lo -c buckets/apr_buckets_pool.c && touch buckets/apr_buckets_pool.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o buckets/apr_buckets_refcount.lo -c buckets/apr_buckets_refcount.c && touch buckets/apr_buckets_refcount.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o buckets/apr_buckets_simple.lo -c buckets/apr_buckets_simple.c && touch buckets/apr_buckets_simple.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o buckets/apr_buckets_socket.lo -c buckets/apr_buckets_socket.c && touch buckets/apr_buckets_socket.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o crypto/apr_crypto.lo -c crypto/apr_crypto.c && touch crypto/apr_crypto.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o crypto/apr_md4.lo -c crypto/apr_md4.c && touch crypto/apr_md4.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o crypto/apr_md5.lo -c crypto/apr_md5.c && touch crypto/apr_md5.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o crypto/apr_passwd.lo -c crypto/apr_passwd.c && touch crypto/apr_passwd.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o crypto/apr_sha1.lo -c crypto/apr_sha1.c && touch crypto/apr_sha1.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o crypto/apr_siphash.lo -c crypto/apr_siphash.c && touch crypto/apr_siphash.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o crypto/crypt_blowfish.lo -c crypto/crypt_blowfish.c && touch crypto/crypt_blowfish.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o crypto/getuuid.lo -c crypto/getuuid.c && touch crypto/getuuid.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o crypto/uuid.lo -c crypto/uuid.c && touch crypto/uuid.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o dbd/apr_dbd.lo -c dbd/apr_dbd.c && touch dbd/apr_dbd.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o dbm/apr_dbm.lo -c dbm/apr_dbm.c && touch dbm/apr_dbm.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o dbm/apr_dbm_sdbm.lo -c dbm/apr_dbm_sdbm.c && touch dbm/apr_dbm_sdbm.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o dbm/sdbm/sdbm.lo -c dbm/sdbm/sdbm.c && touch dbm/sdbm/sdbm.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o dbm/sdbm/sdbm_hash.lo -c dbm/sdbm/sdbm_hash.c && touch dbm/sdbm/sdbm_hash.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o dbm/sdbm/sdbm_lock.lo -c dbm/sdbm/sdbm_lock.c && touch dbm/sdbm/sdbm_lock.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o dbm/sdbm/sdbm_pair.lo -c dbm/sdbm/sdbm_pair.c && touch dbm/sdbm/sdbm_pair.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o encoding/apr_base64.lo -c encoding/apr_base64.c && touch encoding/apr_base64.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o hooks/apr_hooks.lo -c hooks/apr_hooks.c && touch hooks/apr_hooks.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o ldap/apr_ldap_stub.lo -c ldap/apr_ldap_stub.c && touch ldap/apr_ldap_stub.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o ldap/apr_ldap_url.lo -c ldap/apr_ldap_url.c && touch ldap/apr_ldap_url.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o memcache/apr_memcache.lo -c memcache/apr_memcache.c && touch memcache/apr_memcache.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o misc/apr_date.lo -c misc/apr_date.c && touch misc/apr_date.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o misc/apr_queue.lo -c misc/apr_queue.c && touch misc/apr_queue.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o misc/apr_reslist.lo -c misc/apr_reslist.c && touch misc/apr_reslist.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o misc/apr_rmm.lo -c misc/apr_rmm.c && touch misc/apr_rmm.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o misc/apr_thread_pool.lo -c misc/apr_thread_pool.c && touch misc/apr_thread_pool.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o misc/apu_dso.lo -c misc/apu_dso.c && touch misc/apu_dso.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o misc/apu_version.lo -c misc/apu_version.c && touch misc/apu_version.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o redis/apr_redis.lo -c redis/apr_redis.c && touch redis/apr_redis.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o strmatch/apr_strmatch.lo -c strmatch/apr_strmatch.c && touch strmatch/apr_strmatch.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o uri/apr_uri.lo -c uri/apr_uri.c && touch uri/apr_uri.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o xlate/xlate.lo -c xlate/xlate.c && touch xlate/xlate.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o xml/apr_xml.lo -c xml/apr_xml.c && touch xml/apr_xml.lo /bin/sh /usr/local/apr/build-1/libtool --silent --mode=link gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -version-info 6:1:6 -o libaprutil-1.la -rpath /usr/local/apr-util/lib buckets/apr_brigade.lo buckets/apr_buckets.lo buckets/apr_buckets_alloc.lo buckets/apr_buckets_eos.lo buckets/apr_buckets_file.lo buckets/apr_buckets_flush.lo buckets/apr_buckets_heap.lo buckets/apr_buckets_mmap.lo buckets/apr_buckets_pipe.lo buckets/apr_buckets_pool.lo buckets/apr_buckets_refcount.lo buckets/apr_buckets_simple.lo buckets/apr_buckets_socket.lo crypto/apr_crypto.lo crypto/apr_md4.lo crypto/apr_md5.lo crypto/apr_passwd.lo crypto/apr_sha1.lo crypto/apr_siphash.lo crypto/crypt_blowfish.lo crypto/getuuid.lo crypto/uuid.lo dbd/apr_dbd.lo dbm/apr_dbm.lo dbm/apr_dbm_sdbm.lo dbm/sdbm/sdbm.lo dbm/sdbm/sdbm_hash.lo dbm/sdbm/sdbm_lock.lo dbm/sdbm/sdbm_pair.lo encoding/apr_base64.lo hooks/apr_hooks.lo ldap/apr_ldap_stub.lo ldap/apr_ldap_url.lo memcache/apr_memcache.lo misc/apr_date.lo misc/apr_queue.lo misc/apr_reslist.lo misc/apr_rmm.lo misc/apr_thread_pool.lo misc/apu_dso.lo misc/apu_version.lo redis/apr_redis.lo strmatch/apr_strmatch.lo uri/apr_uri.lo xlate/xlate.lo xml/apr_xml.lo -lrt -lcrypt -lpthread -ldl -lexpat /usr/local/apr/lib/libapr-1.la -lrt -lcrypt -lpthread -ldl gawk -f /usr/local/apr/build-1/make_exports.awk /usr/local/src/apr-util-1.6.1/include/apr_anylock.h /usr/local/src/apr-util-1.6.1/include/apr_base64.h /usr/local/src/apr-util-1.6.1/include/apr_buckets.h /usr/local/src/apr-util-1.6.1/include/apr_crypto.h /usr/local/src/apr-util-1.6.1/include/apr_date.h /usr/local/src/apr-util-1.6.1/include/apr_dbd.h /usr/local/src/apr-util-1.6.1/include/apr_dbm.h /usr/local/src/apr-util-1.6.1/include/apr_hooks.h /usr/local/src/apr-util-1.6.1/include/apr_ldap_init.h /usr/local/src/apr-util-1.6.1/include/apr_ldap_option.h /usr/local/src/apr-util-1.6.1/include/apr_ldap_rebind.h /usr/local/src/apr-util-1.6.1/include/apr_ldap_url.h /usr/local/src/apr-util-1.6.1/include/apr_md4.h /usr/local/src/apr-util-1.6.1/include/apr_md5.h /usr/local/src/apr-util-1.6.1/include/apr_memcache.h /usr/local/src/apr-util-1.6.1/include/apr_optional.h /usr/local/src/apr-util-1.6.1/include/apr_optional_hooks.h /usr/local/src/apr-util-1.6.1/include/apr_queue.h /usr/local/src/apr-util-1.6.1/include/apr_redis.h /usr/local/src/apr-util-1.6.1/include/apr_reslist.h /usr/local/src/apr-util-1.6.1/include/apr_rmm.h /usr/local/src/apr-util-1.6.1/include/apr_sdbm.h /usr/local/src/apr-util-1.6.1/include/apr_sha1.h /usr/local/src/apr-util-1.6.1/include/apr_siphash.h /usr/local/src/apr-util-1.6.1/include/apr_strmatch.h /usr/local/src/apr-util-1.6.1/include/apr_thread_pool.h /usr/local/src/apr-util-1.6.1/include/apr_uri.h /usr/local/src/apr-util-1.6.1/include/apr_uuid.h /usr/local/src/apr-util-1.6.1/include/apr_xlate.h /usr/local/src/apr-util-1.6.1/include/apr_xml.h /usr/local/src/apr-util-1.6.1/include/apu_errno.h /usr/local/src/apr-util-1.6.1/include/apu_version.h /usr/local/src/apr-util-1.6.1/include/private/apr_crypto_internal.h /usr/local/src/apr-util-1.6.1/include/private/apr_dbd_internal.h /usr/local/src/apr-util-1.6.1/include/private/apr_dbd_odbc_v2.h /usr/local/src/apr-util-1.6.1/include/private/apr_dbm_private.h /usr/local/src/apr-util-1.6.1/include/private/apu_internal.h > exports.c gawk -f /usr/local/apr/build-1/make_var_export.awk /usr/local/src/apr-util-1.6.1/include/apr_anylock.h /usr/local/src/apr-util-1.6.1/include/apr_base64.h /usr/local/src/apr-util-1.6.1/include/apr_buckets.h /usr/local/src/apr-util-1.6.1/include/apr_crypto.h /usr/local/src/apr-util-1.6.1/include/apr_date.h /usr/local/src/apr-util-1.6.1/include/apr_dbd.h /usr/local/src/apr-util-1.6.1/include/apr_dbm.h /usr/local/src/apr-util-1.6.1/include/apr_hooks.h /usr/local/src/apr-util-1.6.1/include/apr_ldap_init.h /usr/local/src/apr-util-1.6.1/include/apr_ldap_option.h /usr/local/src/apr-util-1.6.1/include/apr_ldap_rebind.h /usr/local/src/apr-util-1.6.1/include/apr_ldap_url.h /usr/local/src/apr-util-1.6.1/include/apr_md4.h /usr/local/src/apr-util-1.6.1/include/apr_md5.h /usr/local/src/apr-util-1.6.1/include/apr_memcache.h /usr/local/src/apr-util-1.6.1/include/apr_optional.h /usr/local/src/apr-util-1.6.1/include/apr_optional_hooks.h /usr/local/src/apr-util-1.6.1/include/apr_queue.h /usr/local/src/apr-util-1.6.1/include/apr_redis.h /usr/local/src/apr-util-1.6.1/include/apr_reslist.h /usr/local/src/apr-util-1.6.1/include/apr_rmm.h /usr/local/src/apr-util-1.6.1/include/apr_sdbm.h /usr/local/src/apr-util-1.6.1/include/apr_sha1.h /usr/local/src/apr-util-1.6.1/include/apr_siphash.h /usr/local/src/apr-util-1.6.1/include/apr_strmatch.h /usr/local/src/apr-util-1.6.1/include/apr_thread_pool.h /usr/local/src/apr-util-1.6.1/include/apr_uri.h /usr/local/src/apr-util-1.6.1/include/apr_uuid.h /usr/local/src/apr-util-1.6.1/include/apr_xlate.h /usr/local/src/apr-util-1.6.1/include/apr_xml.h /usr/local/src/apr-util-1.6.1/include/apu_errno.h /usr/local/src/apr-util-1.6.1/include/apu_version.h /usr/local/src/apr-util-1.6.1/include/private/apr_crypto_internal.h /usr/local/src/apr-util-1.6.1/include/private/apr_dbd_internal.h /usr/local/src/apr-util-1.6.1/include/private/apr_dbd_odbc_v2.h /usr/local/src/apr-util-1.6.1/include/private/apr_dbm_private.h /usr/local/src/apr-util-1.6.1/include/private/apu_internal.h > export_vars.c gcc -E -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 exports.c | grep "ap_hack_" | sed -e 's/^.*[)]\(.*\);$/\1/' >> aprutil.exp gcc -E -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 export_vars.c | sed -e 's/^\#[^!]*//' | sed -e '/^$/d' >> aprutil.exp sed 's,^\(location=\).*$,\1installed,' < apu-1-config > apu-config.out make[1]: 離開目錄「/usr/local/src/apr-util-1.6.1」 make[1]: 進入目錄「/usr/local/src/apr-util-1.6.1」 make[1]: 對「local-all」無需作任何事。 make[1]: 離開目錄「/usr/local/src/apr-util-1.6.1」 /usr/local/apr/build-1/mkdir.sh /usr/local/apr-util/include/apr-1 /usr/local/apr-util/lib/pkgconfig \ /usr/local/apr-util/lib /usr/local/apr-util/bin for f in /usr/local/src/apr-util-1.6.1/include/*.h /usr/local/src/apr-util-1.6.1/include/*.h; do \ /usr/bin/install -c -m 644 ${f} /usr/local/apr-util/include/apr-1; \ done /usr/bin/install -c -m 644 apr-util.pc /usr/local/apr-util/lib/pkgconfig/apr-util-1.pc list=''; for i in $list; do \ ( cd $i ; make DESTDIR= install ); \ done /bin/sh /usr/local/apr/build-1/libtool --mode=install /usr/bin/install -c -m 755 libaprutil-1.la /usr/local/apr-util/lib libtool: install: /usr/bin/install -c -m 755 .libs/libaprutil-1.so.0.6.1 /usr/local/apr-util/lib/libaprutil-1.so.0.6.1 libtool: install: (cd /usr/local/apr-util/lib && { ln -s -f libaprutil-1.so.0.6.1 libaprutil-1.so.0 || { rm -f libaprutil-1.so.0 && ln -s libaprutil-1.so.0.6.1 libaprutil-1.so.0; }; }) libtool: install: (cd /usr/local/apr-util/lib && { ln -s -f libaprutil-1.so.0.6.1 libaprutil-1.so || { rm -f libaprutil-1.so && ln -s libaprutil-1.so.0.6.1 libaprutil-1.so; }; }) libtool: install: /usr/bin/install -c -m 755 .libs/libaprutil-1.lai /usr/local/apr-util/lib/libaprutil-1.la libtool: install: /usr/bin/install -c -m 755 .libs/libaprutil-1.a /usr/local/apr-util/lib/libaprutil-1.a libtool: install: chmod 644 /usr/local/apr-util/lib/libaprutil-1.a libtool: install: ranlib /usr/local/apr-util/lib/libaprutil-1.a libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/sbin" ldconfig -n /usr/local/apr-util/lib ---------------------------------------------------------------------- Libraries have been installed in: /usr/local/apr-util/lib If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the '-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the 'LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the 'LD_RUN_PATH' environment variable during linking - use the '-Wl,-rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to '/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- /usr/bin/install -c -m 644 aprutil.exp /usr/local/apr-util/lib /usr/bin/install -c -m 755 apu-config.out /usr/local/apr-util/bin/apu-1-config [root@linux-01 apr-util-1.6.1]# echo $? 0 [root@linux-01 apr-util-1.6.1]# ls /usr/local/apr-util/ bin include lib
[root@linux-01 apr-util-1.6.1]# cd ../httpd-2.4.39/ [root@linux-01 httpd-2.4.39]# ls ABOUT_APACHE ap.d CHANGES docs httpd.spec libhttpd.dep Makefile.win README srclib acinclude.m4 build CMakeLists.txt emacs-style include libhttpd.dsp modules README.cmake support Apache-apr2.dsw BuildAll.dsp config.layout httpd.dep INSTALL libhttpd.mak NOTICE README.platforms test Apache.dsw BuildBin.dsp configure httpd.dsp InstallBin.dsp LICENSE NWGNUmakefile ROADMAP VERSIONING apache_probes.d buildconf configure.in httpd.mak LAYOUT Makefile.in os server [root@linux-01 httpd-2.4.39]# ./configure --prefix=/usr/local/httpd2.4 --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --enable-so --enable-mods-shared=most checking for chosen layout... Apache checking for working mkdir -p... yes checking for grep that handles long lines and -e... /usr/bin/grep checking for egrep... /usr/bin/grep -E checking build system type... x86_64-pc-linux-gnu checking host system type... x86_64-pc-linux-gnu checking target system type... x86_64-pc-linux-gnu configure: configure: Configuring Apache Portable Runtime library... configure: checking for APR... yes setting CC to "gcc" setting CPP to "gcc -E" setting CFLAGS to " -g -O2 -pthread" setting CPPFLAGS to " -DLINUX -D_REENTRANT -D_GNU_SOURCE" setting LDFLAGS to " " configure: configure: Configuring Apache Portable Runtime Utility library... configure: checking for APR-util... yes checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking how to run the C preprocessor... gcc -E checking for gcc option to accept ISO C99... -std=gnu99 checking for pcre-config... false configure: error: pcre-config for libpcre not found. PCRE is required and available from http://pcre.org/ [root@linux-01 httpd-2.4.39]#
[root@linux-01 httpd-2.4.39]# yum install -y pcre-devel 已加載插件:fastestmirror, langpacks Loading mirror speeds from cached hostfile * base: mirrors.aliyun.com * extras: mirrors.163.com * updates: mirrors.aliyun.com 正在解決依賴關係 --> 正在檢查事務 ---> 軟件包 pcre-devel.x86_64.0.8.32-17.el7 將被 安裝 --> 解決依賴關係完成 依賴關係解決 ================================================================================================================================================== Package 架構 版本 源 大小 ================================================================================================================================================== 正在安裝: pcre-devel x86_64 8.32-17.el7 base 480 k 事務概要 ================================================================================================================================================== 安裝 1 軟件包 總下載量:480 k 安裝大小:1.4 M Downloading packages: pcre-devel-8.32-17.el7.x86_64.rpm | 480 kB 00:00:00 Running transaction check Running transaction test Transaction test succeeded Running transaction 正在安裝 : pcre-devel-8.32-17.el7.x86_64 1/1 驗證中 : pcre-devel-8.32-17.el7.x86_64 1/1 已安裝: pcre-devel.x86_64 0:8.32-17.el7 完畢! [root@linux-01 httpd-2.4.39]#
[root@linux-01 httpd-2.4.39]# ./configure --prefix=/usr/local/httpd2.4 --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --enable-so --enable-mods-shared=most checking for chosen layout... Apache checking for working mkdir -p... yes checking for grep that handles long lines and -e... /usr/bin/grep checking for egrep... /usr/bin/grep -E checking build system type... x86_64-pc-linux-gnu checking host system type... x86_64-pc-linux-gnu checking target system type... x86_64-pc-linux-gnu configure: configure: Configuring Apache Portable Runtime library... configure: checking for APR... yes setting CC to "gcc" setting CPP to "gcc -E" setting CFLAGS to " -g -O2 -pthread" setting CPPFLAGS to " -DLINUX -D_REENTRANT -D_GNU_SOURCE" setting LDFLAGS to " " configure: configure: Configuring Apache Portable Runtime Utility library... configure: checking for APR-util... yes checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking how to run the C preprocessor... gcc -E checking for gcc option to accept ISO C99... -std=gnu99 checking for pcre-config... /usr/bin/pcre-config configure: Using external PCRE library from /usr/bin/pcre-config setting PCRE_INCLUDES to "" setting PCRE_LIBS to "-lpcre" configure: configure: Configuring Apache httpd... configure: setting INCLUDES to "-I." adding "-I$(top_srcdir)/os/$(OS_DIR)" to INCLUDES adding "-I$(top_srcdir)/include" to INCLUDES adding "-I/usr/local/apr/include/apr-1" to INCLUDES adding "-I/usr/local/apr-util/include/apr-1" to INCLUDES configure: configure: Applying OS-specific hints for httpd... configure: forcing SINGLE_LISTEN_UNSERIALIZED_ACCEPT to "1" forcing AP_NONBLOCK_WHEN_MULTI_LISTEN to "1" checking for rm... /usr/bin/rm checking for pkg-config... /usr/bin/pkg-config checking for rsync... /usr/bin/rsync checking for gawk... gawk checking whether ln -s works... yes checking for ranlib... ranlib checking for lynx... no checking for links... no checking for elinks... no checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking minix/config.h usability... no checking minix/config.h presence... no checking for minix/config.h... no checking whether it is safe to define __EXTENSIONS__... yes checking for library containing strerror... none required checking for APR version 1.3.0 or later... yes checking for APR-util version 1.3.0 or later... yes checking for ANSI C header files... (cached) yes checking for string.h... (cached) yes checking limits.h usability... yes checking limits.h presence... yes checking for limits.h... yes checking for unistd.h... (cached) yes checking sys/socket.h usability... yes checking sys/socket.h presence... yes checking for sys/socket.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking for strings.h... (cached) yes checking sys/prctl.h usability... yes checking sys/prctl.h presence... yes checking for sys/prctl.h... yes checking sys/processor.h usability... no checking sys/processor.h presence... no checking for sys/processor.h... no checking sys/sem.h usability... yes checking sys/sem.h presence... yes checking for sys/sem.h... yes checking sys/sdt.h usability... no checking sys/sdt.h presence... no checking for sys/sdt.h... no checking sys/loadavg.h usability... no checking sys/loadavg.h presence... no checking for sys/loadavg.h... no checking for sys/wait.h that is POSIX.1 compatible... yes checking for an ANSI C-conforming const... yes checking for library containing sqrt... -lm checking for library containing crypt... -lcrypt checking for getpwnam... yes checking for getgrnam... yes checking for initgroups... yes checking for bindprocessor... no checking for prctl... yes checking for timegm... yes checking for getpgid... yes checking for fopen64... yes checking for getloadavg... yes checking for void pointer length... no checking for gettid()... yes checking for tm_gmtoff in struct tm... yes checking whether to enable mod_authn_file... shared checking whether to enable mod_authn_dbm... shared (most) checking whether to enable mod_authn_anon... shared (most) checking whether to enable mod_authn_dbd... shared (most) checking whether to enable mod_authn_socache... shared (most) checking whether to enable mod_authn_core... shared checking whether to enable mod_authz_host... shared checking whether to enable mod_authz_groupfile... shared checking whether to enable mod_authz_user... shared checking whether to enable mod_authz_dbm... shared (most) checking whether to enable mod_authz_owner... shared (most) checking whether to enable mod_authz_dbd... shared (most) checking whether to enable mod_authz_core... shared checking whether to enable mod_authnz_ldap... checking dependencies checking for ldap support in apr/apr-util... no configure: WARNING: apr/apr-util is compiled without ldap support checking whether to enable mod_authnz_ldap... no (disabled) checking whether to enable mod_authnz_fcgi... no checking whether to enable mod_access_compat... shared checking whether to enable mod_auth_basic... shared checking whether to enable mod_auth_form... shared (most) checking whether to enable mod_auth_digest... checking dependencies checking whether to enable mod_auth_digest... shared (most) checking whether to enable mod_allowmethods... shared (most) adding "-I$(top_srcdir)/modules/aaa" to INCLUDES checking whether to enable mod_isapi... no checking whether to enable mod_file_cache... shared (most) checking whether to enable mod_cache... shared (most) checking whether to enable mod_cache_disk... checking dependencies checking whether to enable mod_cache_disk... shared (most) checking whether to enable mod_cache_socache... shared (most) checking whether to enable mod_socache_shmcb... shared (most) checking whether to enable mod_socache_dbm... shared (most) checking whether to enable mod_socache_memcache... shared (most) checking whether to enable mod_socache_redis... shared (most) checking whether to enable mod_socache_dc... no adding "-I$(top_srcdir)/modules/cache" to INCLUDES setting HTTPD_LDFLAGS to "-export-dynamic" checking whether to enable mod_so... static setting AP_LIBS to "$(MOD_SO_LDADD)" checking whether to enable mod_watchdog... checking dependencies checking whether to enable mod_watchdog... shared (most) checking whether to enable mod_macro... shared (most) adding "-I$(top_srcdir)/modules/core" to INCLUDES checking whether to enable mod_dbd... shared (most) adding "-I$(top_srcdir)/modules/database" to INCLUDES checking whether to enable mod_bucketeer... no checking whether to enable mod_dumpio... shared (most) checking whether to enable mod_echo... no checking whether to enable mod_example_hooks... no checking whether to enable mod_case_filter... no checking whether to enable mod_case_filter_in... no checking whether to enable mod_example_ipc... no checking whether to enable mod_buffer... shared (most) checking whether to enable mod_data... no checking whether to enable mod_ratelimit... shared (most) checking whether to enable mod_reqtimeout... shared checking whether to enable mod_ext_filter... shared (most) checking whether to enable mod_request... shared (most) checking whether to enable mod_include... shared (most) checking whether to enable mod_filter... shared checking whether to enable mod_reflector... no checking whether to enable mod_substitute... shared (most) checking whether to enable mod_sed... checking dependencies setting MOD_SED_LDADD to "-export-symbols-regex sed_module" checking whether to enable mod_sed... shared (most) checking whether to enable mod_charset_lite... no checking whether to enable mod_deflate... checking dependencies checking for zlib location... not found checking whether to enable mod_deflate... no (disabled) checking whether to enable mod_xml2enc... no checking whether to enable mod_proxy_html... no checking whether to enable mod_brotli... checking dependencies checking for Brotli library >= 0.6.0 via pkg-config... no checking whether to enable mod_brotli... no (disabled) adding "-I$(top_srcdir)/modules/filters" to INCLUDES checking whether to enable mod_http... static adding "$(MOD_HTTP_LDADD)" to AP_LIBS checking whether to enable mod_mime... shared checking whether to enable mod_ldap... checking dependencies checking for ldap support in apr/apr-util... (cached) no configure: WARNING: apr/apr-util is compiled without ldap support checking whether to enable mod_ldap... no (disabled) adding "-I$(top_srcdir)/modules/ldap" to INCLUDES checking whether to enable mod_log_config... shared checking whether to enable mod_log_debug... shared (most) checking whether to enable mod_log_forensic... no checking whether to enable mod_logio... shared (most) adding "-I$(top_srcdir)/modules/loggers" to INCLUDES checking whether to enable mod_lua... no adding "-I$(top_srcdir)/modules/lua" to INCLUDES checking whether to enable mod_env... shared checking whether to enable mod_mime_magic... no checking whether to enable mod_cern_meta... no checking whether to enable mod_expires... shared (most) checking whether to enable mod_headers... shared checking whether to enable mod_ident... no checking whether to enable mod_usertrack... no checking whether to enable mod_unique_id... shared (most) checking whether to enable mod_setenvif... shared checking whether to enable mod_version... shared checking whether to enable mod_remoteip... shared (most) checking whether to enable mod_proxy... shared (most) checking whether to enable mod_proxy_connect... checking dependencies checking whether to enable mod_proxy_connect... shared (most) checking whether to enable mod_proxy_ftp... checking dependencies checking whether to enable mod_proxy_ftp... shared (most) checking whether to enable mod_proxy_http... checking dependencies checking whether to enable mod_proxy_http... shared (most) checking whether to enable mod_proxy_fcgi... checking dependencies checking whether to enable mod_proxy_fcgi... shared (most) checking whether to enable mod_proxy_scgi... checking dependencies checking whether to enable mod_proxy_scgi... shared (most) checking whether to enable mod_proxy_uwsgi... checking dependencies checking whether to enable mod_proxy_uwsgi... shared (most) checking whether to enable mod_proxy_fdpass... checking dependencies checking whether CMSG_DATA is declared... yes checking whether to enable mod_proxy_fdpass... shared (most) checking whether to enable mod_proxy_wstunnel... checking dependencies checking whether to enable mod_proxy_wstunnel... shared (most) checking whether to enable mod_proxy_ajp... checking dependencies checking whether to enable mod_proxy_ajp... shared (most) checking whether to enable mod_proxy_balancer... checking dependencies checking whether to enable mod_proxy_balancer... shared (most) checking whether to enable mod_proxy_express... checking dependencies checking whether to enable mod_proxy_express... shared (most) checking whether to enable mod_proxy_hcheck... checking dependencies checking whether to enable mod_proxy_hcheck... shared (most) adding "-I$(top_srcdir)/modules/proxy" to INCLUDES adding "-I$(top_srcdir)/modules/http2" to INCLUDES checking whether to enable mod_session... shared (most) checking whether to enable mod_session_cookie... checking dependencies checking whether to enable mod_session_cookie... shared (most) configure: WARNING: Your APR does not include SSL/EVP support. To enable it: configure --with-crypto checking whether to enable mod_session_crypto... no checking whether to enable mod_session_dbd... checking dependencies checking whether to enable mod_session_dbd... shared (most) adding "-I$(top_srcdir)/modules/session" to INCLUDES checking whether to enable mod_slotmem_shm... shared (most) checking whether to enable mod_slotmem_plain... no checking whether to enable mod_ssl... checking dependencies checking for OpenSSL... checking for user-provided OpenSSL base directory... none checking for OpenSSL version >= 0.9.8a... FAILED configure: WARNING: OpenSSL version is too old no checking whether to enable mod_ssl... no (disabled) adding "-I$(top_srcdir)/modules/ssl" to INCLUDES checking whether to enable mod_optional_hook_export... no checking whether to enable mod_optional_hook_import... no checking whether to enable mod_optional_fn_import... no checking whether to enable mod_optional_fn_export... no checking whether to enable mod_dialup... no adding "-I$(top_srcdir)/modules/test" to INCLUDES checking for target platform... unix checking for rlim_t... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/resource.h usability... yes checking sys/resource.h presence... yes checking for sys/resource.h... yes checking for sys/sem.h... (cached) yes checking sys/ipc.h usability... yes checking sys/ipc.h presence... yes checking for sys/ipc.h... yes checking for setsid... yes checking for killpg... yes checking bstring.h usability... no checking bstring.h presence... no checking for bstring.h... no checking for unistd.h... (cached) yes checking for syslog... yes checking sys/times.h usability... yes checking sys/times.h presence... yes checking for sys/times.h... yes checking for times... yes adding "-I$(top_srcdir)/server" to INCLUDES checking whether APR supports thread-safe pollsets... checking for kqueue... no checking for port_create... no checking for epoll_create... yes yes checking if event MPM supports this platform... yes checking if mpmt_os2 MPM supports this platform... no checking if prefork MPM supports this platform... yes checking if WinNT MPM supports this platform... no checking if worker MPM supports this platform... yes checking whether to enable mod_http2... checking dependencies checking for OpenSSL... (cached) no checking for nghttp2... checking for user-provided nghttp2 base directory... none checking for pkg-config along ... checking for nghttp2 version >= 1.2.1... FAILED configure: WARNING: nghttp2 version is too old no checking whether to enable mod_http2... no (disabled) checking whether to enable mod_proxy_http2... no adding "-I$(top_srcdir)/modules/md" to INCLUDES checking whether to enable mod_md... checking dependencies checking for OpenSSL... (cached) no configure: WARNING: libssl (or compatible) not found checking for jansson... checking for user-provided jansson base directory... none checking for pkg-config along ... FAILED no configure: WARNING: libjansson not found checking for curl... checking for user-provided curl base directory... none checking for pkg-config along ... checking curl/curl.h usability... no checking curl/curl.h presence... no checking for curl/curl.h... no checking for curl version >= 7.50... FAILED no configure: WARNING: libcurl not found checking for arc4random_buf... no checking whether to enable mod_md... no (disabled) checking whether to enable mod_lbmethod_byrequests... checking dependencies checking whether to enable mod_lbmethod_byrequests... shared checking whether to enable mod_lbmethod_bytraffic... checking dependencies checking whether to enable mod_lbmethod_bytraffic... shared checking whether to enable mod_lbmethod_bybusyness... checking dependencies checking whether to enable mod_lbmethod_bybusyness... shared checking whether to enable mod_lbmethod_heartbeat... checking dependencies checking whether to enable mod_lbmethod_heartbeat... shared checking which MPM to use by default... event adding "$(MOD_MPM_EVENT_LDADD)" to AP_LIBS checking for pthread_kill... yes checking whether to enable mod_unixd... shared checking whether to enable mod_privileges... no adding "-I$(top_srcdir)/modules/arch/unix" to INCLUDES checking whether to enable mod_heartbeat... no checking whether to enable mod_heartmonitor... no checking whether to enable mod_dav... shared (most) adding "-I$(top_srcdir)/modules/dav/main" to INCLUDES checking whether to enable mod_status... shared checking whether to enable mod_autoindex... shared checking whether to enable mod_asis... no checking whether to enable mod_info... shared (most) checking whether to enable mod_suexec... no checking whether to enable mod_cgid... checking dependencies checking whether to enable mod_cgid... shared (most) checking whether to enable mod_cgi... no adding "-I$(top_srcdir)/modules/generators" to INCLUDES checking whether to enable mod_dav_fs... checking dependencies checking whether to enable mod_dav_fs... shared checking whether to enable mod_dav_lock... no checking for extra modules... none checking whether to enable mod_vhost_alias... shared (most) checking whether to enable mod_negotiation... shared (most) checking whether to enable mod_dir... shared checking whether to enable mod_imagemap... no checking whether to enable mod_actions... shared (most) checking whether to enable mod_speling... shared (most) checking whether to enable mod_userdir... shared (most) checking whether to enable mod_alias... shared checking whether to enable mod_rewrite... shared (most) adding "-I$(top_srcdir)/modules/mappers" to INCLUDES configure: configure: Restore user-defined environment settings... configure: restoring CPPFLAGS to "" setting EXTRA_CPPFLAGS to " -DLINUX -D_REENTRANT -D_GNU_SOURCE" restoring CFLAGS to "" setting EXTRA_CFLAGS to " -g -O2 -pthread" restoring CXXFLAGS to "" setting EXTRA_CXXFLAGS to "" restoring LDFLAGS to "" setting EXTRA_LDFLAGS to " " restoring LIBS to "" setting EXTRA_LIBS to "" restoring INCLUDES to "" setting EXTRA_INCLUDES to "-I. -I$(top_srcdir)/os/$(OS_DIR) -I$(top_srcdir)/include -I/usr/local/apr/include/apr-1 -I/usr/local/apr-util/include/apr-1 -I$(top_srcdir)/modules/aaa -I$(top_srcdir)/modules/cache -I$(top_srcdir)/modules/core -I$(top_srcdir)/modules/database -I$(top_srcdir)/modules/filters -I$(top_srcdir)/modules/ldap -I$(top_srcdir)/modules/loggers -I$(top_srcdir)/modules/lua -I$(top_srcdir)/modules/proxy -I$(top_srcdir)/modules/http2 -I$(top_srcdir)/modules/session -I$(top_srcdir)/modules/ssl -I$(top_srcdir)/modules/test -I$(top_srcdir)/server -I$(top_srcdir)/modules/md -I$(top_srcdir)/modules/arch/unix -I$(top_srcdir)/modules/dav/main -I$(top_srcdir)/modules/generators -I$(top_srcdir)/modules/mappers" configure: configure: Construct makefiles and header files... configure: configure: creating config_vars.mk configure: creating ./config.status creating modules/aaa/Makefile creating modules/arch/win32/Makefile creating modules/cache/Makefile creating modules/core/Makefile creating modules/database/Makefile creating modules/debugging/Makefile creating modules/echo/Makefile creating modules/examples/Makefile creating modules/experimental/Makefile creating modules/filters/Makefile creating modules/http/Makefile creating modules/ldap/Makefile creating modules/loggers/Makefile creating modules/lua/Makefile creating modules/metadata/Makefile creating modules/proxy/Makefile creating modules/session/Makefile creating modules/slotmem/Makefile creating modules/ssl/Makefile creating modules/test/Makefile creating os/unix/Makefile creating modules/http2/Makefile creating modules/md/Makefile creating modules/proxy/balancers/Makefile creating server/mpm/Makefile creating server/mpm/event/Makefile creating modules/arch/unix/Makefile creating modules/cluster/Makefile creating modules/dav/main/Makefile creating modules/generators/Makefile creating modules/dav/fs/Makefile creating modules/dav/lock/Makefile creating modules/mappers/Makefile creating Makefile creating modules/Makefile creating srclib/Makefile creating os/Makefile creating server/Makefile creating support/Makefile creating test/Makefile config.status: creating docs/conf/httpd.conf config.status: creating docs/conf/extra/httpd-autoindex.conf config.status: creating docs/conf/extra/httpd-dav.conf config.status: creating docs/conf/extra/httpd-default.conf config.status: creating docs/conf/extra/httpd-info.conf config.status: creating docs/conf/extra/httpd-languages.conf config.status: creating docs/conf/extra/httpd-manual.conf config.status: creating docs/conf/extra/httpd-mpm.conf config.status: creating docs/conf/extra/httpd-multilang-errordoc.conf config.status: creating docs/conf/extra/httpd-ssl.conf config.status: creating docs/conf/extra/httpd-userdir.conf config.status: creating docs/conf/extra/httpd-vhosts.conf config.status: creating docs/conf/extra/proxy-html.conf config.status: creating include/ap_config_layout.h config.status: creating support/apxs config.status: creating support/apachectl config.status: creating support/dbmmanage config.status: creating support/envvars-std config.status: creating support/log_server_status config.status: creating support/logresolve.pl config.status: creating support/phf_abuse_log.cgi config.status: creating support/split-logfile config.status: creating build/rules.mk config.status: creating build/pkg/pkginfo config.status: creating build/config_vars.sh config.status: creating include/ap_config_auto.h config.status: executing default commands configure: summary of build options: Server Version: 2.4.39 Install prefix: /usr/local/httpd2.4 C compiler: gcc -std=gnu99 CFLAGS: -g -O2 -pthread CPPFLAGS: -DLINUX -D_REENTRANT -D_GNU_SOURCE LDFLAGS: LIBS: C preprocessor: gcc -E [root@linux-01 httpd-2.4.39]# echo $? 0 [root@linux-01 httpd-2.4.39]# make && make install 省略 [root@linux-01 httpd-2.4.39]# ls /usr/local/httpd2.4/ bin build cgi-bin conf error htdocs icons include logs man manual modules [root@linux-01 httpd-2.4.39]#
[root@linux-01 httpd-2.4.39]# /usr/local/httpd2.4/bin/apachectl start AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using fe80::c3b2:5f24:81d8:762%ens33. Set the 'ServerName' directive globally to suppress this message [root@linux-01 httpd-2.4.39]# ps aux |grep http root 56461 0.0 0.1 97760 2588 ? Ss 01:51 0:00 /usr/local/httpd2.4/bin/httpd -k start daemon 56462 0.0 0.2 386672 4424 ? Sl 01:51 0:00 /usr/local/httpd2.4/bin/httpd -k start daemon 56463 0.0 0.2 386672 4424 ? Sl 01:51 0:00 /usr/local/httpd2.4/bin/httpd -k start daemon 56464 0.0 0.2 386672 4420 ? Sl 01:51 0:00 /usr/local/httpd2.4/bin/httpd -k start root 56547 0.0 0.0 112728 988 pts/0 S+ 01:51 0:00 grep --color=auto http [root@linux-01 httpd-2.4.39]# netstat -ltnp Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 1/systemd tcp 0 0 192.168.122.1:53 0.0.0.0:* LISTEN 7229/dnsmasq tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 6850/sshd tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 6847/cupsd tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 7219/master tcp 0 0 127.0.0.1:6010 0.0.0.0:* LISTEN 7534/sshd: root@pts tcp6 0 0 :::111 :::* LISTEN 1/systemd tcp6 0 0 :::80 :::* LISTEN 56461/httpd tcp6 0 0 :::22 :::* LISTEN 6850/sshd tcp6 0 0 ::1:631 :::* LISTEN 6847/cupsd tcp6 0 0 ::1:25 :::* LISTEN 7219/master tcp6 0 0 ::1:6010 :::* LISTEN 7534/sshd: root@pts [root@linux-01 httpd-2.4.39]#
[root@linux-001 php-5.6.39]# /usr/local/httpd2.4/bin/httpd -M AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using fe80::8db4:d867:92de:d2d1%ens33. Set the 'ServerName' directive globally to suppress this message Loaded Modules: core_module (static) so_module (static) http_module (static) mpm_event_module (static) authn_file_module (shared) authn_core_module (shared) authz_host_module (shared) authz_groupfile_module (shared) authz_user_module (shared) authz_core_module (shared) access_compat_module (shared) auth_basic_module (shared) reqtimeout_module (shared) filter_module (shared) mime_module (shared) log_config_module (shared) env_module (shared) headers_module (shared) setenvif_module (shared) version_module (shared) unixd_module (shared) status_module (shared) autoindex_module (shared) dir_module (shared) alias_module (shared) php5_module (shared) [root@linux-001 php-5.6.39]#
[root@linux-001 src]# wget http://cn2.php.net/distributions/php-5.6.39.tar.bz2 --2019-05-07 14:59:38-- http://cn2.php.net/distributions/php-5.6.39.tar.bz2 正在解析主機 cn2.php.net (cn2.php.net)... 119.81.61.41, 2a02:cb40:200::1ad 正在鏈接 cn2.php.net (cn2.php.net)|119.81.61.41|:80... 已鏈接。 已發出 HTTP 請求,正在等待迴應... 301 Moved Permanently 位置:https://www.php.net/distributions/php-5.6.39.tar.bz2 [跟隨至新的 URL] --2019-05-07 14:59:39-- https://www.php.net/distributions/php-5.6.39.tar.bz2 正在解析主機 www.php.net (www.php.net)... 119.81.61.41, 2a02:cb40:200::1ad 正在鏈接 www.php.net (www.php.net)|119.81.61.41|:443... 已鏈接。 已發出 HTTP 請求,正在等待迴應... 200 OK 長度:15056476 (14M) [application/octet-stream] 正在保存至: 「php-5.6.39.tar.bz2」 20% [==================> ] 3,161,794 546KB/s 用時 5.7s 2019-05-07 15:14:46 (545 KB/s) - 在 3161794/15056476 字節處發生讀取錯誤 (成功)。重試中。 --2019-05-07 15:14:47-- (嘗試次數: 2) https://www.php.net/distributions/php-5.6.39.tar.bz2 正在鏈接 www.php.net (www.php.net)|119.81.61.41|:443... 已鏈接。 已發出 HTTP 請求,正在等待迴應... 206 Partial Content 長度:15056476 (14M),剩餘 11894682 (11M) [application/octet-stream] 正在保存至: 「php-5.6.39.tar.bz2」 100%[+++++++++++++++++++========================================================================>] 15,056,476 381KB/s 用時 25s 2019-05-07 15:15:13 (456 KB/s) - 已保存 「php-5.6.39.tar.bz2」 [15056476/15056476])
[root@linux-001 src]# tar -jxvf php-5.6.39.tar.bz2 …… php-5.6.39/NEWS php-5.6.39/server-tests.php php-5.6.39/php.ini-development php-5.6.39/EXTENSIONS php-5.6.39/README.namespaces php-5.6.39/pear/ php-5.6.39/pear/install-pear.txt php-5.6.39/pear/install-pear-nozlib.phar php-5.6.39/pear/fetch.php php-5.6.39/pear/Makefile.frag php-5.6.39/README.SUBMITTING_PATCH
./configure --prefix=/usr/local/php --with-apxs2=/usr/local/httpd2.4/bin/apxs --with-config-file-path=/usr/local/php/etc --with-mysql=/usr/local/mysql --with-pdo-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-libxml-dir --with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir --with-iconv-dir --with-zlib-dir --with-bz2 --with-openssl --with-mcrypt --enable-soap --enable-gd-native-ttf --enable-mbstring --enable-sockets --enable-exif
[root@linux-001 src]# cd php-5.6.39/ [root@linux-001 php-5.6.39]# ls acinclude.m4 generated_lists mkinstalldirs README.NEW-OUTPUT-API server-tests-config.php aclocal.m4 genfiles netware README.PARAMETER_PARSING_API server-tests.php build header NEWS README.REDIST.BINS snapshot buildconf INSTALL pear README.RELEASE_PROCESS stamp-h.in buildconf.bat install-sh php5.spec.in README.SELF-CONTAINED-EXTENSIONS stub.c CODING_STANDARDS LICENSE php.gif README.STREAMS tests config.guess ltmain.sh php.ini-development README.SUBMITTING_PATCH travis config.sub main php.ini-production README.TESTING TSRM configure makedist README.EXT_SKEL README.TESTING2 UPGRADING configure.in Makefile.frag README.GIT-RULES README.UNIX-BUILD-SYSTEM UPGRADING.INTERNALS CREDITS Makefile.gcov README.input_filter README.WIN32-BUILD-SYSTEM vcsclean ext Makefile.global README.MAILINGLIST_RULES run-tests.php win32 EXTENSIONS makerpm README.md sapi Zend footer missing README.namespaces scripts [root@linux-001 php-5.6.39]# ./configure --prefix=/usr/local/php --with-apxs2=/usr/local/httpd2.4/bin/apxs --with-config-file-path=/usr/local/php/etc --with-mysql=/usr/local/mysql --with-pdo-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-libxml-dir --with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir --with-iconv-dir --with-zlib-dir --with-bz2 --with-openssl --with-mcrypt --enable-soap --enable-gd-native-ttf --enable-mbstring --enable-sockets --enable-exif Configuring extensions checking size of long... (cached) 8 checking size of int... (cached) 4 checking for int32_t... yes checking for uint32_t... yes checking for sys/types.h... (cached) yes checking for inttypes.h... (cached) yes checking for stdint.h... (cached) yes checking for string.h... (cached) yes checking for stdlib.h... (cached) yes checking for strtoll... yes checking for atoll... yes checking for strftime... (cached) yes checking which regex library to use... php checking whether to enable LIBXML support... yes checking libxml2 install dir... yes checking for xml2-config path... configure: error: xml2-config not found. Please check your libxml2 installation.
[root@linux-001 php-5.6.39]# yum install -y libxml2-devel 已加載插件:fastestmirror Repository base is listed more than once in the configuration Repository updates is listed more than once in the configuration Repository extras is listed more than once in the configuration Repository centosplus is listed more than once in the configuration Loading mirror speeds from cached hostfile * base: mirrors.163.com * epel: mirrors.yun-idc.com * extras: centos.ustc.edu.cn * updates: mirrors.nju.edu.cn 正在解決依賴關係 --> 正在檢查事務 ---> 軟件包 libxml2-devel.x86_64.0.2.9.1-6.el7_2.3 將被 安裝 --> 正在處理依賴關係 xz-devel,它被軟件包 libxml2-devel-2.9.1-6.el7_2.3.x86_64 須要 --> 正在檢查事務 ---> 軟件包 xz-devel.x86_64.0.5.2.2-1.el7 將被 安裝 --> 解決依賴關係完成 依賴關係解決 ===================================================================================================================================== Package 架構 版本 源 大小 ===================================================================================================================================== 正在安裝: libxml2-devel x86_64 2.9.1-6.el7_2.3 base 1.0 M 爲依賴而安裝: xz-devel x86_64 5.2.2-1.el7 base 46 k 事務概要 ===================================================================================================================================== 安裝 1 軟件包 (+1 依賴軟件包) 總下載量:1.1 M 安裝大小:8.9 M Downloading packages: (1/2): xz-devel-5.2.2-1.el7.x86_64.rpm | 46 kB 00:00:00 (2/2): libxml2-devel-2.9.1-6.el7_2.3.x86_64.rpm | 1.0 MB 00:00:26 ------------------------------------------------------------------------------------------------------------------------------------- 總計 42 kB/s | 1.1 MB 00:00:26 Running transaction check Running transaction test Transaction test succeeded Running transaction 正在安裝 : xz-devel-5.2.2-1.el7.x86_64 1/2 正在安裝 : libxml2-devel-2.9.1-6.el7_2.3.x86_64 2/2 驗證中 : xz-devel-5.2.2-1.el7.x86_64 1/2 驗證中 : libxml2-devel-2.9.1-6.el7_2.3.x86_64 2/2 已安裝: libxml2-devel.x86_64 0:2.9.1-6.el7_2.3 做爲依賴被安裝: xz-devel.x86_64 0:5.2.2-1.el7 完畢! [root@linux-001 php-5.6.39]# [root@linux-001 php-5.6.39]# ./configure --prefix=/usr/local/php --with-apxs2=/usr/local/httpd2.4/bin/apxs --with-config-file-path=/usr/local/php/etc --with-mysql=/usr/local/mysql --with-pdo-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-libxml-dir --with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir --with-iconv-dir --with-zlib-dir --with-bz2 --with-openssl --with-mcrypt --enable-soap --enable-gd-native-ttf --enable-mbstring --enable-sockets --enable-exif …… Configuring extensions checking size of long... (cached) 8 checking size of int... (cached) 4 checking for int32_t... yes checking for uint32_t... yes checking for sys/types.h... (cached) yes checking for inttypes.h... (cached) yes checking for stdint.h... (cached) yes checking for string.h... (cached) yes checking for stdlib.h... (cached) yes checking for strtoll... yes checking for atoll... yes checking for strftime... (cached) yes checking which regex library to use... php checking whether to enable LIBXML support... yes checking libxml2 install dir... yes checking for xml2-config path... /usr/bin/xml2-config checking whether libxml build works... yes checking for OpenSSL support... yes checking for Kerberos support... no checking whether to use system default cipher list instead of hardcoded value... no checking for DSA_get_default_method in -lssl... no checking for X509_free in -lcrypto... no checking for RAND_egd... no checking for pkg-config... /usr/bin/pkg-config configure: error: Cannot find OpenSSL's <evp.h>
[root@linux-001 php-5.6.39]# yum install -y openssl-devel 已加載插件:fastestmirror Repository base is listed more than once in the configuration Repository updates is listed more than once in the configuration Repository extras is listed more than once in the configuration Repository centosplus is listed more than once in the configuration Loading mirror speeds from cached hostfile * base: mirrors.163.com * epel: mirrors.yun-idc.com * extras: centos.ustc.edu.cn * updates: mirrors.nju.edu.cn 正在解決依賴關係 --> 正在檢查事務 ---> 軟件包 openssl-devel.x86_64.1.1.0.2k-16.el7_6.1 將被 安裝 --> 正在處理依賴關係 openssl-libs(x86-64) = 1:1.0.2k-16.el7_6.1,它被軟件包 1:openssl-devel-1.0.2k-16.el7_6.1.x86_64 須要 --> 正在處理依賴關係 krb5-devel(x86-64),它被軟件包 1:openssl-devel-1.0.2k-16.el7_6.1.x86_64 須要 --> 正在檢查事務 ---> 軟件包 krb5-devel.x86_64.0.1.15.1-37.el7_6 將被 安裝 --> 正在處理依賴關係 libkadm5(x86-64) = 1.15.1-37.el7_6,它被軟件包 krb5-devel-1.15.1-37.el7_6.x86_64 須要 --> 正在處理依賴關係 krb5-libs(x86-64) = 1.15.1-37.el7_6,它被軟件包 krb5-devel-1.15.1-37.el7_6.x86_64 須要 --> 正在處理依賴關係 libverto-devel,它被軟件包 krb5-devel-1.15.1-37.el7_6.x86_64 須要 --> 正在處理依賴關係 libselinux-devel,它被軟件包 krb5-devel-1.15.1-37.el7_6.x86_64 須要 --> 正在處理依賴關係 libcom_err-devel,它被軟件包 krb5-devel-1.15.1-37.el7_6.x86_64 須要 --> 正在處理依賴關係 keyutils-libs-devel,它被軟件包 krb5-devel-1.15.1-37.el7_6.x86_64 須要 ---> 軟件包 openssl-libs.x86_64.1.1.0.2k-16.el7 將被 升級 --> 正在處理依賴關係 openssl-libs(x86-64) = 1:1.0.2k-16.el7,它被軟件包 1:openssl-1.0.2k-16.el7.x86_64 須要 ---> 軟件包 openssl-libs.x86_64.1.1.0.2k-16.el7_6.1 將被 更新 --> 正在檢查事務 ---> 軟件包 keyutils-libs-devel.x86_64.0.1.5.8-3.el7 將被 安裝 ---> 軟件包 krb5-libs.x86_64.0.1.15.1-34.el7 將被 升級 ---> 軟件包 krb5-libs.x86_64.0.1.15.1-37.el7_6 將被 更新 ---> 軟件包 libcom_err-devel.x86_64.0.1.42.9-13.el7 將被 安裝 ---> 軟件包 libkadm5.x86_64.0.1.15.1-37.el7_6 將被 安裝 ---> 軟件包 libselinux-devel.x86_64.0.2.5-14.1.el7 將被 安裝 --> 正在處理依賴關係 libsepol-devel(x86-64) >= 2.5-10,它被軟件包 libselinux-devel-2.5-14.1.el7.x86_64 須要 --> 正在處理依賴關係 pkgconfig(libsepol),它被軟件包 libselinux-devel-2.5-14.1.el7.x86_64 須要 ---> 軟件包 libverto-devel.x86_64.0.0.2.5-4.el7 將被 安裝 ---> 軟件包 openssl.x86_64.1.1.0.2k-16.el7 將被 升級 ---> 軟件包 openssl.x86_64.1.1.0.2k-16.el7_6.1 將被 更新 --> 正在檢查事務 ---> 軟件包 libsepol-devel.x86_64.0.2.5-10.el7 將被 安裝 --> 解決依賴關係完成 依賴關係解決 ===================================================================================================================================== Package 架構 版本 源 大小 ===================================================================================================================================== 正在安裝: openssl-devel x86_64 1:1.0.2k-16.el7_6.1 updates 1.5 M 爲依賴而安裝: keyutils-libs-devel x86_64 1.5.8-3.el7 base 37 k krb5-devel x86_64 1.15.1-37.el7_6 updates 271 k libcom_err-devel x86_64 1.42.9-13.el7 base 31 k libkadm5 x86_64 1.15.1-37.el7_6 updates 178 k libselinux-devel x86_64 2.5-14.1.el7 base 187 k libsepol-devel x86_64 2.5-10.el7 base 77 k libverto-devel x86_64 0.2.5-4.el7 base 12 k 爲依賴而更新: krb5-libs x86_64 1.15.1-37.el7_6 updates 803 k openssl x86_64 1:1.0.2k-16.el7_6.1 updates 493 k openssl-libs x86_64 1:1.0.2k-16.el7_6.1 updates 1.2 M 事務概要 ===================================================================================================================================== 安裝 1 軟件包 (+7 依賴軟件包) 升級 ( 3 依賴軟件包) 總下載量:4.7 M Downloading packages: Delta RPMs disabled because /usr/bin/applydeltarpm not installed. (1/11): keyutils-libs-devel-1.5.8-3.el7.x86_64.rpm | 37 kB 00:00:00 (2/11): krb5-devel-1.15.1-37.el7_6.x86_64.rpm | 271 kB 00:00:00 (3/11): libcom_err-devel-1.42.9-13.el7.x86_64.rpm | 31 kB 00:00:00 (4/11): libselinux-devel-2.5-14.1.el7.x86_64.rpm | 187 kB 00:00:00 (5/11): libsepol-devel-2.5-10.el7.x86_64.rpm | 77 kB 00:00:00 (6/11): libverto-devel-0.2.5-4.el7.x86_64.rpm | 12 kB 00:00:00 (7/11): libkadm5-1.15.1-37.el7_6.x86_64.rpm | 178 kB 00:00:00 (8/11): openssl-1.0.2k-16.el7_6.1.x86_64.rpm | 493 kB 00:00:00 (9/11): openssl-devel-1.0.2k-16.el7_6.1.x86_64.rpm | 1.5 MB 00:00:00 (10/11): openssl-libs-1.0.2k-16.el7_6.1.x86_64.rpm | 1.2 MB 00:00:00 (11/11): krb5-libs-1.15.1-37.el7_6.x86_64.rpm | 803 kB 00:00:06 ------------------------------------------------------------------------------------------------------------------------------------- 總計 773 kB/s | 4.7 MB 00:00:06 Running transaction check Running transaction test Transaction test succeeded Running transaction 正在更新 : 1:openssl-libs-1.0.2k-16.el7_6.1.x86_64 1/14 正在更新 : krb5-libs-1.15.1-37.el7_6.x86_64 2/14 正在安裝 : libkadm5-1.15.1-37.el7_6.x86_64 3/14 正在安裝 : libcom_err-devel-1.42.9-13.el7.x86_64 4/14 正在安裝 : libsepol-devel-2.5-10.el7.x86_64 5/14 正在安裝 : libselinux-devel-2.5-14.1.el7.x86_64 6/14 正在安裝 : libverto-devel-0.2.5-4.el7.x86_64 7/14 正在安裝 : keyutils-libs-devel-1.5.8-3.el7.x86_64 8/14 正在安裝 : krb5-devel-1.15.1-37.el7_6.x86_64 9/14 正在安裝 : 1:openssl-devel-1.0.2k-16.el7_6.1.x86_64 10/14 正在更新 : 1:openssl-1.0.2k-16.el7_6.1.x86_64 11/14 清理 : 1:openssl-1.0.2k-16.el7.x86_64 12/14 清理 : krb5-libs-1.15.1-34.el7.x86_64 13/14 清理 : 1:openssl-libs-1.0.2k-16.el7.x86_64 14/14 驗證中 : 1:openssl-1.0.2k-16.el7_6.1.x86_64 1/14 驗證中 : keyutils-libs-devel-1.5.8-3.el7.x86_64 2/14 驗證中 : libverto-devel-0.2.5-4.el7.x86_64 3/14 驗證中 : krb5-libs-1.15.1-37.el7_6.x86_64 4/14 驗證中 : libkadm5-1.15.1-37.el7_6.x86_64 5/14 驗證中 : krb5-devel-1.15.1-37.el7_6.x86_64 6/14 驗證中 : libselinux-devel-2.5-14.1.el7.x86_64 7/14 驗證中 : 1:openssl-libs-1.0.2k-16.el7_6.1.x86_64 8/14 驗證中 : libsepol-devel-2.5-10.el7.x86_64 9/14 驗證中 : libcom_err-devel-1.42.9-13.el7.x86_64 10/14 驗證中 : 1:openssl-devel-1.0.2k-16.el7_6.1.x86_64 11/14 驗證中 : 1:openssl-libs-1.0.2k-16.el7.x86_64 12/14 驗證中 : krb5-libs-1.15.1-34.el7.x86_64 13/14 驗證中 : 1:openssl-1.0.2k-16.el7.x86_64 14/14 已安裝: openssl-devel.x86_64 1:1.0.2k-16.el7_6.1 做爲依賴被安裝: keyutils-libs-devel.x86_64 0:1.5.8-3.el7 krb5-devel.x86_64 0:1.15.1-37.el7_6 libcom_err-devel.x86_64 0:1.42.9-13.el7 libkadm5.x86_64 0:1.15.1-37.el7_6 libselinux-devel.x86_64 0:2.5-14.1.el7 libsepol-devel.x86_64 0:2.5-10.el7 libverto-devel.x86_64 0:0.2.5-4.el7 做爲依賴被升級: krb5-libs.x86_64 0:1.15.1-37.el7_6 openssl.x86_64 1:1.0.2k-16.el7_6.1 openssl-libs.x86_64 1:1.0.2k-16.el7_6.1 完畢! [root@linux-001 php-5.6.39]# [root@linux-001 php-5.6.39]# ./configure --prefix=/usr/local/php --with-apxs2=/usr/local/httpd2.4/bin/apxs --with-config-file-path=/usr/local/php/etc --with-mysql=/usr/local/mysql --with-pdo-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-libxml-dir --with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir --with-iconv-dir --with-zlib-dir --with-bz2 --with-openssl --with-mcrypt --enable-soap --enable-gd-native-ttf --enable-mbstring --enable-sockets --enable-exif …… checking for zlib version >= 1.2.0.4... 1.2.7 checking for gzgets in -lz... yes checking whether to enable bc style precision math functions... no checking for BZip2 support... yes checking for BZip2 in default path... not found configure: error: Please reinstall the BZip2 distribution
[root@linux-001 php-5.6.39]# yum install -y bzip2-devel 已加載插件:fastestmirror Repository base is listed more than once in the configuration Repository updates is listed more than once in the configuration Repository extras is listed more than once in the configuration Repository centosplus is listed more than once in the configuration Loading mirror speeds from cached hostfile * base: mirrors.163.com * epel: mirrors.yun-idc.com * extras: centos.ustc.edu.cn * updates: mirrors.nju.edu.cn 正在解決依賴關係 --> 正在檢查事務 ---> 軟件包 bzip2-devel.x86_64.0.1.0.6-13.el7 將被 安裝 --> 解決依賴關係完成 依賴關係解決 ===================================================================================================================================== Package 架構 版本 源 大小 ===================================================================================================================================== 正在安裝: bzip2-devel x86_64 1.0.6-13.el7 base 218 k 事務概要 ===================================================================================================================================== 安裝 1 軟件包 總下載量:218 k 安裝大小:382 k Downloading packages: bzip2-devel-1.0.6-13.el7.x86_64.rpm | 218 kB 00:00:00 Running transaction check Running transaction test Transaction test succeeded Running transaction 正在安裝 : bzip2-devel-1.0.6-13.el7.x86_64 1/1 驗證中 : bzip2-devel-1.0.6-13.el7.x86_64 1/1 已安裝: bzip2-devel.x86_64 0:1.0.6-13.el7 完畢! [root@linux-001 php-5.6.39]# [root@linux-001 php-5.6.39]# ./configure --prefix=/usr/local/php --with-apxs2=/usr/local/httpd2.4/bin/apxs --with-config-file-path=/usr/local/php/etc --with-mysql=/usr/local/mysql --with-pdo-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-libxml-dir --with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir --with-iconv-dir --with-zlib-dir --with-bz2 --with-openssl --with-mcrypt --enable-soap --enable-gd-native-ttf --enable-mbstring --enable-sockets --enable-exif …… checking for T1lib support... no checking whether to enable truetype string function in GD... yes checking whether to enable JIS-mapped Japanese font support in GD... no If configure fails try --with-vpx-dir=<DIR> configure: error: jpeglib.h not found.
[root@linux-001 php-5.6.39]# yum install -y libjpeg-devel 已加載插件:fastestmirror Repository base is listed more than once in the configuration Repository updates is listed more than once in the configuration Repository extras is listed more than once in the configuration Repository centosplus is listed more than once in the configuration Loading mirror speeds from cached hostfile * base: mirrors.163.com * epel: mirrors.yun-idc.com * extras: centos.ustc.edu.cn * updates: mirrors.nju.edu.cn 正在解決依賴關係 --> 正在檢查事務 ---> 軟件包 libjpeg-turbo-devel.x86_64.0.1.2.90-6.el7 將被 安裝 --> 正在處理依賴關係 libjpeg-turbo(x86-64) = 1.2.90-6.el7,它被軟件包 libjpeg-turbo-devel-1.2.90-6.el7.x86_64 須要 --> 正在處理依賴關係 libjpeg.so.62()(64bit),它被軟件包 libjpeg-turbo-devel-1.2.90-6.el7.x86_64 須要 --> 正在檢查事務 ---> 軟件包 libjpeg-turbo.x86_64.0.1.2.90-6.el7 將被 安裝 --> 解決依賴關係完成 依賴關係解決 ===================================================================================================================================== Package 架構 版本 源 大小 ===================================================================================================================================== 正在安裝: libjpeg-turbo-devel x86_64 1.2.90-6.el7 base 99 k 爲依賴而安裝: libjpeg-turbo x86_64 1.2.90-6.el7 base 134 k 事務概要 ===================================================================================================================================== 安裝 1 軟件包 (+1 依賴軟件包) 總下載量:233 k 安裝大小:657 k Downloading packages: Delta RPMs disabled because /usr/bin/applydeltarpm not installed. (1/2): libjpeg-turbo-devel-1.2.90-6.el7.x86_64.rpm | 99 kB 00:00:00 (2/2): libjpeg-turbo-1.2.90-6.el7.x86_64.rpm | 134 kB 00:00:00 ------------------------------------------------------------------------------------------------------------------------------------- 總計 953 kB/s | 233 kB 00:00:00 Running transaction check Running transaction test Transaction test succeeded Running transaction 正在安裝 : libjpeg-turbo-1.2.90-6.el7.x86_64 1/2 正在安裝 : libjpeg-turbo-devel-1.2.90-6.el7.x86_64 2/2 驗證中 : libjpeg-turbo-devel-1.2.90-6.el7.x86_64 1/2 驗證中 : libjpeg-turbo-1.2.90-6.el7.x86_64 2/2 已安裝: libjpeg-turbo-devel.x86_64 0:1.2.90-6.el7 做爲依賴被安裝: libjpeg-turbo.x86_64 0:1.2.90-6.el7 完畢! [root@linux-001 php-5.6.39]# [root@linux-001 php-5.6.39]# ./configure --prefix=/usr/local/php --with-apxs2=/usr/local/httpd2.4/bin/apxs --with-config-file-path=/usr/local/php/etc --with-mysql=/usr/local/mysql --with-pdo-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-libxml-dir --with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir --with-iconv-dir --with-zlib-dir --with-bz2 --with-openssl --with-mcrypt --enable-soap --enable-gd-native-ttf --enable-mbstring --enable-sockets --enable-exif …… checking for T1lib support... no checking whether to enable truetype string function in GD... yes checking whether to enable JIS-mapped Japanese font support in GD... no If configure fails try --with-vpx-dir=<DIR> checking for jpeg_read_header in -ljpeg... yes configure: error: png.h not found. [root@linux-001 php-5.6.39]#
[root@linux-001 php-5.6.39]# yum install -y libpng-devel 已加載插件:fastestmirror Repository base is listed more than once in the configuration Repository updates is listed more than once in the configuration Repository extras is listed more than once in the configuration Repository centosplus is listed more than once in the configuration Loading mirror speeds from cached hostfile * base: mirrors.163.com * epel: mirrors.yun-idc.com * extras: centos.ustc.edu.cn * updates: mirrors.nju.edu.cn 正在解決依賴關係 --> 正在檢查事務 ---> 軟件包 libpng-devel.x86_64.2.1.5.13-7.el7_2 將被 安裝 --> 解決依賴關係完成 依賴關係解決 ===================================================================================================================================== Package 架構 版本 源 大小 ===================================================================================================================================== 正在安裝: libpng-devel x86_64 2:1.5.13-7.el7_2 base 122 k 事務概要 ===================================================================================================================================== 安裝 1 軟件包 總下載量:122 k 安裝大小:211 k Downloading packages: libpng-devel-1.5.13-7.el7_2.x86_64.rpm | 122 kB 00:00:05 Running transaction check Running transaction test Transaction test succeeded Running transaction 正在安裝 : 2:libpng-devel-1.5.13-7.el7_2.x86_64 1/1 驗證中 : 2:libpng-devel-1.5.13-7.el7_2.x86_64 1/1 已安裝: libpng-devel.x86_64 2:1.5.13-7.el7_2 完畢! [root@linux-001 php-5.6.39]# [root@linux-001 php-5.6.39]# ./configure --prefix=/usr/local/php --with-apxs2=/usr/local/httpd2.4/bin/apxs --with-config-file-path=/usr/local/php/etc --with-mysql=/usr/local/mysql --with-pdo-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-libxml-dir --with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir --with-iconv-dir --with-zlib-dir --with-bz2 --with-openssl --with-mcrypt --enable-soap --enable-gd-native-ttf --enable-mbstring --enable-sockets --enable-exif …… If configure fails try --with-vpx-dir=<DIR> checking for jpeg_read_header in -ljpeg... yes checking for png_write_image in -lpng... yes If configure fails try --with-xpm-dir=<DIR> configure: error: freetype-config not found. [root@linux-001 php-5.6.39]#
[root@linux-001 php-5.6.39]# yum install -y freetype-devel 已加載插件:fastestmirror Repository base is listed more than once in the configuration Repository updates is listed more than once in the configuration Repository extras is listed more than once in the configuration Repository centosplus is listed more than once in the configuration Loading mirror speeds from cached hostfile * base: mirrors.163.com * epel: mirrors.yun-idc.com * extras: centos.ustc.edu.cn * updates: mirrors.nju.edu.cn 正在解決依賴關係 --> 正在檢查事務 ---> 軟件包 freetype-devel.x86_64.0.2.8-12.el7_6.1 將被 安裝 --> 正在處理依賴關係 freetype = 2.8-12.el7_6.1,它被軟件包 freetype-devel-2.8-12.el7_6.1.x86_64 須要 --> 正在檢查事務 ---> 軟件包 freetype.x86_64.0.2.8-12.el7 將被 升級 ---> 軟件包 freetype.x86_64.0.2.8-12.el7_6.1 將被 更新 --> 解決依賴關係完成 依賴關係解決 ===================================================================================================================================== Package 架構 版本 源 大小 ===================================================================================================================================== 正在安裝: freetype-devel x86_64 2.8-12.el7_6.1 updates 447 k 爲依賴而更新: freetype x86_64 2.8-12.el7_6.1 updates 380 k 事務概要 ===================================================================================================================================== 安裝 1 軟件包 升級 ( 1 依賴軟件包) 總下載量:826 k Downloading packages: Delta RPMs disabled because /usr/bin/applydeltarpm not installed. (1/2): freetype-devel-2.8-12.el7_6.1.x86_64.rpm | 447 kB 00:00:00 (2/2): freetype-2.8-12.el7_6.1.x86_64.rpm | 380 kB 00:00:00 ------------------------------------------------------------------------------------------------------------------------------------- 總計 1.7 MB/s | 826 kB 00:00:00 Running transaction check Running transaction test Transaction test succeeded Running transaction 正在更新 : freetype-2.8-12.el7_6.1.x86_64 1/3 正在安裝 : freetype-devel-2.8-12.el7_6.1.x86_64 2/3 清理 : freetype-2.8-12.el7.x86_64 3/3 驗證中 : freetype-devel-2.8-12.el7_6.1.x86_64 1/3 驗證中 : freetype-2.8-12.el7_6.1.x86_64 2/3 驗證中 : freetype-2.8-12.el7.x86_64 3/3 已安裝: freetype-devel.x86_64 0:2.8-12.el7_6.1 做爲依賴被升級: freetype.x86_64 0:2.8-12.el7_6.1 完畢! [root@linux-001 php-5.6.39]# [root@linux-001 php-5.6.39]# ./configure --prefix=/usr/local/php --with-apxs2=/usr/local/httpd2.4/bin/apxs --with-config-file-path=/usr/local/php/etc --with-mysql=/usr/local/mysql --with-pdo-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-libxml-dir --with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir --with-iconv-dir --with-zlib-dir --with-bz2 --with-openssl --with-mcrypt --enable-soap --enable-gd-native-ttf --enable-mbstring --enable-sockets --enable-exif …… checking for working alloca.h... (cached) yes checking for alloca... (cached) yes checking for working memcmp... yes checking for stdarg.h... (cached) yes checking for mcrypt support... yes configure: error: mcrypt.h not found. Please reinstall libmcrypt.
[root@linux-001 php-5.6.39]# yum install -y libmcrypt-devel 已加載插件:fastestmirror Repository base is listed more than once in the configuration Repository updates is listed more than once in the configuration Repository extras is listed more than once in the configuration Repository centosplus is listed more than once in the configuration Loading mirror speeds from cached hostfile * base: mirrors.163.com * epel: mirrors.yun-idc.com * extras: centos.ustc.edu.cn * updates: mirrors.nju.edu.cn 正在解決依賴關係 --> 正在檢查事務 ---> 軟件包 libmcrypt-devel.x86_64.0.2.5.8-13.el7 將被 安裝 --> 正在處理依賴關係 libmcrypt = 2.5.8-13.el7,它被軟件包 libmcrypt-devel-2.5.8-13.el7.x86_64 須要 --> 正在處理依賴關係 libmcrypt.so.4()(64bit),它被軟件包 libmcrypt-devel-2.5.8-13.el7.x86_64 須要 --> 正在檢查事務 ---> 軟件包 libmcrypt.x86_64.0.2.5.8-13.el7 將被 安裝 --> 解決依賴關係完成 依賴關係解決 ===================================================================================================================================== Package 架構 版本 源 大小 ===================================================================================================================================== 正在安裝: libmcrypt-devel x86_64 2.5.8-13.el7 epel 13 k 爲依賴而安裝: libmcrypt x86_64 2.5.8-13.el7 epel 99 k 事務概要 ===================================================================================================================================== 安裝 1 軟件包 (+1 依賴軟件包) 總下載量:112 k 安裝大小:302 k Downloading packages: (1/2): libmcrypt-devel-2.5.8-13.el7.x86_64.rpm | 13 kB 00:00:00 libmcrypt-2.5.8-13.el7.x86_64. FAILED http://www.ftp.ne.jp/Linux/distributions/fedora/epel/7/x86_64/Packages/l/libmcrypt-2.5.8-13.el7.x86_64.rpm: [Errno 14] curl#56 - "Recv failure: Connection reset by peer" 正在嘗試其它鏡像。 (2/2): libmcrypt-2.5.8-13.el7.x86_64.rpm | 99 kB 00:00:00 ------------------------------------------------------------------------------------------------------------------------------------- 總計 197 kB/s | 112 kB 00:00:00 Running transaction check Running transaction test Transaction test succeeded Running transaction 正在安裝 : libmcrypt-2.5.8-13.el7.x86_64 1/2 正在安裝 : libmcrypt-devel-2.5.8-13.el7.x86_64 2/2 驗證中 : libmcrypt-devel-2.5.8-13.el7.x86_64 1/2 驗證中 : libmcrypt-2.5.8-13.el7.x86_64 2/2 已安裝: libmcrypt-devel.x86_64 0:2.5.8-13.el7 做爲依賴被安裝: libmcrypt.x86_64 0:2.5.8-13.el7 完畢!
[root@linux-001 php-5.6.39]# [root@linux-001 php-5.6.39]# ./configure --prefix=/usr/local/php --with-apxs2=/usr/local/httpd2.4/bin/apxs --with-config-file-path=/usr/local/php/etc --with-mysql=/usr/local/mysql --with-pdo-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-libxml-dir --with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir --with-iconv-dir --with-zlib-dir --with-bz2 --with-openssl --with-mcrypt --enable-soap --enable-gd-native-ttf --enable-mbstring --enable-sockets --enable-exif …… Thank you for using PHP. config.status: creating php5.spec config.status: creating main/build-defs.h config.status: creating scripts/phpize config.status: creating scripts/man1/phpize.1 config.status: creating scripts/php-config config.status: creating scripts/man1/php-config.1 config.status: creating sapi/cli/php.1 config.status: creating sapi/cgi/php-cgi.1 config.status: creating ext/phar/phar.1 config.status: creating ext/phar/phar.phar.1 config.status: creating main/php_config.h config.status: executing default commands [root@linux-001 php-5.6.39]# make && make install Installing PHP SAPI module: apache2handler /usr/local/httpd2.4/build/instdso.sh SH_LIBTOOL='/usr/local/apr/build-1/libtool' libphp5.la /usr/local/httpd2.4/modules /usr/local/apr/build-1/libtool --mode=install install libphp5.la /usr/local/httpd2.4/modules/ libtool: install: install .libs/libphp5.so /usr/local/httpd2.4/modules/libphp5.so libtool: install: install .libs/libphp5.lai /usr/local/httpd2.4/modules/libphp5.la libtool: warning: remember to run 'libtool --finish /usr/local/src/php-5.6.39/libs' chmod 755 /usr/local/httpd2.4/modules/libphp5.so [activating module `php5' in /usr/local/httpd2.4/conf/httpd.conf] Installing shared extensions: /usr/local/php/lib/php/extensions/no-debug-zts-20131226/ Installing PHP CLI binary: /usr/local/php/bin/ Installing PHP CLI man page: /usr/local/php/php/man/man1/ Installing PHP CGI binary: /usr/local/php/bin/ Installing PHP CGI man page: /usr/local/php/php/man/man1/ Installing build environment: /usr/local/php/lib/php/build/ Installing header files: /usr/local/php/include/php/ Installing helper programs: /usr/local/php/bin/ program: phpize program: php-config Installing man pages: /usr/local/php/php/man/man1/ page: phpize.1 page: php-config.1 Installing PEAR environment: /usr/local/php/lib/php/ [PEAR] Archive_Tar - installed: 1.4.3 [PEAR] Console_Getopt - installed: 1.4.1 [PEAR] Structures_Graph- installed: 1.1.1 [PEAR] XML_Util - installed: 1.4.2 [PEAR] PEAR - installed: 1.10.5 Wrote PEAR system config file at: /usr/local/php/etc/pear.conf You may want to add: /usr/local/php/lib/php to your php.ini include_path /usr/local/src/php-5.6.39/build/shtool install -c ext/phar/phar.phar /usr/local/php/bin ln -s -f phar.phar /usr/local/php/bin/phar Installing PDO headers: /usr/local/php/include/php/ext/pdo/
[root@linux-001 php-5.6.39]# /usr/local/php/bin/php -m [PHP Modules] bz2 Core ctype date dom ereg exif fileinfo filter gd hash iconv json libxml mbstring mcrypt mysql mysqli openssl pcre PDO pdo_mysql pdo_sqlite Phar posix Reflection session SimpleXML soap sockets SPL sqlite3 standard tokenizer xml xmlreader xmlwriter zlib [Zend Modules] [root@linux-001 php-5.6.39]#
下面兩個配置文件都是在php的源碼目錄:
php.ini-development 適合用於開發環境
php.ini-production 適合用於生產環境
[root@linux-001 php-5.6.39]# cp php.ini-production /usr/local/php/etc/php.ini [root@linux-001 php-5.6.39]# /usr/local/php/bin/php -i | less PHP Warning: Unknown: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in Unknown on line 0 phpinfo() PHP Version => 5.6.39 System => Linux linux-001 3.10.0-957.el7.x86_64 #1 SMP Thu Nov 8 23:39:32 UTC 2018 x86_64 Build Date => May 8 2019 00:15:24 Configure Command => './configure' '--prefix=/usr/local/php' '--with-apxs2=/usr/local/httpd2.4/bin/apxs' '--with-config-file-path=/usr/local/php/etc' '--with-mysql=/usr/local/mysql' '--with-pdo-mysql=/usr/local/mysql' '--with-mysqli=/usr/local/mysql/bin/mysql_config' '--with-libxml-dir' '--with-gd' '--with-jpeg-dir' '--with-png-dir' '--with-freetype-dir' '--with-iconv-dir' '--with-zlib-dir' '--with-bz2' '--with-openssl' '--with-mcrypt' '--enable-soap' '--enable-gd-native-ttf' '--enable-mbstring' '--enable-sockets' '--enable-exif' Server API => Command Line Interface Virtual Directory Support => enabled Configuration File (php.ini) Path => /usr/local/php/etc Loaded Configuration File => /usr/local/php/etc/php.ini //此處已經加載了配置文件 Scan this dir for additional .ini files => (none) Additional .ini files parsed => (none) PHP API => 20131106 PHP Extension => 20131226 Zend Extension => 220131226 Zend Extension Build => API220131226,TS PHP Extension Build => API20131226,TS Debug Build => no Thread Safety => enabled Zend Signal Handling => disabled Zend Memory Manager => enabled Zend Multibyte Support => provided by mbstring IPv6 Support => enabled :
[root@linux-001 src]# wget http://cn2.php.net/distributions/php-7.3.0.tar.bz2 --2019-05-08 00:41:36-- http://cn2.php.net/distributions/php-7.3.0.tar.bz2 正在解析主機 cn2.php.net (cn2.php.net)... 119.81.61.41, 2a02:cb40:200::1ad 正在鏈接 cn2.php.net (cn2.php.net)|119.81.61.41|:80... 已鏈接。 已發出 HTTP 請求,正在等待迴應... 301 Moved Permanently 位置:https://www.php.net/distributions/php-7.3.0.tar.bz2 [跟隨至新的 URL] --2019-05-08 00:41:36-- https://www.php.net/distributions/php-7.3.0.tar.bz2 正在解析主機 www.php.net (www.php.net)... 119.81.61.41, 2a02:cb40:200::1ad 正在鏈接 www.php.net (www.php.net)|119.81.61.41|:443... 已鏈接。 已發出 HTTP 請求,正在等待迴應... 200 OK 長度:14786886 (14M) [application/octet-stream] 正在保存至: 「php-7.3.0.tar.bz2」 100%[===========================================================================================>] 14,786,886 467KB/s 用時 31s 2019-05-08 00:42:08 (461 KB/s) - 已保存 「php-7.3.0.tar.bz2」 [14786886/14786886])
[root@linux-001 php-7.3.0]# tar -jxvf php-7.3.0.tar.bz2 …… php-7.3.0/Zend/zend_long.h php-7.3.0/Zend/zend_extensions.h php-7.3.0/Zend/zend_vm_trace_map.h php-7.3.0/Zend/zend_alloc.c php-7.3.0/Zend/zend_builtin_functions.h php-7.3.0/Zend/zend_ini_parser.c php-7.3.0/Zend/zend_errors.h php-7.3.0/Zend/zend_smart_str.h php-7.3.0/Zend/zend_generators.h php-7.3.0/Zend/zend_ptr_stack.h php-7.3.0/Zend/zend_stream.c php-7.3.0/Zend/zend_build.h php-7.3.0/Zend/acinclude.m4 php-7.3.0/Zend/zend_vm_trace_handlers.h php-7.3.0/Zend/zend_objects_API.h php-7.3.0/Zend/zend_ini_parser.output php-7.3.0/Zend/zend_ini_scanner.c php-7.3.0/Zend/zend_float.h php-7.3.0/Zend/zend_alloc.h php-7.3.0/acinclude.m4 php-7.3.0/makedist [root@linux-001 src]# [root@linux-001 src]# cd php-7.3.0/
[root@linux-001 php-7.3.0]# ./configure --prefix=/usr/local/php7 --with-apxs2=/usr/local/httpd2.4/bin/apxs --with-config-file-path=/usr/local/php7/etc --with-pdo-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-libxml-dir --with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir --with-iconv-dir --with-zlib-dir --with-bz2 --with-openssl --with-mcrypt --enable-soap --enable-gd-native-ttf --enable-mbstring --enable-sockets --enable-exif …… Thank you for using PHP. config.status: creating php7.spec config.status: creating main/build-defs.h config.status: creating scripts/phpize config.status: creating scripts/man1/phpize.1 config.status: creating scripts/php-config config.status: creating scripts/man1/php-config.1 config.status: creating sapi/cli/php.1 config.status: creating sapi/phpdbg/phpdbg.1 config.status: creating sapi/cgi/php-cgi.1 config.status: creating ext/phar/phar.1 config.status: creating ext/phar/phar.phar.1 config.status: creating main/php_config.h config.status: executing default commands configure: WARNING: unrecognized options: --with-mcrypt, --enable-gd-native-ttf [root@linux-001 php-7.3.0]# make && make install …… Installing PHP SAPI module: apache2handler /usr/local/httpd2.4/build/instdso.sh SH_LIBTOOL='/usr/local/apr/build-1/libtool' libphp7.la /usr/local/httpd2.4/modules /usr/local/apr/build-1/libtool --mode=install install libphp7.la /usr/local/httpd2.4/modules/ libtool: install: install .libs/libphp7.so /usr/local/httpd2.4/modules/libphp7.so libtool: install: install .libs/libphp7.lai /usr/local/httpd2.4/modules/libphp7.la libtool: warning: remember to run 'libtool --finish /usr/local/src/php-7.3.0/libs' chmod 755 /usr/local/httpd2.4/modules/libphp7.so [activating module `php7' in /usr/local/httpd2.4/conf/httpd.conf] Installing shared extensions: /usr/local/php7/lib/php/extensions/no-debug-zts-20180731/ Installing PHP CLI binary: /usr/local/php7/bin/ Installing PHP CLI man page: /usr/local/php7/php/man/man1/ Installing phpdbg binary: /usr/local/php7/bin/ Installing phpdbg man page: /usr/local/php7/php/man/man1/ Installing PHP CGI binary: /usr/local/php7/bin/ Installing PHP CGI man page: /usr/local/php7/php/man/man1/ Installing build environment: /usr/local/php7/lib/php/build/ Installing header files: /usr/local/php7/include/php/ Installing helper programs: /usr/local/php7/bin/ program: phpize program: php-config Installing man pages: /usr/local/php7/php/man/man1/ page: phpize.1 page: php-config.1 Installing PEAR environment: /usr/local/php7/lib/php/ Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in phar:///usr/local/src/php-7.3.0/pear/install-pear-nozlib.phar/PEAR/PackageFile/v2/Validator.php on line 1933 [PEAR] Archive_Tar - installed: 1.4.3 [PEAR] Console_Getopt - installed: 1.4.1 [PEAR] Structures_Graph- installed: 1.1.1 [PEAR] XML_Util - installed: 1.4.2 [PEAR] PEAR - installed: 1.10.5 Wrote PEAR system config file at: /usr/local/php7/etc/pear.conf You may want to add: /usr/local/php7/lib/php to your php.ini include_path /usr/local/src/php-7.3.0/build/shtool install -c ext/phar/phar.phar /usr/local/php7/bin ln -s -f phar.phar /usr/local/php7/bin/phar Installing PDO headers: /usr/local/php7/include/php/ext/pdo/ [root@linux-001 php-7.3.0]#
[root@linux-001 php-7.3.0]# /usr/local/php7/bin/php -m [PHP Modules] bz2 Core ctype date dom exif fileinfo filter gd hash iconv json libxml mbstring mysqli openssl pcre PDO pdo_mysql pdo_sqlite Phar posix Reflection session SimpleXML soap sockets SPL sqlite3 standard tokenizer xml xmlreader xmlwriter zlib [Zend Modules] [root@linux-001 php-7.3.0]#
[root@linux-001 php-7.3.0]# /usr/local/httpd2.4/bin/apachectl start AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using fe80::8db4:d867:92de:d2d1%ens33. Set the 'ServerName' directive globally to suppress this message httpd (pid 60625) already running [root@linux-001 php-7.3.0]#
[root@linux-001 php-7.3.0]# /usr/local/httpd2.4/bin/apachectl -t //檢查配置文件 Syntax OK [root@linux-001 php-7.3.0]# /usr/local/httpd2.4/bin/apachectl start [root@linux-001 php-7.3.0]# ps aux |grep httpd root 60625 0.0 0.4 253824 8948 ? Ss 01:27 0:00 /usr/local/httpd2.4/bin/httpd -k start daemon 60629 0.0 0.4 540652 8932 ? Sl 01:27 0:00 /usr/local/httpd2.4/bin/httpd -k start daemon 60630 0.0 0.4 540652 8932 ? Sl 01:27 0:00 /usr/local/httpd2.4/bin/httpd -k start daemon 60631 0.0 0.4 540652 8932 ? Sl 01:27 0:00 /usr/local/httpd2.4/bin/httpd -k start root 60718 0.0 0.0 112724 988 pts/0 R+ 01:27 0:00 grep --color=auto httpd
拍錯方法:
1.windows是否能夠ping通地址?
2.telnet 80端口是否能夠通?
3.虛擬機是否放行了80端口?
[root@linux-001 php-7.3.0]# iptables -nvL Chain INPUT (policy ACCEPT 0 packets, 0 bytes) pkts bytes target prot opt in out source destination 38634 71M ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED 0 0 ACCEPT icmp -- * * 0.0.0.0/0 0.0.0.0/0 2 120 ACCEPT all -- lo * 0.0.0.0/0 0.0.0.0/0 1 52 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:22 1263 321K REJECT all -- * * 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited Chain FORWARD (policy ACCEPT 0 packets, 0 bytes) pkts bytes target prot opt in out source destination 0 0 REJECT all -- * * 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited Chain OUTPUT (policy ACCEPT 35950 packets, 8196K bytes) pkts bytes target prot opt in out source destination [root@linux-001 php-7.3.0]# [root@linux-001 php-7.3.0]# iptables -I INPUT -p tcp --dport 80 -j ACCEPT [root@linux-001 php-7.3.0]#
配置文件中的此處爲:Require all granted
若是把配置文件中的此處爲:Require all granted 修改成 Require all denied,查看結果以下。
在 配置文件httpd.conf 還須要把此處更改成granted;不然會出現403狀態碼,通常爲200;
配置文件中添加一行:AddType application/x-httpd-php .php
[root@linux-001 httpd2.4]# vim /usr/local/httpd2.4/htdocs/1.php <?php phpinfo(); ?> [root@linux-001 httpd2.4]# /usr/local/httpd2.4/bin/apachectl -t //檢查配置文件 Syntax OK [root@linux-001 httpd2.4]# /usr/local/httpd2.4/bin/apachectl graceful // 從新加載配置文件 [root@linux-001 httpd2.4]#
修改配置文件中的下面內容,因爲php5和php7不能夠同時被調用。
#LoadModule php5_module modules/libphp5.so
LoadModule php7_module modules/libphp7.so
[root@linux-001 httpd2.4]# /usr/local/httpd2.4/bin/apachectl -t Syntax OK [root@linux-001 httpd2.4]# /usr/local/httpd2.4/bin/apachectl graceful [root@linux-001 httpd2.4]#
1.查看有沒有加載php模塊;
2.查看/usr/local/httpd2.4/modules/沒有php模塊文件;
3.在httpd.conf的配置文件中,是否有加載模塊配置 LoadModule php5_module modules/libphp5.so;
4.在httpd.conf的配置文件中,是否有此配置AddType application/x-httpd-php .php;
5.在httpd.conf的配置文件中,此配置是否有 index.php
<IfModule dir_module> DirectoryIndex index.html index.php //可以跳轉到索引頁 </IfModule>
1.mysql5.7版本和以前版本初始化的不一樣: ./bin/mysqld --initialize --user=mysql --datadir=/data/mysql
mysql5.7版本更改用戶密碼:update user set authentication_string=password(‘123333’) where user=‘root’;
2.版本常識:http://www.05bk.com/520.html
3.yum 安裝 mariadb
[root@linux-01 ~]# wget -O - https://downloads.mariadb.com/MariaDB/mariadb_repo_setup |sh --2019-05-07 22:46:48-- https://downloads.mariadb.com/MariaDB/mariadb_repo_setup 正在解析主機 downloads.mariadb.com (downloads.mariadb.com)... 51.255.85.11 正在鏈接 downloads.mariadb.com (downloads.mariadb.com)|51.255.85.11|:443... 已鏈接。 已發出 HTTP 請求,正在等待迴應... 200 OK 長度:17783 (17K) [application/octet-stream] 正在保存至: 「STDOUT」 100%[========================================================================================================>] 17,783 --.-K/s 用時 0s 2019-05-07 22:46:51 (197 MB/s) - 已寫入至標準輸出 [17783/17783] [info] Repository file successfully written to /etc/yum.repos.d/mariadb.repo. [info] Adding trusted package signing keys... [info] Succeessfully added trusted package signing keys. [root@linux-01 ~]# yum list |grep MariaDB MariaDB-backup.x86_64 10.3.14-1.el7.centos mariadb-main MariaDB-backup-debuginfo.x86_64 10.3.14-1.el7.centos mariadb-main MariaDB-cassandra-engine.x86_64 10.3.14-1.el7.centos mariadb-main MariaDB-cassandra-engine-debuginfo.x86_64 10.3.14-1.el7.centos mariadb-main MariaDB-client.x86_64 10.3.14-1.el7.centos mariadb-main MariaDB-client-debuginfo.x86_64 10.3.14-1.el7.centos mariadb-main MariaDB-common.x86_64 10.3.14-1.el7.centos mariadb-main MariaDB-common-debuginfo.x86_64 10.3.14-1.el7.centos mariadb-main MariaDB-compat.x86_64 10.3.14-1.el7.centos mariadb-main MariaDB-connect-engine.x86_64 10.3.14-1.el7.centos mariadb-main MariaDB-connect-engine-debuginfo.x86_64 10.3.14-1.el7.centos mariadb-main MariaDB-cracklib-password-check.x86_64 10.3.14-1.el7.centos mariadb-main MariaDB-cracklib-password-check-debuginfo.x86_64 MariaDB-devel.x86_64 10.3.14-1.el7.centos mariadb-main MariaDB-devel-debuginfo.x86_64 10.3.14-1.el7.centos mariadb-main MariaDB-gssapi-server.x86_64 10.3.14-1.el7.centos mariadb-main MariaDB-gssapi-server-debuginfo.x86_64 10.3.14-1.el7.centos mariadb-main MariaDB-oqgraph-engine.x86_64 10.3.14-1.el7.centos mariadb-main MariaDB-oqgraph-engine-debuginfo.x86_64 10.3.14-1.el7.centos mariadb-main MariaDB-rocksdb-engine.x86_64 10.3.14-1.el7.centos mariadb-main MariaDB-rocksdb-engine-debuginfo.x86_64 10.3.14-1.el7.centos mariadb-main MariaDB-server.x86_64 10.3.14-1.el7.centos mariadb-main MariaDB-server-debuginfo.x86_64 10.3.14-1.el7.centos mariadb-main MariaDB-shared.x86_64 10.3.14-1.el7.centos mariadb-main MariaDB-shared-debuginfo.x86_64 10.3.14-1.el7.centos mariadb-main MariaDB-test.x86_64 10.3.14-1.el7.centos mariadb-main MariaDB-test-debuginfo.x86_64 10.3.14-1.el7.centos mariadb-main MariaDB-tokudb-engine.x86_64 10.3.14-1.el7.centos mariadb-main MariaDB-tokudb-engine-debuginfo.x86_64 10.3.14-1.el7.centos mariadb-main