Archive for category linux

(Solved) sftp: Received message too long

when you connect by ssh. it works fine. but doesn’t work with sftp ?

check your ~user/.bashrc or ~user/.profile or ~user/.cshrc anything related with your environment.

remove the echo from above files.

addons: check free memory on Solaris without top
vmstat 1 2 | tail -1 | awk '{printf "%d%s\n", ($5*4)/1024, "MB" }'

No Comments

(resolved)sqlplus issue need set oracle_home

bash-3.2$ rpm -qa|grep oracle
oracle-instantclient-sqlplus-11.1.0.1-1
oracle-instantclient-basic-11.1.0.1-1

bash-3.2$ sqlplus
Error 6 initializing SQL*Plus
Message file sp1.msb not found
SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory

Fix:
bash-3.2$ export ORACLE_HOME=/usr/lib/oracle/11.1.0.1/client64
bash-3.2$ export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
bash-3.2$ /usr/lib/oracle/11.1.0.1/client64/bin/sqlplus erer/pass@IP:1526/SPAPA1P

SQL*Plus: Release 11.1.0.6.0 – Production on Sat Sep 22 04:33:02 2012

No Comments

Grub2: fix dual boot issue

Trying boot from livecd to fix the dual boot issue.
ubuntu@ubuntu:~$ sudo grub-install /dev/sda
/usr/sbin/grub-probe: error: cannot find a device for /boot/grub (is /dev mounted?).

Solution:
set the /boot/grub path
root@ubuntu:~# mkdir /a; mount /dev/sda1 /a # sda1 is the root you installed linux
root@ubuntu:~# grub-install /dev/sda –boot-directory=/a/boot/grub
Installation finished. No error reported.

,

No Comments

System Management: Soft collection

Pulp vs Spacewalk

Puppet vs Chef vs Cfengine

No Comments

VCS: fix dg disabled. cannot open ” ” for quotactl

root@myhost1# vxdisk list
DEVICE TYPE DISK GROUP STATUS
sdbu auto:cdsdisk emc1XXX DB_PRD online dgdisabled
sdbv auto:cdsdisk emc1XXX DBarc_PRD online dgdisabled

root@myhost1# vxdg deport DB_PRD
VxVM vxdg ERROR V-5-1-584 Disk group DB_PRD: Some volumes in the disk group are in use
Read the rest of this entry »

No Comments

ldap and sudo issue on Linux box

issue with sudo, we can login with ldap account but can’t sudo -i. When turned on sudoer debug, got following error.
sudo: user_matches=1
sudo: host_matches=0
sudo: sudo_ldap_lookup(0)=0×40
[sudo] password for edy:

Actually the same configuration works on other hosts.
On broken-host, debug info,
sudo: found:cn=UNIX-Team-root,ou=SUDOers,dc=abc,dc=com
sudo: ldap sudoUser netgroup ‘+unixadms’ … not
Read the rest of this entry »

2 Comments

Important Server Maintenance/Update Notes from RH

First, the most important thing is to perform system update in a maintenance window, because if you have any critical service, the service must be stopped before the upgrade begins.

The maintenance window is also necessary because the server needs a reboot to the new kernel goes into production.

If the server has some third-party module into the kernel, the inclusion of these modules should also be made for the new kernel, otherwise the new kernel will not contain all the modules required and this can cause problems at boot process and devices’ recognition, such as storage, drive controllers, and others…
Read the rest of this entry »

No Comments

Install CentOS 6.0(64bit) with one CD

CentOS 6.0 Finally released. seems the CD/DVD has been updated. you should choose one net install CD or 4.4G DVD. could we have minimal install with one CD ? YES.

Here is the CD, you can minimal install the CentOS 6.0. so it good for guys who want to download one CD and install CentOS, of course you can install once you have installed basic system.

Download link:Download from linuxdict
Arch: 64bit
CD Size: 313M
Md5sum: 3f75769d89c8d5f897435f714abe4d11

Install details, please check http://www.linuxdict.com/2011-07-centos-6-0-in-one-cd/

No Comments

CentOS 6.0 In One CD (261M)

CentOS 6.0 Finally released. seems the CD/DVD has been updated. you should choose one net install CD or 4.4G DVD. could we have minimal install with one CD ? YES.

Here is the CD, you can minimal install the CentOS 6.0. so it good for guys who want to download one CD and install CentOS, of course you can install once you have installed basic system.

Download link:Download from china network Download from linuxdict
Arch: 32bit
CD Size: 261M
Md5sum: 0f668976b05374d2ecd09801b096f2e4

Guide for new guys use CentOS 6.
Read the rest of this entry »

No Comments

short scripts: convert squid timestamp

cat > /var/convert.pl
#!/usr/bin/perl -p
s/^\d+\.\d+/localtime $&/e;

Ctrl+D
. /var/convert.pl /var/squid/log/access.log |more

No Comments