segunda-feira, 21 de janeiro de 2013
For some reason I can never remember the xferlog format that is used by daemons such as Pure-FTP. Although xferlog is well documented, I am always fumbling to find the doc when I need it, and it's never bad to have information duplicated in many places!
Anyways, on with the description. Here is a sample log entry from my server (with access IPs and dirs changed):
Fri May 14 05:16:12 2010 0 ::ffff:1.2.3.4 11974 /home/user/public_html/index.php a _ i r user ftp 0 * c
I'll step through each item individually. The delimiter here is whitespace, so each new token represents a unique piece of data, with the exception of the date at the beginning.
Fri May 14 05:16:12 2010
Date/time stamp, nothing complicated.
0
Transfer time, in whole seconds (this transfer took less than a second, so zero).
::ffff:1.2.3.4
Remote host where the user connected from.
11974
Size of the transferred file (in bytes).
/home/user/public_html/index.php
Full path to the uploaded file.
a
Transfer type, a = ASCII (plain-text files), b = binary (everything else)
_
Action flag, C = compressed, U = uncompressed; T = tar'ed; _ = no action was taken.
i
Direction, i = incoming, o = outgoing, d = deleted.
r
Access mode, a = anonymous user, r = real (normal) user.
user
Local username authenticated with.
ftp
The service being invoked (almost always FTP).
0
Authentication method, 0 = none, 1 = RFC931 authetication.
*
User ID or * if not available (virtual user).
c
Completion status, c = completed, i = incomplete.
Fonte: http://www.gnode.net/reading-ftp-logs-in-xferlog-format
terça-feira, 2 de outubro de 2012
quarta-feira, 2 de maio de 2012
sexta-feira, 13 de abril de 2012
quarta-feira, 4 de abril de 2012
quinta-feira, 29 de março de 2012
1. Ligar o Telnet ao Exchange Server que aloja o serviço IMS utilizando a porta 25.
Comando telnet
2. Ligar o local echo no cliente de telnet para poder ver o que está a escrever.
No Telnet do Win 9x e NT 3.5/4.0 fá-lo através da opção “preferences” do menu “terminal”, e seleccionando o botão de opção do local echo. No Telnet do Windows 2000, escreva o comando "set local_echo", no command prompt.
3. Execute a seguinte sequência de comandos smtp
helo
a resposta deve ser a seguinte
250 OK
mail from:
a resposta deve ser a seguinte
250 OK - mail from
rcpt to:
a resposta deve ser a seguinte
250 OK - Recipient
data
a resposta deve ser a seguinte
354 Send data. Finalizar com CRLF.CRLF
To:
From:
Subject:
a resposta deve ser a seguinte
250 OK
quit
Fonte: http://www.rsoutlook.com/exc/telnetsmtp.htm
sexta-feira, 16 de março de 2012
Performance commands for AIX
gz@aix~# sar -P ALL 1 4 AIX lpar1 3 5 0XXXXXXXXXXX 12/07/11 System configuration: lcpu=4 ent=0.50 mode=Uncapped 15:19:45 cpu %usr %sys %wio %idle physc %entc 15:19:46 0 57 37 6 0 0.19 37.3 1 32 22 12 35 0.07 14.9 2 0 26 0 74 0.00 0.1 3 0 32 0 68 0.00 0.1 U - - 11 37 0.24 47.7 - 26 17 15 42 0.26 52.3 15:19:47 0 53 41 6 0 0.18 35.1 1 24 23 7 46 0.07 13.9 2 0 27 0 73 0.00 0.1 3 0 30 0 70 0.00 0.1 U - - 12 39 0.25 50.9 - 22 18 15 46 0.25 49.1 15:19:48 0 49 37 13 1 0.29 58.4 1 17 65 10 9 0.19 38.2 2 0 26 0 74 0.00 0.1 3 0 34 0 66 0.00 0.1 U - - 1 3 0.02 3.3 - 35 46 12 7 0.48 96.7 15:19:49 0 53 42 5 1 0.17 33.9 1 41 21 21 18 0.08 16.9 2 0 28 0 72 0.00 0.1 3 0 30 0 70 0.00 0.1 U - - 14 35 0.25 49.1 - 25 18 19 39 0.25 50.9 Average 0 52 39 8 0 0.21 41.2 1 25 41 12 21 0.10 20.9 2 0 27 0 73 0.00 0.1 3 0 31 0 69 0.00 0.1 U - - 9 29 0.19 37.8 - 27 25 15 33 0.31 62.2How to monitor the system wide processor utilization:
gz@aix~# lparstat 1 3 System configuration: type=Shared mode=Uncapped smt=On lcpu=4 mem=4096 psize=10 ent=0.50 %user %sys %wait %idle physc %entc lbusy vcsw phint ----- ----- ------ ------ ----- ----- ------ ----- ----- 30.5 39.9 7.7 21.9 0.38 76.4 37.0 1550 286 27.3 39.7 6.7 26.2 0.36 72.5 40.5 1641 285 35.4 46.1 6.5 12.0 0.43 87.0 37.7 1849 369
How to display micropartition statistics with topas:
gz@aix~# topas -L Interval: 2 Logical Partition: lpar1 Wed Dec 7 15:21:00 2011 Psize: - Shared SMT ON Online Memory: 4096.0 Ent: 0.50 Mode: UnCapped Online Logical CPUs: 4 Partition CPU Utilization Online Virtual CPUs: 2 %usr %sys %wait %idle physc %entc %lbusy app Vcsw phint %hypv hcalls 47 33 9 11 0.4 89.44 26.16 - 2492 411 55.9 40144 ================================================================================== LCPU minpf majpf intr csw icsw runq lpa scalls usr sys _wt idl pc lcsw Cpu0 292 0 1456 5072 1093 3 100 9643 52 41 6 1 0.24 1166 Cpu1 344 0 706 3622 849 0 100 11180 54 33 8 6 0.21 1285 Cpu2 0 0 10 0 0 0 0 0 0 26 0 74 0.00 20 Cpu3 0 0 11 0 0 0 0 0 0 29 0 71 0.00 20
How to display cpu utilization of all active partitions in the management system:
gz@aix~# topas -C Topas CEC Monitor Interval: 10 Wed Dec 7 15:18:23 2011 Partitions Memory (GB) Processors Shr: 5 Mon:79.0 InUse:75.0 Shr:8.5 PSz: 10 Don: 0.0 Shr_PhysB 7.29 Ded: 0 Avl: - Ded: 0 APP: 1.3 Stl: 0.0 Ded_PhysB 0.00 Host OS M Mem InU Lp Us Sy Wa Id PhysB Vcsw Ent %EntC PhI -------------------------------------shared------------------------------------- lpar1 A53 U 28 27 12 89 8 0 2 4.70 0 4.00 117.6 0 lpar2 A53 U 16 14 8 84 9 0 6 1.55 3188 1.50 103.5 1206 lpar3 A53 U 12 12 6 88 5 0 5 0.72 1426 0.50 143.2 610 lpar4 A53 U 16 15 8 3 10 0 85 0.29 3338 1.50 19.1 399 lpar5 A53 U 8.0 7.8 4 0 1 0 97 0.03 0 1.00 3.4 0 Host OS M Mem InU Lp Us Sy Wa Id PhysB Vcsw %istl %bstl ------------------------------------dedicated-----------------------------------
How to collect and display performance statistics for all logical CPUs in the system. In the example below, we will show one time the 20 seconds data:
gz@aix~# mpstat 20 1 System configuration: lcpu=2 ent=0.8 mode=Uncapped cpu min maj mpc int cs ics rq mig lpa sysc us sy wa id pc %ec lcs 0 301 0 160 450 556 262 0 22 100 3808 30 60 0 10 0.05 6.8 392 1 17 0 160 220 59 41 0 23 100 290 14 48 0 38 0.01 0.8 228 U - - - - - - - - - - - - 0 92 0.74 92.4 - ALL 318 0 320 670 615 303 0 45 100 4098 2 4 0 93 0.06 7.6 620
List of processes sorted by swap usage:
gz@aix~# ps gv | head -n 1; ps gv | egrep -v "RSS" | sort +5n
to calculate total used:
gz@aix~# ps gv | egrep -v "RSS" | awk '{total+=$5} END{print total}'
List of processes sorted by memory usage:
gz@aix~# ps gv | head -n 1; ps gv | egrep -v "RSS" | sort +6n
to calculate total used:
gz@aix~# ps gv | egrep -v "RSS" | awk '{total+=$6} END{print total}'
How to artificially limit the amount of memory:
gz@aix~# rmss -c 3000 Simulated memory size changed to 3000 Mb.
Tool to check the memory and paging space is allocation:
gz@aix~# svmon
(with -P you can see per process allocation)How to determine the amount of asynchronous I/O (legacy) servers configured on your system:
gz@aix~# pstat -a | egrep ' aioserver' | wc -l
or
gz@aix~# ps -ek | grep aioserver | grep -v posix_aioserver | wc -l
How to display virtual memory statistics:
root@aix53# vmstat -w 1 10 System configuration: lcpu=34 mem=30976MB ent=5.80 kthr memory page faults cpu ------- --------------------- ------------------------------------ ------------------ ----------------------- r b avm fre re pi po fr sr cy in sy cs us sy id wa pc ec 0 0 7061457 115394 0 0 0 0 0 0 9595 1833 34264 10 11 77 2 1.27 21.9 1 0 7061454 115397 0 0 0 0 0 0 9201 1709 33079 9 11 77 2 1.23 21.2 16 0 7061463 115192 0 0 0 0 0 0 12316 9676 33034 11 19 69 1 1.80 31.0 3 0 7061464 114619 0 0 0 0 0 0 10842 6207 33429 10 17 68 5 1.66 28.6 2 0 7061638 114443 0 0 0 0 0 0 6906 4124 28329 7 13 69 12 1.23 21.2 0 0 7061131 114942 0 2 0 0 0 0 5757 2354 23583 5 9 75 11 0.90 15.5 5 0 7061613 114457 0 2 0 0 0 0 6230 7724 23951 6 9 77 8 0.96 16.6 1 0 7062157 113913 0 0 0 0 0 0 6340 2021 24501 6 8 81 5 0.90 15.4 0 0 7062334 113736 0 0 0 0 0 0 5897 2530 22285 5 7 84 4 0.80 13.7 2 0 7062425 113645 0 0 0 0 0 0 7378 2931 28937 6 9 82 3 0.92 15.8
A script to get memory utilization:
gz@aix~# cat meminfo #!/usr/bin/ksh # # Quick view of memory usage under AIX # USED=`svmon -G | head -2 | tail -1 | awk '{ print $3 }'` USED=`expr $USED / 256` TOTAL=`lsattr -El sys0 -a realmem | awk '{ print $2 }'` TOTAL=`expr $TOTAL / 1000` FREE=`expr $TOTAL - $USED` echo "\nMemory Information" echo "==================" echo "total memory = $TOTAL MB" echo "free memory = $FREE MB" echo "used memory = $USED MB" exit 0
Fonte: http://docs.gz.ro/aix-performance-commands
quinta-feira, 15 de março de 2012
Backup commands for AIX
#mksysb -i -X /dev/rmt0
Creates image.data file with map file and system backup:
#mksysb -m /dev/rmt0
Creates system data but excludes the files listed in /etc/exclude.rootvg:
#mksysb -e /dev/rmt0
Creates /image.data file:
#mkszfile
Creates system boot backup to the CD-R device /dev/cd1:
#mkcd -d /dev/cd1
Creates backup of vg vg00 to CD-R device /dev/cd1:
#mkcd -d /dev/cd1 -v vg00
Creates generic boot backup:
#mkcd -d /dev/cd1 -G
Creates vg00.data image file and backup vg vg00:
#savevg -i -f /dev/rmt0 vg00
Creates vg00 backup but excludes files listed in the /etc/exclude.vg00:
#savevg -ef /dev/rmt0 vg00
Backup entire system to rmt0:
#find / -print | backup -ivf /dev/rmt0
Backup /home directory to rmt0 with backup level 0:
#backup -0vf /dev/rmt0 /home
List the archive in rmt0:
#restore -Tvf /dev/rmt0
Restore /home from archive in device rmt0:
#restore -xvf /dev/rmt0 /home
Restores particular file from /export/mksysb image:
#restore –xvf /export/mksysb ./etc/sshd.conf
Archives /home directory:
#find ./home -print |cpio -ocvumB > /dev/rmt0
Create an archive of /home directory:
#tar cvf /tmp/home.tar /home
Restores cpio archive from rmt0:
#cpio -icvdumB < /dev/rmt0
List the contents of cpio archive from rmt0:
#cpio -ivt < /dev/rmt0
Restores /home directory from rmt0:
#cpio -icvd < /dev/rmt0 /home
Archives /home to rmt0 device:
#tar -cvf /dev/rmt0 /home
List the archives in rmt0:
#tar -tvf /dev/rmt0
Extract /home from rmt0:
#tar -xvf /dev/rmt0 /home
Convert and copy ascii file si to ebcdic si1:
#dd if=si of=si1 conv=ebcdic
To copy blocks from rmt0 with 512 blocks to rmt1 with 1024 blocks:
#dd if=/dev/rmt0 ibs=512 obs=1024 of=/dev/rmt1
To rewind the tape:
#tctl -f /dev/rmt0 rewind
To eject the tape:
#tctl -f /dev/rmt0 offline
To show the status of tape:
#tctl -f /dev/rmt0 status
To change the block size of the tape to 512:
#chdev -l rmt0 -a block_size=512
How to restore a file from mksysb:
# listvgbackup -f /path/to/mksysb.image -r ./etc/file
Fonte: http://docs.gz.ro/node/20
sexta-feira, 9 de março de 2012
SRC – Gerenciamento de daemons no AIX
O AIX tem um gerenciador de daemons, chamado SRC, em inglês, “System Resource Controller“.Através do SRC podemos verificar se um serviço está ativo, parar, iniciar ou reinicializar um serviço.
Isto pode ser feito através dos seguintes comandos:
startsrc: iniciar refresh: reiniciar stopsrc: parar lssrc: verificar status
O SRC permite trabalharmos com um serviço ou um grupo de serviços. Para um serviço, usamos a opção “-s” e para um grupo, “-g”.
Por exemplo, para gerenciar os serviços de NFS:
Verificando status do grupo de serviços:
# lssrc -g nfs Subsystem Group PID Status biod nfs inoperative nfsd nfs inoperative rpc.statd nfs inoperative rpc.lockd nfs inoperative rpc.mountd nfs inoperative
Iniciando um serviço:
# startsrc -s nfsd # lssrc -g nfs Subsystem Group PID Status nfsd nfs 23672 active biod nfs inoperative rpc.statd nfs inoperative rpc.lockd nfs inoperative rpc.mountd nfs inoperative
Iniciando um grupo de serviços:
# startsrc -g nfs 0513-059 The biod Subsystem has been started. Subsystem PID is 17242. 0513-029 The nfsd Subsystem is already active. Multiple instances are not supported. 0513-059 The rpc.statd Subsystem has been started. Subsystem PID is 19862. 0513-059 The rpc.lockd Subsystem has been started. Subsystem PID is 24236. 0513-059 The rpc.mountd Subsystem has been started. Subsystem PID is 6802. # lssrc -g nfs Subsystem Group PID Status nfsd nfs 23672 active biod nfs 17242 active rpc.statd nfs 19862 active rpc.lockd nfs 24236 active rpc.mountd nfs 6802 active
Parando um grupo de serviços:
# stopsrc -g nfs 0513-044 The nfsd Subsystem was requested to stop. 0513-044 The biod Subsystem was requested to stop. 0513-044 The rpc.statd Subsystem was requested to stop. 0513-044 The rpc.lockd Subsystem was requested to stop. 0513-044 The rpc.mountd Subsystem was requested to stop. # lssrc -g nfs Subsystem Group PID Status biod nfs inoperative nfsd nfs inoperative rpc.statd nfs inoperative rpc.lockd nfs inoperative rpc.mountd nfs inoperative
Fonte: http://www.unixnotes.org/2007/01/31/src-gerenciamento-de-daemons-no-aix
quinta-feira, 8 de março de 2012
AIX - Identificando portas abertas
É muito importante conhecer o ambiente que está sendo administrado. Em se tratando de servidores, muitas vezes temos em um ambiente muitas portas abertas (em modo listen), e é importante saber qual processo está ouvindo em uma determinada porta, por questões de segurança e até em situações de troubleshooting.A dica de hoje é identificar, no AIX, qual processo está sendo executado em uma porta específica.
Método 1 - Usando os comandos netstat e rmsock
Protocolo TCP:# netstat -Aan |grep *.1334
f1000e0002b753b0 tcp4 0 0 *.1334 *.* LISTEN
# rmsock f1000e0002b753b0 tcpcb
The socket 0x2b75008 is being held by proccess 5701822 (writesrv).
# ps -ef |grep 5701822
root 5701822 1507536 0 Jun 10 - 0:00 /usr/sbin/writesrv
Como podem ver o processo writesrv está sendo executado na porta 1334.
Protocolo UDP:
# netstat -Aan |grep *.514
f1000e0002a67e00 udp4 0 0 *.514 *.*
# rmsock f1000e0002a67e00 inpcb
The socket 0x2a64c08 is being held by proccess 5308580 (syslogd).
# ps -ef |grep 5308580
root 5308580 1507536 0 Jun 10 - 0:36 /usr/sbin/syslogd
A porta 514 UDP está sendo utilizada pelo processo do syslogd.
Método 2 - Utilizando os comandos netstat e kdb (kernel debuger)
# netstat -Aan |grep 1334f1000e0002b753b0 tcp4 0 0 *.1334 *.* LISTEN
# kdb
(0)>
(0)> sockinfo f1000e0002b753b0 tcpcb
[... A saída do comando kdb é bem detalhado, e por isso foi truncado. O importante para nós é a ultima linha, como mostrado abaixo ... ]
proc/fd: 87/3
proc/fd: fd: 3
SLOT NAME STATE PID PPID ADSPACE CL #THS
pvproc+015C00 87*writesrv ACTIVE 05700BE 01700D0 0000001190239480 0 0001
O importante é saber o PID do processo, que está em hexadecimal na coluna PID.
Para converter de hexadecimal para decimal, basta utilizar o comando hcal, dentro do prompt do kdb. Como mostrado abaixo.
(0)>
(0)>
(0)> hcal 05700BE
Value hexa: 005700BE Value decimal: 5701822
(0)> quit
De volta ao shell, verificar qual programa pertence ao PID 5701822.
# ps -ef |grep 5701822
root 5701822 1507536 0 Jun 10 - 0:00 /usr/sbin/writesrv
O mesmo procedimento pode ser utilizado para portas UDP, sempre trocando o parâmetro tcpcb por inpcb.
Dica válida para AIX versões 5.3 e 6.1
Fonte: http://www.vivaolinux.com.br/dica/AIX-Identificando-portas-abertas
segunda-feira, 7 de novembro de 2011
terça-feira, 11 de outubro de 2011
Fita HP LTO Ultrium 5 3TB - PN: C7975A
Especificações técnicas | |
---|---|
Tecnologia de gravação | LTO-5 Ultrium |
Etiquetas de suportes | Write-on Labels in box |
Quantidade por embalagem | 1 |
Capacidade de armazenamento | 3.0 TB; Compressed 2:1; Supported |
Cor de produto | Light Blue |
Comprimento de tape | 846 m |
Largura da fita | 12.65 mm |
Espessura de tape | 6.4 um |
Força magnética coerciva | 2500-2700 Oe |
Formato do suporte | Re-Writable |
Itens incluídos | |
---|---|
Declaração de garantia standard | Limited Lifetime |
Compatibilidade | |
---|---|
Compatibilidade de unidade | Storage Media Compatibility Matrix |
url de compatibilidade de unidade | http://www.hptapecompat.com |
domingo, 18 de setembro de 2011
Um zettabyte corresponde ao número 1 seguido de 21 zeros. Computação em nuvem deverá ser a responsável por armazenar tanta informação.
1 Bit = Um dígito binário
8 Bits = 1 Byte
1024 Bytes = 1 Kilobyte
1024 Kilobytes = 1 Megabyte
1024 Megabytes = 1 Gigabyte
1024 Gigabytes = 1 Terabyte
1024 Terabytes = 1 Petabyte
1024 Petabytes = 1 Exabyte
1024 Exabytes = 1 Zettabyte
1024 Zettabytes = 1 Yottabyte
1024 Yottabytes = 1 Brontobyte
1024 Brontobytes = 1 Geopbyte
quinta-feira, 15 de setembro de 2011
Usually when a Random 4K IOPS figure is given, it may state that this is at a certain queue depth, such as 4, 16, 32 or 64. With a queue depth of 4, this means that there are 4 separate threads taking place with the drive, each thread independently running its own transfers. With the use of Native Command Queuing (NCQ), the SSD can handle these threads simultaneously to improve the overall throughput compared to running a single thread. While many hard disks use native command queuing to line up read/write operations to minimise seek times between each read/write operation, SSDs can read from and write to multiple NAND cells simultaneously, where as the read/write head in a hard disk can only be in one physical place at any time.
While it is nice to see how many IOPS a drive is capable of, it is also useful to see how this translates into actual throughput or even vice versa. For example, most benchmark tools such as CrystalDiskMark and AS SSD report the random 4K performance in throughput, i.e. MB/s, while the SSD’s specifications usually rates the 4K performance in IOPS.
To see how to translate MBps into IOPS and vice versa, we need to do a little math:
Or
MBps = (IOPS * KB per IO) / 1024
To convert the 76.2MB/s to IOPS, we perform the following calculation:
IOPS = 19.1 * 1024
IOPS = 19,558.4
MBps = 80,000 / 1024
MBps = 78.125MB/s
segunda-feira, 11 de julho de 2011
In /var/adm/wtmp on AIX maintains a list of past user sessions and information about the restart/shutdown of that particular system. While this file is normally very small in terms of file size, on an active box, this can grow if not properly maintained. You can use the “last” command to read wtmp, or export it to a text file for further processing with “fwtmp”. While you can simply redirect nothing into wtmp to empty it out “>/var/adm/wtmp”, it’s always a good idea to keep this file (or at least a backup) for security/auditing reasons.
Below is a simple script which will rotate the last 1000 entries in wtmp and discard the rest.
#!/bin/ksh # # Maintain the last 1000 lines in /var/adm/wtmp # and discard the rest. # if [ -s /var/adm/wtmp ]; then /usr/sbin/acct/fwtmp < /var/adm/wtmp > /tmp/wtmp.tmp /usr/bin/tail -1000 /tmp/wtmp.tmp | /usr/sbin/acct/fwtmp -ic > /var/adm/wtmp /usr/bin/rm /tmp/wtmp.tmp else continue fi
- Installing Linux with the IBM Installation ToolkitThe IBM Installation Toolkit for Linux provides a set of tools and functions that simplifies the installation of Linux on Power Systems Servers.
- Linux on Power Systems Servers and open source workloadsThis topic collection guides you through configuring the file and print server, web server, network infrastructure server, and mail server open source workloads on the Linux on Power system using the IBM Installation Toolkit Simplified Setup Tool (Simplified Setup Tool). This topic collection also instructs you on setting up a virtualized environment in which to run the open source workloads.
- Supported features for Linux on Power Systems servers
Use this chart to find the Linux distribution version that supports each system feature. Feature support is shown for Red Hat Enterprise Linux and Novell SUSE Linux Enterprise Server (SLES). - Supported Linux distributions for POWER7 and POWER6 Servers
Use these charts to find the supported Linux distributions for Power Systems servers. - Resources for installing Linux on Power Systems Servers
Use these information resources to install Linux on Linux on Power Systems Servers.
Downlaod the latest tar.gz file for apache2
You can download it from httpd.apache.org.
Login as root
You can type
su
to switch to root. Then run source /etc/profile
to ensure that your path environment variable is setup properly. Extract the source code
In this example we extract the source code to a directory under
/usr/local/src/
cp httpd-2.0.46.tar.gz /usr/local/src cd /usr/local/src gunzip httpd-2.0.46.tar.gz tar -xvf httpd-2.0.46.tar rm -f httpd-2.0.46.tar cd httpd-2.0.46Now you should be in the directory that contains the source code. Set compiler options (optional)
If you want you can set some compiler options, this is typically done to create optimized code. One very common thing to do is to set
CFLAGS=-O2
or CFLAGS=-O3
(that's an Oh, not a Zero) that tells the compiler how much code optimization to do, setting it to a higher value does more optimization, but also takes longer to compile and may potentially cause unexpected things (not common). O2 is a fairly safe level to use. To do this type the following: export CFLAGS=-O2You can also tell the compiler what kind of CPU you have to perform more optimizations, I'm not going to get into that here, but if your interested check out the GCC manual. Run autoconf (configure)
Now you need to set the configuration options, and check that all libraries needed to compile are present. This is done with a script called configure, to find out what options you can set type the following:
./configure --helpYou will see quite a few options there, we will set the prefix (the directory to install apache, we picked /usr/local/apache2) and also tell it which modules to compile and install. We will tell configure to compile and install all modules as shared DSO libraries, that way we can easily enable and disable them in the httpd.conf file. Here's how we ran configure:
configure --prefix=/usr/local/apache2 --enable-mods-shared=allCompile Apache
Now to compile apache we run
make
this compiles the source code into executable binaries. makeInstalling Apache
The next step copies the binaries into the install directory, and sets up the modules.
make installStarting/Stopping/Restarting Apache
Now to start/stop apache use apachectl in the bin directory of your install dir.
cd /usr/local/apache2/bin ./apachectl start ./apachectl stop ./apachectl restartA script for init.d (optional)
Here's a script you can save to
/etc/init.d/httpd
it is a modified version of the one that came in the rpm for Apache 2.0.40 #!/bin/bash # # Startup script for the Apache Web Server # # chkconfig: - 85 15 # description: Apache is a World Wide Web server. It is used to serve \ # HTML files and CGI. # processname: httpd # pidfile: /usr/local/apache2/logs/httpd.pid # config: /usr/local/apache2/conf/httpd.conf # Source function library. . /etc/rc.d/init.d/functions if [ -f /etc/sysconfig/httpd ]; then . /etc/sysconfig/httpd fi # This will prevent initlog from swallowing up a pass-phrase prompt if # mod_ssl needs a pass-phrase from the user. INITLOG_ARGS="" # Path to the apachectl script, server binary, and short-form for messages. apachectl=/usr/local/apache2/bin/apachectl httpd=/usr/local/apache2/bin/httpd pid=$httpd/logs/httpd.pid prog=httpd RETVAL=0 # The semantics of these two functions differ from the way apachectl does # things -- attempting to start while running is a failure, and shutdown # when not running is also a failure. So we just do it the way init scripts # are expected to behave here. start() { echo -n $"Starting $prog: " daemon $httpd $OPTIONS RETVAL=$? echo [ $RETVAL = 0 ] && touch /var/lock/subsys/httpd return $RETVAL } stop() { echo -n $"Stopping $prog: " killproc $httpd RETVAL=$? echo [ $RETVAL = 0 ] && rm -f /var/lock/subsys/httpd $pid } reload() { echo -n $"Reloading $prog: " killproc $httpd -HUP RETVAL=$? echo } # See how we were called. case "$1" in start) start ;; stop) stop ;; status) status $httpd RETVAL=$? ;; restart) stop start ;; condrestart) if [ -f $pid ] ; then stop start fi ;; reload) reload ;; graceful|help|configtest|fullstatus) $apachectl $@ RETVAL=$? ;; *) echo $"Usage: $prog {start|stop|restart|condrestart|reload|status" echo $"|fullstatus|graceful|help|configtest}" exit 1 esac exit $RETVALNext run chkconfig to setup runlevels for which httpd will run:
chkconfig --add httpd chkconfig --level 2345 httpd on chkconfig --listUninstall old rpm packages (Optional)
If you have old rpm apache packages installed, you can check by running:
rpm -q httpdIn my case it lists the following:
redhat-config-httpd-1.0.1-13 httpd-2.0.40-11.3 httpd-manual-2.0.40-11.3To uninstall one of the rpm's type
rpm -e packagename
rpm -e httpd-2.0.40-11.3It may tell you that you have other packages that depend on httpd, you will have to uninstall them first before you can remove the old httpd server.
terça-feira, 5 de julho de 2011
How Do I Install AIX 64-bit?
I have AIX running on top of (as a client partition of) Virtual I/O (VIO) Server, which is IBM’s virtualization version of VMware. Does VIO server allow 64-bit client OS installs? Yes.
Does My System Support AIX 64-bit?
Check whether your kernel is currently 32-bit:AIX# bootinfo -K
32
Your AIX version must be 5.1 or above:
AIX# oslevel
5.3.0
Verify that your hardware supports 64 bits:
AIX# bootinfo -y
64
How to Change Your 32-bit AIX Kernel to 64-bit
1) Create/overwrite your links to the Unix kernel:ln -sf /usr/lib/boot/unix_64 /unix
ln -sf /usr/lib/boot/unix_64 /usr/lib/boot/unix
2) Verify:
ls -l /unix
ls -l /usr/lib/boot/unix
lsvg -l rootvg
3) Create your boot image and restart:
lslv -m hd5
bosboot -ad /dev/ipldevice
shutdown -Fr
Note: If you have LSOF installed, make sure you’re running the 64-bit version. Check out the last part of my How to Install LSOF post.
4) After you reboot, verify your OS Kernel:
bootinfo -K
How to Revert Back from 64-bit to 32-bit:
From 64-bit to 32-bit:ln -sf /usr/lib/boot/unix_mp /unix
ln -sf /usr/lib/boot/unix_mp /usr/lib/boot/unix
lslv -m hd5
bosboot -ad /dev/ipldevice
shutdown -Fr
Tags: 32-bit, 64-bit, AIX 5.3, bootinfo, bosboot, osleve, VIO, VIOS, Virtual I/O Server
domingo, 19 de junho de 2011
Tudo o que acontece na internet em apenas 60 segundos
Infográfico mostra o que pode acontecer na internet em apenas 1 minuto.Mais de 20 tarefas entram na lista.
segunda-feira, 6 de junho de 2011
Dez mandamentos para resolução de problemas em TI
Não importa quão profundo sejam os conhecimentos técnicos de uma equipe de TI. Sem metodologia adequada, a solução de problemas torna-se um processo muito mais complicado.
O CIO da Escola de Medicina da Harvard e de um dos maiores grupos de assistência médica dos EUA, John Halamka, baseou-se em sua experiência para elaborar uma lista com os 10 principais segredos para resolver os problemas com rapidez e experiência.
1 – Uma vez que algum problema foi identificado, verifique seu real alcance – O software de monitoramento pode até dizer que tudo está bem, mas é bom não se contentar. O ideal é conversar com os usuários, testar a aplicação ou infraestrutura sozinho e ter certeza sobre o que originou uma reclamação.
2 – Quando o alcance do problema alarmado é muito grande e a raiz ainda é desconhecida, acione um plano de emergência – É muito melhor mobilizar toda a equipe para um falso alarme ocasional do que intervir tarde demais e quando o problema alcançar proporções muito grandes com uma resposta lenta do departamento de TI.
3 – O processo de solução de um problema deve ser visível, atualizado constantemente para todos e participativo – Muitas vezes os profissionais técnicos ficam tão focados na sua tarefa que perdem a noção do tempo, não se atualizam mutuamente e deixam de conversar com outras áreas. A companhia deve ter uma abordagem multidisciplinar com relatórios de progressos pré-determinados para prevenir a isolação e a busca por soluções que têm poucas chances de darem certo.
4 – Mesmo com a rotina de atualizações e relatórios, a equipe deve ficar livre para trabalhar – Alguns líderes de TI gostam de retornos constantes de sua equipe e isso não é necessariamente ruim. Mas se a equipe gastar 90% do seu tempo reportando o status do trabalho, fica muito mais difícil solucionar problemas em prazo razoável.
5 – A explicação mais simples geralmente é a correta – Halamka relata que, em um incidente recente em sua corporação, todas as evidências apontaram para o mal-funcionamento em um componente do firewall. Mas todos as ferramentas de testes e diagnósticos indicavam que o firewall funcionava perfeitamente. Alguns levantaram a hipótese de que a empresa sofria um tipo muito específico de ataque de negação de serviços. Outros aventaram a possibilidade de uma falha em componentes das redes Windows dos servidores. Surgiu ainda a possibilidade de um ataque incomum por vírus. A explicação mais simples, do firewall, foi comprovada correta após a remoção do mesmo da infraestrutura da rede. E, segundo Halamka, a regra da explicação mais simples ser a resposta até mesmo para problemas mais complexos é verdadeira na maioria das vezes.
6 – Os prazos devem ser definidos de maneira responsável – O que mais irrita os usuários não é exatamente a demora, mas a definição de prazos imprecisos e os consequentes pedidos de “só mais uma hora para resolver o problema”. Se uma indisponibilidade de sistema ocorrer por conta de uma mudança planejada de infraestrutura, a questão é ainda mais séria: o melhor a se fazer é definir um prazo preciso e respeitá-lo.
7 – Comunique-se com os usuários o máximo possível – A maioria dos stakeholders da empresa estão dispostos a tolerar indisponibilidade se você explicar exatamente as ações que estão sendo tomadas para restaurar o serviço. Os principais executivos de TI são os maiores alvos dessa dica, pois devem mostrar compromisso, presença e liderança.
8 – Orgulho não deve atrapalhar a solução – É difícil assumir erros e desafiador reconhecer o que não se sabe. Mas em vez de gastar tempo procurando culpados por problemas, o foco deve ser em examinar a raiz da indisponibilidade e depois definir processos para prevenir a repetição dos problemas.
9 – Não cante vitória antes do tempo – É tentador presumir que os problemas foram resolvidos e dizer a todos os usuários sobre a suposta vitória. Mas o melhor é esperar 24 horas seguidas de serviços ininterruptos antes de declarar o problema resolvido.
10 – Líderes de TI devem focar na sua trajetória, não em sua posição cotidiana – Indisponibilidades podem causar diversas emoções, como ansiedade, medo de perder o emprego ou a reputação e tristeza pelo impacto causado nos usuários. Nessas horas, a melhor coisa é ter em mente que o tempo é capaz de curar qualquer coisa e que incidentes eventuais serão esquecidos. Com o passar da trajetória profissional, a comunidade de usuários tende a observar mais a consistência e o processo contínuo de melhoria de qualidade do que episódios isolados.
De uma forma geral, problemas são dolorosos, mas capazes de unir pessoas. Nos piores momentos é que se constrói relações de confiança, criação de novos canais de comunicação e melhoria de processos.