1:安装apache,使用的是httpd-2.4.10,下载了两个文件
httpd-2.4.10-deps.tar.bz2和httpd-2.4.10.tar.bz2 安装就省略了
2:php安装,使用的是php-5.3.28, 因为 vtigerCRM指定需要php5.3的版本,在make的时候遇到一个问题:
摘之互联网:
今天安编绎安装PHP 5.3.28在make时报以下错误:
php-5.3.28/Zend/zend_language_parser.h:317: error: conflicting types for zendparse
php-5.3.28/Zend/zend_globals_macros.h:35: note: previous declaration of zendparse was here
make: *** [ext/standard/basic_functions.lo] Error 1
网友的解决方法是:把zend_language_parser.h文件中317行的内容int zendparse(void *)与zend_globals_macros.h 35行 int zendparse(void *compiler_globals);弄成一致。再进行make可以成功。
##就是将zend_language_parser.h文件中317行的内容int zendparse(void )修改为zend_globals_macros.h 35行的 int zendparse(void *compiler_globals)
3:mysql 安装,使用的版本为mysql-5.6.16,没遇到多大的问题:附上mysql安装脚本:
-
#!bin/sh
-
#shell by ***
-
-
if ! rpm -qa|grep ncurses-devel
-
then
-
yum -y install ncurses-devel
-
fi
-
if ! rpm -qa|grep openssl-devel
-
then
-
yum -y install openssl-devel
-
fi
-
if ! rpm -qa|grep bison-devel
-
then
-
yum -y install bison-devel
-
fi
-
if ! rpm -qa|grep tcp_wrappers-devel
-
then
-
yum -y install tcp_wrappers-devel
-
fi
-
MAKE_RUN=$(($(more /proc/cpuinfo | grep processor | wc -l) + 1))
-
-
useradd -d /data/mysql mysql
-
-
tar zxf mysql-5.6.16.tar.gz
-
cd mysql-5.6.16
-
cmake . \
-
-DCMAKE_INSTALL_PREFIX=/data/mysql/ \
-
-DMYSQL_USER=mysql \
-
-DDEFAULT_CHARSET=utf8 \
-
-DDEFAULT_COLLATION=utf8_general_ci \
-
-DWITH_EXTRA_CHARSETS=all \
-
-DWITH_READLINE=1 \
-
-DWITH_SSL=system \
-
-DWITH_EMBEDDED_SERVER=1 \
-
-DWITH_ZLIB=system \
-
-DWITH_LIBWRAP=1 \
-
-DWITH_INNOBASE_STORAFE_ENGINE=1 \
-
-DWITH_MEMORY_STORAGE_ENGINE=1 \
-
-DWITH_MYISAM_STORAGE_ENGINE=1 \
-
-DENABLE_LOCAL_INFILE=1 \
-
-DMYSQL_UNIX_ADDR=/data/mysql/mysql.sock
-
make -j ${MAKE_RUN}
-
make install
-
-
-
mkdir /data/mysql/var
-
chmod 755 /data/mysql
-
chown -R mysql:mysql /data/mysql
-
/data/mysql/scripts/mysql_install_db --user=mysql --basedir=/data/mysql --datadir=/data/mysql/var/
-
#mv /etc/my.cnf /etc/my.cnf-`date +%F`
-
#rm -f /etc/rc.d/init.d/mysqld
-
-
cp support-files/mysql.server /etc/rc.d/init.d/mysqld
-
chmod 700 /etc/rc.d/init.d/mysqld
-
chkconfig --add mysqld
-
chkconfig --level 345 mysqld on
-
-
echo "PATH=$PATH:/data/mysql/bin" >> /etc/profile
-
echo "export PATH" >> /etc/profile
-
-
echo "/data/mysql/lib" >> /etc/ld.so.conf
-
ldconfig
-
-
source /etc/profile
-
-
mkdir /data/mysqllog
-
mkdir /data/mysqllog/binlog
-
chown -R mysql:mysql /data/mysqllog
-
-
cd ..
-
cp ./my.cnf /etc/my.cnf
由于mysql5.5和mysql5.6 下有些参数不同,启动的时候有报错,根据报错修改相应的配置即可,在使用mysql5.6.16下遇到一个问题:mysql的服务突然死掉了,查询日志发现了,
Jul 24 07:01:09 vultr kernel: Out of memory: Kill process 30977 (mysqld) score 325 or sacrifice child
Jul 24 07:01:09 vultr kernel: Killed process 30977, UID 500, (mysqld) total-vm:2670540kB, anon-rss:623956kB, file-rss:4kB
~
显然内存不够用导致mysqld服务被oom-killer了。mysql所在服务器是一个2G的vps,尽管我已经在my.cnf中缩小了innodb_buffer_pool
,后来缩小的足够小才可以了!
报错的信息如下:
-
2014-07-24 07:08:29 1493 [Note] InnoDB: Initializing buffer pool, size = 512.0M
-
InnoDB: mmap(549453824 bytes) failed; errno 12
-
2014-07-24 07:08:29 1493 [ERROR] InnoDB: Cannot allocate memory for the buffer pool
-
2014-07-24 07:08:29 1493 [ERROR] Plugin 'InnoDB' init function returned error.
-
2014-07-24 07:08:29 1493 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
-
2014-07-24 07:08:29 1493 [ERROR] Unknown/unsupported storage engine: InnoDB
-
2014-07-24 07:08:29 1493 [ERROR] Aborting
-
-
2014-07-24 07:08:29 1493 [Note] Binlog end
4:下载crm,%20CRM%206.0.0/Core%20Product/vtigercrm6.0.0.tar.gz?r=&ts=1406182821&use_mirror=ncu
解压该软件,并安装,在安装时会提示进行相应的配置修改,主要是修改php.ini中的内容,根据提示修改即可
5:php扩展安装:php-imap
cd /home/bak/php-5.3.28/ext/imap
/usr/local/php/bin/phpize
./configure --with-php-config=/usr/local/php/bin/php-config
这里提示报错:
configure: error: utf8_mime2text() has new signature, but U8T_CANONICAL is missing. This should not happen. Check config.log for additional information.
解决方法:yum -y install libc-client-devel
configure: error: This c-client library is built with Kerberos support.
Add --with-kerberos to your configure line. Check config.log for details.
[root@vultr imap]# ./configure --with-kerberos --with-php-config=/usr/local/php/bin/php-config
checking for crypt in -lcrypt... yes
checking for krb5-config... /usr/bin/krb5-config
configure: error: This c-client library is built with SSL support.
Add --with-imap-ssl to your configure line. Check config.log for details.
[root@vultr imap]# ./configure --with-kerberos --with-imap-ssl --with-php-config=/usr/local/php/bin/php-config
checking for crypt in -lcrypt... yes
configure: error: Cannot find imap library (libc-client.a). Please check your c-client installation.
[root@vultr etc]# rpm -qa | grep libc-client
libc-client-2007e-11.el6.x86_64
libc-client-devel-2007e-11.el6.x86_64
[root@vultr etc]# yum -y install libc-client-devel.
[root@vultr etc]# ln -s /usr/lib64/libc-client.so /usr/lib/libc-client.so
###呵呵,自己的流水帐笔记
阅读(1890) | 评论(0) | 转发(0) |