How to Install wget on CentOS 5.7

If your CentOS 5.7 server has been installed with minimal installation, wget command will not exist. Wget is a free network utility for linux to download files from the Web. Therefore, there is simple step to install the wget command utility into your CentOS 5.7 server.

When i try to download the webmin, i got this error:

[root@CentOS57 ~]# wget http://prdownloads.sourceforge.net/webadmin/webmin-1.570.tar.gz
-bash: wget: command not found

Simply run this command to install wget

[root@CentOS57 ~]# yum install wget
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: centos.vr-zone.com
 * extras: centos.vr-zone.com
 * updates: centos.vr-zone.com
base                                                                         | 1.1 kB     00:00
extras                                                                       | 2.1 kB     00:00
updates                                                                      | 1.9 kB     00:00
updates/primary_db                                                           | 480 kB     00:03
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package wget.i386 0:1.11.4-2.el5_4.1 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================
 Package             Arch                Version                          Repository           Size
====================================================================================================
Installing:
 wget                i386                1.11.4-2.el5_4.1                 base                582 k

Transaction Summary
====================================================================================================
Install       1 Package(s)
Upgrade       0 Package(s)

Total download size: 582 k
Is this ok [y/N]: y
Downloading Packages:
wget-1.11.4-2.el5_4.1.i386.rpm                                               | 582 kB     00:04
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : wget                                                                         1/1

Installed:
  wget.i386 0:1.11.4-2.el5_4.1

Complete!

How to Install CentOS 5.7 Server Part 2

This tutorial shows how to install CentOS 5.7 32 x86 server. This steps may be similar with other version of CentOS or RHEL and i do not issue any guarantee that this will work for you. Assume that you already done the steps 1 until 12 as explained from this link.

How to Install CentOS 5.7 Server Part 1

13.  Set configuration for boot loader if you need. In this case, click next to proceed.
CentOS 5.7

14. Install bootloader on /dev/sda.
CentOS 5.7

15. By default, the setting of the network interfaces is DHCP, but it is recommended to set static IP addresses for server installation.
CentOS 5.7

16. Under IPV4, uncheck “Dynamic IP configuration (DHCP)”. Enter prefer static ip address and netmask. Don’t forget to uncheck “Enable IPv6 support”.
CentOS 5.7

17. Input your server’s Hostname, Gateway and DNS servers.
CentOS 5.7

18. Choose your time zone.
CentOS 5.7

19. Set root password and click next.
CentOS 5.7

20. Select softwares you would like to install. It’s recommended to perform minimal installation. Check a box “Customize now” and click next.
CentOS 5.7

21. To perfome minimal installation, unselect all package groups.
CentOS 5.7

22. Click next to proceed.
CentOS 5.7

23. The installer checks the dependencies of the selected packages and the format file system.
CentOS 5.7

24. Installation has been completed. Click ‘Reboot’ button.
CentOS 5.7

How to Install CentOS 5.7 Server Part 1

This tutorial shows how to install CentOS 5.7 32 x86 server. This steps may be similar with other version of CentOS or RHEL and i do not issue any guarantee that this will work for you. Assume that you already downloaded the CentOS 5.7 DVD from public mirrors on the internet.

1. Insert CentOS 5.7 DVD 1 inside CD/DVD-ROM drive then reboot Server. Press <ENTER> at the boot prompt:
CentOS 5.7

2. Click Skip Media test.
CentOS 5.7

3. Click Next to proceed.
CentOS 5.7

4. Select the prefer language that you want to use during the installation.
CentOS 5.7

5. Select your keyboard layout:
CentOS 5.7

6. If you are installing CentOS 5.7 on a fresh system, so Please answer Yes to the question.  This will proceed to initialize the drive and erasing ALL DATA. Please proceed if the server don’t have previous important datas.
CentOS 5.7

7. Change partition layouts. Click Create custom layout.
CentOS 5.7

8. Select the first hard disk, /dev/sda.
CentOS 5.7

9. Create boot partition with default recommended  size which is 100MB.
CentOS 5.7

10. Create Swap partition. In this case i create 2GB swap size because the server RAM is 1GB.  Swap size is equal with RAM x 2.
CentOS 5.7

11. Select maximum allowable size for / partition. Click Ok.
CentOS 5.7

12. Verify the partition size before proceed. Click “Next” button if it’s OK all.
CentOS 5.7

How to Install CentOS 5.7 Server Part 2

How to Install Httpd on CentOS 5.7

Apache httpd is one of the most popular web servers and has a lot of features that make it very extensible and useful for many different types of websites.This steps has been tested on CentOS 5.7 with direct internet connection.

