php的安装_PHP教程
程序员文章站
2024-01-17 12:42:52
...
apache
tar xf httpd-2.2.19.tar
cd httpd-2.2.19 ls
编译: ./configure --prefix=/usr/loacl/apache --sysconfdir=/etc/httpd --enable-ssl --enable-modules=most --enable-mods-shared=most --enable-so
make
make install
弄一个httpd,
vi /etc/init.d/httpd apachectl=/usr/local/apache/bin/apachectl
httpd=/usr/local/apache/bin/httpd
cd /etc/httpd ls
vi /etc/httpd/conf/httpd.conf
启动 PATH=$PATH:/usr/local/apache/bin
apachectl start
chkconfig --add httpd
cp httpd /etc/init.d/httpd
可能会出现不能启动
vi /etc/httpd/conf/httpd.conf PidFile "/var/run/httpd.pid"
killall httpd
chkconfig --level 2345 httpd on
php
tar xf php-5.3.6.tar
cd php-5.3.6
编译 ./configure --prefix=/usr/local/php5 --sysconfdir=/etc/php --enable-mbstring --with-apxs2=/usr/local/apache/bin/apxs --with-mysql=/usr/local/mysql
make
make install
cp php.ini-production /etc/php/php.ini
cd /etc/php
vi php.ini
cd php-5.3.6
cp php.ini-production /usr/loacl/ph5/lib/php.ini
此时还不能和apache一起工作
vi /etc/httpd/conf/httpd.conf AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps
此时还无法识别index.php
添加directory index.php
service httpd start
cd /usr/local/apache/htdocs
$link=mysql_connect('127.0.0.1','root','');
if ($link)
echo "sucess"
else
echo "failure"
?>
本文出自 “linux” 博客
tar xf httpd-2.2.19.tar
cd httpd-2.2.19 ls
编译: ./configure --prefix=/usr/loacl/apache --sysconfdir=/etc/httpd --enable-ssl --enable-modules=most --enable-mods-shared=most --enable-so
make
make install
弄一个httpd,
vi /etc/init.d/httpd apachectl=/usr/local/apache/bin/apachectl
httpd=/usr/local/apache/bin/httpd
cd /etc/httpd ls
vi /etc/httpd/conf/httpd.conf
启动 PATH=$PATH:/usr/local/apache/bin
apachectl start
chkconfig --add httpd
cp httpd /etc/init.d/httpd
可能会出现不能启动
vi /etc/httpd/conf/httpd.conf PidFile "/var/run/httpd.pid"
killall httpd
chkconfig --level 2345 httpd on
php
tar xf php-5.3.6.tar
cd php-5.3.6
编译 ./configure --prefix=/usr/local/php5 --sysconfdir=/etc/php --enable-mbstring --with-apxs2=/usr/local/apache/bin/apxs --with-mysql=/usr/local/mysql
make
make install
cp php.ini-production /etc/php/php.ini
cd /etc/php
vi php.ini
cd php-5.3.6
cp php.ini-production /usr/loacl/ph5/lib/php.ini
此时还不能和apache一起工作
vi /etc/httpd/conf/httpd.conf AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps
此时还无法识别index.php
添加
service httpd start
cd /usr/local/apache/htdocs
$link=mysql_connect('127.0.0.1','root','');
if ($link)
echo "sucess"
else
echo "failure"
?>
本文出自 “linux” 博客
上一篇: sql语句中能否直接把截取的字符串当作where条件
下一篇: 如何学习框架和模板!
推荐阅读
-
用基于Linux的PHP自建维基Wiki网站(1)
-
PHP小程序后台部署运行 LNMP+WNMP的方法
-
求php大侠解决zend studio8.0.1中的乱码有关问题
-
php的安装_PHP教程
-
如何打开php文件以及如何执行PHP文件_PHP教程
-
php中的require-once,phprequire-once_PHP教程
-
[视频教程]曹鹏 PHP MYSQL开发(6) -须知 PHPHTML 互嵌
-
php中__destruct与register_shutdown_function执行的先后顺序问题_PHP
-
PHP定时执行任务的实现
-
WordPress中用于更新伪静态规则的PHP代码实例讲解_php实例