Langkau ke kandungan utama

Pasang Sugarcrm 6.5.0 pada Server Centos 6.2


SugarCRM 6.5.0


1-First, install Basic Service LAMP(Linux, Apache, MySQL, PHP). This will install an Apache2 webserver on a CentOS 6.2 server with PHP5 support (mod_php) and MySQL support.

2-Installing MySQL 5
===========================
[root@server1 ~]yum install mysql mysql-server

3-Then we create the system startup links for MySQL (so that MySQL starts automatically whenever the system boots) and start the MySQL server:

[root@server1 ~]chkconfig --levels 235 mysqld on

[root@server1 ~]/etc/init.d/mysqld start

4-Set passwords for the MySQL root account:

[root@server1 ~]mysql_secure_installation

[root@server1 ~]mysql_secure_installation

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL
      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!

In order to log into MySQL to secure it, we'll need the current
password for the root user.  If you've just installed MySQL, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none):
OK, successfully used a password, moving on...

Setting the root password ensures that nobody can log into the MySQL
root user without the proper authorization.

Set root password? [Y/n] <-- ENTER
New password: <-- yourrootsqlpassword
Re-enter new password: <-- yourrootsqlpassword
Password updated successfully!
Reloading privilege tables..
 ... Success!


By default, a MySQL installation has an anonymous user, allowing anyone
to log into MySQL without having to have a user account created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n] <-- ENTER
 ... Success!

Normally, root should only be allowed to connect from 'localhost'.  This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] <-- ENTER
 ... Success!

By default, MySQL comes with a database named 'test' that anyone can
access.  This is also intended only for testing and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n] <-- ENTER
 - Dropping test database...
 ... Success!
 - Removing privileges on test database...
 ... Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n] <-- ENTER
 ... Success!

Cleaning up...

All done!  If you've completed all of the above steps, your MySQL
installation should now be secure.

Thanks for using MySQL!

[root@server1 ~]


5-Installing Apache2
==========================
Apache2 is available as a CentOS package, therefore we can install it like this:

[root@server1 ~]yum install httpd

Now configure your system to start Apache at boot time...

[root@server1 ~]chkconfig --levels 235 httpd on

... and start Apache:

[root@server1 ~]/etc/init.d/httpd start

Apache's default document root is /var/www/html on CentOS, and the configuration file is /etc/httpd/conf/httpd.conf. Additional configurations are stored in the /etc/httpd/conf.d/ directory.

6-Installing PHP5, We can install PHP5 and the Apache PHP5 module as follows:

[root@server1 ~]yum install php

7-We must restart Apache afterward:

[root@server1 ~]/etc/init.d/httpd restart

8-Testing PHP5 / Getting Details About Your PHP5 Installation
The document root of the default web site is /var/www/html. We will now create a small PHP file (info.php) in that directory and call it in a browser. The file will display lots of useful details about our PHP installation, such as the installed PHP version.

9-Write this program

[root@server1 ~]vi /var/www/html/info.php

<?php
phpinfo();
?>

