redhat

How To Install GUI on Red Hat or CentOS

So you installed Red Hat or CentOS 7 using minimal install and all has been well. Now, you find that you’d like to install the GUI and don’t want to re-install the OS from scratch. No problem.

Start by installing yum-utils

yum install yum-utils

To list software groups, enter

yum grouplist

Output will be similar to this

Loaded plugins: fastestmirror
There is no installed groups file.
Maybe run: yum groups mark convert (see man yum)
Loading mirror speeds from cached hostfile
 * base: mirror.cisp.com
 * extras: mirror.fdcservers.net
 * updates: www.gtlib.gatech.edu
Available environment groups:
   Minimal Install
   Compute Node
   Infrastructure Server
   File and Print Server
   Basic Web Server
   Virtualization Host
   Server with GUI
   GNOME Desktop
   KDE Plasma Workspaces
   Development and Creative Workstation
Available Groups:
   Compatibility Libraries
   Console Internet Tools
   Development Tools
   Graphical Administration Tools
   Legacy UNIX Compatibility
   Scientific Support
   Security Tools
   Smart Card Support
   System Administration Tools
   System Management
Done

To install “Server with GUI” group, enter:

yum groupinstall "Server with GUI"

Once the installation is finished, you need to change system’s runlevel to runlevel 5. Changing runlevel on RHEL 7 and CentOS 7 is done by use of systemctl command.

systemctl enable graphical.target --force

Depending on your previous installations you may need to accept Redhat License after you reboot your system.

GUI-install-license-infoGUI-install-license-info-accept

How To Install SugarCRM

Share on LinkedIn

Performing a SugarCRM installation can be difficult if you’ve never done it. There are many articles on the web with instructions but I’ve found all of them, to include the instructions on SugarCRM’s web site, lacking details. And those were pretty much the best set of instructions that existed…until now! I had a colleague, not as familiar with Linux, go through these instructions. If it’s any consolation, he was able to get his SugarCRM server running! This is SugarCRM Community Edition v6.5.20 installed on CentOS 7. These instructions will work with Red Hat 7 as well.

You pick your machine, VM or physical machine. These instructions work on CentOS 7 no problem. They should work on Red Hat 7 and Fedora 21 as well. Don’t skip steps and good luck!

1. Set Time Zone for Server. In this example, CST.

timedatectl set-timezone America/Chicago

2. Install LAMP components and base tools/utilities
https://www.rosehosting.com/blog/install-lamp-linux-apache-mariadb-and-php-with-phpmyadmin-on-a-fedora-20-vps/
**There are additional component below that are not described in the post**

yum install php httpd mariadb mariadb-server php-mysqlnd php-mssql php-opcache php-mbstring unzip nano wget

3. Install EPEL (required to install php-imap for mail capabilities)

rpm -ivh http://elrepo.org/linux/elrepo/el7/SRPMS/elrepo-release-7.0-2.el7.elrepo.src.rpm
yum install epel-release

Install php-imap

yum install php-imap

4. Update system and all packages (not required but habit)

yum update

5. Change hostname

hostnamectl set-hostname sugarcrm

6. Set SELINUX to permissive

vi /etc/selinux/config

Find SELINUX=enforcing and change to

SELINUX=permissive

Write, Quit, Now

:wq!

Make sure selinux is turned off for this session (same as permissive)

setenforce 0

7. Enable Firewalld and Allow HTTP on port 80 for public zone

firewall-cmd --zone=public --add-service=http --permanent
service firewalld restart
service firewalld status

8. Enable Service, Start Services, Set To Start Services Automatically on Boot

systemctl enable mariadb.service
systemctl start mariadb.service
systemctl restart httpd.service
systemctl stop firewalld
chkconfig firewalld on
chkconfig httpd on

9. Set AllowOverride to All for the Sugar installation directory
Before you install Sugar, set AllowOverride to All for the Sugar installation directory in the httpd.conf file. After you install Sugar, an .htaccess file is created in your Sugar installation directory.

There are at least 3 instances of AllowOverride. The first is for the root directory (/). The second is for /var/www. The third and the setting you need to change is /var/www/html.

vi /etc/httpd/conf/httpd.conf

Search for AllowOverride (for /var/www/html)

AllowOverride None

Change from None to All
Write, Quit, Now

:wq!

10. Edit Hosts File (Not necessarily required, just habit. Use the ip of your machine.)

vi /etc/hosts
xxx.xxx.xxx.xxx sugarcrm.yourdomain.com sugarcrm
xxx.xxx.xxx.xxx sugarcrm

Write, Quit, Now

:wq!

