月度归档:2017年01月

ubuntu上设置服务自动启动

sudo update-rc.d minidlna defaults

This should add the service to the automatic startup system. But if you get:

System start/stop links for /etc/init.d/minidlna already exist.
Do the command

sudo update-rc.d minidlna enable

P.S.: For further detail look at the man page for update-rc.d by typing the command man update-rc.d

ssh连接到virtualbox 里面的linux

The best way to login to a guest Linux VirtualBox VM is port forwarding. By default, you should have one interface already which is using NAT. Then go to the Network settings and click the Port Forwarding button. Add a new Rule:

Host port 3022, guest port 22, name ssh, other left blank.
or from command line

VBoxManage modifyvm myserver –natpf1 “ssh,tcp,,3022,,22”
where ‘myserver’ is the name of the created VM. Check the added rules:

VBoxManage showvminfo myserver | grep ‘Rule’
That’s all! Please be sure you don’t forget to install an SSH server:

sudo apt-get install openssh-server

To SSH into the guest VM, write:

ssh -p 3022 user@127.0.0.1

Where user is your username within the VM.

参考:http://stackoverflow.com/questions/5906441/how-to-ssh-to-a-virtualbox-guest-externally-through-a-host

2017年,你好!

新年好!这一年,我将继续努力,为了更好的未来而继续努力!

2017年,我希望我们拥有更多的美好!我相信一切美好的事情都会不断发生,因为我会变得更好!

工作、家庭、生活、梦想、社会进步,…希望这一切都变得更好!

希望地球变得更好,希望国家变得更好,希望每一个人都变得更好!