10-Now we call that file in a browser (e.g. http://192.168.0.100/info.php):

11-Getting MySQL Support In PHP5.
=======================================
To get MySQL support in PHP, we can install the php-mysql package. It's a good idea to install some other PHP5 modules as well as you might need them for your applications. You can search for available PHP5 modules like this:

[root@server1 ~]yum search php

12-Pick the ones you need and install them like this:

[root@server1 ~]yum install php-mysql php-gd php-imap php-ldap php-mbstring php-odbc php-pear php-xml php-xmlrpc

13-Now restart Apache2:

[root@server1 ~]/etc/init.d/httpd restart

14-Now reload http://192.168.0.100/info.php in your browser and scroll down to the modules section again. You should now find lots of new modules there, including the MySQL module:

phpMyAdmin (If you require)
==============
phpMyAdmin is a web interface through which you can manage your MySQL databases. First we enable the RPMforge repository on our CentOS system as phpMyAdmin is not available in the official CentOS 6.2 repositories:

15-Import the RPMforge GPG key:

[root@server1 ~]rpm --import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt

16 (a)-On x86_64 systems:

[root@server1 ~]yum install http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm

16 (b)-On i386 systems:

[root@server1 ~]yum install http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.i686.rpm

17-phpMyAdmin can now be installed as follows:

[root@server1 ~]yum install phpmyadmin

18-Now we configure phpMyAdmin. We change the Apache configuration so that phpMyAdmin allows connections not just from localhost (by commenting out the <Directory "/usr/share/phpmyadmin"> stanza):

[root@server1 ~]vi /etc/httpd/conf.d/phpmyadmin.conf

#
#  Web application to manage MySQL
#

#<Directory "/usr/share/phpmyadmin">
#  Order Deny,Allow
#  Deny from all
#  Allow from 127.0.0.1
#</Directory>

Alias /phpmyadmin /usr/share/phpmyadmin
Alias /phpMyAdmin /usr/share/phpmyadmin
Alias /mysqladmin /usr/share/phpmyadmin

19-Next we change the authentication in phpMyAdmin from cookie to http:

[root@server1 ~]vi /usr/share/phpmyadmin/config.inc.php

[...]
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'http';
[...]
Restart Apache:

/etc/init.d/httpd restart


Install APC
============

20-After you install and configure your environment properly under CentOS LAMP 6, install APC. What you need before starting:
- PEAR,
- Development of interfaces PHP, Apache & PCRE,
- A C & Make tool.

[root@server1 ~]yum install php-pear php-devel httpd-devel pcre-devel gcc make

21-Last, run the compilation of the APC extension.

[root@server1 ~]pecl install apc

The following questions will be asked, personally I used the defaults.

 Enable internal debugging in APC [no]:
 Enable per request file info about files Used From The APC cache [no]:
 Enable spin locks (EXPERIMENTAL) [no]:
 Enable memory protection (EXPERIMENTAL) [no]:
 Enable pthread mutexes (default) [yes]:
 Enable pthread read / write locks (EXPERIMENTAL) [no]:

22-It enables the PHP extension

[root@server1 ~]echo "extension = apc.so"> /etc/php.d/apc.ini

23-And Apache is restarted.

[root@server1 ~]service httpd restart

You can check that you have successfully installed APC via phpinfo ().

Also, do not hesitate to use the PHP APC administration.
Here, we copy in our HTTP directory.

  cp /usr/share/pear/apc.php /var/www/html/apc.php

24- Edit php.ini file

[root@server1 ~]vi /etc/php.ini

find & replace

memory_limit=512(M)
upload_max_filesize=(30M)
display_errors=ON

25-Securing your Sugarcrm
====================================
To ensure that your Sugar installation is secure from unauthorized access, for Apache, it is recommended that you configure the system as described below.

Create file .htaccess in your Sugar installation directory. This file contains the following content:

[root@server1 ~]vi .htaccess

# BEGIN SUGARCRM RESTRICTIONS
RedirectMatch 403 (?i)^.*\.log$
RedirectMatch 403 (?i)/+not_imported_.*\.txt
RedirectMatch 403 (?i)/+(soap|cache|xtemplate|data|examples|include|log4php|metadata|modules)/+.*\.(php|tpl)
RedirectMatch 403 (?i)/+emailmandelivery\.php
RedirectMatch 403 (?i)/+cache/+upload
# END SUGARCRM RESTRICTIONS

To test the validity of these restrictions, access the sugarcrm.log through the browser to ensure that error #403 is displayed. If not, check your Apache configuration to ensure that htaccess is enabled. For more information, check the Apache documentation.

25-Download sugarcrm 6.5.0 http://sourceforge.net/projects/sugarcrm/files/1%20-%20SugarCRM%206.5.0/SugarCommunityEdition-6.5.0/SugarCE-6.5.0.zip/download  & extract to /var/www/html

26-Set permissions on the Sugar files. The following directories, all subdirectories, and files must be writable by your web server user:

cache
custom
modules
config.php
config_override.php
sugarcrm.log


Resource
=========
http://www.howtoforge.com/installing-apache2-with-php5-and-mysql-support-on-centos-6.2-lamp
http://www.tipsandtutorials.net/centos-6-install-apc.html
http://support.sugarcrm.com/02_Documentation/01_Sugar_Editions/05_Sugar_Community_Edition/Sugar_Community_Edition_6.5/Sugar_Community_Edition_Installation_Guide_6.5.0

Catatan popular daripada blog ini

Setting APACHE Tomcat Dengan Configure mod_jk Connector pada RHEL6.4 cara ringkas.

 Asas - Apakah mod_jk?   Penyambung mod_jk ialah modul Apache httpd yang membolehkan httpd untuk berkomunikasi dengan Apache Tomcat  bagi  seluruh  keadaan  protokol AJP. Modul ini digunakan bersama- s ama dengan komponen Penyambung AJP Tomcat ini.  Mengenai Penyambung   Apache Tomcat menggunakan komponen Penyambung untuk membolehkan komunikasi antara contoh nya  Tomcat dan pihak lain, seperti pelayar, pelayan atau contoh lain Tomcat yang merupakan sebahagian daripada rangkaian yang sama. Sebagai contoh, penyambung HTTP mendengar untuk permintaan lebih protokol HTTP/1.1 pada pelbagai port TCP...

Pasang Fedora 21 pada Surface Pro 3

Sila buat recovery untuk pc anda dulu guna USB yang bersaiz > 8 GB. Windows 8 Tak boleh  shrink volume lebih dari 4 partision. Tapi boleh guna cara khas nak    shrink volume. Jika alat Pengurusan Cakera tidak membenarkan berbuat demikian kerana "fail unmovable", anda akan perlu memasang semula Windows - dan menggunakan helah khas.  Gunakan opsyen Pemulihan untuk Pasang semula (tidak memuat semula) Windows.  Jangan meneruskan Ubahsuaian Awal selepas Windows but untuk kali pertama, sebaliknya, secara paksa mematikannya menggunakan butang kuasa, dan hidupkannya semula. Anda mungkin perlu mematikannya dan pada dua atau tiga kali, sehingga but Windows dan dicadangkan anda untuk menggunakan Advanced Startup untuk membaikinya.  Masukkan Command Prompt daripada pilihan Advanced Startup - Troubleshoot - advance options - command prompt - administrator - continue. .  Gunakan DISKPART mengecut partition C dengan saiz yang anda inginkan.  But s...

GlusterFS & cara penggunaan

Apa itu GlusterFS? GlusterFS ialah sistem fail storan yang dilampirkan berskala. Ia aplikasi yang dijumpai di pengkomputeran awan, perkhidmatan media streaming dan penghantaran kandungan rangkaian . GlusterFS telah dibangunkan semula oleh Gluster, Inc. dan kemudian oleh Red Hat, Inc. Hasilnya Red Hat memperoleh Gluster pada tahun 2011. Pada Jun 2012, Red Hat Storage Server diumumkan sebagai penyepaduan komersil antara GlusterFS dengan Red Hat Enterprise Linux. Red Hat membeli  Inktank Storage  pada bulan April 2014, yang merupakan syarikat di sebalik sistem teragih (Ceph), dan menjenamakan semula Red Hat Storage Server berasaskan GlusterFS kepada "Red Hat Gluster Storage". GlusterFS mengagregat pengiraan, penyimpanan, dan sumber I/O ke dalam ruang nama global.Setiap pelayan ditambah storan komoditi sama ada (storan berhubung langsung, JBOD atau menggunakan storan SAN) dianggap sebagai nod. Kapasiti diperkecil dengan menambahkan nod tambahan atau menambahkan storan ...