- 本人才疏学浅,对问题认知难免有偏差,本着学习与共享的精神和大家一起探讨,若有不对之处,望大家多多批评指正.
- 1、编译安装PHP 5.2.14所需的支持库:
-
- tar zxvf libiconv-1.13.1.tar.gz
- cd libiconv-1.13.1/
- ./configure --prefix=/usr/local
- make
- make install
- cd ../
-
- tar zxvf libmcrypt-2.5.8.tar.gz
- cd libmcrypt-2.5.8/
- ./configure
- make
- make install
- /sbin/ldconfig
- cd libltdl/
- ./configure --enable-ltdl-install
- make
- make install
- cd ../../
-
- tar zxvf mhash-0.9.9.9.tar.gz
- cd mhash-0.9.9.9/
- ./configure
- make
- make install
- cd ../
-
- ln -s /usr/local/lib/libmcrypt.la /usr/lib/libmcrypt.la
拥有帝国一切,皆有可能。欢迎访问phome.net
- ln -s /usr/local/lib/libmcrypt.so /usr/lib/libmcrypt.so
- ln -s /usr/local/lib/libmcrypt.so.4 /usr/lib/libmcrypt.so.4
- ln -s /usr/local/lib/libmcrypt.so.4.4.8 /usr/lib/libmcrypt.so.4.4.8
- ln -s /usr/local/lib/libmhash.a /usr/lib/libmhash.a
- ln -s /usr/local/lib/libmhash.la /usr/lib/libmhash.la
- ln -s /usr/local/lib/libmhash.so /usr/lib/libmhash.so
- ln -s /usr/local/lib/libmhash.so.2 /usr/lib/libmhash.so.2
- ln -s /usr/local/lib/libmhash.so.2.0.1 /usr/lib/libmhash.so.2.0.1
- ln -s /usr/local/bin/libmcrypt-config /usr/bin/libmcrypt-config
-
- tar zxvf mcrypt-2.6.8.tar.gz
- cd mcrypt-2.6.8/
- /sbin/ldconfig
- ./configure
- make
- make install
- cd ../
-
-
-
- 关于/etc/ld.so.conf:
- 这个文件记录了编译时使用的动态链接库的路径.
- 默认情况下,编译器只会使用/lib和/usr/lib这两个目录下的库文件
- 将自己可能存放库文件的路径都加入到/etc/ld.so.conf中是明智的选择
- 添加方法也极其简单,将库文件的绝对路径直接写进去就OK了,一行一个.例如:
- /usr/X11R6/lib
- /usr/local/lib
- /opt/lib
-
- ldconfig是什么?
- 它是一个程序,通常它位于/sbin下,供root用户使用.它的作用就是将/etc/ld.so.conf列出的路径下的库文件 缓存到/etc/ld.so.cache 以供使用,因此当安装完一些库文件,或者修改ld.so.conf增加新的库路径后,需要运行一下/sbin/ldconfig,使所有的库文件都被缓存到ld.so.cache中,如果没做,即使库文件明明就在/usr/lib下的,也是不会被使用的,结果编译过程中报错,缺少xxx库. 切记改动库文件后一定要运行一下ldconfig,在任何目录下运行都可以.
拥有帝国一切,皆有可能。欢迎访问phome.net
-
- 2、编译安装MySQL 5.5.3-m3
-
- /usr/sbin/groupadd mysql
-
- /usr/sbin/useradd -g mysql mysql
- tar zxvf mysql-5.5.3-m3.tar.gz
- cd mysql-5.5.3-m3/
- ./configure --prefix=/home/pubsrv/mysql/ --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client --with-big-tables --with-readline --with-ssl --with-embedded-server --enable-local-infile --with-plugins=partition,innobase,myisammrg
- make && make install
- chmod w /home/pubsrv/mysql
- chown -R mysql:mysql /home/pubsrv/mysql/
- cd ../
- ①、创建MySQL数据库存放目录
-
- mkdir -p /home/pubsrv/mysql/data/
- mkdir -p /home/pubsrv/mysql/logs/binlog/
- mkdir -p /home/pubsrv/mysql/logs/relaylog/
- chown -R mysql:mysql /home/pubsrv/mysql/
-
- ②、以mysql用户帐号的身份建立数据表:
-
- /home/pubsrv/mysql/bin/mysql_install_db --basedir=/home/pubsrv/mysql --datadir=/home/pubsrv/mysql/data --user=mysql
拥有帝国一切,皆有可能。欢迎访问phome.net
-
- ③、创建my.cnf配置文件:
-
- vi /home/pubsrv/mysql/my.cnf
-
- 输入以下内容:
-
- [client]
-
- #character-set-server = utf8
-
- port = 3306
-
- socket = /tmp/mysql.sock
-
-
-
- [mysqld]
-
- #character-set-server = utf8
-
- replicate-ignore-db = mysql
-
- replicate-ignore-db = test
-
- replicate-ignore-db = information_schema
-
- user = mysql
-
- port = 3306
拥有帝国一切,皆有可能。欢迎访问phome.net
-
- socket = /tmp/mysql.sock
-
- basedir = /home/pubsrv/mysql
-
- datadir = /home/pubsrv/mysql/data
-
- log-error = /home/pubsrv/mysql/logs/mysql_error.log
-
- pid-file = /home/pubsrv/mysql/mysql.pid
-
- open_files_limit = 10240
-
- back_log = 600
-
- max_connections = 5000
-
- max_connect_errors = 6000
-
- table_cache = 614
-
- external-locking = FALSE
-
- max_allowed_packet = 32M
-
|