Archive for November, 2008

Installing Yum On Redhat Enterprise Linux 4.

I have one server hosted by a third party which runs Red Hat Enterprise Linux 4 and it doesn’t have yum installed.

To install yum on Red Hat Enterprise Linux 4 you need to install the dependencies first.

Here is a quick and dirty way of doing it.

First download all the required packages.

Download the main yum rpm.

# wget http://dag.wieers.com/rpm/packages/yum/yum-2.4.2-0.4.el4.rf.noarch.rpm

Now download the dependencies…

# wget ftp://fr2.rpmfind.net/linux/PLD/dists/ac/ready/i386/libsqlite-2.8.15-1.i386.rpm

# wget ftp://rpmfind.net/linux/dag/redhat/el4/en/i386/dag/RPMS/python-elementtree-1.2.6-7.el4.rf.i386.rpm

# wget ftp://rpmfind.net/linux/dag/redhat/el4/en/i386/dag/RPMS/python-sqlite-0.5.0-1.2.el4.rf.i386.rpm

# wget ftp://rpmfind.net/linux/dag/redhat/el4/en/x86_64/dag/RPMS/python-urlgrabber-2.9.7-1.2.el4.rf.noarch.rpm

Note: Each one of the above should be on ONE line.

Now we need to install the packages.

First we install the dependencies.

# rpm -ivh libsqlite-2.8.15-1.i386.rpm

# rpm -ivh python-elementtree-1.2.6-7.el4.rf.i386.rpm

# rpm -ivh python-sqlite-0.5.0-1.2.el4.rf.i386.rpm

# rpm -ivh python-urlgrabber-2.9.7-1.2.el4.rf.noarch.rpm

Now we are ready to install yum.

# rpm -ivh yum-2.4.2-0.4.el4.rf.noarch.rpm

Add a repository to the current ones that are installed by default.

# wget http://dag.wieers.com/rpm/packages/rpmforge-release/rpmforge-release-0.3.6-1.el4.rf.i386.rpm

# rpm -ivh rpmforge-release-0.3.6-1.el4.rf.i386.rpm

Now run the following commands to update and upgrade all packages.

# yum update

# yum upgrade

If you would like to add more repositories to your Yum installation, please look here for instructions.

  • Share/Bookmark

Comments (2)

How to Manually Add A Repository To Yum.

Some 3rd part repositories have their own rpm that you can use.

Here is how to do it manually in Cent OS.

For example if you have a repository that exists at subdomain.domain.com.
Note: Replace subdomain, domain, and com with your link.

# cd /etc/yum.repos.d

Add a file that points to the repository name and location.

# nano subdomain

Now type the following in the new file (or copy/paste the following changing the names and locations to the correct repository):

[subdomain]
name=Subdomain for RHEL/ CentOS $releasever – $basearch
baseurl=http://subdomain.domain.com/centos/$releasever/$basearch/
enabled=1
gpgcheck=1
gpgkey=http://subdomain.domain.com/RPM-GPG-KEY.txt

Save the changes and then exit out of nano.

Now import the PGP keys for the repository.

# rpm –import http://subdomain.domain.com/RPM-GPG-KEY.txt

Now run your update and upgrade processes.

# yum update

# yum upgrade

And you are now ready to install packages from the new repository.

  • Share/Bookmark

Comments (5)

Windows XP And Vista Networking From the Command Line.

Netsh.exe is fantastic tool from Microsoft that allows administrators and users to monitor and change networking for Windows from the command prompt.

For the full options and switches that can be used with the command, type

netsh /?

Followed by Enter to view the list.

Here are some examples that you can use.

To view your TCP/IP settings type.

netsh interface ip show config

To set your network interface named Local area connection IP address to static and supply the values

netsh interface ip set address name=”Local Area Connection” static <IP> <Subnet mask> <Gateway>

For example

netsh interface ip set address name=”Local Area Connection” static 192.168.1.15 255.255.255.0 192.168.1.1 1

Note the above should be on one line.

To configure “Local Area Connection” to obtain IP address and others through DHCP.

netsh interface ip set address “Local Area Connection” dhcp

To specify DNS server for an interface.

netsh interface ip set dns “Local Area Connection” static 192.168.1.17

To specify WINS server for an interface.

netsh interface ip set WINS “Local Area Connection” static 192.168.1.17

To export your current network settings including IP address and others, type the following.

netsh -c interface dump > <path to network settings file>

For example.

netsh -c interface dump > c:\networksettings.txt

To import settings from a file previously dumped.

netsh -f <path to network settings file>

For example.

netsh -f c:\networksettings.txt

To reset the TCP/IP stack to default,

netsh interface ip reset C:\resettcpiplog.txt

To turn the Windows firewall off

netsh firewall set opmode disable

To turn it back on

netsh firewall set opmode enable

To disable firewall on computer in a domain environment.

netsh firewall set opmode mode=DISABLE profile=DOMAIN

Gathering firewall status and configuration information

Netsh firewall show state
Netsh firewall show config

To allow a port through firewall.

netsh firewall add portopening <protocol> <port> <descriptiveName> [mode] [scope [addresses]] [profile]

The above should be on one line.

Please note that

*  protocol is TCP, UDP or ALL;
* port is a port in the 1-65535 range;
* descriptiveName is a descriptive name, surrounded in quotes if it contains spaces;
* mode is ENABLE or DISABLE;
* scope is ALL, SUBNET or CUSTOM. If you use CUSTOM then you must specify the addresses;
* addresses if the scope field is set to CUSTOM, this field is a comma-separated list of allowed addresses;
* profile is CURRENT, DOMAIN, STANDARD or ALL.

To delete the firewall exception.

netsh firewall delete portopening <protocol> <port>

Here is the reference page directly from Microsoft.

  • Share/Bookmark

Leave a Comment

Not Getting Windows Updates After Installing Windows XP SP3?

If you notice that you are not getting security updates after installing Windows XP Service Pack 3, then you are one of the unfortunate people that got hit by that mysterious bug/behavior of SP3.

Follow these steps to correct this issue.

1. Log on as an administrator, or as a user that has administrator access.

2. Click start, Run, and then type CMD, and then click OK.

3. From the DOS command box, issue the following commands, hitting the enter key after each one.

net stop wuauserv

cd \windows\system32

regsvr32 wups2.dll

net start wuauserv

4. Windows should start receiving Windows updates from now on.

  • Share/Bookmark

Comments (1)

Where Is My Administrator Account In Windows Vista?

Microsoft decided to have this approach that other opertaing systems have (hide the administrator account access from the average user) to prevent security problems.

The account is added during initial setup but is set to be inactive, that is why the user doesn’t see it.

Click to continue reading “Where Is My Administrator Account In Windows Vista?”

  • Share/Bookmark

Comments (1)