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...