You can change the time zone within a php script. Here is a sample code:
With the php tags enter the following
putenv(”TZ=Europe/Amsterdam”);
You can set the timezone in .htaccess as well. Add the line:
SetEnv TZ America/Indianapolis
List of timezones is here: http://us.php.net/manual/en/timezones.php
hdparm get/set SATA/ATA device parameters
Hdparm is a tool that allows you to set IDE device settings. This includes things such as DMA modes, transfer settings and various other settings that can help improve the speed of your hard disks and CDROMs. These settings are not enabled by default, so you will probably want to enable them.
Getting information about your different drives.
Different drives have different capabilities, so in order to configure them you must know what they are capable of doing. # hdparm -i /dev/hdX should give you the information you need (replace hdX with your drive)
-i Display the identification info that was obtained from the drive at boot time, if available. This is a feature of modern IDE drives, and may not be supported by older devices.
Benchmarking devices
hdparm -tT
hdparm includes a handy benchmark mode, which should allow you to see how much of a speed. When running a benchmark it is recommended that you close all programs that could interfere with the results.
You can use the following command to check what your IDE chipset
To enable DMA on a device type the following:
Now run a benchmark and see how much of an improvement you have received.
Installing OpenVZ
OpenVZ is operating system-level virtualization based on a modified Linux kernel that allows a physical server to run multiple isolated instances known as containers, virtual private servers (VPS), or virtual environments (VE).
Installing OpenVZ on a CentOS 4 or CentOS 5
Download - http://download.openvz.org/openvz.repo
Import the OpenVZ key
rpm –import http://download.openvz.org/RPM-GPG-Key-OpenVZ
Install the OpenVZ kernel
Depending on which kernel arch you want, simply do:
yum install ovzkernel.i386
or
yum install ovzkernel.x86_64
Reference - http://download.openvz.org/doc/OpenVZ-Users-Guide.pdf
1) Examine /etc/grub.conf to ensure the desired kernel is set to be the default,
2) Edit the /etc/sysctl.conf to enable some kernel features that are needed for OpenVZ and
3) Make sure SELINUX is disabled.
Optimizing the EXT3 file system on Linux
There are some things you can do to give ext3 a boost when you just want speed.
Mount Options noatime,nodiratime
noatime
Do not update inode access times on this file system (e.g, for faster access on the news spool to speed up news servers).
nodiratime
Do not update directory inode access times on this filesystem.
This is one of the quickest and easiest performance gains. This mount option tells the system not to update inode access times. This is a good option for web servers, news servers or other uses with high access file systems
Also from the man pages.
commit=nrsec
Sync all data and metadata every nrsec seconds. The default value is 5 seconds. Zero means default.
#
proc /proc proc defaults 0 0
# / was on /dev/sda1 during installation
UUID=164be035-6571-43b4-820e-cef57b74f1dc / ext3 relatime,noatime,nodiratime,errors=remount-ro 0 1
sysreport and sosreport in Red Hat Enterprise Linux
Before Red Hat Enterprise Linux 4.5, we had “sysreport”. The “sosreport” command is a tool that collects information about a Red Hat Enterprise Linux system, such as what kernel is running, what drivers are loaded, and various configuration files for common services. It also does some simple diagnostics against known problematic patterns.
To run “sosreport”, the “sos” package must be installed. The package should be installed by default, bu if the package is not installed, follow the steps below:
Red Hat Enterprise Linux 4
If the system is registered with Red Hat Network (RHN), “sos” can be installed using the up2date command:
Red Hat Enterprise Linux 5 and later
If the system is registered with RHN, use the yum command:
“sosreport” will generate a compressed a bz2 file under /tmp.