分类: LINUX
2009-04-16 13:04:24
yum -y install httpd php mysql mysql-server php-mysql
/sbin/chkconfig httpd on /sbin/chkconfig --add mysqld [this is not required with FC4 and above] /sbin/chkconfig mysqld on
/sbin/service httpd start /sbin/service mysqld start
mysqladmin -u root password 'new-password' [quotes are required]
mysql -u root -p mysql> DROP DATABASE test; [removes the test database] mysql> DELETE FROM mysql.user WHERE user = ''; [Removes anonymous access] mysql> FLUSH PRIVILEGES;5. Following the above steps, the document root for Apache is /var/www/html/
6. Create a database and database user for your data. You will use this database and user name in your database connection string. The GRANT statement actually creates a new MySQL user account.
mysql> CREATE DATABASE web_db; mysql> GRANT ALL PRIVILEGES ON web_db.* TO 'web_user'@'localhost' IDENTIFIED BY 'thepassword';