skanc.com Linux, Microsoft, Raspberry Pi, Python, Android

29Mar/140

Centos – Tips & Tricks 04 – Proxy Configuration

# vi /etc/profile

http_proxy=http://192.168.20.10:8080

https_proxy=http://192.168.20.10:8080

export http_proxy https_proxy

Filed under: Centos No Comments
29Mar/140

Centos – Tips & Tricks 03 – Static IP Address, DNS Set and Network Manager Configuration

Static IP Address Set

 # vi /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0
HWADDR=00:0C:29:4D:FD:91
TYPE=Ethernet
ONBOOT=yes
NM_CONTROLLED=no
BOOTPROTO=static
IPADDR=192.168.12.10
GATEWAY=192.168.12.2
DNS1=192.168.12.2
DNS2=195.175.39.39

 

DNS Set

# cat /etc/resolv.conf
domain localdomain
search localdomain
nameserver 192.168.12.2
nameserver 195.175.39.39

 

Network Manager Stop

 # service NetworkManager stop

# chkconfig NetworkManager off

 

Network Service Start/Stop/Restart

# /etc/init.d/network restart

Filed under: Centos No Comments
29Mar/140

Centos – Tips & Tricks 02 – Copied or Cloned Centos VM’s Network Configuration

1. Network connection name to find out which PCI device is controlling it.

# ls /sys/class/net/

eth0 lo

 

2. Copying/moving which the name of the network adapter changes (from eth0 to eth1).

# cat /etc/udev/rules.d/70-persistent-net.rules

Remove eth0 whole line.

# PCI device 0x8086:0x100f (e1000)

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:48:95:77", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

Rename eth1 to eth0

# PCI device 0x8086:0x100f (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:4d:fd:91", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

 

3. Insert MAC address ifcfg-eth0 file.

#/etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0
HWADDR=00:0C:29:4D:FD:91
TYPE=Ethernet
ONBOOT=yes
NM_CONTROLLED=no
BOOTPROTO=static
IPADDR=192.168.12.10
GATEWAY=192.168.12.2
DNS1=192.168.12.2
DNS2=195.175.39.39

 

Centos_MAC_Address_01

29Mar/140

Centos – Tips & Tricks 01 – How to install VMware tools on Centos

1. Open Vmware Worstation or ESX console

2. Choose your CentOS or Redhat Server which you want to install on Vmware Console

3. Choose Vmware tab –> Install VMware tools

4.  Mount cd to Centos Server and install VMware-tools

 

# mount /dev/cdrom /mnt

# cd /mnt

# cp VMwareTools-* /tmp

# cd /tmp

# tar -xzvf VMwareTools-*

# cd vmware-tools-distrib

# ./vmware-install.pl

Tagged as: No Comments
9Jan/130

Active Directory Services HA (High Availability)

-AD Certificate Services (AD CS)
Failover Clustering

-AD Domain Services (AD DS)
Active Directory Recycle Bin to restore deleted Ad object
Backup & Restore
Multi site Load Balancing
RODC

-AD Federate Services (AD FS)
Cross-site replication
SQL Mirroring for database

-AD Lightweight Directory Services (AD LDS)
Backup & Restore
Cross-site replication

-AD Rights Management Services (AD RMS)
NLB for Licensing Server
SQL HA for database, either Failover Clustering of Log Shipping

-Do not put the entire AD infrastructure on a Hyper-V Failover Cluster
Can cause a service startup deadlock

Published Date: November 08, 2011
Presented By: Microsoft Virtual Academy

http://technet.microsoft.com/en-us/video/microsoft-virtual-academy-understanding-microsofts-high-availability-solutions-module-1-part-1-infrastructure-ha-with-failover-clustering-hyper-v

12Dec/120

THQ Giving Metro 2033 codes

THQ is giving Metro 2033 codes for Facebook likes.

http://www.facebook.com/THQ

Tagged as: No Comments
12Dec/120

Nexus 7

I'm using Nexus 7 version 4.2.1

Tagged as: No Comments
28Aug/120

Raspberry Pi – Tips & Tricks 10 – Firmware Update

https://github.com/Hexxeh/rpi-update

wget http://goo.gl/1BOfJ -O /usr/bin/rpi-update && chmod +x /usr/bin/rpi-update
sudo apt-get install ca-certificates
rpi-update
Filed under: Genel No Comments
22Aug/121

Raspberry Pi – Tips & Tricks 9 – Sending External IP To via Gmail

nano external_ip
------------------------------------------------------------------------------------------------------
import urllib
import smtplib
import re

#External IP Address
f = urllib.urlopen("http://www.canyouseeme.org/")
html_doc = f.read()
f.close()
m = re.search('(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-

5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)',html_doc)
#print m.group(0)
data=m.group()

#Mail send
fromaddr = 'youraccount@gmail.com'
toaddrs  = ['test@gmail.com']
msg = 'Raspberry Pi External IP Addreds is ' + data + ' ...!'

# Credentials (if needed)
username = 'youraccount@gmail.com'
password = 'yourpassword'

# The actual mail send
server = smtplib.SMTP('smtp.gmail.com:587')
server.starttls()
server.login(username,password)
for toad in toaddrs:
    server.sendmail(fromaddr, toad, msg)
server.quit()
------------------------------------------------------------------------------------------------------

chmod a+x external_ip

20Aug/120

Raspberry Pi – Tips & Tricks 8 – Install Chromium browser

sudo apt-get install chromium-browser