标签:style blog http io ar color os sp for
因为编译安装libmcrypt一直出错,运行rpm –q libmcrypt 查看安装的rpm包 发现失败
所以参考了另一篇安装lnmp的文章http://54im.com/tag/libmcrypt
845 tar zxvf libmcrypt-2.5.8.tar.gz 846 cd libmcrypt-2.5.8 847 ./configure --prefix=/usr/local/libmcrypt 848 make && make install
836 tar zxvf libiconv-1.14.tar.gz 837 cd libiconv-1.14 838 ./configure --prefix=/usr/local 839 make && make install
850 tar zxvf mhash-0.9.9.9.tar.gz 851 cd mhash-0.9.9.9 854 ./configure --prefix=/usr/mhash 855 make && make install
cd /tmp/
tar zxvf cmake-2.8.3.tar.gz
cd cmake-2.8.3/
./configure --prefix=/usr
gmake
gmake install
groupadd mysql
useradd -g mysql mysql
groupadd www
useradd -g www www
mkdir -p /data/mysql
chown -R mysql:mysql /data/mysql
mkdir -p /data/www
chown -R www:www /data/www
/usr/local/mysql/scripts/mysql_install_db --basedir=/usr/local/mysql --datadir=/data/mysql/ --user=mysql
自启动
cp /opt/mysql/support-files/mysql.server /etc/rc.d/init.d/mysqld
chkconfig --add mysqld
chkconfig mysqld on
/etc/rc.d/init.d/mysqld start
cd /opt/mysql/
bin/mysql_secure_installation #设置mysql账号密码
cd /tmp/
tar zxvf php-5.3.5.tar.gz
cd php-5.3.5
./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --with-mysql=/opt/mysql --with-mysqli=/usr/local/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 --disable-safe-mode --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --with-curlwrappers --enable-mbregex --enable-fpm --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
./configure --prefix=/usr/local/php --enable-fpm --with-iconv=/usr/local/libiconv \--with-mcrypt=/usr/local/libmcrypt \--enable-mbstring --disable-pdo --with-curl --disable-debug --disable-rpath \--enable-inline-optimization --with-bz2 --with-zlib --enable-sockets \--enable-sysvsem --enable-sysvshm --enable-pcntl --enable-mbregex \--with-mhash --enable-zip --with-pcre-regex --with-mysql --with-mysqli \--with-gd --with-jpeg-dir
make && make install
出现undefined reference to `libiconv_open‘错误,需安装libiconv (参考:http://www.weste.net/2013/6-9/92049.html)
wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gz
tar xzf libiconv-1.14.tar.gz
./configure --prefix=/soft/lib/libiconv-1.14
make && make install
标签:style blog http io ar color os sp for
原文地址:http://www.cnblogs.com/jdhu/p/4166190.html