1. Install Apahce, PHP, Mysql, and php on Fedora to connect to the mysql library components. Yum-yinstallhttpdphpmysqlmysql-serverphp-mysql2. Configure the boot service/sbin/chkconfighttpdon [set the httpd server to boot]/sbin/chkconfig-addmysqld [add mysq to the service list
1. Install Apahce, PHP, Mysql, and php on Fedora to connect to the mysql library components.
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 apahce 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. Set the password of the root account of the mysql database.
Mysqladmin-u root password 'newpassword' [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 = "; [deleting anonymous accounts]
Mysql> flush privileges; [reload permissions]
5. According to the above installation method, the default site directory configured is/var/www/html/
Create a php script:
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 my_db;
Mysql> grant all privileges on my_db. * TO 'user' @ 'localhost' identified by 'Password ';
// Install apache Extension
Yum-y install httpd-manual mod_ssl mod_perl mod_auth_mysql
// Install php Extension
Yum install php-gd
Yum-y install php-gd php-xml php-mbstring php-ldap php-pear php-xmlrpc
// Install mysql extension
Yum-y installmysql-connector-odbcmysql-devel libdbi-dbd-mysql