Ubuntu 14.04-LAMP+kayako系统

Posted 转角处

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Ubuntu 14.04-LAMP+kayako系统相关的知识,希望对你有一定的参考价值。

一、搭建LAMP--apache、mysqlphp

使用系统及软件版本:ubuntu 14.04; apache 2.4.20;mysql 5.6.30;

 Mysql:

使用apt-get安装:

#apt-get install mysql-server-5.6 mysql-client-5.6 mysql-common-5.6

安装过程中会提示输入mysql密码

安装完成后启动mysql:

#service start mysql

Apache:

1、安装C++编译相关组件:

#apt-get install build-essential

2、编译安装apr:

#tar -zxvf apr-1.4.6.tar.gz

#cd apr-1.4.6

#./configure --prefix=/use/local/apr

#make && make install

3、编译安装apr-util:

#tar -zxvf apr-util-1.5.4.tar.gz

#cd apr-util-1.5.4

#./configure --prefix=/use/local/apr-util --with-apt=/usr/local/apr

#make && make install

4、编译安装pcre:

#tar -zxvf pcre-8.31.tar.gz

#cd pcre-8.31

#./configure --prefix=/usr/local/pcre

#make && make install

5、编译安装zlib:

#tar -zxvf zlib-1.2.8.tar.gz

#cd zlib-1.2.8

#./configure --prefix=/usr/local/zlib

#make && make install

6、安装zlib1g-dev:

#apt-get install zlib1g-dev

7、编译安装apache:

#tar -zxvf httpd-2.4.20.tar.gz 

#cd httpd-2.4.20

#./configure --prefix=/usr/local/apache --enable-deflate --enable-expires --enable-headers --enable-modules=most --enable-so --with-worker --enable-rewrite --with-apt=/usr/local/apr --with-apr-util=/usr/loacal/apr-util --with-pcre=/usr/local/pcre

#make && make install

PHP

1、编译安装png:

#tar -zxvf libpng-1.6.7.tar

#cd libpng-1.6.7

#./configure --prefix=/usr/local

#make && make install

2、编译安装libiconv:

#tar -zxvf libiconv-1.14.tar

#cd libiconv-1.14

#./configure --prefix=/usr/local

#make && make install

3、编译安装freetype:

#tar -zxvf freetype-2.6.tar

#cd freetype-2.6

#./configure --prefix=/usr/local

#make && make install

4、编译安装GD:

#tar -zxvf libgd-2.1.1.tar

#cd libgd-2.1.1

#./configure --prefix=/usr/local --with-libiconv-prefix=/usr/loal --with-png=/usr/local --with-freetype=/usr/local 

#make && make install

安装PHP组件

1、安装libxml

#apt-get install libxml2

#apt-get install libxml2-dev

2、编译安装mhash:

#tar -zxvf mhash-0.9.9.9.tar.gz

#cd mhash-0.9.9.9

#./configure --prefix=/usr/local

#make && make install

3、编译安装libmcrypt:

#tar -zxvf libmcrypt-2.6.8.tar.gz

#cd libmcrypt-2.6.8

#./configure --prefix=/usr/local

#make && make install

4、编译安装mcrypt:

#tar -zxvf mcrypt-2.6.8.tar.gz

#cd mcrypt-2.6.8

#LD_LIBRARY_PATH=/usr/local/lib ./configure --prefix=/usr/local

#make && make install

5、安装curl:

#apt-get install curl libcurl3-dev php5-curl

6、编译安装php:

#tar -zxvf php-5.6.21.tar.gz

#cd php-5.6.21

#./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache/bin/apxs --with-config-file-path=/usr/local/php/etc --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-gettext --enable-mbstring --with-iconv --with-mcrypt --with-mhash --with-openssl --enable-bcmath --enable-soap --with-libxml-dir --enable-pcntl --enable-shmop --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-sockets --with-curl --with-gd --with-zlib --enable-zip --without-sqlite3 --without-pdo-sqlite --with-pear

