PHP installation and configuration in Linux redhat6.5

PHP (foreign name: PHP: Hypertext Preprocessor, Chinese name: "Hypertext Preprocessor") is a general open source scripting language. The grammar absorbs the characteristics of C language, Java and Perl, which is conducive to learning and widely used, and is mainly suitable for the field of Web development. PHP's unique syntax is a mix of C, Java, Perl, and PHP's own syntax. It can execute dynamic web pages faster than CGI or Perl. Compared with other programming languages, the dynamic page made by PHP is to embed the program into the HTML (an application under the standard general markup language) document to execute, and the execution efficiency is much higher than that of CGI that completely generates HTML markup; PHP can also execute compiled code, and the compilation can achieve encryption and optimize the code to run, making the code run faster.
The following will be the installation and configuration of PHP
1: Install the function library with yum
PHP installation and configuration in Linux redhat6.5
2: Mount the shared file and get the gd installation package
Unzip the gd compressed package to the /opt directory
PHP installation and configuration in Linux redhat6.5
3: Go to the cd /opt/gd/2.0.35 directory to configure gd
PHP installation and configuration in Linux redhat6.5
4 : Compile && Compile and install
PHP installation and configuration in Linux redhat6.5
5: Unzip the php archive in the shared file /gx to the /opt directory
PHP installation and configuration in Linux redhat6.5
6: Configure php in the /opt/php-5.4.5 directory
PHP installation and configuration in Linux redhat6.5
7: Compile && Compile and install
PHP installation and configuration in Linux redhat6.5
8: Edit httpd with vim. conf (let apache support php)
① LoadModule php5_module modules/libphp5.so Check if this line exists, it means the installation is OK
② Find AddType application/x-gzip .gz .tgz and add the following content
AddType application/x-httpd -php.php
AddType application/x-httpd-php-source
.phps ③DirectoryIndex index.html Find this line and add index.php (adjust the home page file settings)
Save and exit
PHP installation and configuration in Linux redhat6.5
PHP installation and configuration in Linux redhat6.5
PHP installation and configuration in Linux redhat6.5
PHP installation and configuration in Linux redhat6.5
9: Restart httpd installation and configuration is complete
PHP installation and configuration in Linux redhat6.5

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324928883&siteId=291194637