首頁 > 後端開發 > php教程 > Redhat中快速安装php/mysql

Redhat中快速安装php/mysql

WBOY
發布: 2016-06-01 14:26:46
原創
1064 人瀏覽過
确保使用系统自带的apache(Unix平台最流行的WEB服务器平台),从安装光盘中找出所有以MySQL(和PHP搭配之最佳组合)及php-MySQL(和PHP搭配之最佳组合)开头的rpm包,然后运行
#rpm -ivh MySQL(和PHP搭配之最佳组合)*.rpm php-MySQL(和PHP搭配之最佳组合)*.rpm; MySQL(和PHP搭配之最佳组合)_install_db; service MySQL(和PHP搭配之最佳组合) start

apache(Unix平台最流行的WEB服务器平台) + PHP:
[1] Install the all the component of "Web Server" group. If you have not installed "httpd" or if the php support is not installed, you can just execute "redhat-config-packages" to get a user-friendly GUI to Add/Remove any packages.
[2] By default, the php-MySQL(和PHP搭配之最佳组合) cooperation package will not be installed. Get the
RH8 disc 3 and install the rpm package: "php-MySQL(和PHP搭配之最佳组合)-4.2.2-8.0.5.i386.rpm"
[3] Modify /etc/php.ini, change "register_globals = Off" to "register_globals = On"

MySQL(和PHP搭配之最佳组合):
[1] Install all the components of "Database Server" group. If you have not installed the MySQL(和PHP搭配之最佳组合) server, you can just use "redhat-config-packages" to add it.
(RH8 disc2 and disc3 are needed)
[2] Exceute the following commands:
# MySQL(和PHP搭配之最佳组合)_install_db
# service MySQL(和PHP搭配之最佳组合)d start
# MySQL(和PHP搭配之最佳组合)admin -u root password 'password'

Installation of PHP app:
[1] Extract any tools or applications written in PHP to a directory.
[2] Copy all the contents to apache(Unix平台最流行的WEB服务器平台)'s default document root, /var/www/html, and make sure the file "index.php" is in the directory /var/www/html.

现在都是用单独的一个配置文件,在/etc/httpd/conf.d/php.conf
來源:php.cn
本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn
熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板