Php installation _ PHP Tutorial-php Tutorial

Source: Internet
Author: User
Php installation. Apachetarxfhttpd-2.2.19.tarcdhttpd-2.2.19ls compilation:. configure -- prefixusrloaclapache -- sysconfdiretchttpd -- enable-ssl -- enable-modulesmost -- enable-MoD-sharedm 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 an 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
Startup failure may occur.
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. ini
Cd/etc/php
Vi php. ini
Cd php-5.3.6
Cp php. ini-production/usr/loacl/ph5/lib/php. ini
It cannot work with apache at this time.
Vi/etc/httpd/conf/httpd. conf AddType application/x-httpd-php. php AddType application/x-httpd-php-source. phps
Index. php cannot be identified at this time
Add Directory index. php

Service httpd start
Cd/usr/local/apache/htdocs
$ Link = mysql_connect ('2017. 0.0.1 ', 'root ','');
If ($ link)
Echo "sucess"
Else
Echo "failure"
?>
This article is from the "linux" blog

Http://www.bkjia.com/PHPjc/478691.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/478691.htmlTechArticleapache 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.