Os dejo con un interesante video de "Security by default" de como securizar una instalación de SO CentOS, totalmente válido para Red Hat.
Saludos,
[root@localhost system]# ls -ltrha
total 52K
lrwxrwxrwx. 1 root root 39 Jun 27 19:12 syslog.service -> /usr/lib/systemd/system/rsyslog.service
drwxr-xr-x. 2 root root 4.0K Jun 27 19:12 getty.target.wants
drwxr-xr-x. 2 root root 4.0K Jun 27 19:12 default.target.wants
drwxr-xr-x. 2 root root 4.0K Jun 27 19:12 graphical.target.wants
lrwxrwxrwx. 1 root root 41 Jun 27 19:12 dbus-org.fedoraproject.FirewallD1.service -> /usr/lib/systemd/system/firewalld.service
drwxr-xr-x. 2 root root 4.0K Jun 27 19:12 basic.target.wants
lrwxrwxrwx. 1 root root 44 Jun 27 19:12 dbus-org.freedesktop.Avahi.service -> /usr/lib/systemd/system/avahi-daemon.service
drwxr-xr-x. 2 root root 4.0K Jun 27 19:13 sysinit.target.wants
drwxr-xr-x. 2 root root 4.0K Jun 27 19:13 sockets.target.wants
drwxr-xr-x. 2 root root 4.0K Jun 27 19:13 printer.target.wants
lrwxrwxrwx. 1 root root 46 Jun 27 19:13 dbus-org.freedesktop.NetworkManager.service -> /usr/lib/systemd/system/NetworkManager.service
drwxr-xr-x. 2 root root 4.0K Jun 27 19:13 system-update.target.wants
drwxr-xr-x. 2 root root 4.0K Jun 27 19:13 spice-vdagentd.target.wants
lrwxrwxrwx. 1 root root 41 Jun 27 19:14 dbus-org.bluez.service -> /usr/lib/systemd/system/bluetooth.service
drwxr-xr-x. 2 root root 4.0K Jun 27 19:14 bluetooth.target.wants
lrwxrwxrwx. 1 root root 35 Jun 27 19:14 display-manager.service -> /usr/lib/systemd/system/gdm.service
lrwxrwxrwx. 1 root root 37 Oct 10 11:00 default.target -> /lib/systemd/system/multi-user.target
drwxr-xr-x. 4 root root 4.0K Oct 11 14:37 ..
lrwxrwxrwx. 1 root root 57 Oct 11 14:47 dbus-org.freedesktop.nm-dispatcher.service -> /usr/lib/systemd/system/NetworkManager-dispatcher.service
drwxr-xr-x. 13 root root 4.0K Oct 11 14:47 .
drwxr-xr-x. 2 root root 4.0K Oct 11 14:48 multi-user.target.wants
#proxy.sh
export http_proxy=http://host.com:port/
export ftp_proxy=http://host.com:port/
export no_proxy=.domain.com
proxy
|
URL of a proxy server including the port number. |
proxy_password
|
Password for authentication with a proxy server. |
proxy_username
| User name for authentication with a proxy server. |
IPHONE 3GSIOS 5.1.1Baseband 5.16.05 (Firmware modem)
root@myserver # eeprom
nvramrc=devalias mirrordisk /ssm@0,0/pci@18,600000/pci@1/scsi@2/disk@0,0
devalias rootdisk /ssm@0,0/pci@19,700000/pci@2/scsi@2/disk@0,0
devalias cdrom /ssm@0,0/pci@19,700000/pci@2/scsi@2/disk@6,0:f
network-boot-arguments: data not available.
secondary-diag?=false
auto-boot-timeout=512
scsi-initiator-id=7
powerfail-time=0
fcode-debug?=true
output-device=/sgcn
input-device=/sgcn
load-base=0x4000
boot-command=boot
auto-boot?=true
error-reset-recovery=sync
diag-file: data not available.
boot-file: data not available.
diag-device=disk diskifp diskglm diskc net
boot-device=rootdisk mirrordisk
local-mac-address?=false
ansi-terminal?=true
screen-#columns=80
screen-#rows=34
silent-mode?=false
use-nvramrc?=true
oem-logo: data not available.
oem-logo?=false
oem-banner: data not available.
oem-banner?=false
security-mode=none
security-password: data not available.
security-#badlogins: data not available.
hardware-revision: data not available.
last-hardware-update: data not available.
#power-cycles: data not available.
diag-switch?=false
boot-device=rootdisk mirrordiskY los alias corresponden a los siguientes dispositivos:
mirrordisk /ssm@0,0/pci@18,600000/pci@1/scsi@2/disk@0,0
rootdisk /ssm@0,0/pci@19,700000/pci@2/scsi@2/disk@0,0
root@myserver(SunOS-5.10) # df -h /dev/md/dsk/d0Se encuentra en el dispositivo de raid /dev/md/dsk/d0. Vamos a ver su estado con metastat. También nos mostrara los devices.
Filesystem size used avail capacity Mounted on
/dev/md/dsk/d0 9.6G 3.4G 6.2G 36% /
root@myserver(SunOS-5.10) # metastat d0Si hacemos un ls vemos la dirección del hardware:
d0: Mirror
Submirror 0: d10
State: Okay
Submirror 1: d20
State: Okay
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 20494464 blocks (9.8 GB)
d10: Submirror of d0
State: Okay
Size: 20494464 blocks (9.8 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c1t0d0s0 0 No Okay Yes
d20: Submirror of d0
State: Okay
Size: 20494464 blocks (9.8 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c0t0d0s0 0 No Okay Yes
Device Relocation Information:
Device Reloc Device ID
c1t0d0 Yes id1,sd@n5000cca0044105bf
c0t0d0 Yes id1,sd@n5000cca0044105b3
[root@myserver]# cd /usr/lib64/nagios/plugins
[root@myserver plugins]# vi check_linux_mem
[root@myserver plugins]# chmod +x check_linux_mem
[root@myserver plugins]# ./check_mem 80 90
OK | Total=3924872;;;;Used=3063452;;;;Free=861420;;;;Buffers=364708;;;;Cached=1693484
[root@myserver plugins]# ps -ef | grep nrpe
nagios 23755 1 0 09:14 ? 00:00:00 nrpe -c /etc/nagios/nrpe.cfg -d
root 24254 23713 0 09:26 pts/0 00:00:00 grep nrpe
[root@myserver plugins]# vi /etc/nagios/nrpe.cfg
command[check_mem]=/usr/lib64/nagios/plugins/check_linux_mem 90 95
[root@myserver plugins]# service nrpe restart
Shutting down Nagios NRPE daemon (nrpe): [ OK ]
Starting Nagios NRPE daemon (nrpe): [ OK ]
[root@master ~]# wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
--2013-03-11 11:52:16-- http://apt.sw.be/redhat/el6/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
Connecting to 192.168.122.1:3128... connected.
Proxy request sent, awaiting response... 200 OK
Length: 12700 (12K) [application/x-redhat-package-manager]
Saving to: “rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm”
100%[=====================================================================>] 12,700 39.4K/s in 0.3s
2013-03-11 11:52:17 (39.4 KB/s) - “rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm” saved [12700/12700]
[root@master ~]# rpm -Uvh rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
warning: rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 6b8d79e6: NOKEY
Preparing... ########################################### [100%]
1:rpmforge-release ########################################### [100%]
[root@master ~]# yum repolist
Loaded plugins: product-id, subscription-manager
Updating certificate-based repositories.
Unable to read consumer identity
rhel-local | 4.0 kB 00:00
rhel-local/primary_db | 3.1 MB 00:00
rpmforge | 1.9 kB 00:00
rpmforge/primary_db | 2.5 MB 00:00
repo id repo name status
rhel-local Red Hat Linux 6Server - x86_64 - DVD 3,585
rpmforge RHEL 6Server - RPMforge.net - dag 4,458
repolist: 8,043
[root@master ~]# yum install nrpe
Loaded plugins: product-id, subscription-manager
Updating certificate-based repositories.
Unable to read consumer identity
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package nagios-nrpe.x86_64 0:2.12-1.el6.rf will be installed
--> Processing Dependency: nagios-plugins for package: nagios-nrpe-2.12-1.el6.rf.x86_64
--> Running transaction check
---> Package nagios-plugins.x86_64 0:1.4.16-1.el6.rf will be installed
--> Processing Dependency: perl(Net::SNMP) for package: nagios-plugins-1.4.16-1.el6.rf.x86_64
--> Processing Dependency: fping for package: nagios-plugins-1.4.16-1.el6.rf.x86_64
--> Running transaction check
---> Package fping.x86_64 0:3.4-1.el6.rf will be installed
---> Package perl-Net-SNMP.noarch 0:5.2.0-1.2.el6.rf will be installed
--> Processing Dependency: perl(Socket6) >= 0.19 for package: perl-Net-SNMP-5.2.0-1.2.el6.rf.noarch
--> Processing Dependency: perl(Digest::HMAC) for package: perl-Net-SNMP-5.2.0-1.2.el6.rf.noarch
--> Processing Dependency: perl(Crypt::DES) for package: perl-Net-SNMP-5.2.0-1.2.el6.rf.noarch
--> Processing Dependency: perl(Digest::SHA1) for package: perl-Net-SNMP-5.2.0-1.2.el6.rf.noarch
--> Running transaction check
---> Package perl-Crypt-DES.x86_64 0:2.05-3.2.el6.rf will be installed
---> Package perl-Digest-HMAC.noarch 0:1.01-22.el6 will be installed
---> Package perl-Digest-SHA1.x86_64 0:2.12-2.el6 will be installed
---> Package perl-Socket6.x86_64 0:0.23-3.el6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
===============================================================================================================
Package Arch Version Repository Size
===============================================================================================================
Installing:
nagios-nrpe x86_64 2.12-1.el6.rf rpmforge 34 k
Installing for dependencies:
fping x86_64 3.4-1.el6.rf rpmforge 47 k
nagios-plugins x86_64 1.4.16-1.el6.rf rpmforge 795 k
perl-Crypt-DES x86_64 2.05-3.2.el6.rf rpmforge 41 k
perl-Digest-HMAC noarch 1.01-22.el6 rhel-local 21 k
perl-Digest-SHA1 x86_64 2.12-2.el6 rhel-local 49 k
perl-Net-SNMP noarch 5.2.0-1.2.el6.rf rpmforge 88 k
perl-Socket6 x86_64 0.23-3.el6 rhel-local 23 k
Transaction Summary
===============================================================================================================
Install 8 Package(s)
Total download size: 1.1 M
Installed size: 5.5 M
Is this ok [y/N]: y
Downloading Packages:
(1/8): fping-3.4-1.el6.rf.x86_64.rpm | 47 kB 00:00
(2/8): nagios-nrpe-2.12-1.el6.rf.x86_64.rpm | 34 kB 00:00
(3/8): nagios-plugins-1.4.16-1.el6.rf.x86_64.rpm | 795 kB 00:00
(4/8): perl-Crypt-DES-2.05-3.2.el6.rf.x86_64.rpm | 41 kB 00:00
(5/8): perl-Digest-HMAC-1.01-22.el6.noarch.rpm | 21 kB 00:00
(6/8): perl-Digest-SHA1-2.12-2.el6.x86_64.rpm | 49 kB 00:00
(7/8): perl-Net-SNMP-5.2.0-1.2.el6.rf.noarch.rpm | 88 kB 00:00
(8/8): perl-Socket6-0.23-3.el6.x86_64.rpm | 23 kB 00:00
---------------------------------------------------------------------------------------------------------------
Total 572 kB/s | 1.1 MB 00:01
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
Installing : perl-Digest-SHA1-2.12-2.el6.x86_64 1/8
Installing : perl-Digest-HMAC-1.01-22.el6.noarch 2/8
Installing : perl-Socket6-0.23-3.el6.x86_64 3/8
Installing : perl-Crypt-DES-2.05-3.2.el6.rf.x86_64 4/8
Installing : perl-Net-SNMP-5.2.0-1.2.el6.rf.noarch 5/8
Installing : fping-3.4-1.el6.rf.x86_64 6/8
Installing : nagios-plugins-1.4.16-1.el6.rf.x86_64 7/8
Installing : nagios-nrpe-2.12-1.el6.rf.x86_64 8/8
Installed products updated.
Verifying : fping-3.4-1.el6.rf.x86_64 1/8
Verifying : nagios-nrpe-2.12-1.el6.rf.x86_64 2/8
Verifying : perl-Digest-SHA1-2.12-2.el6.x86_64 3/8
Verifying : perl-Net-SNMP-5.2.0-1.2.el6.rf.noarch 4/8
Verifying : perl-Crypt-DES-2.05-3.2.el6.rf.x86_64 5/8
Verifying : perl-Digest-HMAC-1.01-22.el6.noarch 6/8
Verifying : perl-Socket6-0.23-3.el6.x86_64 7/8
Verifying : nagios-plugins-1.4.16-1.el6.rf.x86_64 8/8
Installed:
nagios-nrpe.x86_64 0:2.12-1.el6.rf
Dependency Installed:
fping.x86_64 0:3.4-1.el6.rf nagios-plugins.x86_64 0:1.4.16-1.el6.rf
perl-Crypt-DES.x86_64 0:2.05-3.2.el6.rf perl-Digest-HMAC.noarch 0:1.01-22.el6
perl-Digest-SHA1.x86_64 0:2.12-2.el6 perl-Net-SNMP.noarch 0:5.2.0-1.2.el6.rf
perl-Socket6.x86_64 0:0.23-3.el6
Complete!
[root@master ~]# cd /etc/yum.repos.d/
[root@master yum.repos.d]# ls
local.repo mirrors-rpmforge-extras rhel-source.repo
mirrors-rpmforge mirrors-rpmforge-testing rpmforge.repo
[root@master yum.repos.d]# vi rpmforge.repo
[root@master yum.repos.d]# cat rpmforge.repo
### Name: RPMforge RPM Repository for RHEL 6 - dag
### URL: http://rpmforge.net/
[rpmforge]
name = RHEL $releasever - RPMforge.net - dag
baseurl = http://apt.sw.be/redhat/el6/en/$basearch/rpmforge
mirrorlist = http://apt.sw.be/redhat/el6/en/mirrors-rpmforge
#mirrorlist = file:///etc/yum.repos.d/mirrors-rpmforge
enabled = 0
protect = 0
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag
gpgcheck = 1
[rpmforge-extras]
name = RHEL $releasever - RPMforge.net - extras
baseurl = http://apt.sw.be/redhat/el6/en/$basearch/extras
mirrorlist = http://apt.sw.be/redhat/el6/en/mirrors-rpmforge-extras
#mirrorlist = file:///etc/yum.repos.d/mirrors-rpmforge-extras
enabled = 0
protect = 0
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag
gpgcheck = 1
[rpmforge-testing]
name = RHEL $releasever - RPMforge.net - testing
baseurl = http://apt.sw.be/redhat/el6/en/$basearch/testing
mirrorlist = http://apt.sw.be/redhat/el6/en/mirrors-rpmforge-testing
#mirrorlist = file:///etc/yum.repos.d/mirrors-rpmforge-testing
enabled = 0
protect = 0
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag
gpgcheck = 1
[root@master yum.repos.d]# yum repolist
Loaded plugins: product-id, subscription-manager
Updating certificate-based repositories.
Unable to read consumer identity
repo id repo name status
rhel-local Red Hat Linux 6Server - x86_64 - DVD 3,585
repolist: 3,585
[root@master yum.repos.d]# service nrpe status
nrpe is stopped
[root@master yum.repos.d]# service nrpe start
Starting Nagios NRPE daemon (nrpe): [ OK ]
[root@master yum.repos.d]# ps -ef |grep nrpe
nagios 1504 1 0 11:59 ? 00:00:00 nrpe -c /etc/nagios/nrpe.cfg -d
root 1507 1402 0 11:59 pts/0 00:00:00 grep nrpe
[root@master yum.repos.d]# cat /etc/nagios/nrpe.cfg
#############################################################################
# Sample NRPE Config File
# Written by: Ethan Galstad (nagios@nagios.org)
#
# Last Modified: 11-23-2007
#
# NOTES:
# This is a sample configuration file for the NRPE daemon. It needs to be
# located on the remote host that is running the NRPE daemon, not the host
# from which the check_nrpe client is being executed.
#############################################################################
# LOG FACILITY
# The syslog facility that should be used for logging purposes.
log_facility=daemon
# PID FILE
# The name of the file in which the NRPE daemon should write it's process ID
# number. The file is only written if the NRPE daemon is started by the root
# user and is running in standalone mode.
pid_file=/var/run/nrpe.pid
# PORT NUMBER
# Port number we should wait for connections on.
# NOTE: This must be a non-priviledged port (i.e. > 1024).
# NOTE: This option is ignored if NRPE is running under either inetd or xinetd
server_port=5666
# SERVER ADDRESS
# Address that nrpe should bind to in case there are more than one interface
# and you do not want nrpe to bind on all interfaces.
# NOTE: This option is ignored if NRPE is running under either inetd or xinetd
#server_address=127.0.0.1
# NRPE USER
# This determines the effective user that the NRPE daemon should run as.
# You can either supply a username or a UID.
#
# NOTE: This option is ignored if NRPE is running under either inetd or xinetd
nrpe_user=nagios
# NRPE GROUP
# This determines the effective group that the NRPE daemon should run as.
# You can either supply a group name or a GID.
#
# NOTE: This option is ignored if NRPE is running under either inetd or xinetd
nrpe_group=nagios
# ALLOWED HOST ADDRESSES
# This is an optional comma-delimited list of IP address or hostnames
# that are allowed to talk to the NRPE daemon.
#
# Note: The daemon only does rudimentary checking of the client's IP
# address. I would highly recommend adding entries in your /etc/hosts.allow
# file to allow only the specified host to connect to the port
# you are running this daemon on.
#
# NOTE: This option is ignored if NRPE is running under either inetd or xinetd
allowed_hosts=127.0.0.1
# COMMAND ARGUMENT PROCESSING
# This option determines whether or not the NRPE daemon will allow clients
# to specify arguments to commands that are executed. This option only works
# if the daemon was configured with the --enable-command-args configure script
# option.
#
# *** ENABLING THIS OPTION IS A SECURITY RISK! ***
# Read the SECURITY file for information on some of the security implications
# of enabling this variable.
#
# Values: 0=do not allow arguments, 1=allow command arguments
dont_blame_nrpe=0
# COMMAND PREFIX
# This option allows you to prefix all commands with a user-defined string.
# A space is automatically added between the specified prefix string and the
# command line from the command definition.
#
# *** THIS EXAMPLE MAY POSE A POTENTIAL SECURITY RISK, SO USE WITH CAUTION! ***
# Usage scenario:
# Execute restricted commmands using sudo. For this to work, you need to add
# the nagios user to your /etc/sudoers. An example entry for alllowing
# execution of the plugins from might be:
#
# nagios ALL=(ALL) NOPASSWD: /usr/lib/nagios/plugins/
#
# This lets the nagios user run all commands in that directory (and only them)
# without asking for a password. If you do this, make sure you don't give
# random users write access to that directory or its contents!
# command_prefix=/usr/bin/sudo
# DEBUGGING OPTION
# This option determines whether or not debugging messages are logged to the
# syslog facility.
# Values: 0=debugging off, 1=debugging on
debug=0
# COMMAND TIMEOUT
# This specifies the maximum number of seconds that the NRPE daemon will
# allow plugins to finish executing before killing them off.
command_timeout=60
# CONNECTION TIMEOUT
# This specifies the maximum number of seconds that the NRPE daemon will
# wait for a connection to be established before exiting. This is sometimes
# seen where a network problem stops the SSL being established even though
# all network sessions are connected. This causes the nrpe daemons to
# accumulate, eating system resources. Do not set this too low.
connection_timeout=300
# WEEK RANDOM SEED OPTION
# This directive allows you to use SSL even if your system does not have
# a /dev/random or /dev/urandom (on purpose or because the necessary patches
# were not applied). The random number generator will be seeded from a file
# which is either a file pointed to by the environment valiable $RANDFILE
# or $HOME/.rnd. If neither exists, the pseudo random number generator will
# be initialized and a warning will be issued.
# Values: 0=only seed from /dev/[u]random, 1=also seed from weak randomness
#allow_weak_random_seed=1
# INCLUDE CONFIG FILE
# This directive allows you to include definitions from an external config file.
#include=<somefile.cfg>
# INCLUDE CONFIG DIRECTORY
# This directive allows you to include definitions from config files (with a
# .cfg extension) in one or more directories (with recursion).
#include_dir=<somedirectory>
#include_dir=<someotherdirectory>
# COMMAND DEFINITIONS
# Command definitions that this daemon will run. Definitions
# are in the following format:
#
# command[<command_name>]=<command_line>
#
# When the daemon receives a request to return the results of <command_name>
# it will execute the command specified by the <command_line> argument.
#
# Unlike Nagios, the command line cannot contain macros - it must be
# typed exactly as it should be executed.
#
# Note: Any plugins that are used in the command lines must reside
# on the machine that this daemon is running on! The examples below
# assume that you have plugins installed in a /usr/local/nagios/libexec
# directory. Also note that you will have to modify the definitions below
# to match the argument format the plugins expect. Remember, these are
# examples only!
# The following examples use hardcoded command arguments...
command[check_users]=/usr/lib64/nagios/plugins/check_users -w 5 -c 10
command[check_load]=/usr/lib64/nagios/plugins/check_load -w 15,10,5 -c 30,25,20
command[check_hda1]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /dev/hda1
command[check_zombie_procs]=/usr/lib64/nagios/plugins/check_procs -w 5 -c 10 -s Z
command[check_total_procs]=/usr/lib64/nagios/plugins/check_procs -w 150 -c 200
# The following examples allow user-supplied arguments and can
# only be used if the NRPE daemon was compiled with support for
# command arguments *AND* the dont_blame_nrpe directive in this
# config file is set to '1'. This poses a potential security risk, so
# make sure you read the SECURITY file before doing this.
#command[check_users]=/usr/lib64/nagios/plugins/check_users -w $ARG1$ -c $ARG2$
#command[check_load]=/usr/lib64/nagios/plugins/check_load -w $ARG1$ -c $ARG2$
#command[check_disk]=/usr/lib64/nagios/plugins/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$
#command[check_procs]=/usr/lib64/nagios/plugins/check_procs -w $ARG1$ -c $ARG2$ -s $ARG3$
[root@master yum.repos.d]# service nrpe restart
[root@myserver ~]# php -v
PHP 5.3.3 (cli) (built: Jun 25 2012 04:41:23)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
[root@myserver ~]# wget http://dl.iuscommunity.org/pub/ius/stable/Redhat/6/x86_64/ius-release-1.0-11.ius.el6.noarch.rpm
[root@myserver ~]# wget http://dl.iuscommunity.org/pub/ius/stable/Redhat/6/x86_64/epel-release-6-5.noarch.rpm
[root@myserver ~]# rpm -Uvh epel-release-6-5.noarch.rpm
[root@myserver ~]# rpm -Uvh ius-release-1.0-11.ius.el6.noarch.rpm
[root@myserver ~]#yum install yum-plugin-replace
[root@myserver ~]# yum replace php --replace-with php53u
Loaded plugins: replace
Excluding Packages in global exclude list
Finished
Replacing packages takes time, please be patient...
This may be normal depending on the package. Continue? [y/N] y
Removed:
php.x86_64 0:5.1.6-27.el5 php-cli.x86_64 0:5.1.6-27.el5 php-common.x86_64 0:5.1.6-27.el5
php-devel.x86_64 0:5.1.6-27.el5 php-pear.noarch 1:1.4.9-6.el5
Installed:
php53.x86_64 0:5.3.2-6.ius.el5 php53-cli.x86_64 0:5.3.2-6.ius.el5
php53-common.x86_64 0:5.3.2-6.ius.el5 php53-devel.x86_64 0:5.3.2-6.ius.el5
php53-pear.noarch 1:1.8.1-4.ius.el5 php53-pspell.x86_64 0:5.3.2-6.ius.el5
Complete!
[root@myserver ~]# php -v
PHP 5.3.26 (cli) (built: Jun 24 2013 15:05:00)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2013 Zend Technologies
Which are the goals of this repository ?
Providing the latest versions of the LAMP stack, and some other software, to the Fedora and Enterprise Linux (RHEL, CentOS, Oracle, Scientific Linux, ...) users. It mainly contains :
packages I also maintains in Fedora
backports of packages available in Fedora development version
some packages incompatible with Fedora policy
some packages in progress before being submitted to Fedora repository
(nearly) vanilla versions
This is quite away from backporting fixes policy of Enterprise Linux.
What is the IUS Community Project?
The IUS Community Project is an effort to package rpms of the latest stable versions of the most commonly requested software on Red Hat Enterprise Linux and CentOS. IUS provides a better way to upgrade PHP/MySQL/Python/Etc on RHEL or CentOS. The project is run by professional Linux Engineers that are primarily focused on RPM Development in the web hosting industry.
What is it NOT?
For one, IUS is not a service of Rackspace but rather is Sponsored by Rackspace. Additionally, IUS is not the same as Fedora EPEL or similar repos. EPEL is geared towards adding packages to RHEL, and has strict guidelines that none of their packages replace anything in RHEL. IUS on the other hand is explicitly geared towards providing packages that do replace existing software in RHEL. Essentially, we are offering a proper way to upgrade software on RHEL when you really need it the latest upstream versions of software.
# passwd
# vi /etc/sysconfig/network
# vi /etc/hosts
# hostname NEWHOSTNAME
# cd /etc/sysconfig/network-scripts/
# vi ifcfg-eth0
# vi ifcfg-eth1
# vi /etc/sysconfig/network
# service network restart
# cd /etc/.sshLas claves de usuario, por ejemplo root, también se tendrán que borrar y volver a generar si existieran.
# rm -f *_key*
# reboot
#!/bin/bash
# Guardar cookies
USERNAME=admin
CHECK_INTERVAL=120
EXCEPTIONS_FILE="/etc/notify-exceptions"
# Gets
check(){
FILE=`mktemp`
COOKIES_FILE=`mktemp`
EXCEPTIONS=`cat $EXCEPTIONS_FILE`
wget --keep-session-cookies --save-cookies $COOKIES_FILE --post-data "useralias=$USERNAME&password=$PASSWORD&submit=Connect+%3E%3E" http://myserver.com/centreon/index.php -O /dev/null 2> /dev/null
wget --load-cookies $COOKIES_FILE -p http://myserver.com/centreon/include/home/tacticalOverview/xml/ndo/tacticalOverviewXml.php -O $FILE 2> /dev/null
cat $FILE | tr "<" "\n" |sort | uniq |grep -i "\[sucs" |cut -c9-15 > $FILE
NUMBER_OF_HOSTS=`diff $FILE /etc/notify-exceptions | grep "^<" | cut -d " " -f2 | wc -l`
rm $FILE $COOKIES_FILE
echo $NUMBER_OF_HOSTS
}
# Bucle
while true
do
RES=`check`
if [[ $RES -ne 0 ]] ; then
notify-send --urgency=low -i "terminal" "Alerta Unix" "Eventos en $RES servidores."
fi
sleep $CHECK_INTERVAL
done
rm $HOSTS_FILE
Esquemas eléctricos del timbre a 220v |
GPIO Pin Schema |
#!/usr/bin/python
import RPi.GPIO as GPIO
from time import sleep
import pygame
GPIO.setmode(GPIO.BCM)
GPIO.setup(17, GPIO.IN)
TIME = 15
HOME = "/home/pi/doorbell/"
TONE = "tone.mp3"
pygame.init()
while True:
if not GPIO.input(17):
pygame.mixer.music.load(HOME+TONE)
pygame.mixer.music.play()
sleep(TIME)
pygame.mixer.music.fadeout(5000)
pygame.mixer.stop()
sleep(0.1)
Foto de la protoboard |