Archive

‘常用资料’ 分类存档

Linux操作系统虚拟机(ESXi、VMware Workstation等)MAC地址变化后网卡无法启动-转

原始文章:
http://iknow.lenovo.com/detail/dc_148601.html

虚拟机MAC改变后,无法启动,并报错:“Device eth0 does not seem to be present”
出现该问题,是由于MAC地址变更后,操作系统仍然保留原来MAC地址作为eth0,并且将新的MAC地址识别为新的网卡导致的,可以删除文件“/etc/udev/rules.d/70-persistent-net.rule”中老MAC的信息,并把新MAC中的eth1改成eth0,通过start_udev重新加载udev,然后重启网卡恢复:“service network restart”

Deploy Samba on OpenWRT

买了linksys wrt1200ac很久了,之前只是装了一个openwrt+默认配置,也没启用什么特别功能,感觉还算稳定。不过现在想听一些下载下来的广播,但又不想总是开着PC,所以突然想把这些音频挪到没用的u盘里,并挂在openwrt中,这样任何设备都可以访问了,还剩资源:)

定制OpenWRT

1. 安装中文包

root@OpenWrt:~# opkg update <<< 每次重启后需要缓存安装包列表,这样才能search到所有可用的包
root@OpenWrt:~# opkg list |grep zh-cn <<< 学会如何查找相应的包
root@OpenWrt:~# opkg install luci-i18n-base-zh-cn <<< 安装中文包

2.安装luci的主题

默认只有一种,在默认更新源里,加上默认的一共有4个,最后我还是选择了默认的 -_-

root@OpenWrt:~# opkg list |grep -i theme
luci - git-16.018.33482-3201903-1 - Standard OpenWrt set including full admin with ppp support and the default Bootstrap theme
luci-theme-bootstrap - git-16.018.33482-3201903-1 - Bootstrap Theme (default)
luci-theme-freifunk-bno - git-16.018.33482-3201903-1 - Freifunk Berlin Nordost Theme
luci-theme-freifunk-generic - git-16.018.33482-3201903-1 - Freifunk Generic Theme
luci-theme-openwrt - git-16.018.33482-3201903-1 - LuCI OpenWrt.org theme
 完整阅读

Excel 小技巧

在处理工作时,常常遇到统计log,但如何高效的统计,常常需要度娘,而且查起来也很麻烦,所以统计到blog里,下次可以统一查阅:

Excel中两列数据,找出重复项

参考文章请查看:https://zhidao.baidu.com/question/546059662.html
分别对两行建立条件公式,选中A列,条件“=COUNTIF(B:B,A1)>0”;选中B列,条件“=COUNTIF(A:A,B1)>0”,如下所示:

完整阅读

Backup and Restore MacOS Outlook 2011 & 2016

备份邮件:

我的outlook是由“Exchange+本地文件夹”组成的,直接把下面整个文件夹备份就可以了,这里包含了你所有outlook的邮件,日历和本地文件夹,对于outlook 2016,请看最后部分

/Users/<user>/Documents/Microsoft User Data/Office 2011 Identities/Main  Identity

备份恢复:

在新MAC上打开新的outlook,不要设置任何账号,然后选Tools中得Import:

outlook-recovery-02
完整阅读

Ubuntu 14.04 General config

Not use ubuntu for long time… some useful commands had forgot, summary again:

1. Permit root login
gedit /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf –> “greeter-show-manual-login=true”
sudo passwd root
reboot

2. Change language
gedit /etc/default/locale –> change what do you want
reboot

3. Script couldn’t run on linux “bad interpreter: No such file or directory”
that should dos format, need change to unix format
vi xxx
check format by “:set ff” or “:set fileformat”
change format by “:set ff=unix” or “:set fileformat=unix”
:wq

4. Enable ssh service
sudo apt-get install openssh-server
gedit /etc/ssh/sshd_config –> “PermitRootLogin yes”
restart by “/etc/init.d/ssh restart”
check by “ps -ef|grep ssh”
reboot

5. Disable firewall
check whether enable by “ufw status”
disable by “ufw disable”

6. Change update source
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
sudo vim /etc/apt/sources.list
sudo apt-get update

Refer to default source, can reference this article.

7. Change ip address, add/del GW route, add text to file
sudo ifconfig eth1 up
sudo ifconfig eth0 down
sudo ifconfig eth1 up 10.0.0.30 netmask 255.255.255.128
sudo route add -net 0.0.0.0/0 gw 10.0.0.126 dev eth1
sudo echo ‘nameserver x.x.x.x’ >> /etc/resolv.conf

8. Install DHCP Server

sudo apt-get install isc-dhcp-server
vim /etc/default/isc-dhcp-server

blonde teen swallows load.xxx videos