Category Archives: linux

linux mount cifs share

mkdir /mnt/share mount -t cifs //windowsserver/pathname /mnt/share -o username=administrator,password=********  

Posted in linux | Leave a comment

centos and adito

setting up adito on centos

Posted in linux | Leave a comment

linux allocate memory

#!/bin/bash echo “Provide sleep time in the form of NUMBER[SUFFIX]” echo ” SUFFIX may be ‘s’ for seconds (default), ‘m’ for minutes,” echo ” ‘h’ for hours, or ‘d’ for days.” read -p “> ” delay echo “begin allocating memory…” … Continue reading

Posted in linux | Leave a comment

linux install vmwaretools (CentOS)

create /etc/yum.repos.d/vmware.repo with the following content: [vmware-tools] name=VMware Tools #baseurl=http://packages.vmware.com/tools/esx/5.1latest/rhel5/i386 #baseurl=http://packages.vmware.com/tools/esx/5.1latest/rhel5/x86_64 #baseurl=http://packages.vmware.com/tools/esx/4.0latest/rhel6/x86_64 #baseurl=http://packages.vmware.com/tools/esx/4.0latest/rhel5/i686 baseurl=http://packages.vmware.com/tools/esx/4.0latest/rhel6/i686 enabled=1 gpgcheck=1 gpgkey=http://packages.vmware.com/tools/keys/VMWARE-PACKAGING-GPG-RSA-KEY.pub run the following command: yum install vmware-tools-esx-nox

Posted in linux, Virtualization | Leave a comment

linux grub2

grub2

Posted in linux | Leave a comment

clonezilla

http://www.openlogic.com/wazi/bid/188051/With-Clonezilla-Install-Once-and-Clone-Forever

Posted in linux | Leave a comment

linux opensuse custom init script

1. create the ‘program’ 2. create the init.d script 3. create the links 4. test 1. The ‘program’ is a script that writes its pid to a file in /var/run. The content of the file is used when stopping the … Continue reading

Posted in linux | Leave a comment

linux suse openvpn

VPN Server Configuration Install the package openvpn on the machine that will later become your VPN server. Open a shell, become root and create the VPN secret key: openvpn –genkey –secret /etc/openvpn/secret.key Copy the secret key to your client: scp … Continue reading

Posted in linux | Leave a comment

open suse repositories

repos

Posted in linux | Leave a comment

solaris linux create sparse file

# dd of=sparse-file bs=1k seek=55120 count=0 0+0 records in 0+0 records out 0 bytes transferred in 0.000030 secs (0 bytes/sec) nfs : ls -lh sparse-file -rw-r–r– 1 user1 daemon 54M May 12 20:08 sparse-file

Posted in linux, solaris | Leave a comment

linux suse zypper cheatsheet

zypper cheatsheet

Posted in linux | Leave a comment

linux block users

How to block ssh users after 3 failed login attempts using pam_tally2.so How to block an ssh user after 3 failed login attempts using PAM 1.Edit /etc/pam.d/sshd and the following parameters auth required pam_tally2.so deny=3 onerr=fail unlock_time=300 The /etc/pam.d/sshd should … Continue reading

Posted in linux | Leave a comment

linux password hashing algorithm

Display Current Hashing Algorithm Type the following command: # authconfig –test | grep hashing Sample outputs: password hashing algorithm is md5 Configure Linux Server To Use The SHA-512 To configure the Linux system to use the SHA-512 algorithm, enter: # … Continue reading

Posted in linux | Leave a comment

linux update oracle kernel

wget http://public-yum.oracle.com/public-yum-ol6.repo -P /etc/yum.repos.d/ yum list updates yum update

Posted in linux | Leave a comment

linux raid device

(create raid (raid1)) # mdadm –create md127 –level=1 –raid-devices=2 /dev/sdb1 /dev/sdc1 (add hotspare to raiddevice) # mdadm /dev/md127 -a /dev/sdd1 (check raiddevice) # cat /proc/mdstat Personalities : [raid1] md127 : active raid1 sdd1[2](S) sdc1[1] sdb1[0] 1044181 blocks super 1.2 [2/2] … Continue reading

