Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Server \ To install and deploy PHP environment under the CentOS     - Talk about Java EE Learning (Programming)

- Linux system components Detailed log (Linux)

- TNS-03505 name could not be resolved (Database)

- Linux process scheduling opportunity (Programming)

- CentOS achieve trash mechanism (Linux)

- Ubuntu 32 compile Android 4.0.4 Problems (Linux)

- Android Dynamic efficiency articles: a brilliant Loading Analysis and Implementation (Programming)

- Ubuntu 15.04 installed JDK and configured as the default JDK (Linux)

- Nginx introduced Dynamic Module Architecture (Server)

- MySQL high availability cluster fragmentation of deployment uses Fabric (Database)

- Swift rewrite initialize method of navigation controller class (Programming)

- When a software RAID data recovery and reconstruction of how failure (Linux)

- MySQL rollback insert statement causes ibd file grows double (Database)

- ORA-01157 & ORA-01110 Troubleshooting (Database)

- Under CentOS Linux automatic backup MySQL database daily (Database)

- Ubuntu 14.04 compile and install Apache (Server)

- MySQL EXPLAIN SQL output description (Database)

- To deploy MySQL database with separate read and write OneProxy (Database)

- The difference between statement and preparedStatement of the jdbc (Database)

- Install the latest Pinta graphics editing software on Ubuntu 14.04 (Linux)

 
         
  To install and deploy PHP environment under the CentOS
     
  Add Date : 2018-11-21      
         
         
         
  Surroundings

VM: VMWare10.0.1 build-1379776

Operating System: CentOS7 64 Wei

HTTP Server: Apache (httpd)

step

PHP environment needs to support HTTP server, HTTP server used herein for Apache, you can use now more popular Nginx.

Apache's default document root directory view the location /etc/httpd/conf/httpd.conf view DocumentRoot configuration values

1, install php

yum install php php-devel

2, commonly used to install php extension (optional, according to their actual needs)

yum install php-mysql php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc

3, restart apache so php into force

apachectl restart

4, test php environment

New info.php in / var / www / html directory (Apache default root directory)

vi /var/www/html/info.php

document content

< ? Php phpinfo ();?>

Visit http: //localhost/info.php

Additional: mysql test

The New mysql.php in / var / www / html directory (apache default root directory)

vi /var/www/htmml/mysql.php

document content

< ? Php
$ Con = mysql_connect ( "localhost", "root", "root");
if (! $ con)
  {
  die ( 'Could not connect:' mysql_error ().);
  }
 
mysql_select_db ( "mysql", $ con);
 
$ Result = mysql_query ( "SELECT * FROM user");
 
while ($ row = mysql_fetch_array ($ result))
  {
  echo $ row [ 'User'] "" $ row [ 'Host']..;
  echo "< br />";
  }
 
mysql_close ($ con);
?>

Visit http: //localhost/mysql.php
     
         
         
         
  More:      
 
- Linux rights management (Linux)
- Linux command line ten magic usage (Linux)
- JavaScript, some conclusions about the implicit conversion (Programming)
- Learning OpenCV: (VS2010-openCV2.4.3-win7 configuration instructions) (Linux)
- CentOS How to mount the hard drive (Linux)
- Kafka cluster deployment (Server)
- Number JavaScript type system (Programming)
- CentOS Linux firewall configuration and Close (Linux)
- Linux System Getting Started Learning: The Linux logrotate (Linux)
- SLF4J Tutorial (Programming)
- Python script file directory traversal examples (Programming)
- Linux development management utility command (Linux)
- Oracle 12c users create (Database)
- Hibernate Search and Lucene quick introduction (Linux)
- dmidecode command Detailed (Hardware information) (Linux)
- Linux system on a virtual machine to access the Internet (Linux)
- Four IDS intrusion detection tool under Linux environment (Linux)
- ELKstack log analysis platform (Server)
- JDK installation notes under CentOS (Linux)
- Linux create and delete user step (Linux)
     
           
     
  CopyRight 2002-2020 newfreesoft.com, All Rights Reserved.