Monday, September 19, 2011

Add Google Analytics to Typo3 without extension.



You can simple embed Google Analytics to your Typo3 site.
Just add this code in the template typoscript setup:

Friday, September 16, 2011

Rackspace Kaltura Apache conf

Where the apache settings for kaltura are located, when you use a rackspace prebuilt kaltura image: /opt/kaltura/app/configurations/apache/my_kaltura.conf

Sunday, September 4, 2011

yum update - skip broken

Skip broken:

Skip broken is a feature in yum to skip packages from the transaction there have dependecy problems or introduce problems to the installed packages

Usage:

add the '--skip-broken' option to the yum command line to activate the skip broken feature.

yum update --skip-broken

Friday, September 2, 2011

Kaltura rackspace Content internal error occured - Start/Restart Sphinx

Sometimes sphinx is down.
to restart:


[mouse@wwww etc]# cd /opt/kaltura/app/plugins/sphinx_search/scripts
[mouse@wwww scripts]# dir
cache populateFromLog.php watch.daemon.sh watch.stop.sh
configs searchd.sh watch.populate.sh
[mouse@wwww scripts]# ./watch.populate.sh
[mouse@wwww scripts]# chmod +x populateFromLog.php
[mouse@wwww scripts]# ./searchd.sh
usage: ./searchd.sh {start|stop|stopwait|status}
[mouse@www scripts]# ./searchd.sh start

Starting:Sphinx 1.10-beta (r2420)
Copyright (c) 2001-2010, Andrew Aksyonoff
Copyright (c) 2008-2010, Sphinx Technologies Inc (http://sphinxsearch.com)

Tuesday, August 30, 2011

Update ubuntu via command line

sudo apt-get update
sudo apt-get dist-upgrade

Which Linux Version, which Kernel version i am running?

To find out what version of Linux (distro) you are running, enter the following command at the shell prompt:
$ cat /etc/*-release
Sample output on RHEL 5:

Red Hat Enterprise Linux Server release 5 (Tikanga)

Sample outputs on Ubuntu v7.10:

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=7.10
DISTRIB_CODENAME=gutsy
DISTRIB_DESCRIPTION="Ubuntu 7.10"

lsb_release Command

The lsb_release command displays certain LSB (Linux Standard Base) and distribution-specific information. Type the following command:
$ lsb_release -a

Sample outputs:

No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 6.0.1 (squeeze)
Release: 6.0.1
Codename: squeeze

How Do I Find Out My Kernel Version?

Type the following command:
$ uname -mrs

Sample outputs:

Linux 2.6.32-5-amd64 x86_64

Tuesday, August 16, 2011

Installing Apache, MySQL, PHP in CentOS 5.5 on Rackspace Cloud

Most of cloud users prefer Rackspace Cloud for its better service and cost effectiveness…
All commands are performed as root to install Apache, MySQL, PHP in CentOS 5.5 Server on Rackspace Cloud.

Install Apache

# sudo yum install httpd mod_ssl

Configure ServerName
# sudo /etc/init.d/httpd start

Remove Error
Starting httpd: httpd: Could not reliably determine the server’s fully qualified domain name, using xx.xx.xxx.xx for ServerName

Modify
# sudo vi /etc/httpd/conf/httpd.conf

Add server name after #ServerName www.example.com:80

ServerName svnlabs

# sudo /etc/init.d/httpd reload

By default port 80 is blocked on server, enable in iptables…
# iptables -I RH-Firewall-1-INPUT -p tcp –dport 80 -j ACCEPT

Chkconfig to start automatically if the Cloud Server is rebooted.

# sudo /sbin/chkconfig httpd on

Install MySQL

# yum install mysql-server
# /etc/init.d/mysqld start

Install PHP

Edit Repo file
# sudo vi /etc/yum.repos.d/CentOS-Base.repo

add at last

[c5-testing]
name=CentOS-5 Testing
baseurl=http://dev.centos.org/centos/$releasever/testing/$basearch/
enabled=1
gpgcheck=1
gpgkey=http://dev.centos.org/centos/RPM-GPG-KEY-CentOS-testing

now run
# yum install php php-common php-gd php-mcrypt php-pear php-pecl-memcache php-mhash php-mysql php-xml php-mbstring

Install PhpMyAdmin

# cd /var/www/html
# wget http://downloads.sourceforge.net/project/phpmyadmin/phpMyAdmin/3.3.6/phpMyAdmin-3.3.6-english.tar.gz?r=http%3A%2F%2Fwww.phpmyadmin.net%2Fhome_page%2Fdownloads.php&ts=1283745912&use_mirror=voxel

# tar zxvf phpMyAdmin-3.3.6-english.tar.gz
# mv phpMyAdmin-3.3.6-english phpmyadmin
# cd phpmyadmin
# cp config.sample.inc.php config.inc.php

Edit config.inc.php for random string $cfg['blowfish_secret'] = ‘RandomStringHere’;

Restart server
# service httpd restart

use the following in the file config.inc.php of phpMyAdmin to restrict access to from remote machines:

$cfg['Servers'][$i]['AllowDeny']['order'] = 'deny,allow';
$cfg['Servers'][$i]['AllowDeny']['rules'][] = 'allow % from 127.0.0.1';
$cfg['Servers'][$i]['AllowDeny']['rules'][] = 'deny % from all';

This means that only users logged into my laptop are allowed to see the phpMyAdmin pages in their browser. The percent sign (%) stands for "all users".