LAMP How To – Open Source At Work

Only Passion Matters

Entries for March, 2010

SVN over HTTP

Objective
I want to be able to browse the svn dir from a website like http://zeus.dev/svn.php and at the same time, be able to checkout from the repository via http://zeus.dev/svn/projectname
How

First of all, install mod_dav_svn
Then in the apache config, I am using vhost for example
<VirtualHost *:80>
DocumentRoot /home/data/zeus.dev/apps/
ServerName zeus.dev
# this is for [...]

Quick tips for setting up Eclipse and Monkey

eclipse-pdtis a php integrated eclipse IDE – good for rapid web development.
download eclipse-pdt from above.
setup subclipse (for svn) if you intend to use svn within eclipse. In eclipse->help->software updates->available software->add site, enter URL: http://subclipse.tigris.org/update_1.6.x
Another good software to install is beyond cvs. In eclipse->help->software updates->available software->add site, enter URL: http://beyondcvs.sourceforge.net/update/0.8.x/

 

install subeclipse and javaHL adapter.
setup eclipse monkey [...]

Quick SVN Tutorial

Create New Repo
svnadmin create /home/data/svn/[dir-name]
chown apache:developer -R /home/data/svn/[dir-name]
chown 2770 /home/data/svn/[dir-name]

Import New Site

ssh into server
to import new site to the trunk,

svn import [your-site] file:///home/data/svn/[your-site-name] -m “[import comments]”

View Available Sites In Trunk
svn ls file:///home/svn/trunk/

Checking Out a Site

Create a directory to checkout and use ’svn co’

cd ~
mkdir [my-site]
svn co file:///home/svn/trunk/[site-name] [my-site]

Updating a [...]

Implementing SSL Certificates in Apache

Creating a Private Key
To create a private key without triple des encryption, use the following command:
openssl genrsa -out ssl.key 1024

Creating a Certificate Signing Request
To obtain a certificate signed by a certificate authority, you will need to create a Certificate Signing Request (CSR). The purpose is to send the certificate authority enough information to create the [...]

Quick Mysql Tips

Logging slow queries
To enable the slow query log, start mysqld with the –log-slow-queries[=file_name] option. Use the mysqldumpslow command to summarize the queries that appear in the log. For example:
mysqldumpslow /path/to/your/mysql-slow-queries.log -t 10

shows you top 10 performance killers.
Lost Password

shutdown mysql, then

mysqld –skip-grant-tables –u root
mysql -u root
mysql> use mysql;
mysql> UPDATE [...]