Configuration

Add Xampp in startup

Correct. That's normal Linux behaviour (which applies to any other Unix-like system. It's the admin's job to make sure a particular application is started at bootup.
There is no real standard way to configure the boot process of a Linux system, but most of them should allow you to start XAMPP at boot time using the following steps.
  1. First, find out your default runlevel.
Simply type
# egrep :initdefault: /etc/inittab
You should now see a line containing a number between two colons.
In most cases 3 or 5 (2 if you're using Debian).



  1. Go into the directory which configures this runlevel. If for example your runlevel is 3, then you have to change into the /etc/rc.d/rc3.d directory:
# cd /etc/rc.d/rc3.d
If your system didn't provide /etc/rc.d/rc3.d please try also /etc/init.d/rc3.d and /etc/rc3.d.
Now carry out the actual configuration by typing:

# ln -s /opt/lampp/lampp S99lampp
# ln -s /opt/lampp/lampp K01lampp





Software RAID in Linux (RHEL,CentOS)

This RAID Practical is tested on RHEL & CentOS 5x

Remember :-
For RAID 5, minimum 3 physical partitions.
For RAID 0, minimum 2 physical partitions.(Disk data striping across both drives)For RAID 1, minimum 2 physical partitions.(Disk Mirroring)


* Use fdisk /dev/sd* OR fdisk /dev/hd* command to create more then two (whatever you need) partitions. (where sd*/hd* means sda,sdb,hda,hdb......)


(sd : SATA/SCSI Drive ; hd : IDE Drive)

* To check your drive identity, use "fdisk -l" & check the partition identity.

I am taking "sda" as physical drive & creating 4 partitions. So, the command will be

fdisk /dev/sda


(Note : Create 4 partitions, 250MB each for practical purpose only,which is necessary to create data redundancy. In real world,you can assign whatever size available in your server/desktop)


Press "n" for new partition.
Press "t" to change the partition id.

Select the partition to want to assign "RAID" id.

Press "L" to select from the available list. In our case, select "fd"

Press "w" to write changes to disk & exit

* use "partprobe" command

Now, to create RAID 5,

mdadm -C /dev/md0 -a yes -l 5 -n 4 /dev/sda{2,3,4,5}

( -l means RAID Level which is 5 here)
( -n means number of physical drives,which is 4 here)


mkfs.ext3 /dev/md0 (To make file system)

mdadm --detail /dev/md0 (To check whether RAID has created or not)

Create a directory,i.e. "data1" on "/" partition.& mount /dev/md0 on it. The commnd is
mount /dev/md0 /data


Finally, mount RAID drives permanently during Linux Reboot,
/etc/fstab, make following entry.

/dev/md0 /data ext3 defaults 0 0




Squid Guard Configuration.


Squid is a proxy server and web cache daemon. It has a wide variety of uses, from speeding up a web server by caching repeated requests; to caching web, DNS and other computer network lookups for a group of people sharing network resources; to aiding security by filtering traffic. Although primarily used for HTTP and FTP, Squid includes limited support for several other protocols including TLSSSL, Internet Gopher andHTTPS.[1] The development version of Squid (3.1) includes IPv6 and ICAP support. Squid web site claims that if working in front of the server application, it can improve performance by up to four times. Squid is especially efficient in case of (probably unexpected) high traffic to one or several particular pages, as in this case near 100% of caching can be achieved.
Squid was originally developed by Duane Wessels as the Harvest object cache, part of the Harvest project at the University of Colorado at Boulder.[2] [3] Further work on the program was completed at the University of California, San Diego and funded via two grants from the National Science Foundation.[4] Squid is now developed almost exclusively through volunteer efforts.
Squid is primarily designed to run on Unix-like systems but it also runs on Windows-based systems. Released under the GNU General Public License, Squid is free software.

Install Squid

Install squid and squid-common
#aptitude install squid squid-common
or Rpm base
#yum install squid*
Edit the squid config file.
#vi /etc/squid/squid.conf
Set the allowed hosts
acl internal_network src 192.168.0.0/24 (Where192.168.0.0/24 is your IP range.)
http_access allow internal_network
Set the correct permissions
#chown -R proxy:proxy /var/log/squid/
#chown proxy:proxy /etc/squid/squid.conf

You will need to restart squid for the changes to take affect
#/etc/init.d/squid restart
Now open up your browser and set your proxy to point to your new squid server on port 3128

Authentication

If you wish to use authentication with your proxy you will need to install apache2 utilities
#aptitude install squid squid-common apache2-utils
To add your first user you will need to specify -c
#htpasswd -c /etc/squid.passwd first_user
Thereafter you add new users with
#htpasswd /etc/squid.passwd another_user
Edit the squid config file
vi /etc/squid/squid.conf
Set the the authentication parameters and the acl
auth_param basic program /usr/lib/squid/ncsa_auth /etc/squid.passwd
auth_param basic children 5
auth_param basic realm NFYE Squid proxy-caching web server
auth_param basic credentialsttl 3 hours
auth_param basic casesensitive off
acl users proxy_auth REQUIRED
acl sectionx proxy_auth REQUIRED
http_access allow users

transparent caching to work requires the following steps

i. For some operating systems, you have to configure and build a version of Squid which can recognize the hijacked connections and discern the destination addresses. For Linux this seems to work automatically. For BSD-based systems, configure squid with the –enable-ipf-transparent option and you have to configure squid as

httpd_accel_host virtual
httpd_accel_port 80
httpd_accel_with_proxy on
httpd_accel_uses_host_header on
ii. Next you have to configure your cache host to accept the redirected packets – any IP address, on port 80 – and deliver them to your cache application. This is typically done with IP filtering/forwarding features built into the kernel. In Linux they call this ipfilter (kernel 2.4.x), ipchains (2.2.x) or ipfwadm (2.0.x).

Configuring squid for Reverse Proxy

To run Squid as an accelerator, you probably want to listen on port 80. And you have to define the machine you are accelerating for. This is done in squid module,
http_port 80
httpd_accel_host visolve.com
httpd_accel_port 81
httpd_accel_single_host on
httpd_accel_with_proxy on
If you are using Squid as an accelerator for a virtual host system, then instead of a ‘hostname’ here you have to use the word virtual as:
http_port 80
httpd_accel_host virtual
httpd_accel_port 81
httpd_accel_with_proxy on
httpd_accel_single_host off




Howto Setup yum repositories:-

Install createrepo package:-

Download from internet

http://rpm.pbone.net/index.php3/stat/26/dist/52/size/69480/name/python-createrepo-0.9.6-1.el5.src.rpm

#rpm -ivh python-createrepo* --force

open your iso file in archeive manager

#mkdir  /iso

copy iso file and paste in /iso directory

right click iso file extract here

#cd /iso

# createrepo .

# vi /etc/yum.repos.d/iso.repo 

[ISO]
name=iso
baseurl=file:///iso
enabled=1
gpgcheck=0

# yum clean all
# yum install package-name

No comments:

Post a Comment