How to install windows OS

  1. Change the boot order in BIOS so the CD, DVD, or BD drive is listed first. Some computers are already configured this way but many are not.
    If the optical drive is not first in the boot order, your PC will start "normally" (i.e. boot from your hard drive) without even looking at what might be in your disc drive.
    Note: After setting your optical drive as the first boot device in BIOS, your computer will check that drive for a bootable disc each time your computer starts. Leaving your PC configured this way shouldn't cause problems unless you plan on leaving a disc in the drive all the time.
  2. Insert your bootable CD, DVD, or BD in your disc drive.
    How do you know if a disc is bootable? The easiest way to find out if a disc is bootable is to insert it in your drive and follow the remainder of these instructions. Most operating system setup CDs and DVDs are bootable, as are many advanced diagnostic tools like the ones I discussed above.
    Note: Programs downloadable from the Internet that are intended to be bootable discs are usually made available in ISO format. See How To Burn an ISO File for more information.
  3. Restart your computer.
  4. Watch for a Press any key to boot from CD or DVD... message.
    When booting to a Windows setup disc, and some other bootable discs as well, you may be prompted with a message to press a key to boot to the disc. To boot from the disc, you'll need to press any key on your keyboard (like the space bar) within the few seconds that the message is on the screen.
    If you do nothing, your computer will check for boot information on the next boot device in the list in BIOS (see Step 1) which will probably be your hard drive.
    Some bootable discs do not prompt for a key press and will start immediately.
  5. Your computer should now boot from the CD, DVD, or BD disc.

Install Zend Server and MySQL

Firstly, you need to create a new Cloud Server instance in the Rackspace control panel. For this tutorial, I'm using a 1024MB server with CentOS 5.6 as the operating system. This is a 64bit install.
Any lines in this tutorial starting with # should be typed at the command prompt.
Once your server is active, log on via SSH as root.
Firstly, we need to create a directory to store our downloaded files in:
  1. mkdir Downloads
  2. cd Downloads
Next, we need to go and get a few things. Zend Server will need to be downloaded from Zend. http://www.zend.com/en/products/server-ce/downloads/ Click on the 'Linux' tab and download Zend Server (DEB/RPM Installer Script). You will then need to transfer this file onto your server, into the Downloads directory. Please note, you will need to create a free account with Zend to download the package.
Once you have uploaded the package, we can grab a couple of repositories. We can use wget for these which makes our lives much easier.
  1. wget http://rpms.famillecollet.com/enterprise/remi-release-5.rpm
  2. wget http://download.fedora.redhat.com/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm or wget ftp://ftp.univie.ac.at/systems/linux/fedora/epel/5/i386/epel-release-5-4.noarch.rpm
We'll come back to these in a bit. Next, let's install Zend Server CE:
  1. tar -xzf ZendServer-5.1.0-RepositoryInstaller-linux.tar.gz
  2. cd ZendServer-RepositoryInstaller-linux/
  3. ./install_zs.sh 5.3 ce
  4. yum install -y php-5.3-extra-extensions-zend-server zend-server-framework-extras
And then MySQL:
  1. yum install mysql-server
  2. service mysqld start
  3. mysql_install_db
  4. /usr/bin/mysql_secure_installation
  5. chkconfig --levels 235 mysqld on
That last command will ensure that MySQL starts on boot. Next, we go back to the RPM's we downloaded earlier:
  1. cd ~/Downloads
  2. rpm -Uh remi-release-5.rpm epel-release-5-4.noarch.rpm
Now that we have installed the new repositories, we need to enable remi.repo. epel.repo is already enabled
  1. vi /etc/yum.repos.d/remi.repo
Change the line 'enabled=0' to 'enabled=1'. Just the first instance - we don't want to enable the testing repositories. Now we can install the Zend Server phpMyAdmin extension
  1. yum install phpmyadmin-zend-server-php-5.3
And configure it, by copying the sample config to a live one and setting the passphrase:
  1. cp /usr/local/zend/gui/lighttpd/htdocs/phpmyadmin/config.sample.inc.php /usr/local/zend/gui/lighttpd/htdocs/phpmyadmin/config.inc.php
  2. vi /usr/local/zend/gui/lighttpd/htdocs/phpmyadmin/config.inc.php
Find the line near the top that reads "$cfg['blowfish_secret'] = " and add a passphrase. Something random and complicated. Save and exit. As this is a remote server, we also need to reconfigure a default security setting that will only allow us access from the localhost.
  1. vi /usr/local/zend/gui/lighttpd/etc/lighttpd.conf
Search for 'phpmyadmin' and you should find the following code block:
$HTTP["remoteip"] !~ "127.0.0.1" {
  $HTTP["url"] =~ "^/phpmyadmin/" {
    url.access-deny = ( "" )
    server.errorfile-prefix = "//usr/local/zend/gui/lighttpd/share/lighttpd-custom-errors/errorcode-"
  }
}
To disable the security completely, you can simply comment out this block. Alternatively, just replace the IP Address with your own. Finally, we need to add Zend's bin and lib directories to the system path and restart Zend.
  1. vi /etc/profile
Add the following lines to the very end of this file:
PATH=$PATH:/usr/local/zend/bin
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/zend/lib
Save and exit - then read the new profile in to memory and restart Zend:
  1. source /etc/profile
  2. zendctl.sh restart

Configure the firewall using IPTables

To explain how IPTables works with all the possible options is beyond the scope of this document. However, there is an excellent introduction to the topic here: http://wiki.centos.org/HowTos/Network/IPTables.
I have attached a shell script called iptables.sh that can be used to configure a simple but secure setup that will allow access to only SSH, Apache and Zend. The script is based on the documentation in the Centos Wiki I linked to above, so it should be easy to understand.
Create the script by pasting the code below to /usr/sbin using vi. vi /usr/sbin/iptables.sh
#!/bin/bash
#
# iptables example configuration script
#
# Flush all current rules from iptables
#
 iptables -F
