红联Linux门户
Linux帮助

Ubuntu安装X2CRM

发布时间:2016-08-14 15:01:22来源:topspeedsnail.com作者:斗大的熊猫
X2CRM(https://www.x2crm.com/)是开源的CRM应用,使用PHP开发。源代码:https://github.com/X2Engine/X2CRM。
X2CRM is a next-generation, open source social sales application for small and medium sized businesses. X2CRM was designed to streamline contact and sales actions into one compact blog-style user interface. Add to this contact and colleague social feeds and sales representatives become smarter and more effective resulting in increased sales and higher customer satisfaction.
 
需要安装的软件:
Apache Web服务
PHP5.3+
MySQL 5+
 
Ubuntu安装X2CRM:
 
1.安装MariaDB
为X2CRM创建一个数据库:
$ sudo mysql -u root -p
MariaDB [(none)]> CREATE DATABASE x2crm;
MariaDB [(none)]> GRANT ALL PRIVILEGES ON x2crm.* TO 'x2crm'@'localhost' IDENTIFIED BY 'test1234';
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> \q
上面的SQL语句创建了一个x2crm数据库和x2crm用户(密码test1234)。
 
2.安装Apache
$ sudo apt-get install apache2
 
3.安装PHP和PHP模块
$ sudo apt-get install php7.0 libapache2-mod-php7.0 php7.0-mbstring php7.0-curl php7.0-zip php7.0-gd php7.0-mysql php7.0-mcrypt
 
4.下载X2CRM源码
$ cd /tmp
$ wget https://github.com/X2Engine/X2Engine/archive/master.zip
$ sudo unzip master.zip
$ sudo mv X2CRM-master/x2engine/ /var/www/html/x2crm
更改目录权限:
$ sudo chown www-data:www-data -R /var/www/html/x2crm
 
5.配置Apache
开启Apache rewrite模块:
$ sudo a2enmod rewrite
创建Virtual Host:
$ sudo vim /etc/apache2/sites-available/x2crm.conf
写入内容:
<VirtualHost *:80>
ServerAdmin admin@yourdomain.com
DocumentRoot /var/www/html/x2crm/
ServerName your_domain_or_IP
ServerAlias www.your_domain.com
<Directory /var/www/html/x2crm/>
Options FollowSymLinks
AllowOverride All
Order allow,deny
allow from all
</Directory>
ErrorLog /var/log/apache2/your-domain.com-error_log
CustomLog /var/log/apache2/your-domain.com-access_log common
</VirtualHost>
注意替换上面的域名。
使配置生效:
$ sudo ln -s /etc/apache2/sites-available/x2crm.conf /etc/apache2/sites-enabled/x2crm.conf
重启Apache服务:
$ sudo systemctl restart apache2
 
6.完成安装
使用浏览器访问:http://your_domain_or_IP,根据提示完成安装。
 
本文永久更新地址:http://www.linuxdiyf.com/linux/23302.html