Posted in linux | Leave a comment

linux automatic mail with expect

Expect script sends me a mail to when someone logs in. 1. In .bash_profile ./.sendloggedin 2. In .sendloggedin #!/usr/bin/expect spawn telnet smtp.online.nl 25 send “ehlo smtp.online.nl\r” expect “250 8BITMIME” send “MAIL FROM: centos@groningen.nl\r” expect “250 2.1.0 Ok” send “RCPT TO: … Continue reading

Posted in linux | Leave a comment

linux kerberos server/client

Kerberos Server [root@centos]# yum install krb5-server krb5-libs krb5-workstation Edit /etc/krb5.conf and /var/kerberos/krb5kdc/kdc.conf [quick@centos ~]$ cat /etc/krb5.conf [logging] default = FILE:/var/log/krb5libs.log kdc = FILE:/var/log/krb5kdc.log admin_server = FILE:/var/log/kadmind.log [libdefaults] default_realm = LINUXPROBLEMS.ORG dns_lookup_realm = false dns_lookup_kdc = false ticket_lifetime = 24h renew_lifetime … Continue reading

Posted in linux | Leave a comment

ntp

ntp

Posted in linux | Leave a comment

linux samba and AD

1. check kerberos, ldap, ads and winbind support. # cat /etc/hosts (output skipped) 192.168.1.215 kpsuse1.netapp.local kpsuse1 192.168.1.216 kpsuse2.netapp.local kpsuse2 192.168.1.120 dc.netapp.local dc # cd /usr/sbin # smbd -b | grep LDAP HAVE_LDAP_H HAVE_LDAP HAVE_LDAP_DOMAIN2HOSTLIST … root@windbag:/usr/sbin# smbd -b | grep … Continue reading

Posted in linux | Leave a comment

linux mysql

http://www.if-not-true-then-false.com/2010/install-mysql-on-fedora-centos-red-hat-rhel/

Posted in linux | Leave a comment

linux usb boot

Linux Create A Bootable USB Pen by NIXCRAFT on MARCH 11, 2010 · 15 COMMENTS· last updated at MARCH 11, 2010 How do I create a bootable USB pen drive to start my CentOS / Fedora Linux? How do I … Continue reading

Posted in linux | Leave a comment

netapp autologin.sh script

#!/bin/bash #setup autologin ERRLOG=’autologin.errorlog’ function key { hostname=`hostname` #determine mode echo -n “clustermode? (y/n) : ” read mode if [ $mode == “y” ] then echo “clustermode” echo -n “username : ” read user #get the current index to determine … Continue reading

Posted in linux, netapp, scripts | Leave a comment

linux device info (smartctl)

smartctl -a /dev/sda smartctl 5.42 2011-10-20 r3458 [i686-linux-2.6.32-279.9.1.el6.i686] (local build) Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net === START OF INFORMATION SECTION === Model Family: Seagate Barracuda 7200.12 Device Model: ST31000524AS Serial Number: 5VPA3V38 LU WWN Device Id: 5 000c50 … Continue reading

Posted in linux | Leave a comment

linux local repo

You have an iso file called /iso/distro.iso. 1. mkdir /software 2. mount -o loop /iso/distro.iso /software 3. vi /etc/yum.conf (add to end of file) [localrepo] name=Local Repo baseurl=file:///software enabled=1 yum install telnet

Posted in linux | Leave a comment

linux create repo from iso

Step # 1: Mount an ISO file Type the following command (replace iso file name with the actual iso file): # yum install createrepo # mkdir -p /mnt/iso/{1,2,3} # mount -o loop /path/to/centos1.iso /mnt/iso/1 Step # 2: Create a repository … Continue reading

Posted in linux | Leave a comment

linux rootmirror afterwards

1. Create VM witch 2 drives. Use drive 1 for install. It installs /boot on partition sda1 It installs VolGroup/lv_root and lv_swap on partition sda2 2. Login and partition sdb to be equal to sda Make sdb bootable: grub-install –recheck … Continue reading

