Wednesday, April 30, 2014

Certificate for HTTPS Server

1- Create private/public keys
openssl genrsa -out prv.key 2048

2- Create certificate request
openssl req -new -key prv.key -out cert.csr

3- Create self-signed root authority certificate
openssl req -new -x509 -days 1826 -key prv.key -out ca.crt

4- Sign the certificate request (csr file)
openssl x509 -req -in cert.csr -CA ca.crt -CAkey prv.key -CAcreateserial -out signedCert.crt -days 500

Please note I used same private key for both CA and certificate, that can be different.
To deploy signed certificate the private key and signed  certificated should be copied to proper location and configuration.

Tuesday, April 15, 2014

Creating Local Repository in RedHat

Install createrepo

Make repository directory and put RPMs there

createrepo /path/to/RPMS

Create repo file

/etc/yum.repos.d/local.repo

[local]
name=Local Repository Demo
baseurl=file:///absolute/path/to/RPMS
enabled=1
gpgcheck=0
protect=1

Wednesday, April 9, 2014

Running 32 bits Binary in Linux 64

It usually shows the problem as complaining about ld-linux.so not found.

Installing glib 32 bit version solve the problem.

In RHEL:

yum install glibc.i686

It is better to define original installation dvd as a repo and use it to install.

RHEL Add Local DVD as Reporsitry

Touch /etc/yum.repose.d/rhe-dvd.repo
Add The following inside:

[rhel-dvd]
name=Red Hat Enterprise Linux $releasever - $basearch - DVD
baseurl=file:///mnt/dvdrom/
enabled=1
gpgcheck=0


/mnt/dvdrom supposed to be mount point of DVD

Add Sudoer

Platform: RHEL

Config File: /etc/sudoers

Add username as the following format:

user MACHINE=COMMANDS
like
username ALL=(ALL)     ALL