使用 tuna 作为 repo 镜像
Ubuntu 18.04 下 repo 安装很方便,但直接使用会由于网络问题被卡住,解决方法就是使用国内镜像站点
# apt install repo
$ export REPO_URL='https://mirrors.tuna.tsinghua.edu.cn/git/git-repo/'
以上命令可以写在 ~/.bashrc 里以后就不用每次都手动执行了
利用 smbclient 扫描 Windows 共享目录
# smbclient -L 192.168.1.2 -U Administrator Enter SAMBA\Administrator's password: Sharename Type Comment --------- ---- ------- ADMIN$ Disk 远程管理 C$ Disk 默认共享 D$ Disk 默认共享
# smbclient -L 192.168.1.2 -U administrator%password Sharename Type Comment --------- ---- ------- ADMIN$ Disk 远程管理 C$ Disk 默认共享 D$ Disk 默认共享
使用 oh-my-zsh 及 gnzh 风格
CentOS系统:
# yum install zsh git curl
Ubuntu系统:
# apt install zsh git curl
然后访问:http://ohmyz.sh/,复制一键安装脚本
$ sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
安装后编辑文件:~/.zshrc,修改风格为 gnzh
ZSH_THEME="gnzh"
Ubuntu tftpd server 使用教程
1,安装
# apt-get install tftpd-hpa
2,配置
# vi /etc/default/tftpd-hpa TFTP_OPTIONS="--secure --verbose"
# systemctl restart tftpd-hpa
3,测试
# apt-get install tftp $ tftp localhost tftp> get foo tftp> quit
# tail -f /var/log/syslog
git merge 冲突的偷懒解决办法
如果要使用 vendor 的代码,则:
git checkout --theirs readme.md
如果要使用 master 的代码,则:
git checkout --ours readme.md
使用 Laravel Homestead 环境
$ vagrant init laravel/homestead $ vagrant up $ vagrant ssh
Welcome to Ubuntu 16.04.2 LTS (GNU/Linux 4.4.0-81-generic x86_64) * Documentation: https://help.ubuntu.com * Management: https://landscape.canonical.com * Support: https://ubuntu.com/advantage 3 packages can be updated. 0 updates are security updates. vagrant@homestead:~$
Ubuntu 16.04 升级 PHP 版本至 7.1
$ sudo add-apt-repository ppa:ondrej/php $ sudo apt-get update $ sudo apt-get upgrade php
$ php -v Cannot load Xdebug - it was already loaded PHP 7.1.8-2+ubuntu16.04.1+deb.sury.org+4 (cli) (built: Aug 4 2017 13:04:12) ( NTS ) Copyright (c) 1997-2017 The PHP Group Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies with Zend OPcache v7.1.8-2+ubuntu16.04.1+deb.sury.org+4, Copyright (c) 1999-2017, by Zend Technologies with Xdebug v2.5.5, Copyright (c) 2002-2017, by Derick Rethans
Kubernetes Heapster 安装部署
默认安装的 Dashboard 没有统计 CPU 和内存用量的图表,装上 Heapster 后就可以直观地看到各个组件的资源消耗情况
Kubernetes Dashboard 安装部署
在部署好 Kubernetes 单机版的基础上,首先让 apiserver 监听在 0.0.0.0