Sunday, February 24, 2013

Creating WebApache server in 2 minutes + RHEL

Hi Friends,

Thanks and appreciate your each and every visit. Creating webapache server is very easy.

1. Create a yum repo file, for installation of httpd. for creating yum repo please visit beow link.

http://manywaystosuccess.blogspot.in/2012/09/yum-repository-on-rhel.html

2. yum install httpd

3. after installation, please check the status

[root@guitar named]# yum install httpd or  (rpm -qa |grep -i httpd)
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
Updating certificate-based repositories.
Unable to read consumer identity
Setting up Install Process
Package httpd-2.2.15-15.el6_2.1.x86_64 already installed and latest version
Nothing to do
[root@guitar named]#
[root@guitar named]# service httpd restart
Stopping httpd:                                            [FAILED]
Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using 1.2.3.12 for ServerName
                                                           [  OK  ]
[root@guitar named]#
4. now comment the conetnt of belor file.

[root@guitar html]# cat /etc/httpd/conf.d/welcome.conf
#
# This configuration file enables the default "Welcome"
# page if there is no default index page present for
# the root URL.  To disable the Welcome page, comment
# out all the lines below.
##
#    Options -Indexes
#    ErrorDocument 403 /error/noindex.html
#

[root@guitar html]#
[root@guitar html]#

5. Now create a file with any name in /var/www/html like below

[root@guitar html]# pwd
/var/www/html
[root@guitar html]# ls -ltr
total 4
-rw-r--r--. 1 root root 34 Feb 24 03:31 amit
[root@guitar html]# cat amit
Hi Friends,
welcome to my page.
[root@guitar html]#
6. Now restart the services of httpd:-

[root@guitar html]# service httpd restart
Stopping httpd:                                            [  OK  ]
Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using 1.2.3.12 for ServerName
                                                           [  OK  ]
[root@guitar html]#
7. now from your internet explorer, you can type your server/system IP, and can check the content which you have written.



8. By default, the http page will appear like this, which means that httpd services are running. just read the page. it is written there that we have to comment the welcome page lines and write some content in /var/www/html/ directory.




Love Sharing
Amit Chopra
 

No comments: