安装所需开发
这里我们主要介绍CentOS编译安装相关系统,包括介绍CentOS开发包等方面。CentOS编译安装mysql, apache, php, Zend Optimizer等基本环境。
yum install -y gcc gcc-c++ gcc-g77 flex bison autoconf automake bzip2-devel zlib-devel ncurses-devel libjpeg-devel libpng-devel libtiff-devel freetype-devel pam-devel openssl-devel libxml2-devel gettext-devel pcre-devel
CentOS源码安装MySQL
1. 使用 yum 程序安装所需开发包(以下为标准的rpm包名称)
./configure –prefix=/usr/local/mysql
–without-debug
–enable-thread-safe-client
–enable-assembler
–enable-profiling
–with-mysqld-ldflags=-all-static
–with-client-ldflags=-all-static
–with-charset=utf8
–with-extra-charsets=all
–with-plugins=max
–with-mysqld-user=mysql
或者
./configure –prefix=/usr/local/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=innobase –with-mysqld-user=mysql –without-ndb-debug –without-debug –with-charset=utf8 –localstatedir=/data/mysql/data –with-collation=utf8_general_ci
安装php
./configure
–prefix=/usr/local/php
–with-config-file-path=/usr/local/php/etc
–with-curl
–with-pear
–with-gd
–with-jpeg-dir
–with-png-dir
–with-zlib
–with-xpm-dir
–with-freetype-dir
–with-mcrypt
–with-mhash
–with-mysql
–with-mysqli
–with-pdo-mysql
–with-mysql=/usr/local
–with-openssl
–with-xmlrpc
–with-xsl
–with-bz2
–with-gettext
–with-fpm-user=www
–with-fpm-group=www
–enable-fpm
–enable-exif
–enable-wddx
–enable-zip
–enable-bcmath
–enable-calendar
–enable-ftp
–enable-mbstring
–enable-soap
–enable-sockets
–enable-sqlite-utf8
–enable-shmop
–enable-dba
–enable-sysvmsg
–enable-sysvsem
–enable-sysvshm
make ZEND_EXTRA_LIBS=’-liconv