#
# Allow SSH connections on tcp port 22
# This is essential when working on remote servers via SSH to prevent locking yourself out of the system
#
 iptables -A INPUT -p tcp --dport 22 -j ACCEPT
#
# Allow access to Zend Server default ports (http and https)
#
 iptables -A INPUT -p tcp --dport 10081:10082 -j ACCEPT
#
# Allow access to apache (http and https)
#
 iptables -A INPUT -p tcp --dport 80 -j ACCEPT
 iptables -A INPUT -p tcp --dport 443 -j ACCEPT
#
# Set default policies for INPUT, FORWARD and OUTPUT chains
#
 iptables -P INPUT DROP
 iptables -P FORWARD DROP
 iptables -P OUTPUT ACCEPT
#
# Set access for localhost
#
 iptables -A INPUT -i lo -j ACCEPT
#
# Accept packets belonging to established and related connections
#
 iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
#
# Save settings
#
 /sbin/service iptables save
#
# List rules
#
 iptables -L -v
Give the root user execute permissions on the file:
  1. chown root iptables.sh
  2. chmod u+x iptables.sh
And run the script:
  1. ./iptables.sh
The script should load the new configuration and then print out the new ruleset. To test that it has worked, simply try and access the Zend control panel, which is blocked by default.
http://yourip:10081
You should see the Zend control panel here and be able to proceed to configuring your Zend installation.

Configure localtime and ntpd

  1. yum install -y ntp
  2. cd /etc
  3. ln -sf /usr/share/zoneinfo/GB localtime
  4. chkconfig ntpd on
  5. ntpdate pool.ntp.org
  6. service ntpd start

Configure your hostname

Rather than just running your server under an IP address, you should also configure a hostname. For this example, we will assume that your server IP address is 46.10.11.12 and you have pointed host.my-server.net at that IP address.
  1. vi /etc/hosts
Add your hostname into this file, along with the localhost directive as follows: 127.0.0.1 localhost.localdomain localhost 46.10.11.12 host.mydomain.net host
The order of the names is actually really important here if you want to install sendmail later. Sendmail wants to see the fully qualified names first, otherwise you will experience massive latency every time you restart the server or need to send emails.
Next, set the hostname:
  1. vi /etc/sysconfig/network
Enter your fqdn on the second line: HOSTNAME=host.my-server.net
Save and exit. Then restart the network service.
  1. service network restart

Creating user and changing owner of folder cent os

Creating user and changing owner of folder (here is example folder is recipease) cent os

 

1)First we should connect via sftp to the server

Then we should create a folder call logs in var/www/vhost and inside logs folder we should create two files called error_log and access_log

2)Ssh connection:# ssh root@31.222.136.20

3)then u enter password: #xyz

4)add user:#useradd recipease

5)Changing password for user recipease:#passwd recipease

6)New UNIX password:# xyz

7)(this is change of ownership)#chown -R recipease /var/www/vhosts/recipease

8) #ls -l /var/www/vhosts/recipease

9)To change ip address to host name:#sudo gedit /etc/hosts

10)To restart the server:-#zendctl.sh restart

GIVING PERMISSION TO THE FOLDER AND FILE:

1)This is used to give the permission to the folder:-

a)#chmod -R a+w /dir/




INSTALLING SEND MAIL IN THE SERVER :
  1. connect to the server via SSH.via terminal
  2. enter the send mail installation CMD as show :-
    #yum install sendmail



Get file from one domain name to other:
wget http://thewowcompany.com/blocks.tar.bz2


To Unzip:

#tar jxf acia.tar.bz2 (this is for tar.bz2 file )
#tar zxvf filename.tar.gz (this is for tar.gz file )


To Rename:

#mv source destination


copy files from server to server :
#wget http://pompeycarecouncil.co.uk/pompeycarecouncil.tar.bz2
create tar file in server :
1)connect to the server of that URL via SSH
2)go to the pertucular dir (Eg. cd /home/downhamw/public_html)
3)and zip the file there:# tar -czvf p.tar.gz *


to see all the user name added in server:
1)#cat /etc/passwd

Xdebug installation :-

Steps to install XDebug

1) Download the latest version of ( XAMPP For Linux ) From site [1]
2) Find the PHP version and copy the text of PHP version
3) Go to link [2] ,and paste content there...
4) And press the Button ( analyse my phpinfo() )
5) It will produce some output as below example follow the instruction from that output:-

Instructions
1. Download xdebug-2.1.2.tgz
  
  2. Unpack the downloaded file with tar -xvzf xdebug-2.1.2.tgz
  
  3. Run: cd xdebug-2.1.2
  
  4. Run: phpize
     As part of its output it should show:
     Configuring for:
     Zend Module Api No:      20090626
     Zend Extension Api No:   220090626
     If it does not, you are using the wrong phpize. Please follow this FAQ entry and skip the next step.
  
  5. Run: ./configure
  
  6. Run: make
  
  7. Run: cp modules/xdebug.so /opt/lampp/lib/php/extensions/no-debug-non-zts-20090626
  
  8. Edit /opt/lampp/etc/php.ini and add the line
     zend_extension = /opt/lampp/lib/php/extensions/no-debug-non-zts-20090626/xdebug.so
  
  9. Restart the webserver

Start and Stop ssh-agent

Below is the bash script used to start and stop ss-agent #!/bin/bash ## in .bash_profile SSHAGENT=`which ssh-agent` SSHAGENTARGS="...