Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Server \ To install and deploy PHP environment under the CentOS     - Linux desktop system using the remote server in clear text ssh password (Server)

- Linux source code to install Apache and solutions to common errors (Server)

- Bash Getopts - let your script supports command line parameters (Linux)

- C language function pointer and a callback function (Programming)

- Ganglia Python plug-in the process of writing notes (Linux)

- Compiling source code Nginx module installation subs_filter (Server)

- Linux based serial programming (Programming)

- RocketMQ Message Queuing simple deployment (Linux)

- ARM constant expression (Programming)

- Linux ban single-user mode to enhance system security (Linux)

- Nginx + ownCloud + PHP + MySQL to build personal private cloud under CentOS7 (Server)

- CentOS yum install LAMP (Server)

- Apache Web Security Linux systems (Linux)

- The relationship between UNIX and Linux (Linux)

- Hunk / Hadoop: Performance Best Practices (Server)

- Preview function to confirm the stop resource Oracle 12c new feature crsctl (Database)

- CentOS 6.6 install rsync server (Server)

- Build RubyMine + Ruby On Rails + MySQL development environment under Windows (Server)

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

- MySQL log from the library than the main library (Database)

 
         
  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 / CentOS 7.0 installation and configuration under Tomcat 8.0 (Server)
- Easy to install Ubuntu 15.04 and Ubuntu 15.04 GNOME on Wayland trial (Linux)
- impdp error ORA-31631, ORA-39122 (Database)
- Spring Data JPA call a stored procedure examples (Programming)
- Linux / UNIX: Use the dd command to create a 1GB size binary (Linux)
- Win8 mount disk partitions under Ubuntu (Linux)
- To deploy MySQL database with separate read and write OneProxy (Database)
- Install Java, Maven, Tomcat under Linux (Linux)
- CentOS 5.8 (64) Python 2.7.5 installation error resolved (Linux)
- Oracle table space create large files (Database)
- KVM virtualization nested configuration (Server)
- Source compiler install Nginx (Server)
- Ubuntu 14.04 Boot Repair (Linux)
- Polymorphism of the C ++ compiler and run-time polymorphism (Programming)
- Bash command substitution (Programming)
- Use ARChon runtime environment to run Android apps on Ubuntu (Linux)
- JavaScript file loader LABjs API Explanation (Programming)
- Linux maximum number of threads and limit the number of queries the current thread (Linux)
- Crawl use Wireshark packet on remote Linux (Linux)
- Testing Oracle 11g RMAN replicate database (Database)
     
           
     
  CopyRight 2002-2020 newfreesoft.com, All Rights Reserved.