Apache-2.2
解除安裝 Fedora Core 附帶的預設 Apache 和 PHP
我使用 Apache 和 PHP 的自定義編譯版本,並且想知道如何解除安裝我的 Fedora 13 副本附帶的預設版本。
這些的二進製文件位於,
/usr/bin
而我的編譯的二進製文件分別是/usr/local/apache
&/usr/local/php
。作為使用 PHP 的網路伺服器,此設置工作正常,但在從命令行執行腳本時,除非我指定已編譯 PHP 的絕對路徑,否則 in
/usr/bin
優先,因為它在路徑搜尋順序中首先找到。更新 - 解除安裝日誌
[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
只需使用包管理器 (yum) 來刪除它們。
yum erase httpd php
這應該擺脫它們,但您可能想檢查是否安裝了其他 PHP 包,有些可能不會與主包一起刪除。
更新:
您可以獲得曾經下載的所有軟體包的列表(我認為),然後為 PHP 過濾,例如:
rpm -qa | grep php
這將為您提供包含 PHP 一詞的所有軟體包的列表
現在,如果您在談論 php 二進製文件,我認為那將是 php-cli 包。