公告版位

目前分類:Linux (116)

瀏覽方式: 標題列表 簡短摘要

# vim /etc/ssh/sshd_config
============APPEND==============
UseDNS no
============APPEND==============


# service sshd restart

dreamtails 發表在 痞客邦 PIXNET 留言(0) 人氣()

# sed -i "N;s/\n/ /g" text.txt

dreamtails 發表在 痞客邦 PIXNET 留言(0) 人氣()

# vim /etc/network/interfaces
===================================                             
auto lo
iface lo inet loopback

auto br0 
iface br0 inet static

    address 172.17.11.1
    netmask 255.255.254.0
    gateway 172.17.10.254
    dns-search dreamtails.local
    bridge_ports eth0
    bridge_stp off

    post-up route add default via 172.17.10.254 dev br0 

auto br1 
iface br1 inet dhcp
    bridge_ports eth1
    bridge_stp off 

    post-up route del default dev br1
===================================

dreamtails 發表在 痞客邦 PIXNET 留言(0) 人氣()

# vim /etc/dhcp/dhcpd6.conf
===========add==============
......
log-facility local0;
......
===========add==============

dreamtails 發表在 痞客邦 PIXNET 留言(0) 人氣()

$ sudo vim /etc/network/interfaces
=============================
# interfaces(5) file used by ifup(8) and ifdown(8)                              
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 172.17.11.1
netmask 255.255.254.0
gateway 172.17.10.1
dns-search dreamtails.local     # equal to "search" in /etc/resolv.conf

auto eth1
iface eth1 inet dhcp
post-up route del default dev eth1
==============================

dreamtails 發表在 痞客邦 PIXNET 留言(0) 人氣()

1. Install packages
# yum install dhcp*
# yum install radvd

dreamtails 發表在 痞客邦 PIXNET 留言(0) 人氣()

# mkdir -p /tmp/cores
# chmod a+rwx /tmp/cores
# echo "/tmp/cores/%e.%p.%h.%t.core" > /proc/sys/kernel/core_pattern

------------------------
%p: pid
%: '%' is dropped
%%: output one '%'
%u: uid
%g: gid
%s: signal number
%t: UNIX time of dump
%h: hostname
%e: executable filename
------------------------

# ulimit -c unlimited
# kill -s SIGSEGV $$

Reference: https://sigquit.wordpress.com/2009/03/13/the-core-pattern/

dreamtails 發表在 痞客邦 PIXNET 留言(0) 人氣()

$ sudo vim /etc/network/interfaces
-------------------------------------------------------------------------
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 10.10.100.1
netmask 255.255.0.0
gateway 10.10.0.254
#post-up route add default via 10.10.0.254 dev eth0

auto eth1
iface eth1 inet dhcp
post-up route del default dev eth1
-------------------------------------------------------------------------

dreamtails 發表在 痞客邦 PIXNET 留言(0) 人氣()

If the /dev/sdb is USB device.

# sudo -i

# fdisk /dev/sdb
--> n    (Create partition)
.......
--> w

dreamtails 發表在 痞客邦 PIXNET 留言(0) 人氣()

CentOS 7:
# yum install -y numactl
# numactl -H

 

Ubuntu 14.04:
# apt-get install numactl
# numactl -H

dreamtails 發表在 痞客邦 PIXNET 留言(0) 人氣()

1. Download i386 skype and teamviewer .deb as follows,
    - skype.i386.deb
    - teamviewer.i386.deb

2. Install GDebi package
# apt-get install -y gdebi

3. Update the i386 .deb by GDebi
# gdebi skype.i386.deb
# gdebi teamviewer.i386.deb

4. Install skype and teamviewer on Ubuntu 14.04 64-bit
# dpkg -i skype.i386.deb
# dpkg -i teamviewer.i386.deb



dreamtails 發表在 痞客邦 PIXNET 留言(0) 人氣()

# vim /etc/gai.conf

uncomment line 54
from
-------------------------------------------------------------------
.........
#
#    For sites which prefer IPv4 connections change the last line to
#
# precedence ::ffff:0:0/96  100
.........
-------------------------------------------------------------------

dreamtails 發表在 痞客邦 PIXNET 留言(0) 人氣()

# systemctl stop NetworkManager
# systemctl disable NetworkManager
# systemctl enable network 
         

Physical interface (em1) setting:
# vim /etc/sysconfig/network-scripts/ifcfg-em1
-------------------------- 
DEVICE=em1
HWADDR=xx:xx:xx:xx:xx:xx
ONBOOT=yes   
TYPE=Ethernet
BRIDGE=br0
-------------------------- 

dreamtails 發表在 痞客邦 PIXNET 留言(0) 人氣()

Example 1:
# virt-install --connect qemu:///system --os-type=linux --ram 2048 --vcpus=2 --cpu host --noautoconsole --force --import --disk path=/tmp/CentOS6.qcow2,device=disk,bus=scsi,format=qcow2 --os-variant=rhel6 --name test1

Example 2:
# virt-install --connect qemu:///system --os-type=linux --ram 2048 --vcpus=2 --cpu host --noautoconsole --force --import --disk path=/tmp/CentOS6.qcow2,device=disk,bus=virtio,format=qcow2 --os-variant=rhel6 --network model=virtio,bridge=br0 --name test2_for_br0

dreamtails 發表在 痞客邦 PIXNET 留言(0) 人氣()

1. Install GUI Gnome packages:
# yum groupinstall -y "GNOME Desktop"

2. Install VNC package:
# yum install -y tigervnc-server

dreamtails 發表在 痞客邦 PIXNET 留言(0) 人氣()

What do you need to install packages?
# yum install -y qemu-kvm qemu-img \
    virt-manager libvirt libvirt-python \
    libvirt-client virt-install virt-viewer




Reference: http://www.itzgeek.com/how-tos/linux/centos-how-to...

dreamtails 發表在 痞客邦 PIXNET 留言(0) 人氣()

We will change as follows,
-------------------------------------------------------------------------
deb cdrom:[Debian GNU/Linux 8.2.0 _Jessie_ - Official amd64 DVD Binary-1 20150906-11:13]/ jessie contrib main

# deb http://security.debian.org/ jessie/updates main contrib
# deb-src http://security.debian.org/ jessie/updates main contrib

# jessie-updates, previously known as 'volatile'
# A network mirror was not selected during install. The following entries
# are provided as examples, but you should amend them as appropriate
# for your mirror of choice.
#
# deb http://ftp.debian.org/debian/ jessie-updates main contrib
# deb-src http://ftp.debian.org/debian/ jessie-updates main contrib
-------------------------------------------------------------------------

dreamtails 發表在 痞客邦 PIXNET 留言(0) 人氣()

# vim /var/lib/dhcpd/dhcpd.leases

dreamtails 發表在 痞客邦 PIXNET 留言(0) 人氣()

How to get physical mac address, when other pepole rename your mac address on CentOS.

# cat /var/log/dmesg | grep eth

dreamtails 發表在 痞客邦 PIXNET 留言(0) 人氣()

1) Install packages
# yum install -y kvm libvirt qemu-kvm virt-manager

2)
# chkconfig libvirtd on
# service libvirtd restart

dreamtails 發表在 痞客邦 PIXNET 留言(0) 人氣()