Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2815248
  • 博文数量: 587
  • 博客积分: 6356
  • 博客等级: 准将
  • 技术积分: 6410
  • 用 户 组: 普通用户
  • 注册时间: 2008-10-23 10:54
个人简介

器量大者,福泽必厚

文章分类

全部博文(587)

文章存档

2019年(3)

2018年(1)

2017年(29)

2016年(39)

2015年(66)

2014年(117)

2013年(136)

2012年(58)

2011年(34)

2010年(50)

2009年(38)

2008年(16)

分类: LINUX

2014-07-24 15:33:27

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安装脚本:

  1. #!bin/sh
  2. #shell by ***

  3. if ! rpm -qa|grep ncurses-devel
  4. then
  5. yum -y install ncurses-devel
  6. fi
  7. if ! rpm -qa|grep openssl-devel
  8. then
  9. yum -y install openssl-devel
  10. fi
  11. if ! rpm -qa|grep bison-devel
  12. then
  13. yum -y install bison-devel
  14. fi
  15. if ! rpm -qa|grep tcp_wrappers-devel
  16. then
  17. yum -y install tcp_wrappers-devel
  18. fi
  19. MAKE_RUN=$(($(more /proc/cpuinfo | grep processor | wc -l) + 1))

  20. useradd -d /data/mysql mysql

  21. tar zxf mysql-5.6.16.tar.gz
  22. cd mysql-5.6.16
  23. cmake . \
  24.         -DCMAKE_INSTALL_PREFIX=/data/mysql/ \
  25.         -DMYSQL_USER=mysql \
  26.         -DDEFAULT_CHARSET=utf8 \
  27.         -DDEFAULT_COLLATION=utf8_general_ci \
  28.         -DWITH_EXTRA_CHARSETS=all \
  29.         -DWITH_READLINE=1 \
  30.         -DWITH_SSL=system \
  31.         -DWITH_EMBEDDED_SERVER=1 \
  32.         -DWITH_ZLIB=system \
  33.         -DWITH_LIBWRAP=1 \
  34.         -DWITH_INNOBASE_STORAFE_ENGINE=1 \
  35.         -DWITH_MEMORY_STORAGE_ENGINE=1 \
  36.         -DWITH_MYISAM_STORAGE_ENGINE=1 \
  37.         -DENABLE_LOCAL_INFILE=1 \
  38.         -DMYSQL_UNIX_ADDR=/data/mysql/mysql.sock
  39. make -j ${MAKE_RUN}
  40. make install


  41. mkdir /data/mysql/var
  42. chmod 755 /data/mysql
  43. chown -R mysql:mysql /data/mysql
  44. /data/mysql/scripts/mysql_install_db --user=mysql --basedir=/data/mysql --datadir=/data/mysql/var/
  45. #mv /etc/my.cnf /etc/my.cnf-`date +%F`
  46. #rm -f /etc/rc.d/init.d/mysqld

  47. cp support-files/mysql.server /etc/rc.d/init.d/mysqld
  48. chmod 700 /etc/rc.d/init.d/mysqld
  49. chkconfig --add mysqld
  50. chkconfig --level 345 mysqld on

  51. echo "PATH=$PATH:/data/mysql/bin" >> /etc/profile
  52. echo "export PATH" >> /etc/profile

  53. echo "/data/mysql/lib" >> /etc/ld.so.conf
  54. ldconfig

  55. source /etc/profile

  56. mkdir /data/mysqllog
  57. mkdir /data/mysqllog/binlog
  58. chown -R mysql:mysql /data/mysqllog

  59. cd ..
  60. 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,后来缩小的足够小才可以了!
报错的信息如下:

点击(此处)折叠或打开

  1. 2014-07-24 07:08:29 1493 [Note] InnoDB: Initializing buffer pool, size = 512.0M
  2. InnoDB: mmap(549453824 bytes) failed; errno 12
  3. 2014-07-24 07:08:29 1493 [ERROR] InnoDB: Cannot allocate memory for the buffer pool
  4. 2014-07-24 07:08:29 1493 [ERROR] Plugin 'InnoDB' init function returned error.
  5. 2014-07-24 07:08:29 1493 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
  6. 2014-07-24 07:08:29 1493 [ERROR] Unknown/unsupported storage engine: InnoDB
  7. 2014-07-24 07:08:29 1493 [ERROR] Aborting

  8. 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) |
给主人留下些什么吧!~~