Home >Backend Development >PHP Tutorial > PHP服务装配总结

PHP服务装配总结

WBOY
WBOYOriginal
2016-06-13 13:05:11738browse

PHP服务安装总结

系统环境信息

  • CentOS release 6.3 (Final)
  • VMware? Workstation 9.0.0 build-812388

rpm安装包准备

????? 1 从光盘拷贝如下安装包到指定目录

????? 2 也可以从RPM资源网站下载到本地环境

???? ? ? http://rpmfind.net/linux/

???? php-common-5.3.3-3.el6_2.8.i686.rpm
???? php-cli-5.3.3-3.el6_2.8.i686.rpm
???? php-5.3.3-3.el6_2.8.i686.rpm
???? php-pdo-5.3.3-3.el6_2.8.i686
???? php-mysql-5.3.3-3.el6_2.8.i686.rpm
???? php-xml-5.3.3-3.el6_2.8.i686.rpm
???? php-ldap-5.3.3-3.el6_2.8.i686.rpm

????? 目录名称

  • /usr/dev/php

卸除原有php服务

  1. ?查看php 服务安装情况 --php已经安装

????????? #php -v

???????? PHP 5.3.3 (cli) (built: May? 7 2012 19:58:17)
??????? Copyright (c) 1997-2010 The PHP Group

??? 2. 查看php rpm安装情况

??????? #rpm -qa |grep php
??????? php-cli-5.3.3-3.el6_2.8.i686
??????? php-xml-5.3.3-3.el6_2.8.i686
??????? php-pdo-5.3.3-3.el6_2.8.i686
??????? php-common-5.3.3-3.el6_2.8.i686
??????? php-mysql-5.3.3-3.el6_2.8.i686
??????? php-ldap-5.3.3-3.el6_2.8.i686
??????? php-5.3.3-3.el6_2.8.i686

??? 3.按照如下顺序卸除php

??????? #rpm -e php-5.3.3-3.el6_2.8.i686

??????? #rpm -e php-ldap-5.3.3-3.el6_2.8.i686

??????? #rpm -e php-mysql-5.3.3-3.el6_2.8.i686

??????? #rpm -e php-cli-5.3.3-3.el6_2.8.i686

??????? #rpm -e php-pdo-5.3.3-3.el6_2.8.i686

??????? #rpm -e php-xml-5.3.3-3.el6_2.8.i686

??????? #rpm -e php-common-5.3.3-3.el6_2.8.i686

?? 4 验证

????? #whereis php

????? 已经没有php相关信息了

????? php:

安装php操作步骤

  1. #cd /usr/dev/php
  2. #rpm -ivh php-common-5.3.3-3.el6_2.8.i686.rpm
  3. #rpm -ivh php-cli-5.3.3-3.el6_2.8.i686.rpm
  4. #rpm -ivh php-5.3.3-3.el6_2.8.i686.rpm
  5. #rpm -ivh php-pdo-5.3.3-3.el6_2.8.i686.rpm
  6. #rpm -ivh php-mysql-5.3.3-3.el6_2.8.i686.rpm
  7. #rpm -ivh php-xml-5.3.3-3.el6_2.8.i686.rpm
  8. #rpm -ivh php-ldap-5.3.3-3.el6_2.8.i686.rpm
  9. #php -v

命令注释

?? 1 进入php rmp安装包的目录 才能执行rpm安装包 进行安装

?? 9 验证php是否正常安装 如果正常安装则显示如下内容

????? PHP 5.3.3 (cli) (built: May? 7 2012 19:58:17)
?????? Copyright (c) 1997-2010 The PHP Group

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn