Quickly build Magento & amp; Makingware Nginx host environment in centos

Source: Internet
Author: User
Tags apc nginx host openldap


Quickly build Magento & Makingware Nginx host environment in centos this article mainly uses yum to install LNMP host environment suitable for magento running. * Applicable to pure Centos. If there are httpd and other processes, stop httpd first. After installing nginx/1.2.2 Mysql5.5 PHP5.3.14 APC 3.1.9, select the corresponding centos version to import the external software library, don't get it wrong Oh not sure version and 32 or 64 you can use the command to check more/etc/redhat-release (view centos version) uname-r (view kernel bits) centos-5 32 bit: 1 rpm-Uvh 1082rpm-Uvh http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/i386/ius-release-1.0-10.ius.el5.noarch.rpm3 www.2cto.com rpm-Uvh http://nginx.org/ Packages/centos/5/noarch/RPMS/nginx-release-centos-5-0.el5.ngx.noarch.rpm centos-5 64-bit: 1 rpm-Uvh limit 2rpm-Uvh limit 3rpm-Uvh http://nginx.org/packages/centos/5/noarch/RPMS/nginx-release-centos-5-0.el5.ngx.noarch.rpm www.2cto.com Centos 6 in the following find the corresponding package using rpm-Uvh xxx prompt conflict can use rpm-e corresponding conflict package software library: http://dl.iuscommunity.org/pub/ius/stable/Redhat/Nginx: http://nginx.org/packages/centos/ vi/etc/yum. repos. d/ius. repo, the following line comment: 1 rows list = http://dmirr.iuscommunity.org/mirrorlist? Repo = ius-el5 & arch = $ basearch the following lines delete comments: 1 # baseurl = upgrade update yum1yum-y update use yum to install the required Program/library 1yum-y install gcc-c ++ autoconf libjpeg-devel libpng-devel freetype -devel libxml2 libxml2-devel zlib-devel glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses-devel curl-devel e2fsprogs e2fsprogs-devel kr B5 krb5-devel libidn-devel openssl-devel openldap-devel nss_ldap openldap-clients openldap-servers www.2cto.com install php related plug-in 1yum install php53u-gd php53u-xml php53u-mysql php53u-mcrypt php53u-mbstring pcre-devel php53u-pear pecl Mode install apc1pecl install apc to add apc extension to php vim/etc/php. d/apc. ini the following code is for reference only. Modify 01 extension = apc according to the specific configuration. so02 [apc] 03apc. enabled = APC. shm_size = 2 56M05apc. ttl = 720006 www.2cto.com apc. user_ttl = 720007apc. num_files_hint = 1024008apc. max_file_size = 128M09apc. stat = 010apc. include_once_override = 1 configure nginxvi/etc/nginx/conf. d/default. conf can also be found in/etc/nginx/conf. d/new under the directory. conf file reference (suitable for magento configuration files) Other systems can refer to :) 01 server {02 listen 80; 03 server_name demo.makingware.com; # Your domain name 04 www.2cto.com 05 root/var/www/demo.makingware.com; # Your directory 06 index. php I Ndex.html index.htm; 07 location/{08 if (-f $ request_filename) {09 expires 30d; 10 break; 11} 12 if (! -E $ request_filename) {13 rewrite ^ (. +) $/index. php last; 14} 15} 16 location ~ \. Php ${17 18 include fastcgi_params; 19 fastcgi_pass 127.0.0.1: 9000; 20 fastcgi_index index. php; 21 fastcgi_param SCRIPT_NAME $ fastcgi_script_name; 22 fastcgi_param SCRIPT_FILENAME $ document_root $ fastcgi_script_name; 23 www.2cto.com} 24 location/app/etc {25 deny all; 26} 27} start lnmpchkconfig php-fpm onchkconfig nginx onchkconfig mysqld onservice php-fpm startservice nginx startservice mysqld start to enter the website directory and modify user permission 1 chown-R apache: apache * php-fpm Default User Name and user group is apache modify Default User Group vi/etc/php-fpm.d/www. conf www.2cto.com modify the mysql root password mysqladmin-u root-p password your password uses ssh to connect to Mysql. If a password error occurs, use the following method to solve vim/etc/my. cnf comment # skip-name-resolveservice mysqld restart * modify the php configuration in nginx and then use service php-fpm restart to update and modify the author's brother

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.