tips‎ > ‎

Rhel 6 & Centos 6

Where is my bloddy network !!!
interfaces were there , but no config , and could be done manually with an ifconfig 
IT seems that by default on RHEL 6/ Centos installs the /etc/sysconfig/network-scripts/ifcfg-ethX is ignored :(

(i picked dhcp when i installed - but even that was not working)

check /etc/sysconfig/networking/profiles/default/ifcfg-ethx

DEVICE=eth0
BOOTPROTO=none
HWADDR=00:0c:29:e9:fb:95
NM_CONTROLLED=yes
ONBOOT=no
TYPE=Ethernet
UUID="c72baef6-56dc-4c36-a524-3e3d4a980560"
IPADDR=192.168.1.40
NETMASK=255.255.255.0
GATEWAY=192.168.1.1
DNS1=192.168.1.253
IPV6INIT=no
USERCTL=no

after switching NM_CONTROLLED=no and ONBOOT=yes it worked as expected.



Signing Repos


First create keys if you dont have them already (example taken from Novell site)

gpg --gen-key
gpg (GnuPG) 2.0.9; Copyright (C) 2008 Free Software Foundation, Inc.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Please select what kind of key you want:
(1) DSA and Elgamal (default)
(2) DSA (sign only)
(5) RSA (sign only)
Your selection? 1
DSA keypair will have 1024 bits.
ELG keys may be between 1024 and 4096 bits long.
What keysize do you want? (2048)
Requested keysize is 2048 bits
Please specify how long the key should be valid.
0 = key does not expire
<n> = key expires in n days
<n>w = key expires in n weeks
<n>m = key expires in n months
<n>y = key expires in n years
Key is valid for? (0) 5y
Key expires at Tue 13 Jan 2015 11:45:11 AM CET
Is this correct? (y/N) y
You need a user ID to identify your key; the software constructs the user ID
from the Real Name, Comment and Email Address in this form:
"Heinrich Heine (Der Dichter) <heinrichh@duesseldorf.de>"
Real name: Mycompany repository signing key
Email address: sysadm@mycompany.com
Comment:
You selected this USER-ID:
"Mycompany repository signing key <sysadm@mycompany.com>"
Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? O
You need a Passphrase to protect your secret key.
can't connect to `/root/.gnupg/S.gpg-agent': No such file or directory
gpg-agent[27692]: directory `/root/.gnupg/private-keys-v1.d' created
We need to generate a lot of random bytes. It is a good idea to perform
some other action (type on the keyboard, move the mouse, utilize the
disks) during the prime generation; this gives the random number
generator a better chance to gain enough entropy.
gpg: key 1F199A30 marked as ultimately trusted
public and secret key created and signed.
gpg: checking the trustdb
gpg: 3 marginal(s) needed, 1 complete(s) needed, PGP trust model
gpg: depth: 0 valid: 1 signed: 0 trust: 0-, 0q, 0n, 0m, 0f, 1u
gpg: next trustdb check due at 2015-01-13
pub 1024D/1F199A30 2010-01-14 [expires: 2015-01-13]
Key fingerprint = 7524 F463 045C CCD9 5544 2D19 2B5B 1BF2 1F19 9A30
uid Mycompany repository signing key <sysadm@mycompany.com>
sub 2048g/A4935BFB 2010-01-14 [expires: 2015-01-13]


LIst your Keys (now with my key details)


gpg --list-keys
/Users/poshpaws/.gnupg/pubring.gpg
----------------------------------
<snip>

pub   2048R/80A79AD1 2013-02-26 [expires: 2018-02-25]
uid                  Swiss Unix Support (repo sign) <gri@swissunixsupport.com>
sub   2048R/ACCC880F 2013-02-26 [expires: 2018-02-25]

Sign the Repo

gpg --detach-sign --armor repodata/repomd.xml

export the key for clients
gpg -a --export 80A79AD1 > Swissunix.gpg


on each client : 

rpm --import Swissunix.gpg

or more useful from a webserver :

rpm --import http://cobbler/packages/Swissunix.gpg

Comments