PHP installation and lnmp complete setup-wordpress

Source: Internet
Author: User
Tags mcrypt
This article describes how to install PHP and how to build lnmp-wordpress. it has some reference value. Next, let's take a look at it. PHP installation and lnmp complete setup-wordpress

Install the required lib Library [root @ lnmp01 tools] # rpm-qa zlib-devel libxml2-devel libjpeg-devel libjpeg-turbo-devel libiconv-develzlib-devel-1.2.3-29.el6.x86_64 [root @ lnmp01 tools] # rpm-qa freetype- devel libpng-devel gd-devel libcurl-devel libxslt-devel [root @ lnmp01 tools] # yum install zlib-devel libxml2-devel libjpeg-devel libjpeg-turbo-devel libiconv-devel-y [root @ lnmp01 tools] # yum install freetype-devel libpng-dev El gd-devel libcurl-devel libxslt-devel-y install libiconv (cannot be installed) [root @ lnmp01 tools] # rzrz waiting to receive .??? A? Zmodem ′??? Escape ° 'Ctrl + C ??? Why ?? ′?? Libiconv-1.14.tar.gz .. 100% 4867 KB 4867 KB/s 00:00:01 0 ′?? [Root @ lnmp01 tools] # tar zxf libiconv-1.14.tar.gz [root @ lnmp01 tools] # cd libiconv-1.14 [root @ lnmp01 libiconv-1.14] #. /configure -- prefix =/usr/local/libiconv [root @ lnmp01 libiconv-1.14] # make [root @ lnmp01 libiconv-1.14] # make install [root @ lnmp01 libiconv-1.14] # cd .. /install the third-party yum source library [root @ lnmp01 tools] # wget-O/etc/yum. repos. d/epel. repo http://mirrors.aliyun.com/repo/epel-6.repo [Root @ lnmp01 tools] # yum-y install libmcrypt-devel [root @ lnmp01 tools] # yum-y install mahash [root @ lnmp01 tools] # yum-y install mcrypt install php compile php [root @ lnmp01 tools] # cd/home/lufeng/tools [root @ lnmp01 tools] # rz-y [root @ lnmp01 tools] # tar zxf ..... ....... [root @ lnmp01 tools] # cd php-5.3.27 [root @ lnmp01 tools] #. /configure \ -- prefix =/application/php5.3.27 \ -- with-mysql = mysqlnd \ -- with-iconv-dir =/usr/l Ocal/libiconv \ -- with-freetype-dir \ -- with-jpeg-dir \ -- with-png-dir \ -- with-zlib \ -- with-libxml-dir =/usr \ -- enable-xml \ -- disable-rpath \ -- enable-safe-mode \ -- enable-bcmath \ -- enable-shmop \ -- enable-sysvsem \ -- enable-inline-optimization \-- with-curl \ -- with-curlwrappers \ -- enable-mbregex \ -- enable-fpm \ -- enable-mbstring \ -- with-mcrypt \ -- with-gd \ -- enable-gd-native -ttf \ -- with-openssl \ -- with-mhas H \ -- enable-pcntl \ -- enable-sockets \ -- with-xmlrpc \ -- enable-zip \ -- enable-soap \ -- enable-short-tags \ -- enable-zend-multibyte \ -- enable-static \ -- with-xsl \ -- with-fpm-user = nginx \ -- with-fpm-group = nginx \ -- enable-ftp + License + | License: | This software is subject to the PHP License, available in this | distribution in the file LICENSE. B Y continuing this installation | process, you are bound by the terms of this license agreement. | If you do not agree with the terms of this license, you must abort | the installation process at this point. | + -------------------------------------------------------------------- + Thank you for using PHP. [root @ lnmp01 php-5.3.27] # touch ext/phar. phar [root @ lnmp01 php-5.3.27] # makeBuild complet E. don't forget to run 'Make test '. [root @ lnmp01 php-5.3.27] # make install/home/lufeng/tools/php-5.3.27/build/shtool install-c ext/phar. phar/application/php5.3.27/binln-s-f/application/php5.3.27/bin/phar. phar/application/php5.3.27/bin/pharInstalling PDO headers: /application/php5.3.27/include/php/ext/pdo/configure php and start [root @ lnmp01 php-5.3.27] # ln-s/application/php5.3.27/application/php [ro Ot @ lnmp01 php-5.3.27] # ls-l/application/php [root @ lnmp01 php-5.3.27] # ls php. ini * php. ini-development php. ini-production [root @ lnmp01 php-5.3.27] # cp php. ini-production/application/php/lib/php. ini [root @ lnmp01 php-5.3.27] # cd/application/php/etc/[root @ lnmp01 etc] # cp php-fpm.conf.default php-fpm.conf [root @ lnmp01 etc] #/application/php/sbin/ php-fpm [root @ lnmp01 etc] # ps-ef | grep php-fpmroot 7337 1 0 :03? 00:00:00 php-fpm: master process (/application/php5.3.27/etc/php-fpm.conf) nginx 7338 7337 0? 00:00:00 php-fpm: pool www nginx 7339 7337 0? 00:00:00 php-fpm: pool www root 7341 6079 0 00:00:00 pts/0 grep php-fpm configuration nginx supports PHP requests to access [root @ lnmp01 blog] # cd/application/nginx/conf/extra/[root @ lnmp01 extra] # cat blog. conf server {listen 80; server_name blog.lufeng.com; location/{root html/blog; index index.html;} location ~. * \. (Php | php5 )? $ {Root html/blog; fastcgi_pass 127.0.0.1: 9000; fastcgi_index index. php; include fastcgi. conf ;}} [root @ lnmp01 conf] #... /sbin/nginx-t nginx: the configuration file/application/nginx-1.6.3/conf/nginx. conf syntax is oknginx: configuration file/application/nginx-1.6.3/conf/nginx. conf test is successful [root @ lnmp01 conf] # .. /sbin/nginx-s reload [root @ lnmp01 conf] # cd .. /html/blog/[root @ lnmp01 blog] # echo"
 "> Test_info.php [root @ lnmp01 blog] # cat test_info.php
 Deploy the blog program-mysql [root @ Mysql-server ~] # Mysql-uroot-pEnter password: mysql> create database wordpress; mysql> show databases like 'wordpress'; mysql> grant all on wordpress. * to wordpress @ '2017. 1.1.% 'identified by '20170101'; mysql> show grants for wordpress @ '2017. 1.1.% '; mysql> select user, host from mysql. user; mysql> quit nginx and PHP environment configuration preparation [root @ lnmp01 extra] # cd .. /.. /html/blog/[root @ lnmp01 blog] # rz [root @ lnmp01 blog] # tar xf wordpress-4.7.2-zh_CN.tar.gz [root @ lnmp01 blog] # lstest_info.php wordpress wordpress-4.7.2-zh_CN.tar.gz [root @ lnmp01 blog] # rm test_info.php [root @ lnmp01 blog] # mv wordpress /*. [root @ lnmp01 blog] #/bin/mv wordpress-4.7.2-zh_CN.tar.gz/home/lufeng/tools/[root @ lnmp01 blog] # chown-R nginx. nginx .. /blog/[root @ lnmp01 blog] # ls-l

The above is a detailed description of the PHP installation and lnmp complete setup-wordpress details, please pay attention to other related articles in the first PHP community!

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.