Archive for 'CentOS / RHEL'

1] I used a minimal CentOS 6.5 64-bit installation for this blog post. I've tested this documentation on a VPS and a dedicated server.
2] Login as root in your CentOS installation.
3] "yum install gcc wget"
4] "wget http://www.malaya-digital.org/portsentry-1.2.tar.gz"
5] "tar xzf portsentry-1.2.tar.gz"
6] "cd portsentry_beta"
› Continue reading...

NOTE: This article assumes that you have the necessary software installed in your GNU/Linux distribution.

1] Do a "su -", or do everything here as root.
2] You should have a Linux partition (hex code 83 if you use fdisk in GNU/Linux) for this purpose. Mine is /dev/sdb1
3] Do the following:

mkdir /encrypted

# Note: The following 2 commands will ask you for input.
cryptsetup -y -v luksFormat /dev/sdb1
cryptsetup luksOpen /dev/sdb1 encrypted

mkfs.ext4 /dev/mapper/encrypted
mount /dev/mapper/encrypted /encrypted

4] To unmount your encrypted filesystem:

umount /encrypted
cryptsetup luksClose encrypted

5] To remount your encrypted filesystem:

# Note: The following command will ask you for input.
cryptsetup luksOpen /dev/sdb1 encrypted

mount /dev/mapper/encrypted /encrypted

NOTE: This article assumes that you have the necessary software installed in your GNU/Linux distribution.

1] Do a "su -", or do everything here as root.
2] Create a file for the filesystem and then secure its permissions. This will create 2 GB file on the present working directory:

dd of=encrypted bs=1G count=0 seek=2 # You may substitute an absolute path for "encrypted".
chmod 600 encrypted # You may substitute an absolute path for "encrypted".

3] Do the following on the present working directory in step 2:

mkdir /encrypted
losetup /dev/loop0 encrypted # You may substitute an absolute path to the file "encrypted".

# Note: The following 2 commands will ask you for input.
cryptsetup -y luksFormat /dev/loop0 # A password for the encrypted filesystem will be asked here.
cryptsetup luksOpen /dev/loop0 encrypteddev # This will show "/dev/mapper/encrypteddev".

mkfs.ext4 /dev/mapper/encrypteddev # This will make a EXT4 filesystem on your encrypted file.
mount /dev/mapper/encrypteddev /encrypted

4] To unmount your encrypted filesystem:

umount /encrypted
cryptsetup luksClose encrypteddev # This will remove "/dev/mapper/encrypteddev".
losetup -d /dev/loop0

5] To mount your encrypted filesystem again (your present working directory should be where the "encrypted" file is located):

losetup /dev/loop0 encrypted # You may substitute an absolute path to the file "encrypted".

# Note: The following command will ask you for input.
cryptsetup luksOpen /dev/loop0 encrypteddev # This will show "/dev/mapper/encrypteddev".

mount /dev/mapper/encrypteddev /encrypted # You may substitute an absolute path to the file "encrypted"

This guide will help you setup WikiMedia on http://<IP or hostname>/wiki .
1] Setup CentOS 6 64-bit as in guide (http://www.malaya-digital.org/setup-a-minimal-centos-6-0-64-bit-setup-with-networking/).
2] "yum update"
3] "vi /etc/sysconfig/selinux" and set "SELINUX=disabled".
4] "setenforce 0"
› Continue reading...

1] Do everything below as root. If you need help to setup networking in a minimal CentOS 6.2 installation, please visit http://www.malaya-digital.org/setup-a-minimal-centos-6-0-64-bit-setup-with-networking/.
2] Make sure selinux is disabled.
3] "yum install httpd php pcre php-mysql php-pear php-pecl-apc mysql-server ImageMagick sendmail php-intl wget system-config-firewall-tui"
4] "service mysqld start"
5] "/usr/bin/mysql_secure_installation"
› Continue reading...

1] rpm -ivh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-5.noarch.rpm
2] yum install ssmtp
3] cd /etc/ssmtp
4] mv ssmtp.conf ssmtp.conf.orig
5] vi /etc/ssmtp.conf

AuthUser=<your Google username&#[email protected]
AuthPass=<your password>
FromLineOverride=YES
mailhub=smtp.gmail.com:587
UseSTARTTLS=YES

6]To test: echo "Testing" | mail -s "Test Email" (your e-mail address)

NOTE: I tried this on my Nagios setup as described here: http://www.malaya-digital.org/setup-a-minimal-centos-6-64-bit-nagios-server-configure-a-centos-6-64-bit-nagios-nrpe-client/ .

1] Login as root.
2] "yum install perl-Net-XMPP"
3] Download notify_via_jabber , and save it to /usr/lib64/nagios/plugins .
4] "vi /usr/lib64/nagios/plugins/notify_via_jabber", look for the following 2 lines, and adjust properly.

my $username = "your.google.username";
my $password = "your.google.password";

› Continue reading...

« Previous posts Back to top