as4bbc12
|
分享:
x0
|
[PHP][讨论] Linux上安装MySQL和PHP
手动安装步骤: Step A(Install Apache) # tar xvzf httpd-2.2.2.tar.gz -C /usr/local # cd /usr/local/http-2.2.2; # ./configure --prefix=/usr/local/apache --enable-module=so;make;make install Step B(Install MySQL) # groupadd mysql # useradd -g mysql mysql # gunzip < mysql-5.0.22.tar.gz | tar -xvf - # cd mysql-VERSION # ./configure --prefix=/usr/local/mysql # make # make install # cp support-files/my-medium.cnf /etc/my.cnf # cd /usr/local/mysql # bin/mysql_install_db --user=mysql # chown -R root . # chown -R mysql var # chgrp -R mysql . # bin/mysqld_safe --user=mysql & <----这是启动你的 mysql daemon,记得加到你的 /etc/rc.d/rc.local 中 另外再记得重设你的 DB 的管理者的密码(单引号内打入密码,主机名称请自行代换或打 localhost) /usr/local/mysql/bin/mysqladmin -u root password ' /usr/local/mysql/bin/mysqladmin -u root -h 主机名称 password '
Step C(Install PHP) # tar xvf php-5.1.4.tar.bz2 -j -C /usr/local # cd /usr/local/php-5.1.4 # ./configure --with-apxs2=/usr/local/apache/bin/apxs --with-mysql=/usr/local/mysql # make;make install # cp php.ini-dist /usr/local/lib/php.ini #echo "AddType application/x-httpd-php .php .phtml" >> /usr/local/apache/conf/httpd.conf #echo "AddType application/x-httpd-php .php .phtml" >> /usr/local/apache/conf/httpd.conf # /usr/local/apache/bin/apachectl start <----启动 Apache
|