Posted in linux | Leave a comment

linux mirror root

http://fy.chalmers.se/~appro/linux/HOWTO-mirror-root.html

Posted in linux | Leave a comment

linux selinux

Edit /etc/selinux/config (e.g. $sudo vi /etc/selinux/config) Find the line: SELINUX=enforcing a) If you simply want to set selinux to permissive mode – which will still warn you when something would have been denied change to SELINUX=permissive b) If you are … Continue reading

Posted in linux | Leave a comment

linux fast reset

echo 1 > /proc/sys/kernel/sysrq ;echo b > /proc/sysrq-trigger

Posted in linux | Leave a comment

linux yum

/etc/yum.conf /etc/yum.repos.d yum list yum list installed yum list available yum check-update yum update yum install yum remove yum provides ( like rpm -qf) yum grouplist (shows installed and available groups) yum groupinfo yum groupinstall yum groupupdate yum groupremove

Posted in linux | Leave a comment

linux rpm

rpm -qa (list all packages) rpm -qi (detailed package info) rpm -ql (list files in package) rpm -qf (list package in which file is) rpm -qc (list config files of package) rpm -Ufh (upgrade or install) rpm -ivh (install new … Continue reading

Posted in linux | Leave a comment

linux over windows

link

Posted in linux | Leave a comment

kickstart pxe etcetera oracle linux

http://docs.oracle.com/cd/E20815_01/html/E20821/gisti.html

Posted in linux | Leave a comment

linux containers and btrfs

https://blogs.oracle.com/wim/entry/containers_on_linux

Posted in linux | Leave a comment

linux rescan scsi-bus

echo “- – -” > /sys/class/scsi_host/host#/scan fdisk -l tail -f /var/log/message (where host# may be host0 host1 host2 )

Posted in linux | Leave a comment

linux vnc server

Configuring VNC Server on Linux init (Original Method) systemd (New Method) VNC Clients init (Original Method) The init method works for RHEL and it’s clones (Oracle Linux and CentOS) up to and including RHEL6. It also works for Fedora up … Continue reading

Posted in linux | Leave a comment

dmidecode

lists all your hardware…how much memory do I physically recognize? (CENTOS) dmidecode -t processor # dmidecode 2.11 SMBIOS 2.7 present. Handle 0x0004, DMI type 4, 42 bytes Processor Information Socket Designation: CPU 1 Type: Central Processor Family: Core i5 Manufacturer: … Continue reading

Posted in linux | Leave a comment

Linux iSCSI

CentOS / Red Hat Linux: Install and manage iSCSI Volume by VIVEK GITE on OCTOBER 30, 2007 · 45 COMMENTS· LAST UPDATED FEBRUARY 18, 2011 Internet SCSI (iSCSI) is a network protocol s that allows you to use of the SCSI protocol over TCP/IP networks. It is … Continue reading

Posted in linux | Leave a comment

ubuntu vncserver

Install packages. Code: sudo apt-get install x11vnc vnc-java Set up a password for clients. Code: x11vnc -storepasswd Open up ports 5800 and 5900 on your firewall Run the terminal command: x11vnc -forever -usepw -httpdir /usr/share/vnc-java/ -httpport 5800 and add it for auto-starting in future … Continue reading

Posted in linux | Leave a comment

centos vncserver

1. Installing the required packages The server package is called ‘vnc-server’. Run the command: rpm -q vnc-server The result will be either package vnc-server is not installed or something like vnc-server-4.0-11.el4. If the server is not installed, install it with the command: yum install vnc-server … Continue reading

Posted in linux | Leave a comment

ubuntu vnc4server

  1 Open a Terminal window. The Terminal window can be found under “Start” > “Utilities.” 2 Download vnc4server and xinetd: sudo apt-get install vnc4server xinetd Sponsored Links Try Open Source BackupLower the cost of backup by 10x Try out … Continue reading

Posted in linux | Leave a comment