‘Linux’ 分类存档

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


虚拟机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中,这样任何设备都可以访问了,还剩资源:)


1. 安装中文包

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


默认只有一种,在默认更新源里,加上默认的一共有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 theme



After installed Centos 6.7 for CISCO WAE, I found python version is 2.6 that is much older, and I need ansible1.9, but Centos default upgrade to ansible2.2… in order to easy management ansible1.9 that is python package, I plan to install PIP. From official website, suggest not use 2.6 under pip, so I need to upgrade python to 2.7 too.

But I found WAE use 2.6 after I succeed upgrade python to 2.7…Summarized the totally steps that will help me review in future.

Upgrade Python

After checked from follow link, python 2.7.9 integrate pip, so install this version 🙂

1. Install some package that require by python

python have multi dependencie

[root@wae ~]# yum install gcc
[root@wae ~]# yum install openssl-devel

2. Install python 2.7.9

[root@wae ~]# wget
[root@wae ~]# mv Python-2.7.9.tgz /opt/
[root@wae ~]# cd /opt/
[root@wae opt]# tar -xvf Python-2.7.9.tgz 
[root@wae opt]# cd Python-2.7.9
[root@wae Python-2.7.9]# ./configure --prefix=/usr/local/python2.7
[root@wae Python-2.7.9]# make
[root@wae Python-2.7.9]# make install


Building Citra in MacOS

Platform: MacBook Pro
Version: 10.12.3
Cpu: Core i7 2.2
Xcode: 8.2.1

1. Based on github release, install all component by brew:

2.Have alarm after cmake:

MacOS:Documents frank$ cd citra/
MacOS:citra frank$
MacOS:citra frank$
MacOS:citra frank$ export Qt5_DIR=$(brew --prefix)/opt/qt5
MacOS:citra frank$ export MACOSX_DEPLOYMENT_TARGET=10.9
MacOS:citra frank$ mkdir build
MacOS:citra frank$ cd build
MacOS:build frank$ cmake .. -GXcode
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:36 (project):
No CMAKE_C_COMPILER could be found.

CMake Error at CMakeLists.txt:36 (project):
No CMAKE_CXX_COMPILER could be found.

-- Configuring incomplete, errors occurred!
See also "/Users/frank/Documents/citra/build/CMakeFiles/CMakeOutput.log".
See also "/Users/frank/Documents/citra/build/CMakeFiles/CMakeError.log".


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

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

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”

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”

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