直接安装:
apt-get install 如下软件
make // 源码预编译
gcc // GNU c编译器
g++ // GNU c++编译器
libxml2-dev // 编译安装
libxml2会用此依赖包
libxml2 build-essential // 编译程序的依赖包 作用:提供编译程序必须软件包的列表信息
bison // 安装Mysql会用到
build-depgcc // Ubuntu下的gcc安装
libncurses5-dev // 安装libncurses5的依赖包
re2c // PHP语法分析器
automake
autoconf //自动配置,phpize会用到
libssl-dev //openssl先关
php-gd:
libfreetype6-dev
libfontconfig1-dev
libgpm-dev
libjpeg62
libjpeg62-dev
libpng
libfeetype6
libfreetype6-dev
libxml2
libxml2-dev
zlib1g
zlib1g-dev
libcurl3
libcurl3-dev
libncurses5-dev
libperl-dev bison
源码安装:
libmcrypt // 算法加密库 ----->源码安装
cmake // 用来预编译MySQL------>源码安装
apr ,apr-util,prce----->和apache有关 ----->源码安装
php在编译安装过长中(php-5.3和php7.0之间的区别):
7.0独有的:
1)--with-mysql 没有这个参数了,应该改为:--with-pro-mysql
2) --enable-magic-quotes, --enable-safe-mode
mysql 安装过程中出现:
rm: cannot remove `libtoolT’: No such file or directory
安装源码包第一步./configure检测是否可编译时,检测出问题rm: cannot remove `libtoolT’: No such file or directory
解决方案:将configure文件中的$RM "$cfgfile"这行代码用#注释掉就可以了
apache:
出现403错误:
修改配置文件httpd.conf中
Require all ignore ---------> Require all granted