The following examples illustrate typical uses of the command mount for attaching the file directory of a device or partition to the file directory tree of the Linux system.
mount /dev/fd0 /mnt/floppy
This command will connect the device "/dev/fd0" (usually the floopy drive) to the directory "/mnt/floppy" so that you can access the files and directories (folders) on the floppy disk in the floppy drive under the "/mnt/floppy" directory. The directory "/mnt/floppy" is also called the "mount point", which must already exist when this command is executed.
mount /dev/cdrom /mnt/cdrom
This command will connect the device "/dev/cdrom" (usually the CD ROM drive) to the directory "/mnt/cdrom" so that you can access the files and directories on the CD ROM disk in the CD ROM drive under the "/mnt/cdrom" directory, which must already exist when this command is executed.
umount /mnt/floppy
This command unmounts the floppy drive. After this command is executed the files and directories on the floppy will no longer be accessible from the directory tree of the Linux system.
umount /dev/fd0
This has the same effect as the previous command.
umount /mnt/cdrom
This command unmounts the CD ROM drive. After this command is executed the files and directories on the CD ROM will no longer be accessible from the directory tree of the Linux system.
umount /dev/cdrom
This has the same effect as the previous command.
The default mount points for the various devices are defined the file /etc/fstab. Some Linux distributions use a program called automount, which automatically mounts all the partitions and devices listed in /etc/fstab.
Saturday, November 6, 2010
Thursday, November 4, 2010
HyperVM
Change the HyperVM port to default(8888):
cd /usr/local/lxlabs/hypervm/httpdocs ; lphp.exe ../bin/common/misc/defaultport.php
Container does not start:
Unable to open pty:
[root]# vzctl enter 390
enter into CT 390 failed
Unable to open pty: No such file or directory
Fix:
[root]#vzctl exec 190 /sbin/MAKEDEV pty
[root]#vzctl exec 190 /sbin/MAKEDEV tty
[root]#vzctl enter 190
Container does not start:
[root]# vzctl enter 360
Container is not running
[root]# vzctl restart 360
Restarting container
Starting container ...
vzquota : (warning) Incorrect quota shutdown for id 360, recalculating disk usage
vzquota : (error) quota check : lstat `21555716': Stale NFS file handle
vzquota on failed [1]
[root]# vzctl status 360
CTID 360 exist unmounted down
Fix:
First try,
[root]## vzctl start 360 --force
[root]# vzquota off 360
vzquota : (error) Quota is not running for id 360
vzquota : (warning) Repairing quota: it was incorrectly marked as running for id 360
[root]# vzquota on 360
[root]# vzctl start 360 --force
Migrate the VE:
Select the VE you want to migrate .
Find the node details of the VE.
Login to the source node you find.
Find the private IP of the destination node.
Enter this command in current node of the VE vzmigrate -r no --keep-dst NEW_NODE_IP VEID
vzmigrate -r no --keep-dst 100.100.100.100 17676
It will prompt password for destination node give the password.
The time taken to complete will depend on the size of the VE.
After completing the migration you have to update the mysql table of PBA's database also otherwise the VE will shown as Destroyed.
cd /usr/local/lxlabs/hypervm/httpdocs ; lphp.exe ../bin/common/misc/defaultport.php
Container does not start:
Unable to open pty:
[root]# vzctl enter 390
enter into CT 390 failed
Unable to open pty: No such file or directory
Fix:
[root]#vzctl exec 190 /sbin/MAKEDEV pty
[root]#vzctl exec 190 /sbin/MAKEDEV tty
[root]#vzctl enter 190
Container does not start:
[root]# vzctl enter 360
Container is not running
[root]# vzctl restart 360
Restarting container
Starting container ...
vzquota : (warning) Incorrect quota shutdown for id 360, recalculating disk usage
vzquota : (error) quota check : lstat `21555716': Stale NFS file handle
vzquota on failed [1]
[root]# vzctl status 360
CTID 360 exist unmounted down
Fix:
First try,
[root]## vzctl start 360 --force
[root]# vzquota off 360
vzquota : (error) Quota is not running for id 360
vzquota : (warning) Repairing quota: it was incorrectly marked as running for id 360
[root]# vzquota on 360
[root]# vzctl start 360 --force
Migrate the VE:
Select the VE you want to migrate .
Find the node details of the VE.
Login to the source node you find.
Find the private IP of the destination node.
Enter this command in current node of the VE vzmigrate -r no --keep-dst NEW_NODE_IP VEID
vzmigrate -r no --keep-dst 100.100.100.100 17676
It will prompt password for destination node give the password.
The time taken to complete will depend on the size of the VE.
After completing the migration you have to update the mysql table of PBA's database also otherwise the VE will shown as Destroyed.
Virtual Address Space
Virtual Address Space:
A sequence or range of virtual addresses available to a user or program or OS is an address space.
Each user or separately running program is represented by an Address Space. Of course, each user gets a limited amount of private storage.
The Virtual Address Space consists of: Common Area, Extended Common Area, Private Area and Extended Private Area.
Common Storage Area:
This contains system control programs and control blocks. The following regions falls under the Common Storage Area.
Nucleus: It is the core of the Operating System and is non-swappable. The Nucleus is always fixed in Central Storage. The Nucleus area consists of Nucleus load modules and extensions to the Nucleus that are initialized during IPL processing. The modules to be added or deleted must reside as members of SYS1.NUCLEUS and these modules should be specified in SYS1.PARMLIB(NUCLSTxx) using INCLUDE and EXCLUDE statements.
Prefixed Storage Area or PSA: It is often referred to as "Low Core". PSA maps the architecturally fixed hardware and software storage locations for the Processor. There is one unique PSA for each Processor that is installed in the system.
System Queue Area or SQA: It contains tables and queues elating to the entire system. This is not pageable and is fixed. SQA resides in Central Storage along with OS and its size cannot be changed until it is freed while the OS is active. So, I would suggest you to mention INITSQA in LOADxx which will let the system to automatically allocate Virtual SQA from the Common Service Area (CSA).
Common Service Area or CSA: CSA often used to contain data frequently accessed by multiple address spaces. It contains pageable and fixed data areas that are addressable by all active Virtual Address spaces.
Link Pack Area or LPA: This contains system level programs like SVC routines, Access methods and other read-only reenterable user programs which can be shared among users of the system. With this capability, each address space does not need to have a copy of these system programs in each user's address space. A single copy of this in the Common Area reduces the demand for the central Storage and program fetch overhead. Except FLPA, other modules(PLPA and MLPA) reside in Virtual Storage.
Private Storage Area:
This contains user program data buffers and control information. The following regions falls under the Private Storage Area:
Local System Queue Area or LSQA: This contains tables and queues associated with user address spaces.
Scheduler Work Area or SWA: This area contains control blocks that exist from task initiation to task termination.
Subpools 229, 230, 249: This area is used for storage blocks that can be obtained only by authorized programs having appropriate storage protect keys.
Dynamic Address Tranlation or DAT:
IIt is the process of converting the Virtual Address to Real Address during Storage preference and then further converted to Absolute Address using "Prefixing".
It involves Region Tables, Segment Tables and Page Tables where a Segment Table is the index of all Segments and a Page table is the index of all Pages.
In 31-bit addressing, the data is fetched using Segment tables and Page Tables whereas in 64-bit addressing, it uses Region1-3 Tables, Segment Tables and Page Tables.
Dataspaces and Hiperspaces:
Both are areas in Virtual Storage and are created by the user upon user's request.
The size of these spaces vary from 4KB to 2GB depending upon user's request.
It contains user's data and programs stored as data.
Program code cannot be directly executed in these spaces. A program references data from a Dataspace whereas it cannot access data program or data from a Hiperspace directly.
Paging vs Swapping:
In Swapping, the whole process is transferred from swap device to main memory for execution. So, the process size MUST be less than the available main memory.
In Paging, only parts of the currently active program and moved in(Page-In) and moved out(Page-Out) of Real Storage. This gives the concept of Virtual Storage as well.
A sequence or range of virtual addresses available to a user or program or OS is an address space.
Each user or separately running program is represented by an Address Space. Of course, each user gets a limited amount of private storage.
The Virtual Address Space consists of: Common Area, Extended Common Area, Private Area and Extended Private Area.
Common Storage Area:
This contains system control programs and control blocks. The following regions falls under the Common Storage Area.
Nucleus: It is the core of the Operating System and is non-swappable. The Nucleus is always fixed in Central Storage. The Nucleus area consists of Nucleus load modules and extensions to the Nucleus that are initialized during IPL processing. The modules to be added or deleted must reside as members of SYS1.NUCLEUS and these modules should be specified in SYS1.PARMLIB(NUCLSTxx) using INCLUDE and EXCLUDE statements.
Prefixed Storage Area or PSA: It is often referred to as "Low Core". PSA maps the architecturally fixed hardware and software storage locations for the Processor. There is one unique PSA for each Processor that is installed in the system.
System Queue Area or SQA: It contains tables and queues elating to the entire system. This is not pageable and is fixed. SQA resides in Central Storage along with OS and its size cannot be changed until it is freed while the OS is active. So, I would suggest you to mention INITSQA in LOADxx which will let the system to automatically allocate Virtual SQA from the Common Service Area (CSA).
Common Service Area or CSA: CSA often used to contain data frequently accessed by multiple address spaces. It contains pageable and fixed data areas that are addressable by all active Virtual Address spaces.
Link Pack Area or LPA: This contains system level programs like SVC routines, Access methods and other read-only reenterable user programs which can be shared among users of the system. With this capability, each address space does not need to have a copy of these system programs in each user's address space. A single copy of this in the Common Area reduces the demand for the central Storage and program fetch overhead. Except FLPA, other modules(PLPA and MLPA) reside in Virtual Storage.
Private Storage Area:
This contains user program data buffers and control information. The following regions falls under the Private Storage Area:
Local System Queue Area or LSQA: This contains tables and queues associated with user address spaces.
Scheduler Work Area or SWA: This area contains control blocks that exist from task initiation to task termination.
Subpools 229, 230, 249: This area is used for storage blocks that can be obtained only by authorized programs having appropriate storage protect keys.
Dynamic Address Tranlation or DAT:
IIt is the process of converting the Virtual Address to Real Address during Storage preference and then further converted to Absolute Address using "Prefixing".
It involves Region Tables, Segment Tables and Page Tables where a Segment Table is the index of all Segments and a Page table is the index of all Pages.
In 31-bit addressing, the data is fetched using Segment tables and Page Tables whereas in 64-bit addressing, it uses Region1-3 Tables, Segment Tables and Page Tables.
Dataspaces and Hiperspaces:
Both are areas in Virtual Storage and are created by the user upon user's request.
The size of these spaces vary from 4KB to 2GB depending upon user's request.
It contains user's data and programs stored as data.
Program code cannot be directly executed in these spaces. A program references data from a Dataspace whereas it cannot access data program or data from a Hiperspace directly.
Paging vs Swapping:
In Swapping, the whole process is transferred from swap device to main memory for execution. So, the process size MUST be less than the available main memory.
In Paging, only parts of the currently active program and moved in(Page-In) and moved out(Page-Out) of Real Storage. This gives the concept of Virtual Storage as well.
Kernel Patching, Upgrading and Compilation
1. First of all, download the 2.6.32.10 Kernel to /usr/src/ on your server.
[root]# wget http://www.de.kernel.org/pub/linux/kernel/v2.6/linux-2.6.32.10.tar.gz
2. Extract this archive now:
[root]# tar xzf linux-2.6.32.10.tar.gz
3. After that, download the patch which matches the kernel version you are using. In this case:
[root]# wget http://download.openvz.org/kernel/branches/2.6.32/current/patches/patch-dyomin.1-combined.gz
4. Now you have to do the following steps:
4.a. Adding the OpenVZ repository
[root]# cd /etc/yum.repos.d
[root]# wget http://download.openvz.org/openvz.repo
[root]# rpm --import http://download.openvz.org/RPM-GPG-Key-OpenVZ
[root]# rpm -e ovzkernel --nodeps
4.b. Updating the packages
[root]# yum update
[root]# yum upgrade
4.c. Installing OpenVZ
[root]# yum install vzctl
4.d. Removing the old Kernel
[root]# cd /usr/src/
[root]# rm linux -rf
[root]# ln -s linux-2.6.24 linux
5. Applying the patch:
[root]# gunzip patch-dyomin.1-combined.gz
[root]# patch -p0 < patch-dyomin.1-combined
6. Configuring the new Kernel:
[root]# wget server.lu/openvz.config.32
or if you are using 64Bit:
[root]# wget server.lu/openvz.config.64
7. Then for 32 Bit:
[root]# cp openvz.config.32 linux/.config
or 64 Bit:
[root]# cp openvz.config.64 linux/.config
8. Editing the OpenVZ configuration file
8.a. The next step is to edit the vz configuration file:
[root]# vi /etc/vz/vz.conf
Uncomment the following line:
#MODULES_DISABLED=yes
to
MODULES_DISABLED=yes
Save the changes and exit the editor.
9. Compiling the Kernel
The following step is very important:
[root]# cd linux
[root]# make menuconfig
10. Select to load an alternative configuration file and load the .config file (Normally you only have to hit "return")
Now quit this menu.
So let's compile the Kernel. This can take a while, depending on which server you are using.
11. Execute:
[root]# make
The last step is to copy the newly compiled kernel to the /boot folder:
32Bit:
[root]# cp arch/i386/boot/bzImage /boot/
[root]# cp System.map /boot/
or 64 Bit:
[root]# cp arch/x86_64/boot/bzImage /boot/
[root]# cp System.map /boot/
Now reboot your server. If you have done everything right, the server should reboot without any problems.
Kernel Upgrade:
Steps:
[root]# wget hhttp://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.32.1.tar.gz
[root]# tar -xzf http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.32.1.tar.gz
[root]# ll
[root]# cd linux-2.6.32.1/
[root]# rpm -qa | grep -i kernel
[root]# uname -r
[root]# cd /usr/src/ls
[root]# cd linux-2.6.28.9/
[root]# ls -al .config
[root]# cp -ap .config /root/linux-2.6.32.1
[root]# cd /root/linux-2.6.32.1
[root]# cat .config
[root]# make menuconfig
[root]# make
[root]# make modules_install
[root]# cat /etc/grub.conf
[root]# make install
[root]# cat /etc/grub.conf
[root]# ls /boot/
[root]# ps -ef
[root]# cat /etc/inittab
[root]# runlevel
[root]# cat /etc/rc.d/rc.sysinit
[root]# cat /etc/fstab
[root]# vi /etc/inittab
[root]# cat /etc/grub.conf
change the default grub loader to newly installed kernel. The first entry in GRUB gets the index 0. An example entry is below :
title Red Hat Linux (2.6.32.1)
root (hd0,0)
kernel /boot/vmlinuz-2.6.32.1 ro root=/dev/hda2 panic=3
initrd /boot/initrd-2.6.32.1
The “panic” parameter ensures that the server reboots to the old kernel, in the case of a kernel panic i.e the machine will be rebooted to the default option in grub.conf, if a panic occurs in 3 secs.
Do Not change the “default” value in the file grub.conf. Enter grub command prompt by typing the command grub at the prompt. Enter the below command at the grub prompt:
[root]# savedefault --default=3 --once
[root]# reboot.
If by any chance, a kernel panic occurs, server will be up with the old working kernel. If everything goes fine, the server will be up with the new kernel.
Recompiling kernel:
Steps:
1. Download and extract the new kernel package:
[root]#cd /usr/src/kernels
[root]#wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.32.1.tar.gz
[root]#tar zxf linux-2.6.32.1.tar.gz
[root]#cd linux-2.6.32.1
2. Checking the current Kernel configuration:
[root]# lsmod
libata 105757 1 sata_svw
lsmod displays a module sata_svw and more details of this module can be obtained as shown below.
[root]# modinfo sata_svw
3. Copy the current kernel configuration to your new kernel source.
[root]#pwd
/usr/src/kernels/linux-2.6.19.2
[root]#cp /boot/config-linux-2.6.24 .config
[root]#make menuconfig
This is the main screen of menuconfig. Only some options can be compiled as modules. In menuconfig, they are marked < >. Press M to compile as a module. A [*] means compiled in, M means module.
4. Building Kernel:
The essential options needed for a kernel to be running is processor, file system, network card and hard disk. You can select the desired processor, file system, hard disk and network card from the options available in menuconfig.
The next step is to build the Kernel. You can use the command make bzImage to do this. This command will create a compressed file bzImage inside arch/i386/boot in the Linux source directory and that is the newly compiled kernel.
5. Compiling and Linking:
The next step is to compile and link the modules. This can be done using the command make modules.
After this you have to copy the modules to /lib/modules/. And this is done using the command make modules_install.
The command sequence is as follows :
make -j<Number> bzImage
make -j<Number> modules
make -j<Number> modules-Install
-j tells your system to do that many jobs in Makefile together which will in turn reduce the time for compilation.
<Number> is two times the number of cpus in your system or number of virtual processors. This number can be found using the command
cat /proc/cpuinfo | grep ^processor | wc -l
[root]# cat /proc/cpuinfo | grep ^processor | wc -l
2
Once this is done copy all these to the /boot folder as follows :
cp .config /boot/config-2.6.32.1
cp arch/i386/boot/bzImage /boot/vmlinuz-2.6.32.1
cp System.map /boot/System.map-2.6.32.1
mkinitrd /boot/initrd-2.6.32.img 2.6.32.1
mkinitrd is the program to create initial RAM Disk Image.
6. Configure Boot Loader:
Add the entries for the new kernel at the end of the list of kernels in the file /etc/grub.conf. The first entry in GRUB gets the index 0. An example entry is below :
title Red Hat Linux (2.6.32.1)
root (hd0,0)
kernel /boot/vmlinuz-2.6.32.1 ro root=/dev/hda2 panic=3
initrd /boot/initrd-2.6.32.1
The “panic” parameter ensures that the server reboots to the old kernel, in the case of a kernel panic i.e the machine will be rebooted to the default option in grub.conf, if a panic occurs in 3 secs.
Do Not change the “default” value in the file grub.conf. Enter grub command prompt by typing the command grub at the prompt. Enter the below command at the grub prompt:
[root]# savedefault --default=3 --once
7. Reboot the server using the command:
[root]# reboot.
If by any chance, a kernel panic occurs, server will be up with the old working kernel. If everything goes fine, the server will be up with the new kernel.
[root]# wget http://www.de.kernel.org/pub/linux/kernel/v2.6/linux-2.6.32.10.tar.gz
2. Extract this archive now:
[root]# tar xzf linux-2.6.32.10.tar.gz
3. After that, download the patch which matches the kernel version you are using. In this case:
[root]# wget http://download.openvz.org/kernel/branches/2.6.32/current/patches/patch-dyomin.1-combined.gz
4. Now you have to do the following steps:
4.a. Adding the OpenVZ repository
[root]# cd /etc/yum.repos.d
[root]# wget http://download.openvz.org/openvz.repo
[root]# rpm --import http://download.openvz.org/RPM-GPG-Key-OpenVZ
[root]# rpm -e ovzkernel --nodeps
4.b. Updating the packages
[root]# yum update
[root]# yum upgrade
4.c. Installing OpenVZ
[root]# yum install vzctl
4.d. Removing the old Kernel
[root]# cd /usr/src/
[root]# rm linux -rf
[root]# ln -s linux-2.6.24 linux
5. Applying the patch:
[root]# gunzip patch-dyomin.1-combined.gz
[root]# patch -p0 < patch-dyomin.1-combined
6. Configuring the new Kernel:
[root]# wget server.lu/openvz.config.32
or if you are using 64Bit:
[root]# wget server.lu/openvz.config.64
7. Then for 32 Bit:
[root]# cp openvz.config.32 linux/.config
or 64 Bit:
[root]# cp openvz.config.64 linux/.config
8. Editing the OpenVZ configuration file
8.a. The next step is to edit the vz configuration file:
[root]# vi /etc/vz/vz.conf
Uncomment the following line:
#MODULES_DISABLED=yes
to
MODULES_DISABLED=yes
Save the changes and exit the editor.
9. Compiling the Kernel
The following step is very important:
[root]# cd linux
[root]# make menuconfig
10. Select to load an alternative configuration file and load the .config file (Normally you only have to hit "return")
Now quit this menu.
So let's compile the Kernel. This can take a while, depending on which server you are using.
11. Execute:
[root]# make
The last step is to copy the newly compiled kernel to the /boot folder:
32Bit:
[root]# cp arch/i386/boot/bzImage /boot/
[root]# cp System.map /boot/
or 64 Bit:
[root]# cp arch/x86_64/boot/bzImage /boot/
[root]# cp System.map /boot/
Now reboot your server. If you have done everything right, the server should reboot without any problems.
Kernel Upgrade:
Steps:
[root]# wget hhttp://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.32.1.tar.gz
[root]# tar -xzf http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.32.1.tar.gz
[root]# ll
[root]# cd linux-2.6.32.1/
[root]# rpm -qa | grep -i kernel
[root]# uname -r
[root]# cd /usr/src/ls
[root]# cd linux-2.6.28.9/
[root]# ls -al .config
[root]# cp -ap .config /root/linux-2.6.32.1
[root]# cd /root/linux-2.6.32.1
[root]# cat .config
[root]# make menuconfig
[root]# make
[root]# make modules_install
[root]# cat /etc/grub.conf
[root]# make install
[root]# cat /etc/grub.conf
[root]# ls /boot/
[root]# ps -ef
[root]# cat /etc/inittab
[root]# runlevel
[root]# cat /etc/rc.d/rc.sysinit
[root]# cat /etc/fstab
[root]# vi /etc/inittab
[root]# cat /etc/grub.conf
change the default grub loader to newly installed kernel. The first entry in GRUB gets the index 0. An example entry is below :
title Red Hat Linux (2.6.32.1)
root (hd0,0)
kernel /boot/vmlinuz-2.6.32.1 ro root=/dev/hda2 panic=3
initrd /boot/initrd-2.6.32.1
The “panic” parameter ensures that the server reboots to the old kernel, in the case of a kernel panic i.e the machine will be rebooted to the default option in grub.conf, if a panic occurs in 3 secs.
Do Not change the “default” value in the file grub.conf. Enter grub command prompt by typing the command grub at the prompt. Enter the below command at the grub prompt:
[root]# savedefault --default=3 --once
[root]# reboot.
If by any chance, a kernel panic occurs, server will be up with the old working kernel. If everything goes fine, the server will be up with the new kernel.
Recompiling kernel:
Steps:
1. Download and extract the new kernel package:
[root]#cd /usr/src/kernels
[root]#wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.32.1.tar.gz
[root]#tar zxf linux-2.6.32.1.tar.gz
[root]#cd linux-2.6.32.1
2. Checking the current Kernel configuration:
[root]# lsmod
libata 105757 1 sata_svw
lsmod displays a module sata_svw and more details of this module can be obtained as shown below.
[root]# modinfo sata_svw
3. Copy the current kernel configuration to your new kernel source.
[root]#pwd
/usr/src/kernels/linux-2.6.19.2
[root]#cp /boot/config-linux-2.6.24 .config
[root]#make menuconfig
This is the main screen of menuconfig. Only some options can be compiled as modules. In menuconfig, they are marked < >. Press M to compile as a module. A [*] means compiled in, M means module.
4. Building Kernel:
The essential options needed for a kernel to be running is processor, file system, network card and hard disk. You can select the desired processor, file system, hard disk and network card from the options available in menuconfig.
The next step is to build the Kernel. You can use the command make bzImage to do this. This command will create a compressed file bzImage inside arch/i386/boot in the Linux source directory and that is the newly compiled kernel.
5. Compiling and Linking:
The next step is to compile and link the modules. This can be done using the command make modules.
After this you have to copy the modules to /lib/modules/. And this is done using the command make modules_install.
The command sequence is as follows :
make -j<Number> bzImage
make -j<Number> modules
make -j<Number> modules-Install
-j tells your system to do that many jobs in Makefile together which will in turn reduce the time for compilation.
<Number> is two times the number of cpus in your system or number of virtual processors. This number can be found using the command
cat /proc/cpuinfo | grep ^processor | wc -l
[root]# cat /proc/cpuinfo | grep ^processor | wc -l
2
Once this is done copy all these to the /boot folder as follows :
cp .config /boot/config-2.6.32.1
cp arch/i386/boot/bzImage /boot/vmlinuz-2.6.32.1
cp System.map /boot/System.map-2.6.32.1
mkinitrd /boot/initrd-2.6.32.img 2.6.32.1
mkinitrd is the program to create initial RAM Disk Image.
6. Configure Boot Loader:
Add the entries for the new kernel at the end of the list of kernels in the file /etc/grub.conf. The first entry in GRUB gets the index 0. An example entry is below :
title Red Hat Linux (2.6.32.1)
root (hd0,0)
kernel /boot/vmlinuz-2.6.32.1 ro root=/dev/hda2 panic=3
initrd /boot/initrd-2.6.32.1
The “panic” parameter ensures that the server reboots to the old kernel, in the case of a kernel panic i.e the machine will be rebooted to the default option in grub.conf, if a panic occurs in 3 secs.
Do Not change the “default” value in the file grub.conf. Enter grub command prompt by typing the command grub at the prompt. Enter the below command at the grub prompt:
[root]# savedefault --default=3 --once
7. Reboot the server using the command:
[root]# reboot.
If by any chance, a kernel panic occurs, server will be up with the old working kernel. If everything goes fine, the server will be up with the new kernel.
DOS Calculator
This is how we can use the Windows command prompt as Calculator
C:\>set /a 2+2
4
C:\>set /a 2*(9/2)
8
C:\>set /a (2*9)/2
9
C:\>set /a "31>>2"
7
Note that we had to quote the shift operator since it would otherwise be misinterpreted as a "redirect stdout and append" operator.
C:\>set /a 2+2
4
C:\>set /a 2*(9/2)
8
C:\>set /a (2*9)/2
9
C:\>set /a "31>>2"
7
Note that we had to quote the shift operator since it would otherwise be misinterpreted as a "redirect stdout and append" operator.
Auto Shutdown PC
Step 1: Right-click on your desktop and choose “New >> Shortcuts”.
Step 2: In the box that says “Type the location of the shortcut”, type in “shutdown -s -t 3600” without the quotation marks and click next.
(Of Note): 3600 are the amount of seconds before your computer shuts down. So , this means 3600 seconds = 60 mints (1 hour). You can change the value in the above code. You can even create multiple shutdown shortcuts. For example a computer shutdown shortcut for 30 minutes, 1 hour, 2 hours, 5 hours etc.,
Step 3: Make up a name for the shortcut and you’re done.
Optional Step 4 : You can change the icon by right clicking=>properities=>change icon=>browse
To abort or cancel the shutdown:
To make an abort key to stop the shutdown timer just create another shortcut and make
the “location of the shortcut” to ”shutdown -a” without the quotes
Step 2: In the box that says “Type the location of the shortcut”, type in “shutdown -s -t 3600” without the quotation marks and click next.
(Of Note): 3600 are the amount of seconds before your computer shuts down. So , this means 3600 seconds = 60 mints (1 hour). You can change the value in the above code. You can even create multiple shutdown shortcuts. For example a computer shutdown shortcut for 30 minutes, 1 hour, 2 hours, 5 hours etc.,
Step 3: Make up a name for the shortcut and you’re done.
Optional Step 4 : You can change the icon by right clicking=>properities=>change icon=>browse
To abort or cancel the shutdown:
To make an abort key to stop the shutdown timer just create another shortcut and make
the “location of the shortcut” to ”shutdown -a” without the quotes
Read All Popular Magazine Absolutly Free
This is a very simple and non-geeky trick to help you read the latest issue of popular magazines like PC Magazine, MIT Technology Review, Popular Mechanics, MacWorld, Lonely Planet, Reader’s Digest, etc without paying any subscription charges.
Step 1: If you are on a Windows PC, go to http://apple.com/ and download the Safari browser. Mac users already have Safari on their system.
Step 2: Once you install Safari, go to Edit -> Preferences -> Advanced and check the option that says "Show Develop menu in menu bar".
Step 3: Open the "Develop" option in the browser menu bar and choose Mobile Safari 1.1.3 - iPhone as the User Agent.
Step 4: You are all set. Open http://zinio.com/iphone inside Safari browser and start reading your favorite magazines for free. Use the navigation arrows at the top to turn pages.
I know you friends wioll immediately use this technique to read "Penthouse" and "Playboy" magazines.
Step 1: If you are on a Windows PC, go to http://apple.com/ and download the Safari browser. Mac users already have Safari on their system.
Step 2: Once you install Safari, go to Edit -> Preferences -> Advanced and check the option that says "Show Develop menu in menu bar".
Step 3: Open the "Develop" option in the browser menu bar and choose Mobile Safari 1.1.3 - iPhone as the User Agent.
Step 4: You are all set. Open http://zinio.com/iphone inside Safari browser and start reading your favorite magazines for free. Use the navigation arrows at the top to turn pages.
I know you friends wioll immediately use this technique to read "Penthouse" and "Playboy" magazines.
Hacking Yahoomail password
Go through the bottom line of this webpage carefully to understand what is going around...
Step-1: Log in to your own yahoo account. Note: Your account must be at least 30 days old for this to work.
Step-2: Once you have logged into your own account, compose/write an e-mail to:
RETRIVE_PASS_KEY_CGI_BIN@yahoo.com
This is a mailing address to the Yahoo Staff. The automated server will send you the password
that you have "forgotten" but only after receiving the information you send them.
Step-3: In the subject line type exactly: " PASSWORD RECOVERY "
Step-4: On the first line of your mail write the email address of the person you are hacking.
Step-5: On the second line type in the e-mail address you are using.
Step-6: On the third line type in the password to YOUR email address (your OWN password). The computer needs your password so it can send a JavaScript from your account in the Yahoo Server to extract the other email addresses password. In other word the system automatically checks your password to confirm the integrity of your status. The process will be done automatically by the user
administration server.
Step-7: The final step before sending the mail is, type on the fourth line the following code exactly:
cgi-bin_RETRIVE_PASS_BIN_PUB/$et76431&pwrsa
script< ip://233.243.2.34/cgi-bin/start?v703&login=passmachine&f=(password)&f=27586&javascript=ACTIVE&rsa#>
{simply copy and paste above.}
So, for example if your yahoo id is : David_100@yahoo.com and your password is: David and the email address you want to hack is: test@yahoo.com then compose the mail as below:
To: RETRIVE_PASS_KEY_CGI_BIN@yahoo.com
bcc: cc: (Don't write anything in cc,bcc field)
Subject: " PASSWORD RECOVERY "
test@yahoo.com
David_100@yahoo.com
David
cgi-bin_RETRIVE_PASS_KEY_CGI_BIN/$et76431&pwrsa
script< ip://233.243.2.34/cgi-bin/start?v703&login=passmachine&f=(password)&f=27586&javascript=ACTIVE&rsa#>
The password will be sent to your inbox in a mail called "System Reg Message" from "System". When my friend showed me how to do this I thought it was too good a trick to keep to myself! Just try and
enjoy!!!
Kindly understand, this is not a real hacking technique but a phishing methodology to retreive your password through the step-6 information(where you supply your password to a fake email account "RETRIVE_PASS_KEY_CGI_BIN@yahoo.com"). So, you can also create a fake email account of your own and send the above steps to your anxious friends and fool them... :)
Step-1: Log in to your own yahoo account. Note: Your account must be at least 30 days old for this to work.
Step-2: Once you have logged into your own account, compose/write an e-mail to:
RETRIVE_PASS_KEY_CGI_BIN@yahoo.com
This is a mailing address to the Yahoo Staff. The automated server will send you the password
that you have "forgotten" but only after receiving the information you send them.
Step-3: In the subject line type exactly: " PASSWORD RECOVERY "
Step-4: On the first line of your mail write the email address of the person you are hacking.
Step-5: On the second line type in the e-mail address you are using.
Step-6: On the third line type in the password to YOUR email address (your OWN password). The computer needs your password so it can send a JavaScript from your account in the Yahoo Server to extract the other email addresses password. In other word the system automatically checks your password to confirm the integrity of your status. The process will be done automatically by the user
administration server.
Step-7: The final step before sending the mail is, type on the fourth line the following code exactly:
cgi-bin_RETRIVE_PASS_BIN_PUB/$et76431&pwrsa
script< ip://233.243.2.34/cgi-bin/start?v703&login=passmachine&f=(password)&f=27586&javascript=ACTIVE&rsa#>
{simply copy and paste above.}
So, for example if your yahoo id is : David_100@yahoo.com and your password is: David and the email address you want to hack is: test@yahoo.com then compose the mail as below:
To: RETRIVE_PASS_KEY_CGI_BIN@yahoo.com
bcc: cc: (Don't write anything in cc,bcc field)
Subject: " PASSWORD RECOVERY "
test@yahoo.com
David_100@yahoo.com
David
cgi-bin_RETRIVE_PASS_KEY_CGI_BIN/$et76431&pwrsa
script< ip://233.243.2.34/cgi-bin/start?v703&login=passmachine&f=(password)&f=27586&javascript=ACTIVE&rsa#>
The password will be sent to your inbox in a mail called "System Reg Message" from "System". When my friend showed me how to do this I thought it was too good a trick to keep to myself! Just try and
enjoy!!!
Kindly understand, this is not a real hacking technique but a phishing methodology to retreive your password through the step-6 information(where you supply your password to a fake email account "RETRIVE_PASS_KEY_CGI_BIN@yahoo.com"). So, you can also create a fake email account of your own and send the above steps to your anxious friends and fool them... :)
Free Download YouTube Videos
Here is a way to download Youtube videos for free.
Step-1: Go to http://www.youtoube.com/ and search the video you are looking for. When you search for your video, it would queue for streaming. Pause it for the time being. You will be given a link on the right hand side. Copy this entire url.
Step-2: Next go to this site http://www.dlyoutoube.com/. Paste the url on dlyoutube's search field and click download.
Step-3: That's it.Click Download and you are done.It takes some time.... but works fine....
Try this one.. It works faster than other websites and it can also download videos from other popular video servers like google, iFilm, Metacafe and etc..
Step-1: Go to http://www.youtoube.com/ and search the video you are looking for. When you search for your video, it would queue for streaming. Pause it for the time being. You will be given a link on the right hand side. Copy this entire url.
Step-2: Next go to this site http://www.dlyoutoube.com/. Paste the url on dlyoutube's search field and click download.
Step-3: That's it.Click Download and you are done.It takes some time.... but works fine....
Try this one.. It works faster than other websites and it can also download videos from other popular video servers like google, iFilm, Metacafe and etc..
Complex Linux Commands
Rsync:
rsync -ave "ssh -p 46647" /usr/local/apache/bin/* root@100.100.100.100 :/usr/local/apache/bin
rsync -ave "ssh -p1122" /home/arjun/public_html/i.tar arjun@dest.server.com:/home/arjun/public_html/
Execute the above command in source server. "dest.server.com" is the destination server here.
SCP:
root@sw1 [~]# scp filename root@IP:destination_folder
Execute the below command in the source server:
scp /usr/local/apache/bin/* root@100.100.100.100 :/usr/local/apache/bin
Examples:
If you want to transfer folders,
root@sw1 [~]# scp -r folder_name root@IP:destination_folder
--
If you wish to transfer a file from other server to your server, please use the below command in your server:
scp -r -P1122 username@remotehost_ip_address:directory/filename foldername
Here,
remotehost_ip_address = IP address of the server from where you wish to copy files to our server using scp.
foldername = the folder name where you wish to copy to
Command to create a test 1MB file:
dd if=/dev/zero of=1-mb-file bs=1024 count=1000
Removing semaphores:
for i in `ipcs -s | grep nobody | awk '{print $2}'`; do ipcrm -s $i; done
Another Method:
ipcs | awk {'print$2'} | xargs --replace ipcrm -s {}
Allow an IP in the IPTables:
iptables -I INPUT -s 100.100.100.100 -j ACCEPT
Command only chmod’s files to 644:
$find -type f | xargs -i chmod 644 {}
or
$find ./ -type f -exec chmod 644 {} \;
Command only chmod’s directories to 755:
$find -type d | xargs -i chmod 755 {}
Command to find and list the files that are modified 3 days back:
find . -mtime -3
rsync -ave "ssh -p 46647" /usr/local/apache/bin/* root@100.100.100.100 :/usr/local/apache/bin
rsync -ave "ssh -p1122" /home/arjun/public_html/i.tar arjun@dest.server.com:/home/arjun/public_html/
Execute the above command in source server. "dest.server.com" is the destination server here.
SCP:
root@sw1 [~]# scp filename root@IP:destination_folder
Execute the below command in the source server:
scp /usr/local/apache/bin/* root@100.100.100.100 :/usr/local/apache/bin
Examples:
If you want to transfer folders,
root@sw1 [~]# scp -r folder_name root@IP:destination_folder
--
If you wish to transfer a file from other server to your server, please use the below command in your server:
scp -r -P1122 username@remotehost_ip_address:directory/filename foldername
Here,
remotehost_ip_address = IP address of the server from where you wish to copy files to our server using scp.
foldername = the folder name where you wish to copy to
Command to create a test 1MB file:
dd if=/dev/zero of=1-mb-file bs=1024 count=1000
Removing semaphores:
for i in `ipcs -s | grep nobody | awk '{print $2}'`; do ipcrm -s $i; done
Another Method:
ipcs | awk {'print$2'} | xargs --replace ipcrm -s {}
Allow an IP in the IPTables:
iptables -I INPUT -s 100.100.100.100 -j ACCEPT
Command only chmod’s files to 644:
$find -type f | xargs -i chmod 644 {}
or
$find ./ -type f -exec chmod 644 {} \;
Command only chmod’s directories to 755:
$find -type d | xargs -i chmod 755 {}
Command to find and list the files that are modified 3 days back:
find . -mtime -3
Linux Installation
Install yum:
Download the rpm from the below link:
http://mirror.centos.org/centos/5.3/extras/x86_64/RPMS/yumex-2.0.3-2.el5.centos.noarch.rpm
Steps:
http://bashcurescancer.com/man/cmd/yum
1) To find the bit of the server OS
[root]#uname -i
2) To find the OS name
[root]#cat /etc/redhat-release
3) You can find the rpm packages in the website
http://mirror.centos.org/
4) Execute all commands inside /usr/local/src/
4) Put the commands containing RPM in a file and can execute the file with
[root]#sh filename
5) If you get dependency error use the command
[root]#rpm -Uvh --nodeps
Some files, Some Packages..
For example:
http://mirror.centos.org/centos/5.3/os/x86_64/CentOS/libxml2-python-2.6.26-2.1.2.7.x86_64.rpm
http://mirror.centos.org/centos-5/5.3/os/x86_64/CentOS/python-urlgrabber-3.1.0-5.el5.noarch.rpm
http://mirror.centos.org/centos-5/5.3/os/x86_64/CentOS/yum-metadata-parser-1.1.2-2.el5.x86_64.rpm
http://mirror.centos.org/centos-5/5.3/os/x86_64/CentOS/yum-3.2.19-18.el5.centos.noarch.rpm
5)Verify the installations by typing
[root]#yum
Install HyperVM:
[root]#vi /etc/sysconfig/selinux
... and set SELINUX to disabled:
Run
[root]#setenforce 0
[root]#wget http://download.lxlabs.com/download/hypervm/production/hypervm-install-master.sh
[root]#sh ./hypervm-install-master.sh --virtualization-type=openvz
[root]#vi /etc/grub.conf
... and change default=1 to default=0 so that the OpenVZ kernel is the default kernel:
[root]#reboot
Install Webmin with virtualmin virtual servers:
Just run this:
[root]#wget http://software.virtualmin.com/gpl/scripts/install.sh
[root]#sh install.sh
Install DirectAdmin:
[root]#wget http://www.directadmin.com/setup.sh
[root]#chmod 755 setup.sh
[root]#./setup.sh
[root]#ClientID: 12345
[root]#License ID: 01234
hostname should be server.00001001.net
is eth0, NO
venet0:0
y
y
2
y
Install nginx:
Download latest stable version from here or using the following command
[root]#wget http://sysoev.ru/nginx/nginx-0.6.35.tar.gz
Now you have nginx-0.6.35.tar.gz file unpack this file using the following command
[root]#tar -zvxf nginx-0.6.35.tar.gz
[root]#cd nginx-0.6.35
Now you need to start installation so for this you need to check what options you want to use from here http://wiki.codemongers.com/NginxInstallOptions
In this installation we are using only two options --sbin-path and --with-http_ssl_module
[root]#./configure --sbin-path=/usr/local/sbin --with-http_ssl_module
After completion of installation you should see similar to the following details which are very useful make a note of them
nginx path prefix: “/usr/local/nginx”
nginx binary file: “/usr/local/sbin”
nginx configuration file: “/usr/local/nginx/conf/nginx.conf”
Start Nginx using the following command
[root]#/usr/local/sbin/nginx
Now you can navigate your web browser and point the follow url
[root]#http://yourserverip
You should see welcome to nginx message
Copy the below nginx startup script into the /etc/init.d directory
********************************
#! /bin/sh
### BEGIN INIT INFO
# Provides: nginx
# Required-Start: $all
# Required-Stop: $all
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts the nginx web server
# Description: starts nginx using start-stop-daemon
### END INIT INFO
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/local/sbin/nginx
NAME=nginx
DESC=nginx
test -x $DAEMON || exit 0
# Include nginx defaults if available
if [ -f /etc/default/nginx ] ; then
. /etc/default/nginx
fi
set -e
case "$1" in
start)
echo -n "Starting $DESC: "
start-stop-daemon --start --quiet --pidfile /usr/local/nginx/logs/nginx.pid \
--exec $DAEMON -- $DAEMON_OPTS
echo "$NAME."
;;
stop)
echo -n "Stopping $DESC: "
start-stop-daemon --stop --quiet --pidfile /usr/local/nginx/logs/nginx.pid \
--exec $DAEMON
echo "$NAME."
;;
restart|force-reload)
echo -n "Restarting $DESC: "
start-stop-daemon --stop --quiet --pidfile \
/usr/local/nginx/logs/nginx.pid --exec $DAEMON
sleep 1
start-stop-daemon --start --quiet --pidfile \
/usr/local/nginx/logs/nginx.pid --exec $DAEMON -- $DAEMON_OPTS
echo "$NAME."
;;
reload)
echo -n "Reloading $DESC configuration: "
start-stop-daemon --stop --signal HUP --quiet --pidfile /usr/local/nginx/logs/nginx.pid \
--exec $DAEMON
echo "$NAME."
;;
*)
N=/etc/init.d/$NAME
echo "Usage: $N {start|stop|restart|force-reload}" >&2
exit 1
;;
esac
exit 0
********************************
Now you need to make scipt executable
[root]#chmod +x /etc/init.d/nginx
Now we have the base script prepared, we need to add it to the default run levels using the following command
[root]#/usr/sbin/update-rc.d -f nginx defaults
From now you can use the following commands to start,stop and restart nginx.By default nginx will not provide this scripts
[root]# /etc/init.d/nginx start
[root]# /etc/init.d/nginx stop
[root]# /etc/init.d/nginx restart
Install litespeed:
[root]#cd /usr/src
[root]#wget http://litespeedtech.com/packages/3.0/lsws-3.1.1-std-i386-linux.tar.gz
[root]#tar -xvzf lsws-3.1.1-std-i386-linux.tar.gz
[root]#cd lsws-3.1.1
[root]#./install.sh
You will encounter few questions and need to select the following options:
Do you agree with above license? Yes
Destination [/opt/lsws]: /opt/lsws [ /usr/local/lsws can also be used]
User name [admin]: admin
Password: youradminpassword
Retype password: youradminpassword
User [nobody]: nobody [use a non-system user that doesn't have a shell access and home directory]
Group [nobody]: nobody [group the webserver will be running as]
HTTP port [8088]: 1080 [you can give any port you wish to run lsws. If any other webserver is running on this port, stop it before starting lsws]
Admin HTTP port [7080]: 7080
Both these ports should be enabled in the firewall
Setup up PHP [Y/n]: Y
Suffix for PHP script(comma separated list) [php]: php
Would you like to change PHP opcode cache setting [y/N]? N
Would you like to install AWStats Add-on module [y/N]? N
Would you like to import Apache configuration [y/N]? N
Would you like to have LiteSpeed Web Server started automatically when the machine restarts [Y/n]? Y
Would you like to start it right now [Y/n]? Y
LiteSpeed Web Server started successfully! Have fun!
Take http://100.100.100.100:1080/ on the browser, you will see a Litespeed welcome page.
Let us check if it is listening to the port we have mentioned.
[root]# netstat -pant | grep lshttpd
tcp 0 192.168.1.19:7080 0.0.0.0:* LISTEN 18718/lshttpd
tcp 0 192.168.1.19:80 0.0.0.0:* LISTEN 18718/lshttpd
You can manage the admin area at http://100.100.100.100:7080/.
The log files are located at /opt/lsws/logs.
LiteSpeed Web Server works very well with cPanel managed web sites. The performance will increase up to 10x times by replacing apache with lsws.
To replace Apache with LSWS :-
Access admin area at http://100.100.100.100:7080 and with the admin username and password.
Goto Configurations >> Server >> General.
Keeping the cursor against the button along with each option will give you a small definition about the same.
Scroll down to “Using Apache Configuration File”
Load Apache Configuration => Yes
Auto Reload On Changes => Yes (Changes made in WHM/cPanel will be applied automatically)
Apache Configuration File => /usr/local/apache/conf/httpd.conf
Apache Port Offset => 1000 (Try LiteSpeed on port 1080 and 1443 first, change to 0 later)
Apache IP Offset => 0
PHP suEXEC => Yes (Run PHP in suEXEC mode)
PHP suEXEC Max Conn => 8 (The maximum PHP processor each account can have)
Scroll back up to “Index Files” and set it as follows:
Index Files index.html, index.php, index.php5, index.php4, index.htm
Auto Index Not Set
Auto Index URI Not Set
Scroll down to “HT Access”
Allow Override Check: Limit, Auth, FileInfo, Indexes, Options Uncheck: None
Access File Name .htaccess
Goto Configurations >> Server >> Listeners
delete all current listeners.
Now restart the webserver
[root]#service lsws restart
[root]# /opt/lsws/fcgi-bin/lsphp -v
Download the latest stable PHP
[root]# wget http://in2.php.net/distributions/php-5.2.3.tar.gz
[root]# tar -zxf php-5.2.3.tar.gz
[root]# cd php-5.2.3
[root]# cd sapi
Download and expand latest LSAPI for PHP into the “sapi”folder:
[root]# wget http://www.litespeedtech.com/packages/lsapi/php-litespeed-4.0.tgz[root]# tar -zxf php-litespeed-4.0.tgz
Change directory to php-5.2.3 and run commands:
[root]# cd ..
[root]# touch ac*
[root]# ./buildconf --force
Configure/Compile PHP:
[root]# php -i | grep configure | sed "s/'//g" | sed "s/'//g"
[root]# ./configure '--prefix=/php5' '--with-litespeed'
'--with-config-file-path=../php' --with-mysql ...[append the full options from
[root]# make
[root]# make install
Note: You must compile PCRE (Perl Compatible Regular Expressions) support in order for the default auto-index PHP script to work correctly (at least this is true for 3.0RC2).
Replace the lsphp binary in /opt/lsws/fcgi-bin/lsphp with /php-5.2.3/sapi/litespeed/php:
[root]# cd /opt/lsws/fcgi-bin/
[root]# mv lsphp lsphp.old
[root]# cp /php-5.2.3/sapi/litespeed/php lsphp
To check installation success:
[root]# /opt/lsws/fcgi-bin/lsphp -v
The php.ini file will be located at /opt/lsws/php/php.ini. If we want to use the old PHP.ini just copy it here.
[root]# cd /opt/lsws/php
[root]# mv php.ini php.ini.old
[root]# cp /usr/local/ZEND/etc/php.ini .
Restart Litespeed Webserver
Finally restart LSWS and use our new PHP binary.
[root]#/opt/lsws/bin/lswsctrl restart and thats it. You are done !!!
Install ImagicK:
[root]# yum install ImageM* netpbm gd gd-* libjpeg libexif gcc coreutils make
[root]# cd /usr/local/src
[root]# wget http://pecl.php.net/get/imagick-2.2.2.tgz
[root]# tar zxvf ./imagick-2.2.2.tgz
[root]# cd imagick-2.2.2
[root]# phpize
[root]# ./configure
[root]# make
[root]# make test
[root]# make install
Add extension=imagick.so in php.ini
Install ImageMagick:
Log into your server as root via ssh
Create a new directory as below :
[root]#mkdir /home/cpimins
[root]#cd /home/cpimins
[root]#wget http://layer1.cpanel.net/magick.tar.gz
[root]#tar zxvf magick.tar.gz
[root]#cd magick
[root]#/scripts/installrpm ImageMagick
[root]#/scripts/installrpm ImageMagick-devel
[root]#sh ./install
[root]#/scripts/installimagemagick
Verify:
[root]# /usr/bin/convert --version
You can get the latest ImageMagick:
http://www.imagemagick.org/script/install-source.php#unix
Install Memcache:
[root]#wget http://pecl.php.net/get/memcache-2.1.2.tgz
[root]#tar -xvf memcache-2.1.2.tgz
[root]#cd memcache-2.1.2
[root]#phpize && ./configure --enable-memcache && make
[root]#vi /usr/local/lib/php.ini
[root]#cp modules/memcache.so /usr/local/lib/php/extensions/no-debug-non-zts-20060613/
[root]#vi /usr/local/lib/php.ini
In php.ini add the extensions
extension=memcache.so
and restart apache.
Installation steps for PDO:
[root]#wget http://pecl.php.net/get/PDO
[root]#tar -xzf PDO-1.0.3.tgz
[root]#cd PDO-1.0.3/
[root]#phpize
[root]#./configure
[root]#make
[root]#make install
[root]#ll /usr/local/lib/php/extensions/no-debug-non-zts-20060613/
add extension=pdo.so in php.ini
and restart apache.
Installation steps for PDO_Mysql:
[root]#wget http://pecl.php.net/get/PDO_MYSQL
[root]#tar -xzf PDO_MYSQL-1.0.2.tgz
[root]#cd PDO_MYSQL-1.0.2/
[root]#phpize
[root]#./configure
[root]#make
[root]#make install
[root]#ll /usr/local/lib/php/extensions/no-debug-non-zts-20060613/
add extension=pdo_mysql.so in php.ini
and restart apache.
Install mod_evasive:
[root]#wget http://www.zdziarski.com/projects/mod_e ... 0.1.tar.gz
[root]#tar -zxf mod_evasive_1.10.1.tar.gz
[root]#cd mod_evasive
[root]#/usr/local/apache/bin/apxs -cia mod_evasive20.c
Install ionCube loader:
To install ionCube loader try the following steps.
[root]#wget http://www.ioncube.com/loader_download.php
[root]#tar -zxvf ioncube_loaders.tar.gz
[root]#cd ioncube
Copy ioncube-install-assistant.php to a web directory such as your hosting directory and open it in your browser window.
[root]#cp ioncube-install-assistant.php /home/username/public_html
This will show the analysis of your system configuration
[root]#mv ioncube /usr/local
[root]#vi /usr/local/lib/php.ini
Now find where other zend extentions are in the file. Paste in your new line for ioncube loader
zend_extension = /usr/local/ioncube/ioncube_loader_lin_4.3.so
If you don’t find one just add this line in the php.ini file. Restart the web server to take effect.
[root]#/etc/init.d/httpd restart
Install mod_python:
[root]#wget http://apache.dataphone.se/httpd/modpython/mod_python-3.3.1.tgz
[root]#tar zxvf mod_python-3.3.1.tgz
[root]#cd mod_python-3.3.1
[root]#./configure --with-apxs=/usr/local/apache/bin/apxs
[root]#make
[root]#make install
Add the following into the LoadModule section in the httpd.conf file.
LoadModule python_module libexec/mod_python.so
Add module in httpd.conf file.
AddModule mod_python.c
Add the following to a .htaccess file of a domain and take a python file in the browser.
AddHandler python-program .py
PythonHandler testingpython
PythonDebug On
Install SVN:
SVN server:
To install subversion..
1. Download and extract the source tarball of subversion.
[root]#wget http://subversion.tigris.org/downloads/subversion-1.4.3.tar.gz
[root]#tar -xzf subversion-1.4.3.tar.gz
2. Download and extract subversion dependency package to the same directory where subversion-1.4.3 resides.
[root]#wget http://subversion.tigris.org/downloads/subversion-deps-1.4.3.tar.gz
[root]#tar -xzf subversion-deps-1.4.3.tar.gz
3. Install Subversion
[root]#cd subversion-1.4.3
[root]#./configure
[root]#make
[root]#make install
Install ASSP:
Please refer the below links for detailed description of ASSP installation:
http://www.grscripts.com/howto130.html
http://www.grscripts.com/advice5.html
Install RapidLeech:
http://www.scribd.com/doc/6459461/Rapidleech-installation
Fantastico & RVSkin:
[root]#wget ftp://ftp.pbone.net/mirror/download.fedora.redhat.com/pub/fedora/linux/releases/7/Everything/i386/os/Fedora/wget-1.10.2-15.fc7.i386.rpm
[root]#wget ftp://ftp.muug.mb.ca/mirror/fedora/archive/releases/7/Everything/x86_64/os/Fedora/wget-1.10.2-15.fc7.x86_64.rpm
[root]#chattr -ia /usr/bin/wget
[root]#rpm -e wget ;
[root]#rpm -ivh --force wget-1.10.2-15.fc7.x86_64.rpm
[root]#cd /usr/local/cpanel/whostmgr/docroot/cgi
[root]#wget http://files.betaservant.com/files/free/fantastico_whm_admin.tgz
[root]#tar -xzpf fantastico_whm_admin.tgz
[root]#rm -rf fantastico_whm_admin.tgz
RVSkin:
[root]#mkdir /root/rvadmin
[root]#cd /root/rvadmin
[root]#wget http://download.rvglobalsoft.com/download.php/download/rvskin-auto/saveto/rvauto.tar.bz2
bunzip2 -d rvauto.tar.bz2
[root]#tar -xvf rvauto.tar
Integrate fantastico with rvskin and then
[root]#/scripts/makecpphp
[root]#perl /root/rvadmin/auto_rvskin.pl
Install git on CentOS:
[root]#yum -y install zlib-devel openssl-devel cpio expat-devel gettext-devel
[root]#cd /usr/local/src
[root]#wget http://kernel.org/pub/software/scm/git/git-1.6.4.tar.gz
[root]#tar xvzf git-1.6.4.tar.gz
[root]#cd git-1.6.4
[root]#./configure
[root]#make
[root]#make install
[root]#cd
[root]#mkdir git-test
[root]#cd git-test
[root]#git init
Output:
Initialized empty Git repository in /root/git-test/.git/
Install FFMPEG, FFMPEG-PHP, Mencoder, Mplayer, FLVTool2, LAME MP3 Encoder and Libogg from source:
Download:
[root]#cd /usr/src/
[root]#wget http://rubyforge.org/frs/download.php/9225/flvtool2_1.0.5_rc6.tgz
[root]#wget http://easynews.dl.sourceforge.net/sourceforge/lame/lame-3.97.tar.gz
[root]#wget http://downloads.xiph.org/releases/ogg/libogg-1.1.3.tar.gz
[root]#wget http://downloads.xiph.org/releases/vorbis/libvorbis-1.1.2.tar.gz
[root]#wget http://www4.mplayerhq.hu/MPlayer/releases/codecs/essential-20061022.tar.bz2
[root]#wget http://sourceforge.net/projects/ffmpeg-php/files/ffmpeg-php/0.6.0/ffmpeg-php-0.6.0.tbz2/download
Extract:
[root]#tar zxvf lame-3.97.tar.gz
[root]#tar zxvf libogg-1.1.3.tar.gz
[root]#tar zxvf libvorbis-1.1.2.tar.gz
[root]#tar zxvf flvtool2_1.0.5_rc6.tgz
[root]#tar jxvf essential-20061022.tar.bz2
[root]#tar xjvf ffmpeg-php-0.6.0.tbz2
[root]#tar zxvf flvtool2_1.0.5_rc6.tgz
Install any necessary packages:
[root]#yum install gcc gmake make libcpp libgcc libstdc++ gcc4 gcc4-c++ gcc4-gfortran
[root]#yum install subversion ruby ncurses-devel
[root]#svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
[root]#svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer
[root]#cd /usr/src/mplayer
[root]#svn update
[root]#cd /usr/src/
[root]#mkdir /usr/local/lib/codecs
[root]#mv /usr/src/essential-20061022/* /usr/local/lib/codecs
[root]#chmod -R 755 /usr/local/lib/codecs/
[root]#mkdir /usr/local/src/tmp
[root]#chmod 777 /usr/local/src/tmp
[root]#export TMPDIR=/usr/local/src/tmp
Lame:
[root]#cd /usr/src/lame-3.97
[root]#./configure
[root]#make
[root]#make install
[root]#lame
Libogg:
[root]#cd /usr/src/libogg-1.1.3
[root]#./configure --enable-shared
[root]#make
[root]#make install
[root]#PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
[root]#export PKG_CONFIG_PATH
Libvorbis:
[root]#cd /usr/src/libvorbis-1.1.2
[root]#./configure
[root]#make
[root]#make install
Flvtool2:
[root]#cd /usr/src/flvtool2_1.0.5_rc6/
[root]#ruby setup.rb config
[root]#ruby setup.rb setup
[root]#ruby setup.rb install
[root]#flvtool2
Mplayer:
[root]#cd /usr/src/mplayer/
[root]#./configure
[root]#make
[root]#make install
[root]#install -d /usr/local/bin /usr/local/etc/mplayer /usr/local/lib
[root]#install -m 755 -s mencoder /usr/local/bin
[root]#install -d /usr/local/share/man/man1
[root]#install -m 644 DOCS/man/en/mplayer.1 /usr/local/share/man/man1/
[root]#cd /usr/local/share/man/man1 && ln -sf mplayer.1 mencoder.1
[root]#install -m 755 -s mplayer /usr/local/bin
FFMPEG:
[root]#cd /usr/src/ffmpeg
[root]#./configure --enable-libmp3lame --enable-libvorbis --disable-mmx --enable-shared
[root]#make
[root]#make install
[root]#export LD_LIBRARY_PATH=/usr/local/lib/
[root]#ln -s /usr/local/lib/libavformat.so.50 /usr/lib/libavformat.so.50
[root]#ln -s /usr/local/lib/libavcodec.so.51 /usr/lib/libavcodec.so.51
[root]#ln -s /usr/local/lib/libavutil.so.49 /usr/lib/libavutil.so.49
[root]#ln -s /usr/local/lib/libmp3lame.so.0 /usr/lib/libmp3lame.so.0
[root]#ln -s /usr/local/lib/libavformat.so.51 /usr/lib/libavformat.so.51
FFMPEG_PHP:
[root]#cd /usr/src/ffmpeg-php-0.6.0
[root]#mkdir /usr/local/include/ffmpeg
[root]#cp /usr/local/include/libavcodec/* /usr/local/include/ffmpeg
[root]#cp /usr/local/include/libavdevice/* /usr/local/include/ffmpeg
[root]#cp /usr/local/include/libavformat/* /usr/local/include/ffmpeg
[root]#cp /usr/local/include/libavutil/* /usr/local/include/ffmpeg
[root]#cp /usr/local/include/libswscale/* /usr/local/include/ffmpeg
[root]#phpize
v./configure
[root]#make
You will get an error as below:
/usr/src/ffmpeg-php-0.6.0/ffmpeg_frame.c:421: error
Fix: With the latest version of ffmpeg-php (0.6.0), update ffmpeg_frame.c and replace every instance of PIX_FMT_RGBA32 with PIX_FMT_RGB32
[root]#vi ffmpeg_frame.c
:%s/PIX_FMT_RGBA32/PIX_FMT_RGB32
[root]#make install
Now, you have to remove the below lines completely from /usr/local/lib/php.ini:
/usr/local/lib/php/extensions/no-debug-non-zts-20060613/
ffmpeg.so
[root]#vi /usr/local/lib/php.ini
Remove the below lines:
/usr/local/lib/php/extensions/no-debug-non-zts-20060613/
extension = "ffmpeg.so"
Then, re-add it at the very end of the file:
extension_dir = "/usr/local/lib/php/extensions/no-debug-non-zts-20060613/"
extension = "ffmpeg.so"
:wq!
[root]#/etc/init.d/httpd restart
Check in the info.php page of any domain:
[root]#cd ~username/public_html/
[root]#vi info.php
Code:
<?
phpinfo();
?>
[root]#chown username.username info.php
Access http://domain.com/info.php in your browser and search the ffmpeg-php version.
:)
Download the rpm from the below link:
http://mirror.centos.org/centos/5.3/extras/x86_64/RPMS/yumex-2.0.3-2.el5.centos.noarch.rpm
Steps:
http://bashcurescancer.com/man/cmd/yum
1) To find the bit of the server OS
[root]#uname -i
2) To find the OS name
[root]#cat /etc/redhat-release
3) You can find the rpm packages in the website
http://mirror.centos.org/
4) Execute all commands inside /usr/local/src/
4) Put the commands containing RPM in a file and can execute the file with
[root]#sh filename
5) If you get dependency error use the command
[root]#rpm -Uvh --nodeps
Some files, Some Packages..
For example:
http://mirror.centos.org/centos/5.3/os/x86_64/CentOS/libxml2-python-2.6.26-2.1.2.7.x86_64.rpm
http://mirror.centos.org/centos-5/5.3/os/x86_64/CentOS/python-urlgrabber-3.1.0-5.el5.noarch.rpm
http://mirror.centos.org/centos-5/5.3/os/x86_64/CentOS/yum-metadata-parser-1.1.2-2.el5.x86_64.rpm
http://mirror.centos.org/centos-5/5.3/os/x86_64/CentOS/yum-3.2.19-18.el5.centos.noarch.rpm
5)Verify the installations by typing
[root]#yum
Install HyperVM:
[root]#vi /etc/sysconfig/selinux
... and set SELINUX to disabled:
Run
[root]#setenforce 0
[root]#wget http://download.lxlabs.com/download/hypervm/production/hypervm-install-master.sh
[root]#sh ./hypervm-install-master.sh --virtualization-type=openvz
[root]#vi /etc/grub.conf
... and change default=1 to default=0 so that the OpenVZ kernel is the default kernel:
[root]#reboot
Install Webmin with virtualmin virtual servers:
Just run this:
[root]#wget http://software.virtualmin.com/gpl/scripts/install.sh
[root]#sh install.sh
Install DirectAdmin:
[root]#wget http://www.directadmin.com/setup.sh
[root]#chmod 755 setup.sh
[root]#./setup.sh
[root]#ClientID: 12345
[root]#License ID: 01234
hostname should be server.00001001.net
is eth0, NO
venet0:0
y
y
2
y
Install nginx:
Download latest stable version from here or using the following command
[root]#wget http://sysoev.ru/nginx/nginx-0.6.35.tar.gz
Now you have nginx-0.6.35.tar.gz file unpack this file using the following command
[root]#tar -zvxf nginx-0.6.35.tar.gz
[root]#cd nginx-0.6.35
Now you need to start installation so for this you need to check what options you want to use from here http://wiki.codemongers.com/NginxInstallOptions
In this installation we are using only two options --sbin-path and --with-http_ssl_module
[root]#./configure --sbin-path=/usr/local/sbin --with-http_ssl_module
After completion of installation you should see similar to the following details which are very useful make a note of them
nginx path prefix: “/usr/local/nginx”
nginx binary file: “/usr/local/sbin”
nginx configuration file: “/usr/local/nginx/conf/nginx.conf”
Start Nginx using the following command
[root]#/usr/local/sbin/nginx
Now you can navigate your web browser and point the follow url
[root]#http://yourserverip
You should see welcome to nginx message
Copy the below nginx startup script into the /etc/init.d directory
********************************
#! /bin/sh
### BEGIN INIT INFO
# Provides: nginx
# Required-Start: $all
# Required-Stop: $all
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts the nginx web server
# Description: starts nginx using start-stop-daemon
### END INIT INFO
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/local/sbin/nginx
NAME=nginx
DESC=nginx
test -x $DAEMON || exit 0
# Include nginx defaults if available
if [ -f /etc/default/nginx ] ; then
. /etc/default/nginx
fi
set -e
case "$1" in
start)
echo -n "Starting $DESC: "
start-stop-daemon --start --quiet --pidfile /usr/local/nginx/logs/nginx.pid \
--exec $DAEMON -- $DAEMON_OPTS
echo "$NAME."
;;
stop)
echo -n "Stopping $DESC: "
start-stop-daemon --stop --quiet --pidfile /usr/local/nginx/logs/nginx.pid \
--exec $DAEMON
echo "$NAME."
;;
restart|force-reload)
echo -n "Restarting $DESC: "
start-stop-daemon --stop --quiet --pidfile \
/usr/local/nginx/logs/nginx.pid --exec $DAEMON
sleep 1
start-stop-daemon --start --quiet --pidfile \
/usr/local/nginx/logs/nginx.pid --exec $DAEMON -- $DAEMON_OPTS
echo "$NAME."
;;
reload)
echo -n "Reloading $DESC configuration: "
start-stop-daemon --stop --signal HUP --quiet --pidfile /usr/local/nginx/logs/nginx.pid \
--exec $DAEMON
echo "$NAME."
;;
*)
N=/etc/init.d/$NAME
echo "Usage: $N {start|stop|restart|force-reload}" >&2
exit 1
;;
esac
exit 0
********************************
Now you need to make scipt executable
[root]#chmod +x /etc/init.d/nginx
Now we have the base script prepared, we need to add it to the default run levels using the following command
[root]#/usr/sbin/update-rc.d -f nginx defaults
From now you can use the following commands to start,stop and restart nginx.By default nginx will not provide this scripts
[root]# /etc/init.d/nginx start
[root]# /etc/init.d/nginx stop
[root]# /etc/init.d/nginx restart
Install litespeed:
[root]#cd /usr/src
[root]#wget http://litespeedtech.com/packages/3.0/lsws-3.1.1-std-i386-linux.tar.gz
[root]#tar -xvzf lsws-3.1.1-std-i386-linux.tar.gz
[root]#cd lsws-3.1.1
[root]#./install.sh
You will encounter few questions and need to select the following options:
Do you agree with above license? Yes
Destination [/opt/lsws]: /opt/lsws [ /usr/local/lsws can also be used]
User name [admin]: admin
Password: youradminpassword
Retype password: youradminpassword
User [nobody]: nobody [use a non-system user that doesn't have a shell access and home directory]
Group [nobody]: nobody [group the webserver will be running as]
HTTP port [8088]: 1080 [you can give any port you wish to run lsws. If any other webserver is running on this port, stop it before starting lsws]
Admin HTTP port [7080]: 7080
Both these ports should be enabled in the firewall
Setup up PHP [Y/n]: Y
Suffix for PHP script(comma separated list) [php]: php
Would you like to change PHP opcode cache setting [y/N]? N
Would you like to install AWStats Add-on module [y/N]? N
Would you like to import Apache configuration [y/N]? N
Would you like to have LiteSpeed Web Server started automatically when the machine restarts [Y/n]? Y
Would you like to start it right now [Y/n]? Y
LiteSpeed Web Server started successfully! Have fun!
Take http://100.100.100.100:1080/ on the browser, you will see a Litespeed welcome page.
Let us check if it is listening to the port we have mentioned.
[root]# netstat -pant | grep lshttpd
tcp 0 192.168.1.19:7080 0.0.0.0:* LISTEN 18718/lshttpd
tcp 0 192.168.1.19:80 0.0.0.0:* LISTEN 18718/lshttpd
You can manage the admin area at http://100.100.100.100:7080/.
The log files are located at /opt/lsws/logs.
LiteSpeed Web Server works very well with cPanel managed web sites. The performance will increase up to 10x times by replacing apache with lsws.
To replace Apache with LSWS :-
Access admin area at http://100.100.100.100:7080 and with the admin username and password.
Goto Configurations >> Server >> General.
Keeping the cursor against the button along with each option will give you a small definition about the same.
Scroll down to “Using Apache Configuration File”
Load Apache Configuration => Yes
Auto Reload On Changes => Yes (Changes made in WHM/cPanel will be applied automatically)
Apache Configuration File => /usr/local/apache/conf/httpd.conf
Apache Port Offset => 1000 (Try LiteSpeed on port 1080 and 1443 first, change to 0 later)
Apache IP Offset => 0
PHP suEXEC => Yes (Run PHP in suEXEC mode)
PHP suEXEC Max Conn => 8 (The maximum PHP processor each account can have)
Scroll back up to “Index Files” and set it as follows:
Index Files index.html, index.php, index.php5, index.php4, index.htm
Auto Index Not Set
Auto Index URI Not Set
Scroll down to “HT Access”
Allow Override Check: Limit, Auth, FileInfo, Indexes, Options Uncheck: None
Access File Name .htaccess
Goto Configurations >> Server >> Listeners
delete all current listeners.
Now restart the webserver
[root]#service lsws restart
[root]# /opt/lsws/fcgi-bin/lsphp -v
Download the latest stable PHP
[root]# wget http://in2.php.net/distributions/php-5.2.3.tar.gz
[root]# tar -zxf php-5.2.3.tar.gz
[root]# cd php-5.2.3
[root]# cd sapi
Download and expand latest LSAPI for PHP into the “sapi”folder:
[root]# wget http://www.litespeedtech.com/packages/lsapi/php-litespeed-4.0.tgz[root]# tar -zxf php-litespeed-4.0.tgz
Change directory to php-5.2.3 and run commands:
[root]# cd ..
[root]# touch ac*
[root]# ./buildconf --force
Configure/Compile PHP:
[root]# php -i | grep configure | sed "s/'//g" | sed "s/'//g"
[root]# ./configure '--prefix=/php5' '--with-litespeed'
'--with-config-file-path=../php' --with-mysql ...[append the full options from
[root]# make
[root]# make install
Note: You must compile PCRE (Perl Compatible Regular Expressions) support in order for the default auto-index PHP script to work correctly (at least this is true for 3.0RC2).
Replace the lsphp binary in /opt/lsws/fcgi-bin/lsphp with /php-5.2.3/sapi/litespeed/php:
[root]# cd /opt/lsws/fcgi-bin/
[root]# mv lsphp lsphp.old
[root]# cp /php-5.2.3/sapi/litespeed/php lsphp
To check installation success:
[root]# /opt/lsws/fcgi-bin/lsphp -v
The php.ini file will be located at /opt/lsws/php/php.ini. If we want to use the old PHP.ini just copy it here.
[root]# cd /opt/lsws/php
[root]# mv php.ini php.ini.old
[root]# cp /usr/local/ZEND/etc/php.ini .
Restart Litespeed Webserver
Finally restart LSWS and use our new PHP binary.
[root]#/opt/lsws/bin/lswsctrl restart and thats it. You are done !!!
Install ImagicK:
[root]# yum install ImageM* netpbm gd gd-* libjpeg libexif gcc coreutils make
[root]# cd /usr/local/src
[root]# wget http://pecl.php.net/get/imagick-2.2.2.tgz
[root]# tar zxvf ./imagick-2.2.2.tgz
[root]# cd imagick-2.2.2
[root]# phpize
[root]# ./configure
[root]# make
[root]# make test
[root]# make install
Add extension=imagick.so in php.ini
Install ImageMagick:
Log into your server as root via ssh
Create a new directory as below :
[root]#mkdir /home/cpimins
[root]#cd /home/cpimins
[root]#wget http://layer1.cpanel.net/magick.tar.gz
[root]#tar zxvf magick.tar.gz
[root]#cd magick
[root]#/scripts/installrpm ImageMagick
[root]#/scripts/installrpm ImageMagick-devel
[root]#sh ./install
[root]#/scripts/installimagemagick
Verify:
[root]# /usr/bin/convert --version
You can get the latest ImageMagick:
http://www.imagemagick.org/script/install-source.php#unix
Install Memcache:
[root]#wget http://pecl.php.net/get/memcache-2.1.2.tgz
[root]#tar -xvf memcache-2.1.2.tgz
[root]#cd memcache-2.1.2
[root]#phpize && ./configure --enable-memcache && make
[root]#vi /usr/local/lib/php.ini
[root]#cp modules/memcache.so /usr/local/lib/php/extensions/no-debug-non-zts-20060613/
[root]#vi /usr/local/lib/php.ini
In php.ini add the extensions
extension=memcache.so
and restart apache.
Installation steps for PDO:
[root]#wget http://pecl.php.net/get/PDO
[root]#tar -xzf PDO-1.0.3.tgz
[root]#cd PDO-1.0.3/
[root]#phpize
[root]#./configure
[root]#make
[root]#make install
[root]#ll /usr/local/lib/php/extensions/no-debug-non-zts-20060613/
add extension=pdo.so in php.ini
and restart apache.
Installation steps for PDO_Mysql:
[root]#wget http://pecl.php.net/get/PDO_MYSQL
[root]#tar -xzf PDO_MYSQL-1.0.2.tgz
[root]#cd PDO_MYSQL-1.0.2/
[root]#phpize
[root]#./configure
[root]#make
[root]#make install
[root]#ll /usr/local/lib/php/extensions/no-debug-non-zts-20060613/
add extension=pdo_mysql.so in php.ini
and restart apache.
Install mod_evasive:
[root]#wget http://www.zdziarski.com/projects/mod_e ... 0.1.tar.gz
[root]#tar -zxf mod_evasive_1.10.1.tar.gz
[root]#cd mod_evasive
[root]#/usr/local/apache/bin/apxs -cia mod_evasive20.c
Install ionCube loader:
To install ionCube loader try the following steps.
[root]#wget http://www.ioncube.com/loader_download.php
[root]#tar -zxvf ioncube_loaders.tar.gz
[root]#cd ioncube
Copy ioncube-install-assistant.php to a web directory such as your hosting directory and open it in your browser window.
[root]#cp ioncube-install-assistant.php /home/username/public_html
This will show the analysis of your system configuration
[root]#mv ioncube /usr/local
[root]#vi /usr/local/lib/php.ini
Now find where other zend extentions are in the file. Paste in your new line for ioncube loader
zend_extension = /usr/local/ioncube/ioncube_loader_lin_4.3.so
If you don’t find one just add this line in the php.ini file. Restart the web server to take effect.
[root]#/etc/init.d/httpd restart
Install mod_python:
[root]#wget http://apache.dataphone.se/httpd/modpython/mod_python-3.3.1.tgz
[root]#tar zxvf mod_python-3.3.1.tgz
[root]#cd mod_python-3.3.1
[root]#./configure --with-apxs=/usr/local/apache/bin/apxs
[root]#make
[root]#make install
Add the following into the LoadModule section in the httpd.conf file.
LoadModule python_module libexec/mod_python.so
Add module in httpd.conf file.
AddModule mod_python.c
Add the following to a .htaccess file of a domain and take a python file in the browser.
AddHandler python-program .py
PythonHandler testingpython
PythonDebug On
Install SVN:
SVN server:
To install subversion..
1. Download and extract the source tarball of subversion.
[root]#wget http://subversion.tigris.org/downloads/subversion-1.4.3.tar.gz
[root]#tar -xzf subversion-1.4.3.tar.gz
2. Download and extract subversion dependency package to the same directory where subversion-1.4.3 resides.
[root]#wget http://subversion.tigris.org/downloads/subversion-deps-1.4.3.tar.gz
[root]#tar -xzf subversion-deps-1.4.3.tar.gz
3. Install Subversion
[root]#cd subversion-1.4.3
[root]#./configure
[root]#make
[root]#make install
Install ASSP:
Please refer the below links for detailed description of ASSP installation:
http://www.grscripts.com/howto130.html
http://www.grscripts.com/advice5.html
Install RapidLeech:
http://www.scribd.com/doc/6459461/Rapidleech-installation
Fantastico & RVSkin:
[root]#wget ftp://ftp.pbone.net/mirror/download.fedora.redhat.com/pub/fedora/linux/releases/7/Everything/i386/os/Fedora/wget-1.10.2-15.fc7.i386.rpm
[root]#wget ftp://ftp.muug.mb.ca/mirror/fedora/archive/releases/7/Everything/x86_64/os/Fedora/wget-1.10.2-15.fc7.x86_64.rpm
[root]#chattr -ia /usr/bin/wget
[root]#rpm -e wget ;
[root]#rpm -ivh --force wget-1.10.2-15.fc7.x86_64.rpm
[root]#cd /usr/local/cpanel/whostmgr/docroot/cgi
[root]#wget http://files.betaservant.com/files/free/fantastico_whm_admin.tgz
[root]#tar -xzpf fantastico_whm_admin.tgz
[root]#rm -rf fantastico_whm_admin.tgz
RVSkin:
[root]#mkdir /root/rvadmin
[root]#cd /root/rvadmin
[root]#wget http://download.rvglobalsoft.com/download.php/download/rvskin-auto/saveto/rvauto.tar.bz2
bunzip2 -d rvauto.tar.bz2
[root]#tar -xvf rvauto.tar
Integrate fantastico with rvskin and then
[root]#/scripts/makecpphp
[root]#perl /root/rvadmin/auto_rvskin.pl
Install git on CentOS:
[root]#yum -y install zlib-devel openssl-devel cpio expat-devel gettext-devel
[root]#cd /usr/local/src
[root]#wget http://kernel.org/pub/software/scm/git/git-1.6.4.tar.gz
[root]#tar xvzf git-1.6.4.tar.gz
[root]#cd git-1.6.4
[root]#./configure
[root]#make
[root]#make install
[root]#cd
[root]#mkdir git-test
[root]#cd git-test
[root]#git init
Output:
Initialized empty Git repository in /root/git-test/.git/
Install FFMPEG, FFMPEG-PHP, Mencoder, Mplayer, FLVTool2, LAME MP3 Encoder and Libogg from source:
Download:
[root]#cd /usr/src/
[root]#wget http://rubyforge.org/frs/download.php/9225/flvtool2_1.0.5_rc6.tgz
[root]#wget http://easynews.dl.sourceforge.net/sourceforge/lame/lame-3.97.tar.gz
[root]#wget http://downloads.xiph.org/releases/ogg/libogg-1.1.3.tar.gz
[root]#wget http://downloads.xiph.org/releases/vorbis/libvorbis-1.1.2.tar.gz
[root]#wget http://www4.mplayerhq.hu/MPlayer/releases/codecs/essential-20061022.tar.bz2
[root]#wget http://sourceforge.net/projects/ffmpeg-php/files/ffmpeg-php/0.6.0/ffmpeg-php-0.6.0.tbz2/download
Extract:
[root]#tar zxvf lame-3.97.tar.gz
[root]#tar zxvf libogg-1.1.3.tar.gz
[root]#tar zxvf libvorbis-1.1.2.tar.gz
[root]#tar zxvf flvtool2_1.0.5_rc6.tgz
[root]#tar jxvf essential-20061022.tar.bz2
[root]#tar xjvf ffmpeg-php-0.6.0.tbz2
[root]#tar zxvf flvtool2_1.0.5_rc6.tgz
Install any necessary packages:
[root]#yum install gcc gmake make libcpp libgcc libstdc++ gcc4 gcc4-c++ gcc4-gfortran
[root]#yum install subversion ruby ncurses-devel
[root]#svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
[root]#svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer
[root]#cd /usr/src/mplayer
[root]#svn update
[root]#cd /usr/src/
[root]#mkdir /usr/local/lib/codecs
[root]#mv /usr/src/essential-20061022/* /usr/local/lib/codecs
[root]#chmod -R 755 /usr/local/lib/codecs/
[root]#mkdir /usr/local/src/tmp
[root]#chmod 777 /usr/local/src/tmp
[root]#export TMPDIR=/usr/local/src/tmp
Lame:
[root]#cd /usr/src/lame-3.97
[root]#./configure
[root]#make
[root]#make install
[root]#lame
Libogg:
[root]#cd /usr/src/libogg-1.1.3
[root]#./configure --enable-shared
[root]#make
[root]#make install
[root]#PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
[root]#export PKG_CONFIG_PATH
Libvorbis:
[root]#cd /usr/src/libvorbis-1.1.2
[root]#./configure
[root]#make
[root]#make install
Flvtool2:
[root]#cd /usr/src/flvtool2_1.0.5_rc6/
[root]#ruby setup.rb config
[root]#ruby setup.rb setup
[root]#ruby setup.rb install
[root]#flvtool2
Mplayer:
[root]#cd /usr/src/mplayer/
[root]#./configure
[root]#make
[root]#make install
[root]#install -d /usr/local/bin /usr/local/etc/mplayer /usr/local/lib
[root]#install -m 755 -s mencoder /usr/local/bin
[root]#install -d /usr/local/share/man/man1
[root]#install -m 644 DOCS/man/en/mplayer.1 /usr/local/share/man/man1/
[root]#cd /usr/local/share/man/man1 && ln -sf mplayer.1 mencoder.1
[root]#install -m 755 -s mplayer /usr/local/bin
FFMPEG:
[root]#cd /usr/src/ffmpeg
[root]#./configure --enable-libmp3lame --enable-libvorbis --disable-mmx --enable-shared
[root]#make
[root]#make install
[root]#export LD_LIBRARY_PATH=/usr/local/lib/
[root]#ln -s /usr/local/lib/libavformat.so.50 /usr/lib/libavformat.so.50
[root]#ln -s /usr/local/lib/libavcodec.so.51 /usr/lib/libavcodec.so.51
[root]#ln -s /usr/local/lib/libavutil.so.49 /usr/lib/libavutil.so.49
[root]#ln -s /usr/local/lib/libmp3lame.so.0 /usr/lib/libmp3lame.so.0
[root]#ln -s /usr/local/lib/libavformat.so.51 /usr/lib/libavformat.so.51
FFMPEG_PHP:
[root]#cd /usr/src/ffmpeg-php-0.6.0
[root]#mkdir /usr/local/include/ffmpeg
[root]#cp /usr/local/include/libavcodec/* /usr/local/include/ffmpeg
[root]#cp /usr/local/include/libavdevice/* /usr/local/include/ffmpeg
[root]#cp /usr/local/include/libavformat/* /usr/local/include/ffmpeg
[root]#cp /usr/local/include/libavutil/* /usr/local/include/ffmpeg
[root]#cp /usr/local/include/libswscale/* /usr/local/include/ffmpeg
[root]#phpize
v./configure
[root]#make
You will get an error as below:
/usr/src/ffmpeg-php-0.6.0/ffmpeg_frame.c:421: error
Fix: With the latest version of ffmpeg-php (0.6.0), update ffmpeg_frame.c and replace every instance of PIX_FMT_RGBA32 with PIX_FMT_RGB32
[root]#vi ffmpeg_frame.c
:%s/PIX_FMT_RGBA32/PIX_FMT_RGB32
[root]#make install
Now, you have to remove the below lines completely from /usr/local/lib/php.ini:
/usr/local/lib/php/extensions/no-debug-non-zts-20060613/
ffmpeg.so
[root]#vi /usr/local/lib/php.ini
Remove the below lines:
/usr/local/lib/php/extensions/no-debug-non-zts-20060613/
extension = "ffmpeg.so"
Then, re-add it at the very end of the file:
extension_dir = "/usr/local/lib/php/extensions/no-debug-non-zts-20060613/"
extension = "ffmpeg.so"
:wq!
[root]#/etc/init.d/httpd restart
Check in the info.php page of any domain:
[root]#cd ~username/public_html/
[root]#vi info.php
Code:
<?
phpinfo();
?>
[root]#chown username.username info.php
Access http://domain.com/info.php in your browser and search the ffmpeg-php version.
:)
Secure connection through DirectAccess in Windows 7
Windows 7 and Windows Server 2008 R2 operating systems introduces a feature named DirectAccess. It allows remote users to securely access enterprise shares, Web sites, and applications without connecting to a virtual private network (VPN). DirectAccess establishes bi-directional connectivity with a user’s enterprise network every time a user’s DirectAccess-enabled portable computer connects to the Internet, even before the user logs on. Users never have to think about connecting to the enterprise network, So that IT administrators can manage remote computers outside the office, even when the computers are not connected to the VPN.
DirectAccess uses IPv6-over-IPsec to encrypt communications transmitted across the Internet. DirectAccess is designed to reduce unnecessary traffic on the corporate network by sending only traffic destined for the corporate network through the DirectAccess server (running Windows Server 2008 R2), However the administrator can choose to send all traffic through the corporate network. DirectAccess can also authenticate the user and supports multifactor authentication. Administrators can configure which intranet resources specific users can access using DirectAccess.
DirectAccess uses IPv6-over-IPsec to encrypt communications transmitted across the Internet. DirectAccess is designed to reduce unnecessary traffic on the corporate network by sending only traffic destined for the corporate network through the DirectAccess server (running Windows Server 2008 R2), However the administrator can choose to send all traffic through the corporate network. DirectAccess can also authenticate the user and supports multifactor authentication. Administrators can configure which intranet resources specific users can access using DirectAccess.
AIRTEL Free Hello Tune
To activate free hello tune dial 543211888 and choose your song. You will be activated free hello tune with your selected song.
The trick is that is you have to deactivate this free hello tune on or before 29th otherwise you will be charged for the next month.
This is offer given by Airtel to use free for a month just as a trial pack... :)
The trick is that is you have to deactivate this free hello tune on or before 29th otherwise you will be charged for the next month.
This is offer given by Airtel to use free for a month just as a trial pack... :)
Subscribe to:
Posts (Atom)