knowhow

subversion on ubuntu

To install subversion, open a terminal and run the following command:

sudo apt-get install subversion libapache2-svn

We're going to create the subversion repository in /svn, although you should choose a location that has a good amount of space.

sudo svnadmin create /svn

Next we'll need to edit the configuration file for the subversion webdav module. You can use a different editor if you'd like.

sudo gedit /etc/apache2/mods-enabled/dav_svn.conf

The Location element in the configuration file dictates the root directory where subversion will be acessible from, for instance: http://www.server.com/svn

OCI8 PHP5 Ubuntu

OCI8 is an extension for providing APIs to Oracle database management system. However, installing OCI8 is not just easy like apt-get since it requires SDK offered by Oracle and its distribution license prohibits the inclusion to linux distribution. That means we have to download and compile it by ourselves. Fortunately, it is a little bit easy for Ubuntu.

Install PEAR and PECL

sudo apt-get install php-pear
Download Oracle Instant Client. You need at least Basic and SDK.

Extract the archives.

sudo mkdir -p /opt/oracle
cd /opt/oracle
sudo unzip instantclient-basic-linux-x86-64-10.2.0.3-20070103.zip

Install NFS Server in Ubuntu

Install NFS Server in Ubuntu

sudo apt-get install nfs-kernel-server nfs-common portmap

When configuring portmap do =not= bind loopback. If you do you can either edit /etc/default/portmap using the following

sudo vi /etc/default/portmap

or use the following command

sudo dpkg-reconfigure portmap

Restart Portmap using the following command

sudo /etc/init.d/portmap restart

NFS Server Configuration

NFS exports from a server are controlled by the file /etc/exports. Each line begins with the absolute path of a directory to be exported, followed by a space-seperated list of allowed clients.

Calculate mySQL memory

MySQL memory = key_buffer + max_connections * (join_buffer + record_buffer + sort_buffer + thread_stack + tmp_table_size)

OPTIMISING MYSQL

To obtain the stat of your mysql server since it has been loaded, run mysqladmin processlist extended-status as mentionned above.

1 - The two most important variables : Table_cache and Key_buffer_size

* If Opened_tables is big, then your table_cache variable is probably
too small.
table_cache 64
Open_tables 64
Opened_tables 544468

This is the first serious problem. "The table_cache is the number of open
tables for all threads. MySQL, being multi-threaded, may be running many

install new harddisk on ubuntu box

yesterday i got the problem after install new harddisk on ubuntu box and how to make filesystem and mount point on exinting system

my friend introduce me for step to fdisk and make.ext3 on new device

1. to fdisk the partiion of new device use follow this step

fdisk /dev/sdb
n
p
1
enter
enter
w

2. to make ext3 filesystem
mkfs.ext3 /dev/sdb1

and after step 2 new device is ready to mount

ps. don't forget edit /etc/fstab to add mount point after restart machine

Turn on hyperthreading on FreeBSD

to turn on this option follow this

www03# sysctl machdep.hyperthreading_allowed=1
machdep.hyperthreading_allowed: 0 -> 1

use top command and see multiple cpu was use

siege with webserver

testing your webserver with siege

First, you’ll need to untar the package:
$ tar xvzf siege-latest.tar.gz

Then you’ll need to configure it; the default configuration is a good start:
$ ./configure

Configuration help is available with the -help suffix. The only one that I've personally added on is SSL support through the -with-ssl=/usr/local/ssl suffix.

Next, it’s time to compile and install:
$ make
$ make install

Laying Siege
Siege has a lot of options for how to "lay siege" against a Web server. The simplest and easiest way to get a feel for the program is to do a test against a single URL. The single URL test is also a good indication of how a particular page will hold up against a slashdot effect or other similar massive traffic driver.

plesk and semaphores for FreeBSD

Plesk requires addtional semaphores for it to run.

You can only do this at kernel boot time. I use the following and it seems to work:

You need to edit /boot/loader.conf

# semaphores for psa
kern.ipc.semmap="768"
kern.ipc.semmni="256"
kern.ipc.semmns="393216"
kern.ipc.semmnu="768"
kern.ipc.semmsl="1536"

Psa backup all domain

Today i looking for tool or command line to make backup all domain customer in my hosting box on anotherway except vmware backup and i found this tool from psa forum

Take the backup of all the domains using the command:

/usr/local/psa/bin/psadump -F -f - --nostop --tar | split -b 1000m - dump

It is easy to restore this backup than a raw file backup.
Later we can use the script psarestore to restore the backup.

You can also try backing up the directories /usr/local/psa, /etc and /var if you prefer raw file backup

Su for normal user FreeBSD

Please note that if you get an error su: Sorry for normal user account. Then following workaround needed to get rid of this problem:
1) For security, reason FreeBSD only allows su to user if user is member of wheel group. Wheel group is a special group for administration purpose. Add your normal user to this group using pw command using following:
# pw user mod -G wheel

2) So to add user test to group wheel run command as follows:
# pw user mod test -G wheel
# groups test
test wheel

3) Now su will work for test user.

You can disable this behavior complete for all users (not recommended until and unless you trust ALL your users):

Syndicate content