This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env php | |
<?php | |
# Stuff we have to do | |
if(!defined('sugarEntry'))define('sugarEntry', true); | |
function usage() { | |
global $argv; | |
return "\n" . $argv[0] . " <path to sugar>\n"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Disable SELinux | |
echo 0 > /selinux/enforce | |
perl -pi -e 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config | |
# Install required packages | |
yum install pdksh compat-libstdc++-33 compat-libstdc++-33.i686 libaio libaio.i686 \ | |
pam-1.1.1-17.el6.x86_64 pam-1.1.1-17.el6.i686 nfs-utils openssh-clients \ | |
numactl | |
# Update Kernel Parameters (http://ibm.co/1czEKb4) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Make sure we're using a compatible java | |
yum remove java | |
yum install java-1.6.0-openjdk wget | |
# Install Jenkins | |
sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo | |
sudo rpm --import http://pkg.jenkins-ci.org/redhat/jenkins-ci.org.key | |
sudo yum install jenkins | |
# Enable Jenkins at boot, and start it up |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create Note | |
set_entry: Request: | |
{ | |
"session": "eubisbbcntp13gcvmq9nlcess1", | |
"module_name": "Notes", | |
"name_value_list": { | |
"name":{"name":"name","value":"A Test Note"}, | |
"team_count":{"name":"team_count","value":1}, | |
"team_name":{"name":"team_name","value":"Global"} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install Guide for Sugar on CentOS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Make a local copy | |
service mysql stop | |
cp -ra /var/lib/mysql mysqldata | |
service mysql start | |
# Make a local dump | |
mysqldump --routines --events --flush-privileges --all-databases > all-databases.sql | |
# drop everything except the mysql table | |
mysql -e "SELECT DISTINCT CONCAT ('DROP DATABASE ',TABLE_SCHEMA,' ;') FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA <> 'mysql' AND TABLE_SCHEMA <> 'information_schema';" | tail -n+2 > drop.sql |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Download from here: https://github.com/sugarcrm/Tidbit | |
# Copy Tidbit to your Sugar Root and unpack | |
cp Tidbit-master.zip /var/www/html | |
unzip Tidbit-master.zip | |
# Run Tidbit | |
cd Tidbit | |
php -f install_cli.php -- -c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Apache: | |
- Activated 'KeepAlive' connections | |
- Lowered keep alive timeout from 15 seconds to 2 seconds | |
- Increased the number of minimum workers from 8 to 16 | |
- Activated server status page (/server-status) | |
APC (Alternative PHP Cache): | |
- Set cache size to 256MB (ideal for SugarCRM workload) | |
Memcache: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
define('sugarEntry', 1); | |
ini_set('max_execution_time', '0'); | |
ini_set('memory_limit', '2G'); | |
require_once 'include/entryPoint.php'; | |
require_once 'include/SugarQuery/SugarQuery.php'; | |
require 'include/language/en_us.lang.php'; | |
require 'install/demoData.en_us.php'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Opportunities { | |
public function __construct() { | |
# Instantiate this so we can read all of our resources into RAM ONCE | |
$this->generator = new OpportunityGenerator(); | |
} | |
public function populateForAccount(&$account) { | |
# Need our demo array |