Simply run this command to install apache httpd service on CentOS 5.7:

    [root@CentOS57 ~]# yum install httpd
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
     * base: mirror.yourconnect.com
     * extras: mirrors.sin1.sg.voxel.net
     * updates: mirror.yourconnect.com
    Setting up Install Process
    Resolving Dependencies
    --> Running transaction check
    ---> Package httpd.i386 0:2.2.3-53.el5.centos.3 set to be updated
    base/filelists                                                              | 2.9 MB     00:25
    extras/filelists_db                                                         | 199 kB     00:03
    updates/filelists_db                                                        | 1.9 MB     00:22
    --> Processing Dependency: /etc/mime.types for package: httpd
    --> Processing Dependency: libapr-1.so.0 for package: httpd
    --> Processing Dependency: libaprutil-1.so.0 for package: httpd
    --> Running transaction check
    ---> Package apr.i386 0:1.2.7-11.el5_6.5 set to be updated
    ---> Package apr-util.i386 0:1.2.7-11.el5_5.2 set to be updated
    --> Processing Dependency: libpq.so.4 for package: apr-util
    ---> Package mailcap.noarch 0:2.1.23-1.fc6 set to be updated
    --> Running transaction check
    ---> Package postgresql-libs.i386 0:8.1.23-1.el5_7.3 set to be updated
    --> Finished Dependency Resolution
    
    Dependencies Resolved
    
    ===================================================================================================
     Package                  Arch            Version                           Repository        Size
    ===================================================================================================
    Installing:
     httpd                    i386            2.2.3-53.el5.centos.3             updates          1.2 M
    Installing for dependencies:
     apr                      i386            1.2.7-11.el5_6.5                  base             124 k
     apr-util                 i386            1.2.7-11.el5_5.2                  base              80 k
     mailcap                  noarch          2.1.23-1.fc6                      base              14 k
     postgresql-libs          i386            8.1.23-1.el5_7.3                  updates          197 k
    
    Transaction Summary
    ===================================================================================================
    Install       5 Package(s)
    Upgrade       0 Package(s)
    
    Total download size: 1.6 M
    Is this ok [y/N]: y
    Downloading Packages:
    (1/5): mailcap-2.1.23-1.fc6.noarch.rpm                                      |  14 kB     00:00
    (2/5): apr-util-1.2.7-11.el5_5.2.i386.rpm                                   |  80 kB     00:00
    (3/5): apr-1.2.7-11.el5_6.5.i386.rpm                                        | 124 kB     00:01
    (4/5): postgresql-libs-8.1.23-1.el5_7.3.i386.rpm                            | 197 kB     00:02
    (5/5): httpd-2.2.3-53.el5.centos.3.i386.rpm                                 | 1.2 MB     00:11
    ---------------------------------------------------------------------------------------------------
    Total                                                               99 kB/s | 1.6 MB     00:16
    Running rpm_check_debug
    Running Transaction Test
    Finished Transaction Test
    Transaction Test Succeeded
    Running Transaction
      Installing     : apr                                                                         1/5
      Installing     : mailcap                                                                     2/5
      Installing     : postgresql-libs                                                             3/5
      Installing     : apr-util                                                                    4/5
      Installing     : httpd                                                                       5/5
    
    Installed:
      httpd.i386 0:2.2.3-53.el5.centos.3
    
    Dependency Installed:
      apr.i386 0:1.2.7-11.el5_6.5                 apr-util.i386 0:1.2.7-11.el5_5.2
      mailcap.noarch 0:2.1.23-1.fc6               postgresql-libs.i386 0:8.1.23-1.el5_7.3
    
    Complete!
    

Set httpd service to auto start at boot:

    [root@CentOS57 ~]# chkconfig httpd on
    

Start and troubleshoot httpd start error:

    [root@CentOS57 ~]# service httpd start
    
    Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
    

Check the server hostname or server fully qualified domain name:

    [root@CentOS57 ~]# hostname
    CentOS57
    

Change the ServerName on line 265 to your hostname above.

    [root@CentOS57 ~]# vi /etc/httpd/conf/httpd.conf
    
      263 # redirections work in a sensible way.
        264 #
        265 ServerName CentOS57:80
        266
        267 #
    

Start the Httpd service using the following command :

    [root@CentOS57 ~]# service httpd start
    Starting httpd:                                            [  OK  ]
    

or

    [root@CentOS57 ~]# /etc/init.d/httpd start
    Starting httpd:                                            [  OK  ]