How To Ensure WordPress Auto Updates Work on Self-Hosted Linux Machine

Share on LinkedIn

I’ve been meaning to get this posted for some time now. It could prove useful to someone hosting their own WordPress site on a self-hosted Linux machine.

When you are logged into the admin console of your WordPress site, you will get notifications of needed updates. You may also want to upload new themes from time-to-time.

When you go to perform the Automatic Update, it will work without issue so as long as your permissions are setup properly on your apache web server.

If you find yourself running into this issue, ssh into the backend of your apache web server and follow these simple steps:

1. Set ownership of /var/www/html and make changes recursive

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

2. Ensure the apache user/group can write to /var/www/html and make changes recursive

chmod -R 0775 /var/www/html

3. Restart apache

service httpd restart

Once you made those changes to the backend, try to run the update(s) again from the admin portal. You should be all good to go from there.

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
**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
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


Write, Quit, Now


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


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

vi /etc/hosts sugarcrm sugarcrm

Write, Quit, Now


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


12. Reboot the server


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

cd /var/www

When complete, press Enter

Show contents of directory


You should see an html directory and your download which will lead with “” followed by a bunch of other characters

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


Show contents of directory


You should see an html directory and your new, abbreviated file

14. Extract zip file to your www directory


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

Output Example


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


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

Should now be logged into myslq


20. That’s it. Go to site from web browser

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!



Nagios Logo

Install Nagios 4.0.4 on CentOS 6.5

Assumptions: This build document assumes you are on a local domain with a local DNS server. You need to identify the DNS server an add this server as a host if you’d like to browse to it in your address bar. For instance, we just go to instead of the ip address.

Virtual Machine Resources
4Core, 8GB
Local dns nagios.<yourdomain>.com
Minimal Install CentOS 6.5
Hostname: nagios
Local Domain: <yourdomain>.com
IP Address: <nagiosip>
Local DNS IP: <localdnsip>

Install nano
yum install nano

Add Hosts Entries
nano /etc/hosts

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

Add the following:
<nagiosip> nagios

Add Nameserver
nano /etc/resolv.conf

Change default “nameserver ” to “nameserver <localdnsip>”
Press “Ctl+X” to exit
Select “Y” to save changes
Press “Enter” to get back to CL

Disable other services and firewall
service iptables stop
chkconfig iptables off

change selinux=enforcing to selinux=disabled
nano /etc/selinux/config
Press “Ctl+X” to exit
Select “Y” to save changes
Press “Enter” to get back to CL

Install Prerequisites
yum install -y wget httpd php gcc glibc glibc-common gd gd-devel make net-snmp

Download Nagios Core and Nagios Plugins Tarballs
For all systems, run the following commands in your terminal:
cd /tmp

Adding the Nagios User and Group
Next add the appropriate user and group for the Nagios process to run:
useradd nagios
groupadd nagcmd
usermod -a -G nagcmd nagios

Install Nagios Core
tar zxvf nagios-4.0.4.tar.gz
tar zxvf nagios-plugins-2.0.tar.gz
Change to the new Nagios directory and install the packages:
cd nagios-4.0.4
./configure –with-command-group=nagcmd

make all
make install
make install-init
make install-config
make install-commandmode
make install-webconf
cp -R contrib/eventhandlers/ /usr/local/nagios/libexec/
chown -R nagios:nagios /usr/local/nagios/libexec/eventhandlers
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
/etc/init.d/nagios start/etc/init.d/httpd start
Create a Default User for Web Access. (may have to do this last)
Add a default user for Web Interface Access:
htpasswd –c /usr/local/nagios/etc/htpasswd.users nagiosadmin

Monitoring Infrastructure Switch
htpasswd /usr/local/nagios/etc/htpasswd.users

For perl modules, need to install perl
yum install perl-LDAP

less /var/log/messages | grep perl
Aug 19 15:25:39 nagios yum[2062]: Installed: perl-DBI-1.609-4.el6.x86_64
Aug 19 15:25:39 nagios yum[2062]: Installed: perl-DBD-MySQL-4.013-3.el6.x86_64
Aug 19 15:25:39 nagios yum[2062]: Installed: mysql-5.1.73-3.el6_5.x86_64
Aug 19 15:25:41 nagios yum[2062]: Installed: mysql-server-5.1.73-3.el6_5.x86_64
Aug 19 15:46:41 nagios yum[21836]: Installed: perl-XML-NamespaceSupport-1.10-3.el6.noarch
Aug 19 15:46:42 nagios yum[21836]: Installed: perl-XML-SAX-0.96-7.el6.noarch
Aug 19 15:46:42 nagios yum[21836]: Installed: 1:perl-XML-LibXML-1.70-5.el6.x86_64
Aug 19 15:46:42 nagios yum[21836]: Installed: perl-XML-Filter-BufferText-1.01-8.el6.noarch
Aug 19 15:46:42 nagios yum[21836]: Installed: perl-Digest-SHA1-2.12-2.el6.x86_64
Aug 19 15:46:42 nagios yum[21836]: Installed: perl-Digest-HMAC-1.01-22.el6.noarch
Aug 19 15:46:43 nagios yum[21836]: Installed: perl-Convert-ASN1-0.22-1.el6.noarch
Aug 19 15:46:43 nagios yum[21836]: Installed: perl-Net-SSLeay-1.35-9.el6.x86_64
Aug 19 15:46:43 nagios yum[21836]: Installed: perl-GSSAPI-0.26-6.el6.x86_64
Aug 19 15:46:43 nagios yum[21836]: Installed: perl-Authen-SASL-2.13-2.el6.noarch
Aug 19 15:46:43 nagios yum[21836]: Installed: perl-Net-LibIDN-0.12-3.el6.x86_64
Aug 19 15:46:43 nagios yum[21836]: Installed: perl-IO-Socket-SSL-1.31-2.el6.noarch
Aug 19 15:46:43 nagios yum[21836]: Installed: perl-Text-Iconv-1.7-6.el6.x86_64
Aug 19 15:46:43 nagios yum[21836]: Installed: perl-XML-SAX-Writer-0.50-8.el6.noarch
Aug 19 15:46:43 nagios yum[21836]: Installed: 1:perl-LDAP-0.40-1.el6.noarch

Nagios Config File (tells nagios what config files to look at)
cd /usr/local/nagios/etc/nagios.cfg

Configuration files
cd /usr/local/nagios/etc/objects

If making changes to configuration files, restart service when finished
service nagios restart

We monitor multiple locations. Each location has its own config file in objects. Each location config file specifies its own host group, hosts, and services.