Category: CentOS


Centos 7 disable SELinux

By polfilm,
sestatus
sudo sed -i 's/enforcing/disabled/g' /etc/selinux/config /etc/selinux/config
sestatus (mode from config file should now be disabled)
reboot

File Duplicates Recursive in Linux

By polfilm,
md5deep -r -l . > filelist.txt
sort < filelist.txt > filelist_sorted.txt

First command will render all hashes for all files
Second will sort the list so as you scroll you will easily spot duplicates with their paths.
m5deep is in most apt-get and yum repos.

Ipa. Change Admin Password

By polfilm,
LDAPTLS_CACERT=/etc/ipa/ca.crt ldappasswd \
           -ZZ -D 'cn=directory manager' -W \
           -S uid=admin,cn=users,cn=accounts,dc=domain,dc=com

or

kadmin.local
Authenticating as principal admin/admin@EXAMPLE.COM with password.
kadmin.local:  change_password admin@EXAMPLE.COM
Enter password for principal "admin@EXAMPLE.COM": 
Re-enter password for principal "admin@EXAMPLE.COM": 

Webmin Add System User and Roles

By polfilm,
===== Add User =====
/etc/webmin/miniserv.users

===== Add Roles for User =====
/etc/webmin/webmin.acl

Note: nano line cut (CTRL-K) nano paste (CTRL-U)

CentOS Virtualized – eth0 not found?

By polfilm,

Network interface probably changed the name when you cloned as original version guid and mac are stored in a different file. To verify run:

ifconfig -a

or

ip a l

If its hiding under eth1 or some other name then you’re in luck.
Remove the kernel’s networking interface rules file so that it can be regenerated

rm -f /etc/udev/rules.d/70-persistant-net.rules

Now set your eth0 info in /etc/sysconfig/network-scripts/ifcfg-eth0. Remove mac and guid from the file and reboot. For static IP setup you may want to try this

Jenkins – An extendable open source continuous integration server

By polfilm,

Jenkins is an award-winning application that monitors executions of repeated jobs, such as building a software project or jobs run by cron. Among those things, current Jenkins focuses on the following two jobs:

Building/testing software projects continuously, just like CruiseControl or DamageControl. In a nutshell, Jenkins provides an easy-to-use so-called continuous integration system, making it easier for developers to integrate changes to the project, and making it easier for users to obtain a fresh build. The automated, continuous build increases the productivity.
Monitoring executions of externally-run jobs, such as cron jobs and procmail jobs, even those that are run on a remote machine. For example, with cron, all you receive is regular e-mails that capture the output, and it is up to you to look at them diligently and notice when it broke. Jenkins keeps those outputs and makes it easy for you to notice when something is wrong.

http://jenkins-ci.org/

C# NUnit Testing
http://stackoverflow.com/questions/9121312/how-do-you-run-nunit-tests-from-jenkins

HTML Website Testing
http://www.hiringthing.com/2012/04/13/automated-ui-testing-with-jenkins-selenium.html

Installing Jenkins on CentOS
https://wiki.jenkins-ci.org/display/JENKINS/Installing+Jenkins+on+RedHat+distributions

Cluster Setup. Discussion
http://jenkins.361315.n4.nabble.com/Approach-to-build-a-cluster-of-Jenkins-CI-servers-hands-off-and-tie-them-together-td4641859.html

Cacti

By polfilm,

Cacti is a complete network graphing solution designed to harness the power of RRDTool’s data storage and graphing functionality. Cacti provides a fast poller, advanced graph templating, multiple data acquisition methods, and user management features out of the box. All of this is wrapped in an intuitive, easy to use interface that makes sense for LAN-sized installations up to complex networks with hundreds of devices.

http://www.cacti.net/

Install procedure on Fedora / Centos

Installing the EPEL Repository on CentOS or RHEL

By polfilm,

CentOS 6 / RHEL 6 [Updated: 2013.10.01]

# rpm -ivh http://mirror.karneval.cz/pub/linux/fedora/epel/6/i386/epel-release-6-8.noarch.rpm --test
warning: /var/tmp/rpm-tmp.Hrps3E: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY

Now copy and import a key (.txt file with key ID as name of the file. Upper Case)

# cd ~
# wget --no-check-certificate https://fedoraproject.org/static/0608B895.txt
# mv 0608B895.txt /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
# rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6

Verify

# rpm -qa gpg*
gpg-pubkey-0608b895-4bd22942

Install EPEL Repo

# rpm -Uvh http://mirror.karneval.cz/pub/linux/fedora/epel/6/i386/epel-release-6-8.noarch.rpm

CentOS 6.3 Netinstall URL

By polfilm,

CentOS 6.3 – i386 – 32-bit

http://mirror.centos.org/centos/6/os/i386/
or
http://mirror.centos.org/centos/6.3/os/i386/

 
CentOS 6.3 – x86_64 – 64-bit

http://mirror.centos.org/centos/6/os/x86_64/
or
http://mirror.centos.org/centos/6.3/os/x86_64/