Install the software:
# yum -y install mysql mysql-server php-mysql httpd php phpmyadminCreate link from the DirectoryRoot of the webserver to PhpMyAdmin:
# cd /var/www/htmlMake sure the services are started at boot time:
# ln -s /usr/share/phpMyAdmin
# chkconfig httpd onSet the root password for mysql:
# chkconfig --add mysqld
# chkconfig mysqld on
# service httpd start
# service mysqld start
# mysqladmin -u root password rootMake additional security-related changes to mysql:
# mysql -u root -pFollowing the above steps, the document root for Apache is /var/www/html/. Create a test PHP script (such as phpinfo.php) and place it in the document root. A useful test script sample:
mysql> DROP DATABASE test; [removes the test database]
mysql> DELETE FROM mysql.user WHERE user = ''; [Removes anonymous access]
<?phpTest with a brower: http://hostname/phpinfo.php
phpinfo();
?>
Create a database:
mysql> create database testdbAdd the following to /etc/httpd/conf/httpd.conf:
<Directory "/usr/share/phpMyAdmin">Set the ServerName entry to hostname:80
Order allow,deny
Allow from all
</Directory>
Add "index.php" to the DirectoryIndex entry, so the webserver also recognizes index.php as an index file.
Restart the http server:
# service httpd restartTest with a browser: http://hostname/phpMyAdmin/
If you found this useful, here's more on the same topic(s) in our blog:
- EMC and MPIO
- Install Python version 3 on Red Hat / CentOS
- Yum
- Preventing Gnome's initial setup
- IP address service processors
UNIX Health Check delivers software to scan Linux and AIX systems for potential issues. Run our software on your system, and receive a report in just a few minutes. UNIX Health Check is an automated check list. It will report on perfomance, capacity, stability and security issues. It will alert on configurations that can be improved per best practices, or items that should be improved per audit guidelines. A report will be generated in the format you wish, and the report includes the issues discovered and information on how to solve the issues as well.
Interested in learning more?
Interested in learning more?