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-debugsudo 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()信息获取安装对伊你个安装方法:
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")
编译配置与上面的一样.