Installing Sugarcrm Community Edition

From ArchWiki

Jump to: navigation, search

I want to check one of the most famous CRM softwares, SugarCRM, so i googled it, but unfortunately i got no result on Arch Linux, so i decided to setup myself. Then i posted here. Hope it helps somebody else who wants to setup on Arch Linux.

SugarCRM is a webbased CRM solution written in PHP. SugarCRM is available in different flavours and they are “Community” (free), “Professional”, and “Enterprise” editions. For a detailed overview of the different editions, you can take a look at the SugarCRM website. In this tutorial I will describe the installation of the free Community Edition on Arch Linux.

1. First of all we install unzip if we have not before:

# pacman -S unzip

2. Then we install mysql:

# pacman -S mysql mysql-clients

3. Now we start mysqld:

/etc/rc.d/mysqld start

4. To start MySQL at bootup, add mysqld to the list of daemons in /etc/rc.conf or add /etc/rc.d/mysqld start to /etc/rc.local. The MySQL server does not listen on the TCP port 3306 by default. To allow (remote) TCP connections, comment the line containing ’skip-networking’ in /etc/my.cnf. Remember to edit /etc/hosts.allow by adding the following line:

mysqld: ALL

5. Stop mysqld daemon

# /etc/rc.d/mysqld stop

6. Connect to mysql server

# mysql -u root mysql

7. For to define a root password:

mysql> UPDATE user SET password=PASSWORD(”Your_Password_Here”) WHERE User=’root’;
mysql> FLUSH PRIVILEGES;
mysql> exit

Then restart daemon:

# /etc/rc.d/mysqld restart

8. For Sugarcrm, we must create a user and database, then we must give the privileges:

$ mysql -u root -p
Enter password:

Now that you are logged in, we create a database:

mysql> create database sugarcrm;
Query OK, 1 row affected (0.00 sec)

We allow user sugarcrm to connect to the server from localhost using the password :

mysql> grant usage on *.* to sugarcrm@localhost identified by ‘yourpassword’;
Query OK, 0 rows affected (0.00 sec)

And finally we grant all privileges on the sugarcrm database to this user:

mysql> grant all privileges on sugarcrm.* to sugarcrm@localhost ;
Query OK, 0 rows affected (0.00 sec)

8. We install apache and php if we do not have before:

# pacman -S apache php

9. We make some configuration on Apache and Php, First of all we will create the user http (this account may already exist):

# useradd http

10. Add this line to /etc/hosts (If the file doesn’t exist, create it.):

127.0.0.1  localhost.localdomain   localhost

Note: If you want a different hostname, append it to the end:

127.0.0.1  localhost.localdomain   localhost myhostname

11.Edit /etc/rc.conf:

If you set a hostname, the HOSTNAME variable should be the same; otherwise, use “localhost”:

#
# Networking
#
HOSTNAME=”localhost”

12. Make sure the hostname appears in /etc/hosts or apache will fail to start. Alternatively, you can edit /etc/httpd/conf/httpd.conf as root and comment the following module:

LoadModule unique_id_module        modules/mod_unique_id.so

It should now appear as:

#LoadModule unique_id_module        modules/mod_unique_id.so

13. Run the following in a terminal as root to start the HTTP server:

# /etc/rc.d/httpd start

14. Apache should now be running. Test by visiting http://localhost/ in a web browser. It should display a simple Apache test page.

15. To start Apache automatically at boot, edit /etc/rc.conf as root and add the httpd daemon:

DAEMONS=(… httpd …)

Or add this line to /etc/rc.local:

/etc/rc.d/httpd start

16. Add these line in /etc/httpd/conf/httpd.conf:

LoadModule php5_module modules/libphp5.so
Include conf/extra/php5_module.conf

Note: The “Include” can not be directly after the “LoadModule” line in the configuration file, it need to be down with the other “Includes”. [ edit: it works with includes following loadmodule ]

17. If your DocumentRoot is outside of /home/, add it to open_basedir in /etc/php/php.ini as such:

open_basedir = /home/:/tmp/:/usr/share/pear/:/path/to/documentroot

Suggestion - Add your document root as follows: this is the default

open_basedir = /srv/http:/home/:/tmp/:/usr/share/pear/

18. Restart the Apache service to make changes take effect (as root):

# /etc/rc.d/httpd restart

19. If you have any problems, edit your /etc/httpd/conf/httpd.conf file with the following information:

# nano /etc/httpd/conf/httpd.conf

20. Within <IfModule mime_module>

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

21. Restart Apache

# /etc/rc.d/httpd restart

22. Set the memory_limit is at least 64M and set the upload_max_filesize to 20M on php.ini:

#vim /etc/php/php.ini
[...]
memory_limit = 128M      ; Maximum amount of memory a script may consume (128MB)
[...]
; Maximum allowed size for uploaded files.
upload_max_filesize = 20M
[...]

23. /etc/rc.d/httpd restart

24. Add a file handler for .phtml if you need it in /etc/httpd/conf/extra/php5_module.conf:

DirectoryIndex index.php index.phtml index.html

25. for enabling the libGD module, uncomment in /etc/php/php.ini:

;extension=gd.so

to

extension=gd.so

26. for enabling the mcrypt module, uncomment in /etc/php/php.ini:

;extension=mcrypt.so

to

extension=mcrypt.so

27. Make sure you have libmcrypt installed:

# pacman -S libmcrypt

28. Also, there have been issues with getting mcrypt to work with php if you don’t have libtool installed:

# pacman -S libtool

29. Edit /etc/php/php.ini (this is in /usr/etc on older systems) to uncomment the following line (By removing ;):

;extension=mysql.so

30. Install basic tables and secure at mysql:

# sudo /usr/bin/mysql_install_db
# sudo /usr/bin/mysql_secure_installation

31. Run in terminal (as root):

# /etc/rc.d/mysqld start

32. Make a directory named sugarcrm under /srv/http/sugarcrm, download the installation file of sugarcrm, unzip it, move to the directory /srv/http/sugarcrm and then change the ownership:

# mkdir /srv/http/sugarcrm
# cd /tmp
# wget -c http://www.sugarforge.org/frs/download.php/5446/SugarCE-5.2.0e.zip
# unzip SugarCE-5.2.0e.zip
# cd SugarCE-Full-5.2.0e/
# mv * /srv/http/sugarcrm/
# chown -R http:http /srv/http/sugarcrm/

33. Start the webbased SugarCRM installer by opening the URL

http://localhost/sugarcrm/install.php

34. The SugarCRM setup wizard comes up:

35. Scroll down and click on the Next button:

36. Accept the license (GPL) and click on Next:

37. Select Typical Install and click on Next:

38. Select the database type (MySQL):

39. On the Database Configuration page, fill in a name for the SugarCRM database (sugarcrm). The Host Name is localhost. Then fill in the username of the MySQL administrator (root) and his MySQL password (yourrootsqlpassword). Then scroll down…

40. Select Define user to create from the drop-down menu to create a MySQL user for SugarCRM (this user will be created by the setup wizard). Fill in a name for that user (sugarcrm) and the password. If you want to have some demo data to play with, select Yes from the Populate Database with Demo Data. Click on Next.

41. Next fill in a password for the SugarCRM admin user (username is admin):

42. Select your locale and currency settings:

43. You should now see a summary of your selected options. If everything’s ok, click on Install:

44. Now you should now see the SugarCRM login screen. Fill in admin as the username and the password you specified in the setup wizard. That’s all. Enjoy it.

  • You can reach to last edition of this how-to via
http://cihan.me/installing-sugarcrm-community-edition-on-arch-linux/
Personal tools