chmod 775 is not the answer!
| February 4, 2012 | Posted by Linux under Back to Basics, Linux Administration |
Securing your website’s files is often overlooked by many running interactive sites. One of the most common answers is chmod 775. chmod 775 makes WordPress and other common systems happy, but it is not the correct solution. Newbies get chided and derided on message boards for not understanding Linux file systems and permissions. The following…
Rename files based upon cotent
| January 23, 2012 | Linux Administration |
I was faced with a question today, how do you take a bunch of files with no extension and give them the proper extension. I have never faced this problem and did not have an immediately correct answer. thinking it through, I derived the following: fgrep -l ‘<?php’ /home/fakeuser/* | cut -f4 -d/ | xargs…
Linux Heartbeat
| January 23, 2012 | Linux Administration |
The same configurations must be on all nodes in the cluster. Install pssh to make this easy. Install heartbeat. yum install heartbeat Copy needed files: cp /usr/share/doc/heartbeat-2.1.4/authkeys /etc/ha.d/ cp /usr/share/doc/heartbeat-2.1.4/ha.cf /etc/ha.d/ cp /usr/share/doc/heartbeat-2.1.4/haresources /etc/ha.d/ Edit authkeys: vi /etc/ha.d/authkeys auth 2 2 sha1 test-ha Secure authkeys: chmod 600 /etc/ha.d/authkeys Edit HA confiure file: vi /etc/ha.d/ha.cf Add/change:…
List of Linux Commands.
| January 21, 2012 | Back to Basics, Linux Administration |
A general list of Linux commands. User accounts adduser is alias to useradd – add a new user account useradd [options] LOGIN useradd -m -g wheel -s /bin/bash newadminuser passwd – modify user passwords passwd [OPTION...] LOGIN passwd newadminuser groupadd – Add a new group groupadd [options] group usermod [options] LOGIN usermod -G admins newadminuser…
Linux Run Levels
| January 18, 2012 | Back to Basics, Linux Administration |
The SysV init runlevel system is a standard system for controlling which services and programs the init programs starts and stops at each run level. There are 7 init runlevels (RH based distros). init 0 Halt the system. Same as shutdown -h now init 1 Single user mode, read only file system. Always run fsck…
Fix WordPress Social Login PHP Error
| January 9, 2012 | Posted by Linux under WebServer Administration |
Comments off
|
Installing the WordPress Social Login will throw an error if short_open_tag are not enabled in your php.ini when you access Settings\ WP Social Login. Parse error: syntax error, unexpected $end in /path/to/wordpress/wp-content/plugins/wordpress-social-login/includes/plugin.settings/plugin.settings.1.php on line 167 Other areas of this plugin will show a similiar error. On line 90 of plugin.settings.1.php change: <? To <?php On…
Stop WordPress FTP prompt
| January 9, 2012 | Posted by Linux under WebServer Administration |
Comments off
|
WordPress seems to “randomly” decide that it wants to use ftp to do updates. All resources I looked into claimed that if the wp-content directory was writeable by the webserver process, then WordPress would not prompt for the ftp login. Previously the solution was to install the pecl SSH2 extension sftp account for the wordpress…
Enable APC on CentOS 5
| January 5, 2012 | Posted by Linux under WebServer Administration |
Comments off
|
Alternative PHP Cache or APC is an easy quick way to speed up almost any PHP based website. Setup only takes a few seconds and it comes complete with a monitoring and management GUI webpage. The software as an opcode cache, basically it keeps a copy of your compiled php scripts in memory eliminating the…
Apache mod_deflate
| December 18, 2011 | Posted by Linux under WebServer Administration |
Comments off
|
The Apache HTTP server has the ability to compress content resulting in a huge savings in bandwidth and a dramatic increases in site speed. Content such as html, style sheets and javascript compress nicely and can give up to 80% savings in bandwidth. For example enabling mod_deflate reduces the size of jquery-ui-.custom.min.js from 205k to…

