在安装PHP之前首先要安装的依赖
0.sudo yum -y install gcc gcc++ gcc-c++ libxml2-devel ncurses-deve openssl openssl-develncurses-devel bison
1.sudo wget http://hk1.PHP.net/get/PHP-7.1.3.tar.gz/from/this/mirror 下载PHP
2.sudotar -zxvf mirror
3.sudo cd PHP-7.1.3/
4.sudo ./configure --prefix=/usr/local/PHP7.1 --enable-fpm
5.sudo make && make install
测试用力
比如:vim test.PHP
<?PHP
PHPinfo();
6./usr/local/PHP7.1/bin/PHP test.PHP
=============================================================================
MysqL5.7
安装MysqL之前先安装cmake
1.sudo wget https://cmake.org/files/v3.8/cmake-3.8.0-rc4.tar.gz 下载cmake
2.sudotar -zxvf cmake-3.8.0-rc4.tar.gz && cd cmake-3.8.0-rc4/
3../bootstrap
4.gmake
5.gmake install
下载boost
3.从MysqL 5.7.5开始Boost库是必需的
下载 MysqL-boost-5.7.12.tar.g 在 cmake 指定参数 -DWITH_BOOST=boost/boost_1_59_0/
或直接cmake指定参数 -DDOWNLOAD_BOOST=1 -DWITH_BOOST=<directory> 系统会下载 boost
我这里直接下载安装:
cd /usr/local/src
wget http://downloads.sourceforge.net/project/boost/boost/1.59.0/boost_1_59_0.tar.gz
tar zxvf boost_1_59_0.tar.gz
cd boost_1_59_0
./bootstrap.sh
./b2 install 下载MysqL1.sudo wgethttps://dev.MysqL.com/get/Downloads/MysqL-5.7/MysqL-5.7.17.tar.gz 下载
2.sudo tar -zxvfMysqL-5.7.17.tar.gz
3.cd MysqL-5.7.17
cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/MysqL \ -DMysqL_DATADIR=/mydata/data \ -DSYSCONFDIR=/etc \ -DWITH_INNOBASE_STORAGE_ENGINE=1 \ -DWITH_FEDERATED_STORAGE_ENGINE=1 \ -DWITH_ARCHIVE_STORAGE_ENGINE=1 \ -DWITH_BLACKHOLE_STORAGE_ENGINE=1 \ -DWITHOUT_EXAMPLE_STORAGE_ENGINE=1 \ -DWITH_PARTITION_STORAGE_ENGINE=1 \ -DWITH_PERFSCHEMA_STORAGE_ENGINE=1 \ -DWITH_READLINE=ON \ -DWITH_LIBWRAP=0 \ -DMysqL_UNIX_ADDR=/tmp/MysqL.sock \ -DWITH_SSL=system \ -DWITH_ZLIB=system \ -DDEFAULT_CHARSET=utf8 \ -DENABLE_DOWNLOADS=1 \ -DWITH_BOOST=/usr/local/src/boost_1_59_0 \ -DDEFAULT_COLLATION=utf8_general_ci
make && make install
一些参考网站
http://www.justwinit.cn/post/8677/ C++编译 内部错误 内存不足导致的
http://www.cnblogs.com/goozgk/p/5645041.html http://www.cnblogs.com/galengao/p/5755788.html http://blog.itpub.net/20893244/viewspace-2133137/ http://www.cnblogs.com/chunguang/p/5553301.html原文链接:https://www.f2er.com/centos/378050.html