PHP Installation _php Tutorial

Source: Internet
Author: User
Apache
Tar XF Httpd-2.2.19.tar
CD httpd-2.2.19 ls
Compile:./configure--prefix=/usr/loacl/apache--sysconfdir=/etc/httpd--enable-ssl--enable-modules=most-- Enable-mods-shared=most--enable-so
Make
Make install
Get a 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
Start path= $PATH:/usr/local/apache/bin

Apachectl start
Chkconfig--add httpd
CP HTTPD/ETC/INIT.D/HTTPD
May occur that cannot be started
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
Compile./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
It's not working with Apache at this point.
vi/etc/httpd/conf/httpd.conf addtype application/x-httpd-php. php addtype application/x-httpd-php-source. Phps
Index.php is not recognized at this time
Add to directory index.php

Service httpd start
Cd/usr/local/apache/htdocs
!--? ph P
$link =mysql_connect (' 127.0.0.1 ', ' root ', ');
if ($link)
echo "sucess"
Else
Echo "Failure"
?>
article from "Linux" blog

http://www.bkjia.com/phpjc/478691.html www.bkjia.com true http://www.bkjia.com/phpjc/478691.html techarticle apache tar XF httpd-2.2.19.tar CD httpd-2.2.19 ls compilation:./configure-- Prefix=/usr/loacl/apache--sysconfdir=/etc/httpd--enable-ssl--enable-modules=most--enable-mods-shared=m ...

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.