RHCE6 Preperation (6) – httpd, lvm, grep, ssh, nfs

1, install the http server, make it automatically startup yum install -y http* /etc/init.d/httpdd start chkconfig httpd on 2, create logical volume, name as lv0, lv0 belong to logical group vg0, PE size as 8M, logical volume as 40 PE, formatted as ext4, mount to /data, and make it automatically mounted when start, fdisk /dev/sda to create physical partition, label as 0x8e, make it usable by partx command,   partx -a /dev/sda   create pv, pvcreate /dev/sda4 create vg, the PE size as 8M vgcreate –s 8M vg0 /dev/sda4  create lv, name as lv0, size as 40 PE.

Apache CGI Perl error encountered and resolved

Tested the Apache CGI perl encountered quite a few problem and solved, 1, configure the /etc/httpd/conf/httpd.conf uncomment the line as: AddHandler cgi-script .cgi .pl   get the the access right of the CGI directory, add below lines, <Directory “/var/www/html/cgi”> Options +ExecCGI AllowOverride None Order allow,deny Allow from all </Directory>   Restart the httpd /etc/init.d/httpd restart mkdir /var/www/html/cgi   2, create the perl scripts, helloworld.pl and change the access condition of the perl script chmod a+x helloworld.pl   3, (13)Permission denied: exec of ‘/var/www/html/cgi/helloworld.pl’ failed this error caused by selinux, use the command to change folder Selinux security context: chcon -R -t httpd_sys_script_exec_t /var/www/html/cgi result as: [root@localhost cgi]# ll -Z -rwxr-xr-x.