#make && make install

复制php配置文件:

复制php.ini-development或php.ini-production到/usr/local/php/etc/php.ini

更改时间域:

925行:date.timezone = Asia/Shanghai

二、整合Apache与php:

修改apache配置文件:

#vi /usr/local/apache/conf/httpd.conf

114行:LoadModule php5_module /usr/local/apache/modules/libphp5.so

250行:DirectoryIndex index.php index.html

387行:AddType application/x-httpd-php .php

388行:AddType application/x-httpd-php-source .phps

保存退出,重启apache

php测试:

vi info.php

<?php

phpinfo();

?>

 

三、链接php与Mysql:

开启Extensions:

extension=php_curl.dll
extension=php_fileinfo.dll
extension=php_gd2.dll
extension=php_gettext.dll

extension=php_imap.dll  

extension=php_mbstring.dll
extension=php_exif.dll ; Must be after mbstring as it depends on it
extension=php_mysql.dll
extension=php_mysqli.dll
extension=php_openssl.dll

extension=php_pdo_mysql.dll
extension=php_pdo_sqlite.dll

extension=php_soap.dll
extension=php_tidy.dll
extension=php_xmlrpc.dll

链接mysql:

1001行:pdo_mysql.default_socket=/var/run/mysqld/mysqld.sock

1209行:mysqli.default_socket =/var/run/mysqld/mysqld.sock

mysql测试:

vi mysql.php

<?php
$link=mysqli_connect(‘localhost‘,‘root‘,‘you password‘);
if(!$link)
{
die(‘Could not connect: ‘ . mysql_error());
}
else echo "success";
mysqli_close($link);
?>

四、搭建kayako系统

https://kayako.atlassian.net/wiki/display/DOCS/New+installation

1、下载安装包

2、解压 将文件解压/上传到apache服务器根目录(虚拟主机根目录)

3、创建数据库:

#mysql -u root -p

> CREATE DATABASE kayako_fusion;

> USE kayako_fusion;

> ALTER DATABASE kayako_fusion DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;

GRANT ALL PRIVILEGES ON kayako_fusion.* TO ‘kayako_user‘@‘localhost‘ IDENTIFIED by ‘this_is_a_weak_password‘;

> exit

重启数据库

4、编辑kayako中config.php文件:

位置:__swift/config/

#cp config.php.new config.php

#vi config.new

define(‘SWIFT_BASENAME‘, ‘index.php?‘);

/**
* DATABASE HOSTNAME
*/
define(‘DB_HOSTNAME‘, ‘localhost‘);

/**
* DATABASE USERNAME
*/
define(‘DB_USERNAME‘, ‘root‘);

/**
* DATABASE PASSWORD
*/
define(‘DB_PASSWORD‘, ‘you password‘);

/**
* DATABASE NAME
*/
define(‘DB_NAME‘, ‘kayako_fusion‘);

5、上传key.php文件(此文件为官网购买)

6、更改文件权限:

__swift/files

__swift/cache

__swift/geoip

__swift/logs

__apps

# chmod -Rf 777 files cache geoip logs

# chmod -Rf 777 __apps

7、安装kayako:

windows端打开浏览器并输入kayako服务器IP/setup即可访问kayako安装界面;

10.11.20.15/setup

技术分享

以上是关于Ubuntu 14.04-LAMP+kayako系统的主要内容,如果未能解决你的问题,请参考以下文章

利用 Resetter 将 Ubuntu 系发行版重置为初始状态 | Linux 中国

debian系(Ubuntu)安装jenkins(持续集成)

怎样在VMware虚拟机中使用安装并设置Ubuntu系ǻ

如何将自己当前调试好的Ubuntu系统制作成iso格式镜像文件

ubuntu 装入归档文件时发生错误,是exe文件,和这有关系么??本人菜鸟,求指点

Ubuntu 在登陆界面usb的键盘和鼠标上无法输入和移动(注明:与内核驱动有关系)