Linux--yum Installing nginx PHP mysql

Source: Internet
Author: User
Tags apc fpm gpg install php pear php mysql tidy epel repo

Linux--yum Installing nginx PHP mysql(2011-11-13 11:27:14) reproduced
Tags: gossip Category: Linux
1. Start a new repo# Vi/etc/yum.repos.d/centos.21andy.com.repo Add the following [21andy.com]name=21andy.com Packages for Enterprise Linux 5-$ basearchbaseurl=http://www.21andy.com/centos/5/$basearch/enabled=1gpgcheck=0protect=12. Enable EPEL repo32-bit machine enabled:RPM-IHV http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm64-bit machine enabled:RPM-IHV http://download.fedora.redhat.com/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm attached:To view the Linux version and the number of CPU bits:To view the system version: Lsb_release-a View the number of CPU bits: getconf long_bit3. Import KeyRPM--import/etc/pki/rpm-gpg/rpm-gpg-key-epel4. One-click InstallationYum Install Nginx php-fpm mysql-server if nginx you want to use 0.7.65 the latest stable version, the yum-y install Nginx replaced yum-y install nginx-stable can beattached: Complete installationYum-y updateyum-y mysql-serverservice mysqld startmysqladmin-u root password rootservice mysqld stopyum-y install Ngin X php-fpm php-cli php-pdo php-mysql php-mcrypt php-mbstring php-gd php-tidy php-xml php-xmlrpc php-pear Php-pecl-memcache php-eaccelerator# APC and Eaccelerator conflict, 2 selected 1yum-y install PHP-PECL-APCor just one sentenceYum-y install Nginx mysql-server php-fpm php-cli php-pdo php-mysql php-mcrypt php-mbstring php-gd php-tidy php-xml PHP-XM LRPC php-pear Php-pecl-memcache Php-eaccelerator last as long as the yum-y update, all is the latest5. Boot upChkconfig--level 345 mysqld onchkconfig--level 345 php-fpm onchkconfig--level 345 nginx onAdd:All the configuration files are in/etc directory, including Nginx, PHP-FPM, mysql configuration file, please find your own settings.6. ConfigurationNote: Fastcgi_params to join this line # vim/etc/nginx/Fastcgi_paramsFastcgi_param script_filename $document _root$fastcgi_script_name;nginx Configuration:Under/etc/nginx/nginx.conf's HTTP node under server (all servers to support PHP) add: Location ~. *\. (PHP|PHP5)? $ {Fastcgi_pass Unix:/tmp/php-cgi.sock;   Fastcgi_index index.php; Include Fastcgi_params;            root/home/wwwroot/;        Index index.html index.htm index.php; }PHP ConfigurationThen, change the/etc/php-fpm.conf file and set the value of Listen_address to the following (as in the Nginx configuration above): <value name= "Listen_address" > /tmp/php-cgi.sock</value>7. Restart Nginx, php-fpmService Nginx Restartservice php-fpm restart

Linux--yum Installing nginx PHP mysql

Related Article

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.