lnmp+xdebug配置简单过程
lnmp+xdebug配置简单过程
lilclimate 发表于5年前
lnmp+xdebug配置简单过程
  • 发表于 5年前
  • 阅读 1053
  • 收藏 2
  • 点赞 0
  • 评论 1

ubuntu 12.04LTS环境:

 nginx 配置安装

安装依赖: 

libssl-dev libpcre3-dev

编译配置:

wget http://nginx.org/download/nginx-1.5.4.tar.gz
sudo ./configure --prefix=/usr/local/nginx --with-http_ssl_module --with-debug
sudo make 
sudo make install



mysql 安装 179M(不需要configure)

安装依赖: 

libaio-dev
sudo useradd --no-create-home --no-log-init --shell=/bin/false mysql 
cd xxx/mysql/script 
sudo ./mysql_install_db --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --user=mysql 
sudo ln -s /usr/local/mysql/bin/mysql /usr/bin/mysql 作链接


若启动mysqld_safe守护进程时错误done掉,查看Log时显示 /usr/local/mysql/bin/mysqld: Can't create/write to file '/var/run/mysqld/mysqld.pid' (Errcode: 2). 比较快的解决办法,查看/var/run下有无mysqld文件. 若不存在则新建并赋777权限.


php安装

安装依赖:

libfreetype6-dev libltdl-dev libxml2-dev libpng12-dev libjpeg-dev libmcrypt-dev libcurl4-openssl-dev

 配置安装:

sudo ./configure --prefix=/usr/local/php --enable-fpm --enable-mbstring --enable-debug --enable-gd-jis-conv --enable-gd-native-ttf --with-jpeg-dir --with-mcrypt --with-mysqli=/usr/local/mysql/bin/mysql_config --with-mysql=/usr/local/mysql --with-gd --with-png-dir --with-curl --with-freetype-dir --with-iconv-dir --with-openssl --with-pdo-mysql=/usr/local/mysql/bin/mysql_config --with-zlib 
sudo make 
sudo make install 
sudo cp php.ini-development /usr/local/php/etc/php.ini 
sudo useradd --no-create-home --shell=/sbin/nologin www 
cd /usr/local/php/etc 
sudo cp php-fpm.conf.default php-fpm.conf 
sudo vim php-fpm.conf (修改user=www group=www)



备用php的configure:

sudo ./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --with-config-file-scan-dir=/usr/local/php/lib/php --with-curl --with-gd --with-iconv-dir --with-jpeg-dir --with-mcrypt --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-openssl --with-pcre-dir --with-png-dir  --with-zlib --with-xmlrpc --enable-ftp --enable-gd-jis-conv --enable-gd-native-ttf --enable-soap --enable-mbstring --enable-mod-charset --enable-mysqlnd --enable-shmop --enable-sockets --enable-zip --enable-static --with-pdo-mysql=/usr/local/mysql/bin/mysql_config --enable-debug --enable-exif --enable-bcmath --with-freetype-dir --enable-fpm


xdebug:

根据phpinfo()信息获取安装对伊你个安装方法:http://xdebug.org/wizard.php

centOS 6.4

nginx配置安装

安装依赖: 

pcre-devel.i686 openssl-devel.i686

编译配置:与上面的ubuntu一样.

php安装

安装依赖:

libjpeg-devel curl-devel libxml2-devel libpng-devel freetype-devel

libmcrypt-devel(源中默认没有此包,需要  rpm -ivh "http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm")

编译配置与上面的一样.

标签: lnmp nginx mysql php xdebug
共有 人打赏支持
粉丝 0
博文 5
码字总数 1141
评论 (1)
陈颜胤
顶!!! 8585 强烈支持
×
lilclimate
如果觉得我的文章对您有用,请随意打赏。您的支持将鼓励我继续创作!
* 金额(元)
¥1 ¥5 ¥10 ¥20 其他金额
打赏人
留言
* 支付类型
微信扫码支付
打赏金额:
已支付成功
打赏金额: