PHP安裝及lnmp完整搭建-wordpress

來源:互聯網
上載者:User

標籤:wordpress   php   mysql   nginx   lnmp   

安裝所需的lib庫[[email protected] tools]# rpm -qa zlib-devel libxml2-devel libjpeg-devel libjpeg-turbo-devel libiconv-develzlib-devel-1.2.3-29.el6.x86_64[[email protected] tools]# rpm -qa freetype-devel libpng-devel gd-devel libcurl-devel libxslt-devel[[email protected] tools]# yum install zlib-devel libxml2-devel libjpeg-devel libjpeg-turbo-devel libiconv-devel -y[[email protected] tools]# yum install freetype-devel libpng-devel gd-devel libcurl-devel libxslt-devel -y安裝libiconv(無法安裝)[[email protected] tools]# rzrz waiting to receive.???a? zmodem ′???£ °′ Ctrl+C ???£??′?? libiconv-1.14.tar.gz...  100%    4867 KB 4867 KB/s 00:00:01       0 ′??[[email protected] tools]# tar zxf libiconv-1.14.tar.gz[[email protected] tools]# cd libiconv-1.14[[email protected] libiconv-1.14]# ./configure --prefix=/usr/local/libiconv[[email protected] libiconv-1.14]# make[[email protected] libiconv-1.14]# make install[[email protected] libiconv-1.14]# cd ../安裝三方yum源相關庫[[email protected] tools]# wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6.repo[[email protected] tools]# yum -y install libmcrypt-devel[[email protected] tools]# yum -y install mahash[[email protected] tools]# yum -y install mcrypt安裝php編譯php[[email protected] tools]# cd /home/lufeng/tools[[email protected] tools]# rz -y[[email protected] tools]# tar zxf ............[[email protected] tools]# cd php-5.3.27[[email protected] tools]# ./configure --prefix=/application/php5.3.27 --with-mysql=mysqlnd --with-iconv-dir=/usr/local/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-mhash --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:                                                           || This software is subject to the PHP License, available in this     || distribution in the file LICENSE.  By 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.[[email protected] php-5.3.27]# touch ext/phar/phar.phar[[email protected] php-5.3.27]# makeBuild complete.Don‘t forget to run ‘make test‘.[[email protected] php-5.3.27]# make install/home/lufeng/tools/php-5.3.27/build/shtool install -c ext/phar/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/配置php及啟動[[email protected] php-5.3.27]# ln -s /application/php5.3.27 /application/php [[email protected] php-5.3.27]# ls -l /application/php [[email protected] php-5.3.27]# ls php.ini*php.ini-development  php.ini-production[[email protected] php-5.3.27]# cp php.ini-production /application/php/lib/php.ini[[email protected] php-5.3.27]# cd /application/php/etc/[[email protected] etc]# cp php-fpm.conf.default php-fpm.conf[[email protected] etc]# /application/php/sbin/php-fpm[[email protected] etc]# ps -ef|grep php-fpmroot       7337      1  0 15:03 ?        00:00:00 php-fpm: master process (/application/php5.3.27/etc/php-fpm.conf)nginx      7338   7337  0 15:03 ?        00:00:00 php-fpm: pool www            nginx      7339   7337  0 15:03 ?        00:00:00 php-fpm: pool www            root       7341   6079  0 15:03 pts/0    00:00:00 grep php-fpm配置nginx支援PHP請求訪問[[email protected] blog]# cd /application/nginx/conf/extra/[[email protected] extra]# cat blog.conf     server {       listen         80;       server_name    blog.lufeng.com;       location / {            root      html/blog;            index     index.html index.html;        }        location ~ .*\.(php|php5)?$ {                root    html/blog;                fastcgi_pass    127.0.0.1:9000;                fastcgi_index   index.php;                include         fastcgi.conf;        }}[[email protected] 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[[email protected] conf]# ../sbin/nginx -s reload[[email protected] conf]# cd ../html/blog/[[email protected] blog]# echo "<?php phpinfo(); ?>" >test_info.php[[email protected] blog]# cat test_info.php <?php phpinfo(); ?>部署blog程式-mysql[[email protected] ~]# mysql -uroot -pEnter password: mysql> create database wordpress;mysql> show databases like ‘wordpress‘;mysql> grant all on wordpress.* to [email protected]‘192.1.1.%‘ identified by ‘199429‘;mysql> show grants for [email protected]‘192.1.1.%‘;mysql> select user,host from mysql.user;mysql> quitnginx與PHP環境配置準備[[email protected] extra]# cd ../../html/blog/[[email protected] blog]# rz[[email protected] blog]# tar xf wordpress-4.7.2-zh_CN.tar.gz [[email protected] blog]# lstest_info.php  wordpress  wordpress-4.7.2-zh_CN.tar.gz[[email protected] blog]# rm test_info.php[[email protected] blog]# mv wordpress/* .[[email protected] blog]# /bin/mv wordpress-4.7.2-zh_CN.tar.gz /home/lufeng/tools/[[email protected] blog]# chown -R nginx.nginx ../blog/[[email protected] blog]# ls -l


本文出自 “大夢初醒” 部落格,請務必保留此出處http://bestlufeng.blog.51cto.com/11790256/1910953

PHP安裝及lnmp完整搭建-wordpress

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.