Advertisement
Guest User

Installation

a guest
Apr 25th, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.51 KB | None | 0 0
  1. 1. gunzip apache_xxx.tar.gz
  2. 2. tar -xvf apache_xxx.tar
  3. 3. gunzip php-xxx.tar.gz
  4. 4. tar -xvf php-xxx.tar
  5. 5. cd apache_xxx
  6. 6. ./configure --prefix=/www --enable-module=so
  7. 7. make
  8. 8. make install
  9. 9. cd ../php-xxx
  10.  
  11. 10. Now, configure your PHP. This is where you customize your PHP
  12. with various options, like which extensions will be enabled. Do a
  13. ./configure --help for a list of available options. In our example
  14. we'll do a simple configure with Apache 1 and MySQL support. Your
  15. path to apxs may differ from our example.
  16.  
  17. ./configure --with-mysql --with-apxs=/www/bin/apxs
  18.  
  19. 11. make
  20. 12. make install
  21.  
  22. If you decide to change your configure options after installation,
  23. you only need to repeat the last three steps. You only need to
  24. restart apache for the new module to take effect. A recompile of
  25. Apache is not needed.
  26.  
  27. Note that unless told otherwise, 'make install' will also install PEAR,
  28. various PHP tools such as phpize, install the PHP CLI, and more.
  29.  
  30. 13. Setup your php.ini file:
  31.  
  32. cp php.ini-development /usr/local/lib/php.ini
  33.  
  34. You may edit your .ini file to set PHP options. If you prefer your
  35. php.ini in another location, use --with-config-file-path=/some/path in
  36. step 10.
  37.  
  38. If you instead choose php.ini-production, be certain to read the list
  39. of changes within, as they affect how PHP behaves.
  40.  
  41. 14. Edit your httpd.conf to load the PHP module. The path on the right hand
  42. side of the LoadModule statement must point to the path of the PHP
  43. module on your system. The make install from above may have already
  44. added this for you, but be sure to check.
  45.  
  46. LoadModule php5_module libexec/libphp5.so
  47.  
  48. 15. And in the AddModule section of httpd.conf, somewhere under the
  49. ClearModuleList, add this:
  50.  
  51. AddModule mod_php5.c
  52.  
  53. 16. Tell Apache to parse certain extensions as PHP. For example,
  54. let's have Apache parse the .php extension as PHP. You could
  55. have any extension(s) parse as PHP by simply adding more, with
  56. each separated by a space. We'll add .phtml to demonstrate.
  57.  
  58. AddType application/x-httpd-php .php .phtml
  59.  
  60. It's also common to setup the .phps extension to show highlighted PHP
  61. source, this can be done with:
  62.  
  63. AddType application/x-httpd-php-source .phps
  64.  
  65. 17. Use your normal procedure for starting the Apache server. (You must
  66. stop and restart the server, not just cause the server to reload by
  67. using a HUP or USR1 signal.)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement