centos 7 mysqli,centos官网

这篇文章给大家聊聊关于centos 7 mysqli,以及centos官网对应的知识点,希望对各位有所帮助,不要忘了收藏本站哦。

centos7.0怎么卸载软件

centos7.0卸载软件的方法

第一步:卸载php5.4

1.查看php版本

2.卸载php

3.查看php是否卸载

php未能完成卸载,还有对应的依赖包。所以需要接着来卸载。

4.卸载php对应的依赖包

网上的资料是用rpm-e来卸载,但是试了几次都提示不能找到该安装包。

# rpm-e php-mysql-5.1.6-27.el5_5.3# rpm-e php-pdo-5.1.6-27.el5_5.3# rpm-e php-xml-5.1.6-27.el5_5.3# rpm-e php-cli-5.1.6-27.el5_5.3# rpm-e php-gd-5.1.6-27.el5_5.3# rpm-e php-common-5.1.6-27.el5_5.3

自己解决的办法是如下:

5.再次查看php是否卸载完成

第二步:安装php

1.下载php

2.上传到服务器,并且解压

3.安装php

1.说明:

#–prefix=/usr/php##PHP安装路径

#–exec-prefix=/usr/bin##PHP命令执行路径

#–sysconfdir=/etc##配置文件存放路径

#–with-apxs2=/usr/sbin/apxs##Apache apxs扩展路径

#–with-mysql=/var/lib/mysql##mysql路径

#–with-mysqli=/usr/bin/mysql_config##mysqli路径

#–with-mcrypt##启用加密模块

2.出现错误, error: xml2-config not found.

3.接着安装php

4.编译php

5.出现错误提示

网上解决方法如下:

6.接着编译php

7.编译test

8.安装成功

9.说明

如果apache不识别php,请对应的在http.conf中添加:

LoadModule php5_module modules/libphp5.so

AddType application/x-httpd-php.php

debian8怎么安装php7

debian8编译安装 php7

目录(?)[-]

Please reinstall the libcurl distributionCannot find OpenSSL

configure error Unable to locate gmph

Can not find recodeh anywhere under usr usrlocal usr optCannot find pspell

Please reinstall the mysql distribution

mcrypth not found Please reinstall libmcryptxml2-config not found

安装编译器

apt-get install build-essential autoconf automake libtool bison re2c获取PHP安装包

wget 安装dev包

apt-get install libxml2-dev libssl-dev libbz2-dev libjpeg-dev libpng-dev libxpm-dev libfreetype6-dev libgmp-dev libgmp3-dev libmcrypt-dev libmysqlclient15-dev libpspell-dev librecode-dev进行编译安装

./buildconf//用来生成configure脚本

./configure\

--prefix=/usr\

--with-config-file-path=/etc\

--enable-mbstring\

--enable-zip\

--enable-bcmath\

--enable-pcntl\

--enable-ftp\

--enable-exif\

--enable-calendar\

--enable-sysvmsg\

--enable-sysvsem\

--enable-sysvshm\

--enable-wddx\

--with-curl\

--with-mcrypt\

--with-iconv\

--with-gmp\

--with-pspell\

--with-gd\

--with-jpeg-dir=/usr\

--with-png-dir=/usr\

--with-zlib-dir=/usr\

--with-xpm-dir=/usr\

--with-freetype-dir=/usr\

--with-t1lib=/usr\

--enable-gd-native-ttf\

--enable-gd-jis-conv\

--with-openssl\

--with-pdo-mysql=/usr\

--with-gettext=/usr\

--with-zlib=/usr\

--with-bz2=/usr\

--with-recode=/usr\

--with-mysqli=/usr/bin/mysql_config

备注:错误1:Cannot find OpenSSL's libraries解决:

确认已安装过 openssl、libssl-dev包,还是会提示该错误;解决办法:

root@test2:~/php-5.3.27# find/-name libssl.so输出结果为:/usr/lib/x86_64-Linux-gnu/libssl.so初步判断它可能只会在/usr/lib/下寻找 libssl.so文件,于是:

ln-s/usr/lib/x86_64-linux-gnu/libssl.so/usr/lib错误2:debian Please reinstall the libcurl distribution解决:

# RetHat CentOS or Fedora使用下面安装命令yum install curl curl-devel

# Debian or Ubuntu使用下面的安装命令

apt-get install curl

