标签:
测试环境,下面二者之一
CentOS-6.5-x86_64-minimal.iso
CentOS-7-x86_64-Minimal-1511.iso
第一步系统检测与优化,即初始化工作,
常规型的
rpm -qa|wc -l
ip addr
ping qq.com
cat /var/log/boot.log
以下是c65的关闭ipv6与防火墙
CentOS-6.5-x86_64-minimal.iso
sed -i ‘$a\alias net-pf-10 off \nalias ipv6 off‘ /etc/modprobe.d/dist.conf
grep ‘ipv6‘ /etc/modprobe.d/dist.conf
chkconfig --level 2345 ip6tables off
chkconfig --level 2345 iptables off
chkconfig --list|grep iptables
service iptables stop
service ip6tables stop
最小化安装是没有防火墙服务的
CentOS-7-x86_64-Minimal-1511.iso
[root@localhost ~]# cat /etc/redhat-release
CentOS Linux release 7.2.1511 (Core)
[root@localhost grub2]# vi /etc/default/grub
将GRUB_CMDLINE_LINUX="rd.lvm.lv=centos/root rd.lvm.lv=centos/swap rhgb quiet"
改为GRUB_CMDLINE_LINUX="ipv6.disable=1 rd.lvm.lv=centos/root rd.lvm.lv=centos/swap rhgb quiet"
即加上ipv6.disable=1,再重新生成grub.cfg,再重启系统就可以了
[root@localhost grub2]# grub2-mkconfig -o /boot/grub2/grub.cfg
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-3.10.0-327.el7.x86_64
Found initrd image: /boot/initramfs-3.10.0-327.el7.x86_64.img
Found linux image: /boot/vmlinuz-0-rescue-1ace541fd97c40e6a45fd1f7062adae8
Found initrd image: /boot/initramfs-0-rescue-1ace541fd97c40e6a45fd1f7062adae8.img
done
cp /etc/selinux/config ./
sed -i ‘s/SELINUX=enforcing/SELINUX=disabled/g‘ /etc/selinux/config
diff config /etc/selinux/config
setenforce 0
下面是c65中要设置的,c72可能不需要下面了。
sed -i ‘s/tty\[1-6\]/tty\[1-2\]/g‘ /etc/init/start-ttys.conf
sed -i ‘s/tty\[1-6\]/tty\[1-2\]/g‘ /etc/sysconfig/init
reboot
第二步具体某项应用与功能,
任务型的
1.安装lxc,c7.2环境下
yum install epel-release
yum install lxc
lxc-checkconfig //一开始检测,某些项是missing状态的
rpm -ql lxc|more
rpm -ql lxc-libs|more
yum install libcgroup //无依赖
yum install lxc-templates
service cgconfig start
service lxc start
启动之后,在/cgroup目录下产生了很多目录与文件
2.扫描网段,并登入某台linux机器,查看硬件与系统配置
yum install --disablerepo=epel nmap或者直接下面的
yum install nmap
nmap 192.168.10.0/24
ssh 192.168.10.45
lscpu
cat /proc/cpuinfo
yum install pciutils
lspci
3.抓包
yum install tcpdump
标签:
原文地址:http://www.cnblogs.com/createyuan/p/5703042.html