11. Edit php.ini file
Navigate to the php.ini file located in your Sugar root directory and set the variables_order parameter to EGPCS.

vi /etc/php.ini

Search for upload_max_filesize and change from 2M to 20M

upload_max_filesize =

Search for variables_order and change from GPCS to EGPCS

variables_order =

Search for date.timezone

; date.timezone =

Uncomment and set to America/Chicago as such

date.timezone = America/Chicago

Write, Quit, Now

:wq!

12. Reboot the server

reboot

13. Download Installation Package and Copy To Linux Machine
Navigate to WWW directory

cd /var/www
wget http://downloads.sourceforge.net/project/sugarcrm/1%20-%20SugarCRM%206.5.X/SugarCommunityEdition-6.5.X/SugarCE-6.5.20.zip?r=http%3A%2F%2Fwww.sugarcrm.com%2Fthank-you-downloading-sugar-community-edition&ts=1426019617&use_mirror=superb-dca2

When complete, press Enter

Show contents of directory

ls

You should see an html directory and your download which will lead with “SugarCE-Full-6.5.20.zip” followed by a bunch of other characters

Rename that file to something more manageable (highlight the file to select the exact name)

mv SugarCE-6.5.20.zip?r=http%3A%2F%2Fwww SugarCE-Full-6.5.20.zip

Show contents of directory

ls

You should see an html directory and your new, abbreviated SugarCE-Full-6.5.20.zip file

14. Extract zip file to your www directory

unzip SugarCE-Full-6.5.20.zip
ls

You should see an html directory, your new, abbreviated SugarCE-Full-6.5.20.zip file, and a new directory named SugarCE-Full-6.5.20

Output Example

html
SugarCE-Full-6.5.20.zip
SugarCE-Full-6.5.20

15. Move contents of SugarCE-Full-6.5.20 directory to html directory

cd SugarCE-Full-6.5.20
mv * /var/www/html
cd ..
rm -rf SugarCE-Full-6.5.20

16. Create empty .htaccess file
Installation is supposed to do this automatically but I ran into problems so I created a blank one that can be written to.

cd /var/www/html
vi .htaccess
#

Write, Quit, Now

:wq!

17. Change Owner and make changes recursive

chown apache:apache -R /var/www/html

18. Change Permissions to files and sub-directories

chmod -R 0775 /var/www/html

19. Configure mysql for first use
Setup Root user for first use

mysqladmin -u root password NEWPW

Test root user login

mysql -u root -p

Enter NEWPW
Should now be logged into myslq

exit

20. That’s it. Go to site from web browser
http://<ipaddress_of_server>

You SHOULD be able to reach the site and SHOULD be able to go through the entire install process from here! If not, we missed something somewhere!

 

References:

How To Install Zimbra 8.6 on Linux CentOS 7.0

Share on LinkedIn

This post will walk you through the steps of installing Zimbra 8.6 on CentOS 7.0 and the instructions should work the same for RHEL 7.

There were some CentOS services that were deprecated in 7.0. Two particular that I was comfortable with. Iptables and Ifconfig.

Instructions for installing the iptables feature on CentOS 7.0 can be found here.
Instructions for installing the ifconfig feature on CentOS 7.0 can be found here.

 

Configure DNS Entries on your local DNS server
Setup DNS A Record
Ensure you have a Reverse lookup zone
Setup MX Record

Configure Host Settings
Login as root user
su root

Install pre-requisites
yum install wget make nc sudo sysstat libtool-ltdl glibc perl-core ntp unzip libaio

Set hostname
hostname mail.yourdomain.com

Edit hostname file
nano /etc/hostname
mail.yourdomain.com

Add Hosts Entries
nano /etc/hosts

By default, this is what’s present:
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

Comment out (required for disabling ipv6)
#::1               localhost localhost.localdomain localhost6 localhost6.localdomain6

Add the following:
<server IP>   mail.yourdomain.com MAIL
<local DNS IP> mail.yourdomain.com

Press “Ctl+X” to exit
Select “Y” to save changes
Press “Enter” to get back to CL

 

Disable other services and firewall
service postfix stop
chkconfig postfix off
service ip6tables stop
chkconfig ip6tables off

 

Disable SELINUX
Enter this at command line:
setenforce 0

Update selinux config file
nano /etc/selinux/config
selinux=permissive

Press “Ctl+X” to exit
Select “Y” to save changes
Press “Enter” to get back to CL

 

Completely disable the ipv6 module
To completely disable IPv6 in your system, all you have to do is save the following line in a file inside/etc/modprobe.d/.
cd /etc/modprobe.d/
nano disable-ipv6

