Build an Apache + PHP + MySQL environment on SuSE Linux
Source: Internet
Author: User
Build an Apache + PHP + MySQL environment on SuSE Linux
1. Install the apacheapache installation package: httpd-2.2.9.tar.gz, installation steps: 1)./configure -- prefix =/usr/local/httpd-2.2.92) make3) make install
2. install MySQL directly using the MySQL non-RPM binary installation package, such as: mysql-5.1.36-linux-i686-glibc23.tar.gz, the procedure is as follows: shell> groupadd mysqlshell> useradd-G MySQL mysqlshell> Cd/usr/localshell> gunzip </path/to/mysql-VERSION-OS.tar.gz | tar xvf-shell> ln-s full-path-- mysql-version-OS mysqlshell> Cd mysqlshell> chown-r MySQL. shell> chgrp-r MySQL. shell> scripts/mysql_install_db -- user = mysqlshell> chown-r root. shell> chown-r MySQL datashell> bin/mysqld_safe -- user = MySQL &
3. install PHP dependent libraries libxml2, expat, Gd, and gettext. install these dependent libraries using the standard automake installation method.
4. install phpphp installation package: php-5.2.6.tar.gz, installation steps: 1 ). /configure -- prefix =/usr/local/php-5.2.6 -- enable-mbstring = Lang -- With-mysql =/usr/local/MySQL -- With-Gd =/usr/local/GD -- with-gettext =/usr/local/gettext -- With-libxml-Dir =/usr/local/libxml2 -- With-libexpat-Dir =/usr/local/expat -- with-apxs2 =/ the usr/local/httpd/bin/apxs parameter -- with-apxs2 =/usr/local/httpd/bin/apxs is used to generate the libphp5.so file, so it is required. 2) make3) make install, copy PHP. ini-Dist to/usr/local/PHP/lib/, and rename it PHP. ini. Basically, PHP is successfully installed here. If an error occurs in the middle, no errors will occur except when no correct option is selected during configuration.
5. modify the Apache configuration file httpd. conf, add the following two lines: addtype application/X-httpd-PHP. PHP. phtmladdtype application/X-httpd-PHP-source. PHPs and make sure that there is one sentence in the file. If not, add it after all loadmodules: loadmodule php5_module modules/libphp5.so
6. Start Apache #/usr/local/httpd/bin/apachectl restart
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