yum install -y gcc gcc-c++ make autoconf libtool-ltdl-devel gd-devel freetype-devel libxml2-devel libjpeg-devel libpng-devel openssl-devel curl-devel patch libmcrypt-devel libmhash-devel ncurses-devel sudo bzip2 openldap openldap-devel

有些包可能装的不全,在某些版本的系统下编译php的时候,可能还需要手工再编译

那些依赖库,比如libmcrypt等

----------------------

vi /etc/profile
ulimit -n 65535

若要 长久 改变这两个参数值,就要修改/ect/security/limits.conf,在文件中加上两行:
* - nofile 65535

* - nproc 65535

-------------------------------

#tar zxvf pcre**.tar.gz

#./configure && make && make install

./configure --prefix=//usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-http_gzip_static_module

------------------------------------------

 

#tar xvf jdk-6u12-linux-i586-rpm.bin.tar

 #chmod +x jdk-6u12-linux-i586-rpm.bin

 #./jdk-6u12-linux-i586-rpm.bin

 

#tar zxvf apache-tomcat-6.0.29.tar.gz

 #mv  apache-tomcat-6.0  /home/101/tomcat6

 

JAVA_OPTS='-Xms1920m -Xmx1920m -Xmn640m -Xss128k -XX:PermSize=128m -XX:MaxPermSize=512m'

-----------------------------------

JAVA_OPTS='-Xms3200m -Xmx3200m -Xmn640m -Xss128k -XX:PermSize=128m -XX:MaxPermSize=512m -XX:-UseGCOverheadLimit'

------------------------------------------------------------------------------------------

#useradd s /sbin/nologin mysql

./configure --prefix=/usr/local/mysql --with-unix-socket-path=/tmp/mysql.sock --localstatedir=/data/database --with-comment=Source --with-server-suffix=enterprise-gpl --with-mysqld-user=mysql --without-debug --with-extra-charsets=all --with-plugins=all --with-pthread --enable-static --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --enable-assembler --enable-thread-safe-client --with-big-tables --with-readline --with-ssl --with-embedded-server --enable-local-infile --with-charset=utf8

#make && make install

-----------------------------------------------------------

#/usr/local/mysql/bin/mysql_install_db user=mysql

#chown R  root.mysql /usr/local/mysql

#chown R root.mysql /data

#chown R mysql /data/database

#echo /usr/local/mysql/lib/mysql>>/etc/ld.so.conf

#ldconfig

#export PATH=$PATH:/usr/local/mysql/bin

#mysqld_safe user=mysql &

#mysqladmin uroot password 123.com

#ps ef | grep mysql

#netstat ntulp | grep mysql

----------------------------------

 

#wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.13.1.tar.gz

#tar -zxvf libiconv-1.13.1.tar.gz

#cd libiconv-1.13.1

#./configure --prefix=/usr/local

#make && make install

-----------------------------------------------------

 #tar zxvf php-5.2.17.tar.gz  (编译前需要很多依赖库要先安装好)

 #gzip -cd php-5.2.17-fpm-0.5.14.diff.gz | patch -d php-5.2.17 -p1

 ./configure --prefix=/home/101/php --with-config-file-path=/home/101/php/etc --with-mysql=/home/101/mysql --with-mysqli=/home/101/mysql/bin/mysql_config --with-iconv-dir=/usr/local --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-discard-path --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --with-curlwrappers --enable-mbregex --enable-fastcgi --enable-fpm --enable-force-cgi-redirect --enable-mbstring --with-mcrypt --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-ldap --with-ldap-sasl --with-xmlrpc --enable-zip --enable-soap --without-pear

#make ZEND_EXTRA_LIBS='-liconv'

#make install

--------------------------------------------------------------

启动时找不到libiconv.so这个库

#echo /etc/local/lib>>/etc/ld.so.conf

#echo /etc/local/lib64>>/etc/ld.so.conf

#ldconfig

#ps ef | grep php

---------------------------------