Add this to the new file:
ipv6 /bin/true

Press “Ctl+X” to exit
Select “Y” to save changes
Press “Enter” to get back to CL

 

Configure iptables to allow email server traffic
nano /etc/sysconfig/iptables

Add the following

-A INPUT -m state –state NEW -m tcp -p tcp –dport 25 -j ACCEPT
-A INPUT -m state –state NEW -m tcp -p tcp –dport 80 -j ACCEPT
-A INPUT -m state –state NEW -m tcp -p tcp –dport 110 -j ACCEPT
-A INPUT -m state –state NEW -m tcp -p tcp –dport 143 -j ACCEPT
-A INPUT -m state –state NEW -m tcp -p tcp –dport 443 -j ACCEPT
-A INPUT -m state –state NEW -m tcp -p tcp –dport 389 -j ACCEPT
-A INPUT -m state –state NEW -m tcp -p tcp –dport 465 -j ACCEPT
-A INPUT -m state –state NEW -m tcp -p tcp –dport 993 -j ACCEPT
-A INPUT -m state –state NEW -m tcp -p tcp –dport 995 -j ACCEPT
-A INPUT -m state –state NEW -m tcp -p tcp –dport 7071 -j ACCEPT
-A INPUT -m state –state NEW -m tcp -p tcp –dport 7025 -j ACCEPT

Press “Ctl+X” to exit
Select “Y” to save changes
Press “Enter” to get back to CL

 

Download Zimbra Installation
Latest Version 8.6.0 GA Release
http://www.zimbra.com/downloads/zimbra-collaboration-open-source

 

Move Zimbra Download File To New VM
I downloaded the package to my local Windows workstation. From a Windows machine, an additional tool is required.  There are a few options but I downloaded and used WinSCP v 5.5.2. It works.

Copy downloaded Zimbra .tgz file (in this case zcs-8.6.0_GA_1153.RHEL7_64.20141215151110.tgz) from local workstation to /tmp/ directory on new VM. Simple click, drag and drop copies the file.

 

Decompress and Install Zimbra
From the CL, decompress the file by running the following command:
tar xzf zcs-8.6.0_GA_1153.RHEL7_64.20141215151110.tgz

 

Navigate to the newly created/renamed directory:
cd zcs-8.6.0_GA_1153.RHEL7_64.20141215151110

su root
./install.sh

To uninstall (which you will need to do if you run into issues with the installation)
./install.sh -u

 

Change admin password to a more complex password  (this is the admin console login)
“r” to return to previous screen
“a” to apply the changes
Yes to save config to file
Enter to save to default config file
Yes to modify system

Save config in file: [/opt/zimbra/config.23168]
Moving /tmp/zmsetup01072015-114839.log to /opt/zimbra/log

When complete, change user to zimbra
su – zimbra

Check status of Zimbra
zmcontrol status

 

Verify Mail Server is Operational
Open a browser and navigate to https://mail.yourdomain.com (webmail console)

Login using admin and password

 

Open a browser and navigate to https://mail.yourdomain.com:7071 (admin console)
Login using admin and password

 

Once logged into your admin panel, continue configuration
Configure->Global Settings->MTA

Add hostname of your server (in this case, mail)

Added New Domain yourdomain.com

Setup admin@yourdomain.com with Global Admin rights

Deleted domain created at setup mail.yourdomain.com

Create user accounts

Create distribution lists

Create aliases

 

Production

To put this server into production, you will need to:
1. Contact your ISP and request a PTR record or reverse DNS.
2. Acquire a certificate from a trusted source.
3. Setup an MX record with your domain registrar

 

Customizations
Rebranding is limited with the OSS license. Ensure your read and understand the licensing agreement.

Favicon Locations
/opt/zimbra/jetty-distribution-9.1.5.v20140505/webapps/zimbraAdmin/img/logo/favicon.ico
/opt/zimbra/jetty-distribution-9.1.5.v20140505/webapps/zimbra/img/logo/favicon.ico

 

Changing the Page Title

As zimbra user (su – zimbra):
vi /opt/zimbra/jetty/webapps/zimbra/WEB-INF/classes/messages/ZmMsg.properties
[change value for zimbraTitle = <new value>]
vi /opt/zimbra/jetty/webapps/zimbra/WEB-INF/classes/messages/ZhMsg.properties
[change value for zimbraTitle = <new value>]

The first is for the advanced client and the second is for the basic client.
You will need to restart jetty and clear your browser cache/restart browser to see change take effect

As zimbra user,
zmmailboxdctl restart

 

You will most likely run into some issues depending on your environment so good luck!