Author Archives: vicki

About vicki

Welcome to the Sovereign Republic of Vickistan. I am the President here. Lucky me! No taxes or laws yet. Lucky you!

Subversion Stuff

To establish a subversion repository anew: svnadmin create /var/svn/myrepos svn mkdir -m “creating the trunk dir” file:///var/svn/myrepos/repo1 svn import -m “Adding first directory” /var/www/vhosts/mydomain.com/wordpress file:///var/svn/myrepos/repo1 **Note that if you don’t specify a directory to copy, subversion is happy to add … Continue reading →

Posted in Linux | Comments Off on Subversion Stuff

Grepping (and egrepping) with Style

Grep is a powerful tool. It can do many things well. It can also be used in conjunction with other tools. If you are new to grep, it is a supercharged search tool. The basic format of the command is: … Continue reading →

Posted in Linux | Comments Off on Grepping (and egrepping) with Style

zend_mm_heap corrupted messages in apache logs

zend_mm_heap corrupted if php5.2. google for patch if php5.3 increase apc memory size in apc.ini

Posted in Linux | Comments Off on zend_mm_heap corrupted messages in apache logs

Access Control Lists

Add ACL for apache user: First see what ACLs exist already: root@server1 mysite.org]# getfacl /var/www/vhosts/mysite.org/uploads getfacl: Removing leading ‘/’ from absolute path names # file: var/www/vhosts/mysite.org/uploads # owner: user1 # group: user1 user::rwx group::rwx mask::rwx other::r-x default:user::rwx default:group::rwx default:mask::rwx default:other::r-x … Continue reading →

Posted in Linux | Comments Off on Access Control Lists

Tune MySQL

wget http://www.day32.com/MySQL/tuning-primer.sh sh tuning-primer.sh

Posted in Linux | Comments Off on Tune MySQL

Common rewrite rules

The easiest way to redirect one site to another is by adding the following to the Virtualhost: Redirect 301 / http://newsite.com/ Note: When AllowOverride is set to allow the use of .htaccess files, Apache will look in every directory for … Continue reading →

Posted in Linux | Comments Off on Common rewrite rules

Number of processors/number of cores

cat /proc/cpuinfo | grep processor | wc -l Counts the number of processor lines

Posted in Linux | Comments Off on Number of processors/number of cores

compression on your site

Ensure that the browser sends the Accept-encoding: gzip, deflate header Add the following to your .htaccess file: # compress text, html, javascript, css, xml: AddOutputFilterByType DEFLATE text/plain AddOutputFilterByType DEFLATE text/html AddOutputFilterByType DEFLATE text/xml AddOutputFilterByType DEFLATE text/css AddOutputFilterByType DEFLATE text/javascript AddOutputFilterByType … Continue reading →

Posted in Linux | Comments Off on compression on your site

PHP email script to test email

Sometimes you gotta test outgoing email. If you have php installed, it is as easy as adding the following into a file called something like emailtest.php and executing with php emailtest.php. Check the email logs to ensure it went out. … Continue reading →

Posted in Linux | Comments Off on PHP email script to test email

Cool MySQL command list

# to see the full CREATE TABLE statement and show table engine show create table table_name\G #To see full CREATE TABLE statement on all tables in a database export database=”dbname”;for table in `mysql -s –column-name=false -e “SHOW TABLES” $database`;do mysql … Continue reading →

Posted in Linux | Comments Off on Cool MySQL command list