Skip to content

Instantly share code, notes, and snippets.

@FlatMapIO
Last active August 29, 2015 14:04
Show Gist options
  • Save FlatMapIO/57e2f46eeeab1c8630c4 to your computer and use it in GitHub Desktop.
Save FlatMapIO/57e2f46eeeab1c8630c4 to your computer and use it in GitHub Desktop.
linux 管理备忘

工具

  • 解压 tar -xzvf foo.tar.gz
  • 安装开发包
sudo yum groupinstall "Development Tools" # 一口气安装编译时所需的一切工具
sudo yum install ncurses-devel #必须这样才能让 make *config 这个指令正确地执行。
sudo yum install hmaccalc zlib-devel binutils-devel elfutils-libelf-devel #创建 CentOS-6 内核时需要它们

进程

  • 查端口占用 lsof -i:端口号
  • 杀进程 killall 进程名

网络

防火墙

  • 常用操作
开放80    iptables -I INPUT -p tcp –dport 80 --j ACCEPT
保存设定  /etc/rc.d/init.d/iptables save
重启      /etc/init.d/iptables restart
查看      /etc/init.d/iptables status
  • 关闭防火墙 /etc/init.d/iptables stop
  • 永久关闭防火墙 chkconfig –level 35 iptables off

配置

  • /etc/yum.repo.d/

系统

  • 查看内核版本 uname -acat /proc/version
  • 内核升级(手动) 参考
  • 内核源码 https://github.com/torvalds/linux.git

应用

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment