1.1.1 Required Software
- CMake
- Ncourse
- Mysql
- Apr
- Apr-util
- Pcre
- Apache
- Php
1.1.2 Decompression Software
Enter the /usr/src/soft directory
Tar xzf/usr/src/tar/httpd-2.4.10.tar.gz-c/usr/src/soft/
Tar xzf/usr/src/tar/apr-util-1.5.4.tar.gz-c/usr/src/soft/
Tar xzf/usr/src/tar/apr-1.5.2.tar.gz-c/usr/src/soft/
Tar xzf/usr/src/tar/mysql-5.6.22.tar.gz-c/usr/src/soft/
Tar xzf/usr/src/tar/pcre-8.35.tar.gz-c/usr/src/soft/
Tar xzf/usr/src/tar/cmake-3.0.0.tar.gz-c/usr/src/soft/
Tar xzf/usr/src/tar/ncurses.tar.gz-c/usr/src/soft/
Tar xzf/usr/src/tar/php-5.6.0.tar.gz-c/usr/src/soft/
1.1.3 Software Installation1.1.3.1 installation CMake
cd/usr/src/soft/cmake-3.0.0/
./configure
Make && make install
1.1.3.2 installation ncourse
cd/usr/src/soft/ncurses-5.9/
./configure
Make && make install
1.1.3.3 installing mysql
Groupadd MySQL
Useradd-r-G MySQL MySQL
CMake.
Make
Make install
cd/usr/local/mysql/
Chown-r MySQL.
Chgrp-r MySQL.
scripts/mysql_install_db--user=mysql
Chown-r Root.
Chown-r MySQL Data
Bin/mysqld_safe--user=mysql &
CP Support-files/mysql.server/etc/init.d/mysqld
1.1.3.4 Installing Apr
CD SRCLIB/APR
./configure--PREFIX=/USR/LOCAL/APR
Make && make install
1.1.3.5 installation apr-util
Cd.. /apr-util/
./configure--prefix=/usr/local/apr-util--with-apr=/usr/local/apr/
Make && make install
1.1.3.6 installation pcre
cd/usr/src/soft/pcre-8.35/
./configure--prefix=/usr/local/pcre
Make && make install
Path= $PATH:/usr/local/pcretbin/
1.1.3.7 installation httpd
cd/usr/src/soft/httpd-2.4.10
./configure--prefix=/usr/local/apache \
--ENABLE-SO \
--WITH-APR=/USR/LOCAL/APR \
--with-apr-util=/usr/local/apr-util/bin \
--enable-mods-shared=all \
--with-mpm=worker \
--enable-cache \
--enable-disk-cache \
--enable-mem-cache \
--enable-file-cache\
--with-pcr=/usr/local/pcre/
Make
Make install
Change the ServerName in httpd.conf
1.1.3.8 Installing PHP
cd/usr/src/soft/php-5.6.0/
./configure--with-apxs2=/usr/local/apache/bin/apxs--with-mysql=/usr/local/mysql/
Make && make install
CP Php.ini-development/usr/local/lib/php.ini
Vi/usr/local/apache/conf/httpd.conf
<ifmodule mime_module>
SetHandler application/x-httpd-php
</IfModule>
1.1.4 Software Configuration1.1.4.1 httpd.conf configuration
Vi/usr/local/apache/conf/httpd.conf
ServerName 127.0.0.1:80
<ifmodule mime_module>
SetHandler application/x-httpd-php
</IfModule>
For a version, add the following statement to support PHP
AddType application/x-httpd-php. php
AddHandler php-script .phpAddType text/html .php
1.1.5 Software Testing1.1.5.1 Apache test
In the browser, type:http://172.16.2.82
As shown: "It works" proves that the software is working properly
1.1.5.2 PHP test
Write a simple phpinfo script, as follows
vi/usr/local/apache/htdocs/phpinfo.php
<?php
Phpinfo ();
?>
In the browser, type:http://172.16.2.82/phpinfo.php
Test that the script is able to display PHP-related information correctly
linux+mysql+apache+php