apt-get install libcurl4-gnutls-dev

错误3:Unable to locate gmp.h解决:

在下载 gmp源码包,接着./configure&& make&& make install编译安装

make&&make install

报错处理

Please reinstall the libcurl distributionaptitude search libcurl4

aptitude install libcurl4-gnutls-dev

Cannot find OpenSSL’

wget openssl-1.0.2j.tar.gz

cd openssl-1.0.2j

./config

make&& make install

configure: error: Unable to locate gmp.h

sudo apt-get install libgmp-dev libgmp3-devln-s/usr/include/x86_64-linux-gnu/gmp.h/usr/include/gmp.hCan not find recode.h anywhere under/usr/usr/local/usr/opt.

apt-get install librecode-dev

Cannot find pspell

apt-get install libpspell-dev

Please reinstall the mysql distribution

apt-get install libmysqlclient15-dev

mcrypt.h not found. Please reinstall libmcrypt.

apt-get install libmcrypt-dev

xml2-config not found

apt-get install libxml2-dev

Centos7如何安装PHP7最新版

方法一、简单安装(通过yum)

1.安装epel-release

rpm-ivh

2.安装PHP7的rpm源

rpm-Uvh

3.安装PHP7

yum install php70w

方法二、编译安装

1.下载php7

wget-O php7.tar.gz

2.解压php7

tar-xvf php7.tar.gz

3.进入php目录

cd php-7.0.4

4.安装依赖包

#直接复制下面一行(不包括本行)

yum install libxml2 libxml2-devel openssl openssl-devel bzip2 bzip2-devel libcurl libcurl-devel libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel gmp gmp-devel libmcrypt libmcrypt-devel readline readline-devel libxslt libxslt-devel

5.编译配置(如果出现错误,基本都是上一步的依赖文件没有安装所致)

嫌麻烦的可以从这一步起参考PHP官方安装说明:

./configure\

--prefix=/usr/local/php\

--with-config-file-path=/etc\

--enable-fpm\

--with-fpm-user=nginx\

--with-fpm-group=nginx\

--enable-inline-optimization\

--disable-debug\

--disable-rpath\

--enable-shared\

--enable-soap\

--with-libxml-dir\

--with-xmlrpc\

--with-openssl\

--with-mcrypt\

--with-mhash\

--with-pcre-regex\

--with-sqlite3\

--with-zlib\

--enable-bcmath\

--with-iconv\

--with-bz2\

--enable-calendar\

--with-curl\

--with-cdb\

--enable-dom\

--enable-exif\

--enable-fileinfo\

--enable-filter\

--with-pcre-dir\

--enable-ftp\

--with-gd\

--with-openssl-dir\

--with-jpeg-dir\

--with-png-dir\

--with-zlib-dir\

--with-freetype-dir\

--enable-gd-native-ttf\

--enable-gd-jis-conv\

--with-gettext\

--with-gmp\

--with-mhash\

--enable-json\

--enable-mbstring\

--enable-mbregex\

--enable-mbregex-backtrack\

--with-libmbfl\

--with-onig\

--enable-pdo\

--with-mysqli=mysqlnd\

--with-pdo-mysql=mysqlnd\

--with-zlib-dir\

--with-pdo-sqlite\

--with-readline\

--enable-session\

--enable-shmop\

--enable-simplexml\

--enable-sockets\

--enable-sysvmsg\

--enable-sysvsem\

--enable-sysvshm\

--enable-wddx\

--with-libxml-dir\

--with-xsl\

--enable-zip\

--enable-mysqlnd-compression-support\

--with-pear\

--enable-opcache

6.正式安装

make make install

7.配置环境变量

vi/etc/profile

在末尾追加

PATH=$PATH:/usr/local/php/bin

export PATH

执行命令使得改动立即生效

source/etc/profile

8.配置php-fpm

cp php.ini-production/etc/php.ini

cp/usr/local/php/etc/php-fpm.conf.default/usr/local/php/etc/php-fpm.conf

cp/usr/local/php/etc/php-fpm.d/www.conf.default/usr/local/php/etc/php-fpm.d/www.conf

cp sapi/fpm/init.d.php-fpm/etc/init.d/php-fpm

chmod+x/etc/init.d/php-fpm

9.启动php-fpm

/etc/init.d/php-fpm start

阅读剩余
THE END