Install apache2 + php5 + mysql in debian

Source: Internet
Author: User
Tags fully qualified domain name
Install apache2 + php5 + mysql in debian-Linux Enterprise Application-Linux server application information. For more information, see the following. The simplest is to open the desktop-system management-the new software package manager.
Installation of apache2 through dummies
Php5
Mysql-server-5.0
Php5-mysql
After installation, I tested the php connection to apache2 page.
(I forgot to install php5-mysql in advance, so there is a bunch of errors below, if you are in a hurry, the following will not have to read)
However, an error is reported when php is connected to MySQL 5:
Undefined function mysql_connect ()
Find a solution:
Remove the one before extension = mysql. so.
Restart apahce2:
# Apache2ctl restart
If bash: apache2ctl: command not found is prompted, search for the path:
# Whereis apache2ctl
Apache2ctl:/usr/sbin/apache2ctl/usr/share/man/man8/apache2ctl.8.gz

OK, add path:
# Export PATH = $ PATH:/usr/sbin
(Log On with the root user: su, input password)
# Apache2ctl restart
Apache2: cocould not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
Modify/etc/apache2/apache2.conf
# Nano/etc/apache2/apache2.conf
Add a row: ServerName 127.0.0.1
# Apache2ctl restart
Httpd not running, trying to start
To the Internet idle, suddenly realized, I did not install php5-mysql module, So Ran to Suntory to install,
Run again
# Apache2ctl restart
Successful
Come back and run the php webpage connecting to mysql, success, too
Related Article

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.