emerge – -sync
ls -l /usr/portage/sys-kernel/gentoo-sources/ (check latest kernel version)
cd /etc/portage/package.mask -> nano gentoo-sources -> (>=sys-kernel/gentoo-sources-4.10)
nano /etc/portage/package.accept_keywords
emerge -v1 gentoo-sources
eselect kernel list
eselect kernel set * Continue reading “Gentoo upgrade kernel”
Squid
yum install squid
systemctl status squid
systemctl enable squid
/var/spool/squid/
/etc/squid.conf(/etc/squid/squid.conf) Continue reading “Squid”
centos mini_instal
After mini_installation:
cd /etc/sysconfig/network-scripts
ONBOOT=yes
yum install net-tools (ifconfig)
yum install psmisc (pstree)
yum install nano
yum install pcitils / redhat-lsb Continue reading “centos mini_instal”
net cmd
Windows:
ipconfig /release (renew)
ipconfig /flushdns
tracert hostname
netsh winsock reset
netsh int ip reset
msra /offerra
Linux:
ifconfig
traceroute hostname
nslookup hostname
netstat -a
arp -na
route add/del Continue reading “net cmd”
ubuntu
sudo apt update
sudo apt upgrade
sudo apt update && sudo apt dist-upgrade
sudo lsb_release -a
sudo apt install chromium-browser
sudo apt install openssh-server
sudo ufw allow ssh
Continue reading “ubuntu”
How to add SWAP Space in Linux
Sometimes we need to add extra swap space in our Linux machine, so in this article, I’m going to show you how to add swap space to a Linux server.
We have two ways to adding swap space in Linux environment.
- Create swap space using the file.
free -m
swapon -s
dd if=/dev/zero of=/swap_file bs=1G count=1
Cockpit
Centos:
yum -y install cockpit
yum -y install cockpit-* //install all modules
#yum install cockpit-docker (cockpit-storaged, cockpit-kubernetes,cockpit-ws)
systemctl start cockpit
systemctl enable cockpit (systemctl enable –now cockpit.socket)
systemctl stop firewalld
systemctl disable firewalld Continue reading “Cockpit”
arch gentoo lfs definitions
arch邪教教徒,gentoo是邪教干部,lfs算是邪教教主
Redhat是少林,根正描红,在武林一呼百应,说一不二。Debian是丐帮,号称不受任何一个商业公司驱动,像是一群穷鬼搞出来的。所谓天下武功出少林,apt有超级牛力,是Debian的降龙十八掌。rpm和deb系就是正教,一些商业软件只会提供rpm和deb打包格式的安装文件。
Arch被称为邪教,是因为它不提供图形化(哪怕是类图形化)的安装配置界面,路数比较野。要知道Debian和FreeBSD之类,虽然以难于上手著称,但也提供了类图形化的安装向导,基本用键盘上下键和回车就能完成安装,Arch却要人一行一行地敲命令。现在都倡导给用户隐藏细节,强调易于使用,这种逆潮流的发行版不多了。
另一方面,Arch wiki就像葵花宝典,博大精深,其他武学各派人人觊觎之。不管用什么发行版,遇到问题去Arch wiki上寻求答案一定没错,即便不一定完全适用,但也有相当高的参考价值。
第三,Arch教众言必称AUR,KISS,滚动发行、时刻最新,虽然牛逼得不行,但总上不了台面。涉及关键业务关键数据,不管是服务器还是桌面,用Arch准会遭到一众讥笑,让你滚动发行,说不定哪天就滚挂了。那些试图用Linux代替Windows和macOS的新手们,老鸟给他们的推荐也大多是Mint,Ubuntu,Fedora,openSUSE……Arch的定位略显尴尬,显得邪门。
lfs installation refer to:
coreboot
Download, configure, and build coreboot
Step 1 – Install tools and libraries needed for coreboot
$ sudo apt-get install -y bison build-essential curl flex git gnat-5 libncurses5-dev m4 zlib1g-dev
Step 2 – Download coreboot source tree
$ git clone https://review.coreboot.org/coreboot $ cd coreboot
Step 3 – Build the coreboot toolchain
Please note that this can take a significant amount of time
$ make crossgcc-i386 CPUS=$(nproc)
ssh
$ ssh user@host 如:ssh [email protected]
如果本地用户名与远程用户名一致,登录时可以省略用户名。
$ ssh host
SSH的默认端口是22,也就是说,你的登录请求会送进远程主机的22端口。使用p参数,可以修改这个端口。
$ ssh -p 2222 user@host
上面这条命令表示,ssh直接连接远程主机的2222端口。 Continue reading “ssh”
scp
scp 跨机远程拷贝
scp是secure copy的简写,用于在Linux下进行远程拷贝文件的命令,和它类似的命令有cp,不过cp只是在本机进行拷贝不能跨服务器,而且scp传输是加密的。可能会稍微影响一下速度。两台主机之间复制文件必需得同时有两台主机的复制执行帐号和操作权限。 Continue reading “scp”