php5.5 installation and Phpmyadmin&nginx configuration PHP module

Source: Internet
Author: User
Tags configuration php php mysql php mysql extension phpmyadmin

Install php5.5;

Download Source Address: RPM-UVH

RPM Package Installation: Yum install php55w.x86_64 php55w-cli.x86_64 php55w-common.x86_64 php55w-gd.x86_64 php55w-ldap.x86_64 php55w-mbstring.x86_64 php55w-mcrypt.x86_64 php55w-mysql.x86_64 php55w-pdo.x86_64

After installation, you need to install MySQL dependencies if you need to call the MySQL module:

Yum Install Php55w-mysql

At this point, PHP installation is complete;

phpMyAdmin can also be installed with Yum:

Yum Install phpMyAdmin

After the installation is complete, you need to modify the configuration file information, such as MySQL information, for the correct information:

Under the PhpMyAdmin installation directory,/etc/phpmyadmin/

Edit Profile: config.inc.php

To modify the corresponding MySQL configuration:

$cfg [' Servers '] [$i] [' host '] = ' www1.qixoo.com '; MySQL hostname or IP address

$cfg [' Servers '] [$i] [' port '] = ' 60090 '; MySQL Port

$cfg [' Servers '] [$i] [' extension '] = ' mysqli '; The PHP MySQL extension to use (' MySQL ' or ' mysqli ')

$cfg [' Servers '] [$i] [' auth_type '] = ' cookie '; authentication method (config, HTTP or cookie based)

$cfg [' Servers '] [$i] [' allowroot '] = TRUE; Whether to allow root login

The point is to modify the MySQL port for the corresponding MySQL port, if connected to a remote MySQL server, you need to change localhost to the IP address of the remote server;

Provide phpMyAdmin service:

The/usr/share/phpmyadmin is established with a soft connection to the/usr/share/nginx/html/below, providing access via Nginx phpMyAdmin;

Configure Nginx Add PHP module:

To the Nginx configuration file, such as/etc/nginx/conf.d/default.conf, add the following configuration:

Location ~ \.php$ {

root HTML;

Fastcgi_pass 127.0.0.1:9000;

Fastcgi_index index.php;

Fastcgi_param Script_filename/scripts$fastcgi_script_name;

Include Fastcgi_params;

}

After completion, restart Nginx;

Start Php,service php-fpm Start

If the page prompts the error message, there may be a problem with the PHP module call, you need to modify the Nginx Fastcgi_params, replaced by the following:

Fastcgi_param Gateway_interface cgi/1.1;

Fastcgi_param Server_software Nginx;

Fastcgi_param query_string $query _string;

Fastcgi_param Request_method $request _method;

Fastcgi_param Content_Type $content _type;

Fastcgi_param content_length $content _length;

Fastcgi_param script_filename $document _root$fastcgi_script_name;

Fastcgi_param script_name $fastcgi _script_name;

Fastcgi_param Request_uri $request _uri;

Fastcgi_param Document_uri $document _uri;

Fastcgi_param document_root $document _root;

Fastcgi_param server_protocol $server _protocol;

Fastcgi_param remote_addr $remote _addr;

Fastcgi_param Remote_port $remote _port;

Fastcgi_param server_addr $server _addr;

Fastcgi_param server_port $server _port;

Fastcgi_param server_name $server _name;

Restart Nginx or service Nginx reload;

Visit phpMyAdmin:

The interface requires MySQL account and password, the configuration is correct to log in;

PHP Call Database:

Need to modify the/etc/php.ini file, modify the parameters of MySQL for the correct parameters, such as port,socket, etc.;

php5.5 installation and Phpmyadmin&nginx configuration PHP module

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.