Install Apache + PHP + MySQL environment with Yum under Fedora6

Source: Internet
Author: User
Tags php mysql
Use Yum to install the Apache + PHP + MySQL environment under Fedora6-Linux Enterprise Application-Linux server application information. For details, refer to the following. Source: 5D Home
Time: Tue, 12 Jun 2007 11:32:22 + 0000
Author: mancharo
Http://www.5dhome.net/myblog/read.php? 150

Content:
In "non-Dora" (Fedora => non-Dora, think of ipola, haha), use yum to manage the Basic installation of Apache + PHP + Mysql.

1. Install Apahce, PHP, Mysql, and php to connect to the mysql library component.

Yum-y install httpd php mysql-server php-mysql

2. Configure the startup Service

/Sbin/chkconfig httpd on [set the startup of the httpd service on the apache server]
/Sbin/chkconfig -- add mysqld [add mysql service to service list]
/Sbin/chkconfig mysqld on [set mysql Service Startup]

/Sbin/service httpd start [start the httpd service, which has nothing to do with startup]
/Sbin/service mysqld start [start mysql service, irrelevant to startup]

3. Very important! Set the password of the root account of the mysql database. If it is not set to be hacked, cry hard ~~

Mysqladmin-u root password 'new-password' [enter the password in quotation marks]

4. Make mysql database more secure

Mysql-u root-p

Mysql> drop database test; [Delete the test DATABASE]
Mysql> delete from mysql. user WHERE user = ''; [DELETE an anonymous account]
Mysql> flush privileges; [reload permissions]

5. According to the above installation method, the configured site directory is/var/www/html/

Create a php script and test it. Write a phpinfo program and place it to the root database of the site. Example:

Phpinfo ();
?>

6. Create a database, add a database user, and set user permissions. Write a php script to test the database connection.

Mysql> create database web_db;
Mysql> grant all privileges on web_db. * TO 'web _ user' @ 'localhost' identified by 'thepassword ';

Generated by Bo-blog 2.0.3 sp1
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.