我使用Apache和PHP的自定义编译版本,并想知道如何卸载我的Fedora 13副本附带的默认版本。
这些二进制文件位于/usr/bin而我的编译的二进制文件分别为/usr/local/apache & /usr/local/php 。
作为一个使用PHP的networking服务器,这个设置工作正常,但是当从命令行执行脚本时,除非指定了编译的PHP的绝对path,否则/usr/bin的一个优先于pathsearch顺序中的第一个。
更新 – 卸载日志
[root@dogmatix ~]# which php /usr/bin/php [root@dogmatix ~]# which httpd /usr/sbin/httpd [root@dogmatix ~]# yum erase httpd php Loaded plugins: presto, refresh-packagekit, rhnplugin This system is not registered with RHN. RHN support will be disabled. Setting up Remove Process Resolving Dependencies --> Running transaction check ---> Package httpd.i686 0:2.2.15-1.fc13 set to be erased --> Processing Dependency: httpd-mmn = 20051115 for package: mod_perl-2.0.4-10.fc13.i686 --> Processing Dependency: httpd-mmn = 20051115 for package: mod_python-3.3.1-11.i686 --> Processing Dependency: httpd-mmn = 20051115 for package: 1:mod_ssl-2.2.15-1.fc13.i686 --> Processing Dependency: httpd for package: 1:mod_ssl-2.2.15-1.fc13.i686 --> Processing Dependency: httpd = 2.2.15-1.fc13 for package: 1:mod_ssl-2.2.15-1.fc13.i686 --> Processing Dependency: httpd for package: webalizer-2.21_02-3.i686 --> Processing Dependency: httpd for package: BackupPC-3.1.0-13.fc13.noarch --> Processing Dependency: httpd >= 2.2.0 for package: gnome-user-share-2.30.0-1.fc13.i686 --> Processing Dependency: httpd = 2.2.15-1.fc13 for package: httpd-manual-2.2.15-1.fc13.noarch --> Processing Dependency: httpd >= 2.0.40 for package: mod_python-3.3.1-11.i686 --> Processing Dependency: httpd for package: 5:system-config-httpd-1.4.6-1.fc13.noarch ---> Package php.i686 0:5.3.3-1.fc13 set to be erased --> Running transaction check ---> Package BackupPC.noarch 0:3.1.0-13.fc13 set to be erased ---> Package gnome-user-share.i686 0:2.30.0-1.fc13 set to be erased ---> Package httpd-manual.noarch 0:2.2.15-1.fc13 set to be erased ---> Package mod_perl.i686 0:2.0.4-10.fc13 set to be erased ---> Package mod_python.i686 0:3.3.1-11 set to be erased ---> Package mod_ssl.i686 1:2.2.15-1.fc13 set to be erased ---> Package system-config-httpd.noarch 5:1.4.6-1.fc13 set to be erased ---> Package webalizer.i686 0:2.21_02-3 set to be erased --> Finished Dependency Resolution Dependencies Resolved ==================================================================================================================================== Package Arch Version Repository Size ==================================================================================================================================== Removing: httpd i686 2.2.15-1.fc13 @anaconda-InstallationRepo-201005130056.i386 2.7 M php i686 5.3.3-1.fc13 @updates 3.3 M Removing for dependencies: BackupPC noarch 3.1.0-13.fc13 @anaconda-InstallationRepo-201005130056.i386 2.2 M gnome-user-share i686 2.30.0-1.fc13 @anaconda-InstallationRepo-201005130056.i386 1.1 M httpd-manual noarch 2.2.15-1.fc13 @anaconda-InstallationRepo-201005130056.i386 3.5 M mod_perl i686 2.0.4-10.fc13 @anaconda-InstallationRepo-201005130056.i386 6.0 M mod_python i686 3.3.1-11 @anaconda-InstallationRepo-201005130056.i386 1.5 M mod_ssl i686 1:2.2.15-1.fc13 @anaconda-InstallationRepo-201005130056.i386 181 k system-config-httpd noarch 5:1.4.6-1.fc13 @anaconda-InstallationRepo-201005130056.i386 2.3 M webalizer i686 2.21_02-3 @anaconda-InstallationRepo-201005130056.i386 329 k Transaction Summary ==================================================================================================================================== Remove 10 Package(s) Reinstall 0 Package(s) Downgrade 0 Package(s) Is this ok [y/N]: y Downloading Packages: Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Erasing : httpd-manual-2.2.15-1.fc13.noarch 1/10 Erasing : BackupPC-3.1.0-13.fc13.noarch 2/10 Erasing : 5:system-config-httpd-1.4.6-1.fc13.noarch 3/10 Erasing : php-5.3.3-1.fc13.i686 4/10 Erasing : mod_perl-2.0.4-10.fc13.i686 5/10 Erasing : 1:mod_ssl-2.2.15-1.fc13.i686 6/10 Erasing : webalizer-2.21_02-3.i686 7/10 Erasing : mod_python-3.3.1-11.i686 8/10 Erasing : gnome-user-share-2.30.0-1.fc13.i686 9/10 Erasing : httpd-2.2.15-1.fc13.i686 10/10 Removed: httpd.i686 0:2.2.15-1.fc13 php.i686 0:5.3.3-1.fc13 Dependency Removed: BackupPC.noarch 0:3.1.0-13.fc13 gnome-user-share.i686 0:2.30.0-1.fc13 httpd-manual.noarch 0:2.2.15-1.fc13 mod_perl.i686 0:2.0.4-10.fc13 mod_python.i686 0:3.3.1-11 mod_ssl.i686 1:2.2.15-1.fc13 system-config-httpd.noarch 5:1.4.6-1.fc13 webalizer.i686 0:2.21_02-3 Complete! [root@dogmatix ~]# which php /usr/bin/php
只需使用软件包pipe理器(yum)将其删除即可。
yum erase httpd php
这应该摆脱他们两个,你可能想检查是否有其他的PHP软件包安装,但有些可能不会被删除与主包。
更新:
你可以得到所有包下载(我认为)的列表,然后过滤PHP的,如:
rpm -qa | grep php
这会给你一个包含单词PHP的所有包的列表
现在,如果你正在谈论的PHP二进制文件,我认为这将是php-cli包。