VCS ON
RHEL6–CONFIGURE & OPERATION-P1
We will test “HTTP/APACHE” on VCS.
[root@pr01 ~]# rpm -qa|grep http
httpd-2.2.15-26.el6.x86_64
httpd-tools-2.2.15-26.el6.x86_64
[root@dr01 ~]# rpm -qa|grep http
httpd-tools-2.2.15-26.el6.x86_64
httpd-2.2.15-26.el6.x86_64
If not installed, then
[root@pr01 ~]# yum install -y httpd
[root@dr01 ~]# yum install -y httpd
[root@pr01 ~]# ps -ef|grep http
root 6967 3879 0
13:38 pts/0 00:00:00 grep http
[root@pr01 ~]# service httpd restart
Stopping httpd:
[ OK ]
Starting httpd: httpd: Could not reliably determine the server's
fully qualified domain name, using 192.168.234.170 for ServerName
[ OK ]
[root@pr01 ~]# chkconfig httpd on
[root@pr01 ~]# ps -ef|grep http
root 7004
1 0 13:38 ? 00:00:00 /usr/sbin/httpd
apache 7006
7004 0 13:38 ? 00:00:00 /usr/sbin/httpd
apache 7007
7004 0 13:38 ? 00:00:00 /usr/sbin/httpd
apache 7008
7004 0 13:38 ? 00:00:00 /usr/sbin/httpd
apache 7009
7004 0 13:38 ? 00:00:00 /usr/sbin/httpd
apache 7010
7004 0 13:38 ? 00:00:00 /usr/sbin/httpd
apache 7011
7004 0 13:38 ? 00:00:00 /usr/sbin/httpd
apache 7012
7004 0 13:38 ? 00:00:00 /usr/sbin/httpd
apache 7013
7004 0 13:38 ? 00:00:00 /usr/sbin/httpd
root 7028
3879 0 13:39 pts/0 00:00:00 grep http
Do this on dr01 also,
[root@dr01 ~]# ps -ef|grep http
root 7993 1 0
13:40 ? 00:00:00 /usr/sbin/httpd
apache 7996 7993 0
13:40 ? 00:00:00 /usr/sbin/httpd
apache 7997 7993 0
13:40 ? 00:00:00 /usr/sbin/httpd
apache 7998 7993 0
13:40 ? 00:00:00 /usr/sbin/httpd
apache 7999 7993 0
13:40 ? 00:00:00 /usr/sbin/httpd
apache 8000 7993 0
13:40 ? 00:00:00 /usr/sbin/httpd
apache 8001 7993 0
13:40 ? 00:00:00 /usr/sbin/httpd
apache 8002 7993 0
13:40 ? 00:00:00 /usr/sbin/httpd
apache 8003 7993 0
13:40 ? 00:00:00 /usr/sbin/httpd
root 8008 4166 0
13:40 pts/0 00:00:00 grep http
[root@pr01 ~]# fdisk -l
[root@pr01 ~]# vxdisk -e list
DEVICE TYPE
DISK GROUP STATUS OS_NATIVE_NAME ATTR
disk_0 auto - - error sdd -
disk_1 auto:none - - online invalid sdc -
disk_2 auto - - error sde -
disk_3 auto:none - - online invalid sdf -
sda auto:none - - online invalid sda -
sdb auto:none - - online invalid sdb -
[root@pr01 ~]# vxddladm set namingscheme=osn
[root@pr01 ~]# vxdisk list
DEVICE TYPE DISK GROUP STATUS
sda auto:none - - online invalid
sdb auto:none - - online invalid
sdc auto:none - - online invalid
sdd auto - -
error
sde auto - - error
sdf auto:none - - online invalid
[root@pr01 ~]# vxdisksetup -i sdc format=sliced
-bash: vxdisksetup: command not found
[root@pr01 ~]# echo $PATH
/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
[root@pr01 ~]# vi /etc/bashrc
export
PATH=$PATH:/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/etc/vx/bin
[root@pr01 ~]# . /etc/bashrc
[root@pr01 ~]# echo $PATH
/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/etc/vx/bin
[root@pr01 ~]# vxdisksetup -i sdc format=sliced
[root@pr01 ~]# vxdisk list
DEVICE TYPE DISK GROUP STATUS
sda auto:none - - online invalid
sdb auto:none - - online invalid
sdc auto:sliced - - online
sdd auto - - error
sde auto - - error
sdf auto:none - - online invalid
[root@pr01 ~]#
[root@pr01 ~]# vxdg init apps_dg appsdg01=sdc cds=off
[root@pr01 ~]# vxassist -g apps_dg maxsize
Maximum volume size: 78833664 (38493Mb)
[root@pr01 ~]# vxassist -g apps_dg make apps_vol 38493M
[root@pr01 ~]# mkfs -t vxfs
/dev/vx/rdsk/apps_dg/apps_vol
version 9 layout
78833664 sectors, 39416832
blocks of size 1024, log size 65536 blocks
rcq size 4096 blocks
largefiles supported
[root@pr01 ~]# mkdir /apps
[root@pr01 ~]# mount -t vxfs
/dev/vx/dsk/apps_dg/apps_vol /apps
[root@pr01 ~]# df -h /apps
Filesystem Size Used Avail Use% Mounted on
/dev/vx/dsk/apps_dg/apps_vol
38G 79M
36G 1% /apps
[root@pr01 ~]# cd /apps/
[root@pr01 apps]# vi /apps/index.html
<title>Apache Testng Page
</title>
<H1><B> Hello, This is test page for VCS
</H1></B>
[root@pr01 apps]# cd /etc/httpd/conf
[root@pr01 conf]# vi httpd.conf
<VirtualHost *:80>
ServerAdmin root@pr01
DocumentRoot /apps/index.html
ServerName pr01
ErrorLog logs/node1-error_log
CustomLog logs/node1-access_log common
</VirtualHost>
[root@pr01 conf]# service httpd restart
Stopping
httpd:
[FAILED]
Starting
httpd: Warning: DocumentRoot [/apps] does not exist
httpd:
Could not reliably determine the server's fully qualified domain name, using
192.168.234.170 for ServerName
[ OK ]
[root@pr01 conf]# /etc/init.d/httpd restart
Stopping
httpd:
[ OK ]
Starting
httpd: Warning: DocumentRoot [/apps] does not exist
httpd:
Could not reliably determine the server's fully qualified domain name, using
192.168.234.170 for ServerName
[ OK ]
[root@pr01 conf]# chmod 777 /apps
[root@pr01 conf]# chmod 777 /apps/
index.html lost+found/
[root@pr01 conf]# chmod 777 /apps/index.html
[root@pr01 conf]#
[root@pr01 conf]# setenforce 0
[root@pr01 conf]# /etc/init.d/httpd restart
Stopping
httpd:
[ OK ]
Starting
httpd: Warning: DocumentRoot [/apps/index.html] does not exist
httpd:
Could not reliably determine the server's fully qualified domain name, using
192.168.234.170 for ServerName
[ OK ]
[root@pr01 conf]# vi httpd.conf
<VirtualHost *:80>
ServerAdmin root@pr01
DocumentRoot /apps/
ServerName pr01
ErrorLog logs/node1-error_log
CustomLog logs/node1-access_log common
</VirtualHost>
[root@pr01 conf]# vi httpd.conf
DocumentRoot /apps/index.html çç
[root@pr01 conf]# service httpd restart
Stopping httpd:
[ OK ]
Starting httpd: Warning: DocumentRoot [/apps/index.html] does not
exist
[ OK ]
[root@pr01 conf]# vi httpd.conf
DocumentRoot /apps/ çç
[root@pr01 conf]# service httpd restart
Stopping
httpd:
[ OK ]
Starting
httpd:
[ OK ]
[root@pr01 conf]# /etc/init.d/httpd restart
Stopping
httpd:
[ OK ]
Starting
httpd: httpd: Could not reliably determine the server's fully qualified domain
name, using 192.168.234.170 for ServerName
[root@pr01 conf]# vi httpd.conf
ServerName localhost:80 çç
[root@pr01 conf]# !service
service httpd restart
Stopping httpd:
[ OK ]
Starting httpd:
[ OK ]
AT DR01,
[root@dr01 rpms]# cd /etc/httpd/conf
[root@dr01 conf]# vi httpd.conf
<VirtualHost *:80>
ServerAdmin root@dr01
DocumentRoot /apps/
ServerName pr01
ErrorLog logs/node1-error_log
CustomLog logs/node1-access_log common
</VirtualHost>
[root@dr01 conf]# service httpd restart
Stopping httpd:
[ OK ]
Starting httpd: Warning: DocumentRoot [/apps/] does not exist
[ OK ]
TESTING IT ON DR01,
[root@pr01 ~]# service httpd stop
Stopping httpd:
[ OK ]
[root@pr01 ~]# umount /apps
[root@pr01 ~]# vxdg deport apps_dg
[root@dr01 ~]# mkdir /apps
[root@dr01 ~]# chmod 777 /apps
[root@dr01 ~]# vxdg import apps_dg
[root@dr01 ~]# mount -t vxfs
/dev/vx/dsk/apps_dg/apps_vol /apps
[root@dr01 ~]# service httpd restart
Stopping httpd: [ OK ]
Starting httpd:
[ OK ]
Check it on PR01 now.
NOW SETUP APACHE ON VCS……………………………………………….
No comments:
Post a Comment