CRM安装手册

一:环境: redhat5.4 32位系统
二:操作系统安装请参考(系统安装文件)
三:系统底层架构: LAMP平台
四:实施步骤
______________________________________________________________________________
(1)检查crm系统所需的依赖包,软件包在系统盘去找即可。
libtermcap-2.0.8-46.1.i386.rpm
libtermcap-devel-2.0.8-46.1.i386.rpm
libxml2-2.6.26-2.1.2.8.i386.rpm
libxml2-devel-2.6.26-2.1.2.8.i386.rpm
libxml2-python-2.6.26-2.1.2.8.i386.rpm
openssl-0.9.8e-12.el5.i386.rpm
openssl-0.9.8e-12.el5.i686.rpm
openssl-devel-0.9.8e-12.el5.i386.rpm
openssl-perl-0.9.8e-12.el5.i386.rpm
glib-1.2.10-20.el5.i386.rpm
gd-progs-2.0.33-9.4.el5_1.1.i386.rpm
gdm-docs-2.16.0-56.el5.i386.rpm
gdk-pixbuf-0.22.0-25.el5.i386.rpm
gdk-pixbuf-devel-0.22.0-25.el5.i386.rpm
gtk+-1.2.10-56.el5.i386.rpm
gtk+-devel-1.2.10-56.el5.i386.rpm
lm_sensors-2.10.7-4.el5.rpm
net-snmp-libs-5.3.2.2-7.el5.rpm
net-snmp-utils-5.3.2.2-7.el5.rpm
net-snmp-5.3.2.2-7.el5.rpm
freeradius-1.1.3-1.4.el5.rpm
freeradius-mysql-1.1.3-1.4.el5.rpm
libtool-ltdl-devel-1.5.22-6.1.i386.rpm
gamin-devel-0.1.7-8.el5.i386.rpm
expect-5.43.0-5.1.i386.rpm
expect-devel-5.43.0-5.1.i386.rpm
pcre-devel-6.6-2.el5_1.7.i386.rpm

______________________________________________________________________________
(2)apache
rpm -e httpd --nodeps
tar -zxvf httpd-2.2.15.tar.gz -C /usr/src
cd /usr/src/httpd-2.2.15
配置
./configure --prefix=/usr/local/http \
--enable-rewrite \
--enable-so \
--enable-auth-digest \
--enable-cgi \
 --with-ssl=/usr/lib \
--enable-ssl \
--enable-suexec \
--with-suexec-docroot=/usr/local/http/htdocs 
编译安装
make && make install
cd /usr/local/http/bin
vim apachectl        添加如下
#! /bin/sh
# chkconfig: 35 85 15
# description: Apache is a World Wide Web Server

cp /usr/local/http/bin/apachectl /etc/init.d/httpd
chmod o+x /etc/init.d/httpd
chkconfig --add httpd
chkconfig httpd on
service httpd start
______________________________________________________________________________
(3)mysql
检查系统mysql包
[root@localhost ~]# rpm -qa | grep mysql
mysql-server-5.0.77-3.el5
mysql-5.0.77-3.el5
libdbi-dbd-mysql-0.8.1a-1.2.2
mysql-connector-odbc-3.51.26r1127-1.el5

下面通过系统光盘软件安装以下几个软件包
mysql-devel-5.0.77-3.el5
mysql-bench-5.0.77-3.el5
mysql-test-5.0.77-3.el5

[root@localhost ~]# service mysqld start
[root@localhost ~]# mysqladmin -uroot password aqcx123456

编辑数据库配置文件:
vi /etc/my.cnf
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1

key_buffer = 384M
max_allowed_packet = 1M
table_cache = 512
sort_buffer_size = 2M
read_buffer_size = 2M
read_rnd_buffer_size = 8M
myisam_sort_buffer_size = 64M
thread_cache_size = 80
query_cache_size = 32M
back_log = 500
set-variable = max_connections= 1024
thread_concurrency = 8


[mysql.server]
user=mysql
basedir=/var/lib

[mysqld_safe]
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

[myisamchk]
key_buffer = 256M
sort_buffer_size = 256M
read_buffer = 2M
write_buffer = 2M


service mysqld start
______________________________________________________________________________
(4)PHP
rpm -e php --nodeps
tar -zxvf php-5.2.13.tar.gz -C /usr/src
cd /usr/src/php-5.2.13
 ./configure --prefix=/usr/local/php --with-apxs2=/usr/local/http/bin/apxs --with-config-file-path=/usr/local/php --with-gd --with-freetype-dir --with-mysql --enable-sockets --enable-mbstring --with-jpeg-dir --with-png-dir --disable-json --with-zlib --with-mysqli
make
make install
cp php.ini-dist /usr/local/php/php.ini
vim /usr/local/apache/conf/httpd.conf     启用php模块
53 LoadModulephp5_module                   modules/libphp5.so                                                                                 
54 AddType application/x-httpd-php .php                                      
167
168       DirectoryIndexindex.phpindex.html                                  
169

vim /usr/local/apache/htdocs/index.php           
          phpinfo();
?>
service apache stop     关闭
service apache start    启动
______________________________________________________________________________
(5)创建数据库
mysql -u root -p
>create database crm;
______________________________________________________________________________
(6)crm
rm -rf /usr/local/http/htdocs/*
tar -zxvf crm_install.tar.gz -C /usr/local/http/htdocs/
useradd -s /sbin/nologin aqcx
vim /usr/local/http/conf/httpd.conf  修改apache用户
User aqcx
Group aqcx
chown aqcx:aqcx -R /usr/local/http/htdocs/*
cd /usr/local/http/htdocs/
mv crm/* /usr/local/http/htdocs/
rm -rf crm/
______________________________________________________________________________
echo "service iptables stop" >> /etc/rc.local

重启机器:reboot

http://localhost/install 进行安装crm