Home PC Games Linux Windows Database Network Programming Server Mobile  
  Home \ Server \ To install and deploy PHP environment under the CentOS     - Android Studio simple setup (Linux)

- How Glances monitoring system on Ubuntu (Linux)

- Installation and use GAMIT / GLOBK Software (Linux)

- Install Web-based monitoring tool: Linux-Dash (Server)

- CentOS7 install and configure Nagios (Server)

- Debian 8 Jessie install LAMP server tutorial (Server)

- Linux mention the right notes (Linux)

- Java open source monitoring platform Zorka basic use (Linux)

- Install and configure GO 1.2.1 under CentOS 6.5 (Linux)

- JavaScript cross-browser event object library (Programming)

- CentOS 7 - use cgroups limit process resource (Linux)

- Linux C programming and Shell Programming in the development of practical tools similarities summary (Programming)

- Preps - Print within the specified range of IP addresses (Linux)

- C # assembly calls across constants, variables and functions (Programming)

- Linux System Getting Started Tutorial: How do you know Shell which is currently being used (Linux)

- Vmstat command Linux Performance Monitoring (Linux)

- PostgreSQL use pgpool achieve high availability (Database)

- QBit development of micro-services (Server)

- Autojump: an advanced cd command in the Linux file system fast navigation (Linux)

- Dynamic programming Android (Programming)

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

VM: VMWare10.0.1 build-1379776

Operating System: CentOS7 64 Wei

HTTP Server: Apache (httpd)


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
- Install Open vSwitch under CentOS 6.5 (Linux)
- How to extend / remove swap partitions (Linux)
- MySQL display operation control tips (Database)
- MySQL IO SSD attempt at optimization (Database)
- Android and OpenCV2.4.4 build an image processing framework (2013 edition) (Linux)
- Configuring Proxy on a Unix terminal, accelerate Android Studio Construction (Linux)
- Analysis examples: Intrusion Response Linux platform Case (Linux)
- Executable file format Explanation under Linux (Linux)
- Oracle Client Easy Connection error ORA-12154, TNS-03505 (Database)
- Puppet subcommands Introduction (Server)
- How to use Linux to download music from Grooveshark (Linux)
- How to Install Foreman under Ubuntu (Server)
- Linux Network Programming - raw socket programming (Programming)
- MySQL & NoSQL - Memcached widget (Database)
- Java synchronization mechanism: synchronized, wait, notify (Programming)
- Dual system Linux (Ubuntu) into the Windows NTFS partition's mount error (Linux)
- Java Network Programming Internet address lookup (Programming)
- Linux Services Comments (Linux)
- MySQL5.6 based GTID master-slave replication (Database)
- CoreOS Linux introduces Kubernetes kubelet (Server)
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.