Results 1 to 9 of 9

Thread: Idiot’s Guide for Linux - SugarCRM 4.2.1 Installation

  1. #1
    mtfrog77 is offline Sugar Community Member
    Join Date
    May 2006
    Posts
    67

    Post Idiot’s Guide for Linux - SugarCRM 4.2.1 Installation

    Below is a set-by-set guide I made for installing Sugar CRM on a basic linux install. This guide assumes that you have a working linux install with apache installed. I hope this help eveyone save a little time on their frist install.

    Installation
    1. Install Apache (httpd), PHP, MySQL (server and client), and the component that allows php to talk to mysql.
    yum -y install httpd php mysql mysql-server php-mysql
    yum install php-imap -y
    yum update -y

    2. Configure the new services to start automatically
    chkconfig httpd on
    chkconfig mysqld on
    service httpd start
    service mysqld start

    3. IMPORTANT! Set up the mysql database root password. Without a password, ANY user on the box can login to mysql as database root. The mysql root account is a separate password from the machine root account.
    mysqladmin -u root password 'new-password' [quotes are required]
    4. Make additional security-related changes to mysql.
    mysql -u root -p

    mysql> DROP DATABASE test; [removes the test database]
    mysql> DELETE FROM mysql.user WHERE user = ''; [Removes anonymous access]
    mysql> FLUSH PRIVILEGES;


    FireWall
    /etc/sysconfig/iptables

    # Firewall configuration written by system-config-securitylevel
    # Manual customization of this file is not recommended.
    *filter
    :INPUT ACCEPT [0:0]
    :FORWARD ACCEPT [0:0]
    :OUTPUT ACCEPT [0:0]
    :RH-Firewall-1-INPUT - [0:0]
    -A INPUT -j RH-Firewall-1-INPUT
    -A FORWARD -j RH-Firewall-1-INPUT
    -A RH-Firewall-1-INPUT -i lo -j ACCEPT
    -A RH-Firewall-1-INPUT -p icmp --icmp-type any -j ACCEPT
    #-A RH-Firewall-1-INPUT -p 50 -j ACCEPT
    #-A RH-Firewall-1-INPUT -p 51 -j ACCEPT
    #-A RH-Firewall-1-INPUT -p udp --dport 5353 -d 224.0.0.251 -j ACCEPT
    #-A RH-Firewall-1-INPUT -p udp -m udp --dport 631 -j ACCEPT
    -A RH-Firewall-1-INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
    # SSH
    -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
    # HTTP
    -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT

    # Temporarily allow access to MySQL
    # If this machine is in production and the next line is not commented out, someone messed up
    -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -s 10.0.0.0/22 -j ACCEPT

    # DENY EVERYTHING ELSE
    -A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited
    COMMIT


    if you change this file you have to restart the service:
    service iptables restart

    Installing Sugar Suite
    http://www.sugarforge.org/frs/downlo...de_v401a.pdf]]
    To install Sugar Suite 4.0, you need to do the following:
    1. Download the Sugar files.
    2. Copy the Sugar files to your web server.
    3. Check and set the dependencies and requirements required by Sugar Suite. See the sub-sections, System Check Acceptance, Database Configuration, and Site Configuration, for more information.
    4. Install Sugar with the Sugar Installation Wizard.
    5. Log in to Sugar!

    Download Sugar Files
    To download the latest Sugar Suite files:
    1. Go to http://www.sugarforge.org/content/downloads/
    2. Click on the “SugarCRM 4.0 Latest Stable Full” link to download.

    wget http://www.sugarforge.org/frs/downlo...uite-4.2.1.zip

    unzip SugarSuite-4.2.1.zip
    cd /SugarSuite-Full-4.2.1
    mv *.* /var/www/html/
    mv * /var/www/html/
    mv htaccess /var/www/html/



    Copy Sugar Files to Web Server
    Once you’ve downloaded Sugar, you need to unzip the Sugar files and set permissions.
    1. Locate your webroot directory on your web server. This is the directory on your web server where publicly accessible files are made available by your web server. Common locations for webroot includes:
    * /var/www/html/ (Linux/Apache)
    2. Unzip the Sugar Suite zip file into your webroot. A directory is automatically created within webroot.
    3. Rename this directory if desired.
    4. Set permissions on your Sugar files. The following directories, all subdirectories, and files must be made writable by your web server user:
    * cache
    * custom
    * data
    * modules
    * config.php

    chown -R apache cache/
    chgrp -R apache cache/
    chown -R apache custom
    chgrp -R apache custom
    chown -R apache data
    chgrp -R apache data
    chown -R apache modules
    chgrp -R apache modules
    chown -R apache config.php
    chgrp -R apache config.php


    Set PHP Memory Limit >= 32M
    vi /etc/php.ini

    memory_limit = 8M ; Maximum amount of memory a script may consume (8MB)

    Change to:
    memory_limit = 64M ; Maximum amount of memory a script may consume (64MB)

    Start and stop Apache service

    service httpd stop
    service httpd start


    Warning: Your PHP configuration must be changed to allow files of at least 6MB to be uploaded. Please modify the upload_max_filesize value in your php.ini located at: /etc/php.ini

    vi /etc/php.ini

    Change to:
    upload_max_filesize = 6M

    Start and stop Apache service

    service httpd stop
    service httpd start


    .htaccess
    BY default .htaccess Sugar CRM can't change this file. And you will see an error in set 6 of the install.

    chown -R apache .htaccess
    chgrp -R apache .htaccess
    chmod 644 .htaccess


    Install Sugar with the Sugar Installation Wizard
    Once you’ve copied the Sugar files into your webroot, you can now begin to use the Sugar Installation Wizard. The http://<yourServer>/ <yourSugarDirectory> / directory on your server now corresponds to the Sugar URL that you will use to access the Installation Wizard. You should now be redirected to the Installation Wizard. Click Start to begin.
    Note: At any time prior to accepting the Confirm Setting menu, you can modify any of your settings. To modify any
    settings, click the Back button.
    1. License Acceptance: Review the Sugar Public License and check “I Accept” to continue. Click Next when you are finished.
    2. System Check Acceptance: In this step, Sugar checks a number of dependencies and system requirements. If all these checks pass successfully, you will be allowed to click Next and proceed to the next step. See the System Check Acceptance sub-section for more information
    3. Database Configuration: In this step, Sugar configures its database information. You may also choose to populate demo data in this step. See the Database Configuration sub-section for more information.
    4. Site Configuration: In this step, you set your Sugar URL, admin password, and other miscellaneous options. See the Site Configuration sub-section for more information.
    5. Confirm Settings: Review the settings you provided to the Installation Wizard. To change any settings, click the Back button to visit previous steps. Note that you will not be able to modify settings after this point. Click Next to perform the setup.
    6. Installation Log: Sugar attempts to install itself with the settings you have provided. The following occurs:
    a. The configuration file config.php is created. If the file can’t be created due to a file permissions issue, then the config.php file contents are printed to the screen. Cut and paste these values directly into your config.php file.
    b. The primary database tables are created.
    c. The relationship tables are added and demo data (if applicable) is installed.
    * After you install, the system prevents inadvertent re-installation. To re-install, change the installer_locked setting in the config.php file.
    * Click Next to continue.
    7. Registration: Registration is optional, but we always appreciate your feedback. Please take the time to fill out the registration form and send it to us. After clicking Send Registration, you should be redirected to the log in screen. If you choose not to register, click Finish to proceed to the log in screen.

    Importing Data
    Navicat 2004

    Navicat 2004 can be used to import information into a MySQL for most files types.

    1. By default mysql does not support remote access...
    2. you will have to specify this in the server first, (ofcourse you will not be able to do this from a remote machine!!! unless you have remote desktop access)
    3. To enable access from a client machine called nile, do the following after starting mysqld (or mysqld_safe) on the server, named delaware:

    % mysql -u root -p
    mysql> use mysql;
    mysql> grant all privileges on *.* to usrname1@'%' identified by 'test' with grant option;
    mysql> insert into host values('nile', '%', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y');
    mysql> exit


    Hope this helps you!

    The user name, usrname1, and the password, test, should be replaced by the real value.
    One can then run mysql on nile as follows:

    % mysql --host=delaware --user=usrname1 -ptest

    To restrict access to a user from a specific host, change '%' in the grant command to a valid hostname or ip address.

  2. #2
    dtokeefe's Avatar
    dtokeefe is offline Sugar Community Member
    Join Date
    Mar 2005
    Location
    Sao Paulo, Brasil
    Posts
    671

    Default Re: Idiot’s Guide for Linux - SugarCRM 4.2.1 Installation

    Very nice !

    You should add, for performance:

    yum install php-json php-eaccelerator

    To set permissions, you can do

    chown -R apache.apache /var/www/html/sugar

    to set owner and group in one command.

    You might also want to make the Apache user = nobody for security purposes, in which case you would write

    chown -R nobody.nobody /var/www/html/sugar

    Finally, some people will find it convenient to use the Trixbox CD iso (http://www.trixbox.org/) to set up a SugarCRM server. It installs CentOS (essentially Redhat Enterprise 4), Asterix and SugarCRM. Even if you don't use Asterix, it's a good setup and prepares the ground for one day using Asterix. We think this setup is better than the Bitrock installer for Linux, which is convenient, but puts files in non-standard places.

    Cheers.

    David
    David O'Keefe
    Lampada Global Services
    SugarCRM Gold Partner
    USA: +1 908 998-2278
    BR: +55 11 3237-3110
    Skype: dtokeefe
    Email: equipe@lampadaglobal.com
    www.lampadaglobal.com

    Lampada Global delivers enterprise software and offshore programming services to customers around the world.

  3. #3
    mtfrog77 is offline Sugar Community Member
    Join Date
    May 2006
    Posts
    67

    Default Re: Idiot’s Guide for Linux - SugarCRM 4.2.1 Installation

    Thanks for the imput David

  4. #4
    dsharma is offline Sugar Community Member
    Join Date
    Mar 2006
    Posts
    17

    Default Re: Idiot’s Guide for Linux - SugarCRM 4.2.1 Installation

    yum install php-json - returns nothing - any clue ?

    Reading repository metadata in from local files
    Parsing package install arguments
    No Match for argument: phpjson
    Nothing to do

  5. #5
    Dale Thomas is offline Sugar Community Member
    Join Date
    Oct 2006
    Posts
    38

    Default Re: Idiot’s Guide for Linux - SugarCRM 4.2.1 Installation

    Can anyone help? It doesn't matter what I do I still get the following in the admin section --> module upload.



    Warning: Your PHP configuration must be changed to allow files of at least 6MB to be uploaded. Please modify the upload_max_filesize value in your php.ini located at: /etc/php.ini

    vi /etc/php.ini

    Change to:
    upload_max_filesize = 6M

    Start and stop Apache service

    service httpd stop
    service httpd start

  6. #6
    mapm's Avatar
    mapm is offline Sugar Community Member
    Join Date
    Aug 2006
    Location
    Portugal
    Posts
    239

    Default Re: Idiot’s Guide for Linux - SugarCRM 4.2.1 Installation

    Quote Originally Posted by Dale Thomas
    Can anyone help? It doesn't matter what I do I still get the following in the admin section --> module upload.



    Warning: Your PHP configuration must be changed to allow files of at least 6MB to be uploaded. Please modify the upload_max_filesize value in your php.ini located at: /etc/php.ini

    vi /etc/php.ini

    Change to:
    upload_max_filesize = 6M

    Start and stop Apache service

    service httpd stop
    service httpd start
    Be sure that you killed httpd server, after stop try netstat -tlp and see if http is running if it is maybe you are changing the wrong php.ini, if your web server is running on a chroot environment maybe the /etc/php.ini is not the real /etc/php.ini but something relative to your chroot environment.

    Hope it helps

  7. #7
    jose0510 is offline Junior Member
    Join Date
    Jun 2007
    Posts
    2

    Default Re: Idiot’s Guide for Linux - SugarCRM 4.2.1 Installation

    Hi, I am following the instructions religiosly and downloading the latest stable version of sugar, and extraction that to my /var/www/htm directory. However when I try to launch the installer by going to http://localhost/sugar_rgg/ in my web browser i simply get a directory listing. I am using Linux red hat enterprise OS btw. Is there something I need to configure to get this to run?

  8. #8
    dlorenzetti's Avatar
    dlorenzetti is offline Sugar Community Member
    Join Date
    Jan 2008
    Location
    São Paulo, Brasil
    Posts
    189

    Default Re: Idiot’s Guide for Linux - SugarCRM 4.2.1 Installation

    Hi all,

    I try change the upload_max_filesize = 6M, but not work, it's need to be more, when i tried:

    upload_max_filesize = 7M

    so it's work perfect.
    Diego Lorenzetti
    Lampada Global Services - Open Source Solutions
    Phone: +55 11 3237-3110
    Email: equipe@lampadaglobal.com
    Site: www.lampadaglobal.com

    Lampada Global delivers offshore software development and support services to customers around the world.
    Lampada is proud to be a SugarCRM Gold Partner, revolutionizing Customer Relationship Management.

  9. #9
    dimitrisk8 is offline Junior Member
    Join Date
    Dec 2009
    Posts
    4

    Red face Re: Idiot’s Guide for Linux - SugarCRM 4.2.1 Installation

    hi...

    i have a problem

    i am a sugarcrm user about 1 year our technician has left the country and i have some problems but he can't help me anymore... the problem is that i was joining before 1 month from my house pc to my crm server(my company server) home panel but now i format my computer and i lost the URL from the server SugarCrm i used so i know a little bit from computers if you can help me...

    btw i am using linux server...

    Maybe something from Site Configuration(i don't know if there is) i know my ip of course and i don't know the way i used to type on my browser... it was like http://62.141*(server's ip)/_______/index.php?module=Home&action=index i also know my network url from my company which is like 192.168.1.11/index.php?module=Home&action=index...

    thanks for reading ans sorry for the bad english...

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •