Category: RedHat

Pages: 1 2 3 4 >>

04/24/09

Permalink 09:20:15 am, by admin Email , 31 words   English (US)
Categories: Linux, RedHat

Mount Windows drive share on RHEL5

RHEL5 replaced the old smbmount command with mount.cifs so to mount a shared Windows drive do something like:


mount -t cifs //servername/sharename /mnt/mountpoint \
-o username=myusername,password=mypassword

04/14/09

Permalink 10:26:30 am, by admin Email , 58 words   English (US)
Categories: RedHat

Reinstall grub in MBR

Two approaches to this. The first is to use the grub-install utility:


grub-install --root-directory=/boot /dev/???

The second approach is to use the grub command line:

1. Start the grub command line:

grub

2. Determine the boot device:

find /boot/grub/stage1

You'll get something like "(hd0,0)".

3. Tell grub where the root is:

root (hd0,0)

4. Install the MBR:

setup (hd0,0)

Permalink 10:18:13 am, by admin Email , 85 words   English (US)
Categories: Project Gallery, RedHat

Remote access via ssh with RedHat Rescue Disk

  1. Insert Rescue Disk and boot server.
  2. At the first prompt type "linux rescue" and hit enter.
  3. Follow boot disk prompts to start networking. Enter the system's ip address, netmask, gateway and name server.
  4. Continue with prompts until the root partition is mounted and you get a command prompt.
  5. Verify network configuration with ifconfig and route.
  6. Use the following commands to start sshd:

    cd /mnt/sysimage
    chroot /mnt/sysimage
    mount /dev/pts
    /sbin/service sshd start

You should now be able to SSH into the server.

04/10/09

Permalink 09:39:10 am, by admin Email , 189 words   English (US)
Categories: RedHat

Fix strange characters from pstree on RedHat.

By default on Redhat, the output from pstree is scrambled like this:

initââ¬âEvMgrCâââEvMgrCâââ4*[EvMgrC]
ââatd
ââbdflush
ââcrondâââcrondâââshâââwget
ââcvdâââcvdâââ8*[cvd]
ââhttpdâââ31*[httpd]
ââirqbalance
ââkeventd
ââkhubd
ââ2*[kjournald]
ââklogd
ââkscand
ââksoftirqd/0
ââksoftirqd/1
ââksoftirqd/2
ââksoftirqd/3
ââkswapd
ââkupdated
ââmdrecoveryd
ââ6*[mingetty]
ââminiserv.pl
ââmysqld_safeâââmysqld
âânsrexecdââânsrexecd
ââportmap
ââ2*[portsentry]
âârhnsd
ââsaslauthdâââ4*[saslauthd]
ââscsi_eh_0
ââsshdâââsshdâââsshdâââbashâââsuâââbashâââpstree
ââsvscanbootââ¬âreadproctitle
â ââsvscanââ¬âsuperviseâââqmail-sendââ¬âqmail-clean
â â ââqmail-lspawn
â â ââqmail-rspawn
â ââ3*[superviseâââmultilog]
â ââsuperviseâââtcpserverâââ6*[rblsmtpdâââfixcrio]
â ââsuperviseâââtcpserver
ââsyslogd
ââvsftpd
ââxinetd

There are a couple of ways to clear this up so that it looks like this:

init─┬─EvMgrC───EvMgrC───4*[EvMgrC]
├─atd
├─bdflush
├─crond
├─cvd───cvd───8*[cvd]
├─httpd───22*[httpd]
├─irqbalance
├─keventd
├─khubd
├─2*[kjournald]
├─klogd
├─kscand
├─ksoftirqd/0
├─ksoftirqd/1
├─ksoftirqd/2
├─ksoftirqd/3
├─kswapd
├─kupdated
├─mdrecoveryd
├─6*[mingetty]
├─miniserv.pl
├─mysqld_safe───mysqld
├─nsrexecd───nsrexecd
├─portmap
├─2*[portsentry]
├─rhnsd
├─saslauthd───4*[saslauthd]
├─scsi_eh_0
├─sshd───sshd───sshd───bash───su───bash───pstree
├─svscanboot─┬─readproctitle
│ └─svscan─┬─supervise───qmail-send─┬─qmail-clean
│ │ ├─qmail-lspawn
│ │ └─qmail-rspawn
│ ├─3*[supervise───multilog]
│ ├─supervise───tcpserver───12*[rblsmtpd───fixcrio]
│ └─supervise───tcpserver
├─syslogd
├─vsftpd
└─xinetd

Here are two possible solutions:

1. Use "pstree -G" to force VT100 line drawing

2. Do "export LANG='en_US'" to change the language from UTF-8 to English

07/06/06

Permalink 11:31:00 am, by admin Email , 237 words   English (US)
Categories: RedHat

Static Routes On RedHat

Here's the docs from redhat on how to setup static routes:

/etc/sysconfig/network-scripts/route-<interface-namegt;

  Contains lines that specify additional routes that should be added when the
  associated interface is brought up.

  The files are processed by the ifup-routes script and uses the /sbin/ipcalc
  utility for all network masks and numbers. Routes are specified using the
  syntax:

    ADDRESSn=<network>
    NETMASKn=<network/prefix mask>
    GATEWAYn=<next-hop router/gateway IP address>

  The "n" can be any integer number, but is expected to be monotonically
  increasing and counting starts from 0. For example:

    ADDRESS0=192.168.2.0
    NETMASK0=255.255.255.0
    GATEWAY0=192.168.1.1

  adds a network route to the 192.168.2.0 network via the gateway at
  192.168.1.1. Since you must already have a route to the network of the
  gateway, there is no need to specify a device.

  Note: The ifup-routes script also supports an older syntax designed to be
  used directly as an argument to "/sbin/ip route add". This syntax is
  deprecated, but if no "ADDRESSn" lines are found the following will still
  work:

  192.168.2.0/24 dev ppp0

  adds a network route to the 192.168.2.0 network through ppp0.

Let's say you want to add two static routes to eth1. The first routes 10.10.10.0/255.255.255.0 to 10.10.10.1 and the second routes traffic from 10.10.11.0/255.255.255.0 to 10.10.11.1. To accomplish this create a file at:

/etc/sysconfig/network-scripts/route-eth1

And place the following lines in the file:

    ADDRESS0=10.10.10.0
    NETMASK0=255.255.255.0
    GATEWAY0=10.10.10.1
    ADDRESS1=10.10.11.0
    NETMASK1=255.255.255.0
    GATEWAY1=10.10.11.1

Then restart networking with:

    /sbin/service network restart

1 2 3 4 >>

March 2010
Sun Mon Tue Wed Thu Fri Sat
 << <   > >>
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      

Reliable Penguin offers Linux Server Migrations, Systems Administration & Programming. Visit our main website at:

http://www.reliablepenguin.com

Search

Bookmark and Share

XML Feeds

powered by b2evolution