php的安装_PHP教程
程序员文章站
2022-03-31 15:13:57
...
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” 博客
推荐阅读
-
MacBook Air上安装OS X 10.9的图文教程
-
红旗Linux4.1下安装配置Apahce+Tomcat+PHP+mySQL+vsFTPd
-
php版微信公众号接口实现发红包的方法
-
FreeBSD7.0编译安装nginx+php+mysql
-
上传图片的时候,就弹出选择本map">
求php+ajax上传图片的实例!用的不是files,点击上传图片的时候,就弹出选择本map
-
PHP实现的进度条效果详解,php进度条详解
-
php开启与关闭错误提示适用于没有修改php.ini的权限,错误提示php.ini
-
PHP ECSHOP安装有关问题
-
详解PHP中的mb_detect_encoding函数使用方法
-
解析strtr函数的效率问题_PHP