Install httpd and php: # yuminstallhttpdphpphp-common to start the apache service: # servicehttpdstart allows you to run the netstat-tnl command to check whether port 80 is enabled and whether apache is enabled. Enter localhost in the browser to view the apache page and set the apache service to start from
Install httpd and php: # yum install httpd php-common to start the apache service: # service httpd start you can run the netstat-tnl command to check whether port 80 is enabled, determine whether apache is enabled. Enter http: // localhost/in the browser to view the apache page and set the apache service to start from
Install httpd and php:
# Yum install httpd php-common
Start the apache service:
# Service httpd start
You can run the netstat-tnl command to check whether port 80 is enabled and whether apache is enabled. Enter http: // localhost/in the browser to view the apache page.
Set Automatic startup of apache service
# Chkconfig-level 235 httpd on
Install the php module:
# Yum install php-pecl-apc php-cli php-pear php-pdo php-mysql php-pgsql php-pecl-mongo
# Yum install php-sqlite php-pecl-memcache php-pecl-memcached php-gd php-mbstring php-mcrypt
Create a simple page touch test. php under/var/www/html/and enter
Open http: // localhost/test. php In the browser to view the php information.
Install the database module Mysql and Mysql-server
# Yum install mysql-server
Enable mysql Service
# Systemctl start mysqld. service
You can also use netstat-tnl to check whether the mysql service is enabled. If yes, port 3306 is displayed.
Set the mysql user name and password
Mysqladmin-u user name password
Enter the user name and password
Then try to log on to the mysql database
# Mysql-h localhost-u username-p
Then you are prompted to enter the password. If you can log on successfully, the installation is successful.
Install the graphical management interface of mysql
# Yum install phpmyadmin
After installation, restart the apache service.
# Service httpd restart
Finally, open http: // localhost/phpmyadmin/to manage the mysql database on the GUI.