Skip to content

Instantly share code, notes, and snippets.

@cnruby
cnruby / ubtuntu904-910
Last active August 29, 2015 14:01
《?》如何将会Ubuntu服务器系统版本9.04升级到9.10
$ wget http://old-releases.ubuntu.com/releases/9.10/ubuntu-9.10-server-i386.iso
$ mkdir /media/cdrom0
$ sudo mount -o loop /path/to/alternate-cd.iso /media/cdrom0
$ cd /media/cdrom0
$ sudo ./cdromupgrade --frontend=DistUpgradeViewText
# 注意事项:
# 下面问题一定要回答:n
# Include latest updates from the Internet?
# ...
@cnruby
cnruby / show_ubuntu_version
Created May 14, 2014 15:55
《?》如何查看Ubuntu系统版本
$ lsb_release -a
No LSB modules are available.
Distributor ID:Ubuntu
Description:Ubuntu 9.04
Release:9.04
Codename:jaunty
$ cat /etc/lsb-release
@cnruby
cnruby / ubuntu910-1004
Created May 14, 2014 16:10
《?》如何将会Ubuntu服务器系统版本9.10升级到10.04
$ sudo vim /etc/apt/sources.list
# /etc/apt/sources.list
# Required
deb http://old-releases.ubuntu.com/ubuntu/ karmic main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu/ karmic-updates main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu/ karmic-security main restricted universe multiverse
$ sudo aptitude update && sudo aptitude safe-upgrade
$ sudo do-release-upgrade
@cnruby
cnruby / ubuntu1004-1204
Last active August 29, 2015 14:01
《?》如何将会Ubuntu服务器系统版本10.04升级到12.04
$ sudo apt-get install update-manager-core
$ sudo vim /etc/update-manager/release-upgrades
# /etc/update-manager/release-upgrades
set Prompt=lts
$ do-release-upgrade
参考资料:
https://help.ubuntu.com/community/PreciseUpgrades
@cnruby
cnruby / ubuntu1204-1210
Last active August 29, 2015 14:01
《?》如何将会Ubuntu服务器系统版本12.04升级到12.10
$ sudo apt-get install update-manager-core
$ sudo vim /etc/update-manager/release-upgrades
# /etc/update-manager/release-upgrades
set Prompt=normal
$ do-release-upgrade
参考资料:
https://help.ubuntu.com/community/QuantalUpgrades
@cnruby
cnruby / ubuntu1210-1310
Created May 14, 2014 17:59
《?》如何将会Ubuntu服务器系统版本12.10升级到13.10
$ sudo apt-get install update-manager-core
$ sudo do-release-upgrade
参考资料:
https://help.ubuntu.com/community/SaucyUpgrades
@cnruby
cnruby / ubuntu1310-1404
Last active August 29, 2015 14:01
《?》如何将会Ubuntu服务器系统版本13.10升级到14.04
$ sudo apt-get install update-manager-core
$ sudo do-release-upgrade
参考资料:
https://help.ubuntu.com/community/TrustyUpgrades
@cnruby
cnruby / gist:c58049e55ac0cb3d8e98
Created May 15, 2014 16:05
《??》curl: (60) SSL certificate problem: unable to get local issuer certificate
$ cd ~
$ wget http://curl.haxx.se/ca/cacert.pem
$ vim ~/.profile
# ...
export CURL_CA_BUNDLE="~/cacert.pem"
$ . ~/.profile
参考资料
http://curl.haxx.se/docs/sslcerts.html
@cnruby
cnruby / install_vagrant_on_macosx
Last active August 29, 2015 14:01
install virtualbox and vagrant and OS
export VAGRANT_HOME='~/vagrant'
cd $VAGRANT_HOME
# install VirtualBox 4.3.12 on Mac OSX
wget http://download.virtualbox.org/virtualbox/4.3.12/VirtualBox-4.3.12-93733-OSX.dmg
# install Vagrant 1.6.2 on Mac OSX
https://dl.bintray.com/mitchellh/vagrant/vagrant_1.6.2.dmg
# install Ubuntu OS on VirtualBox
@cnruby
cnruby / use_vagrant_on_virtualbox
Last active August 29, 2015 14:01
use vagrant on virtualbox
cd $VAGRANT_HOME # exists, the file Vagrantfile
vagrant help
vagrant up # 启动Ubuntu系统
vagrant ssh # 进入Ubuntu系统
pwd # /home/vagrant
cd /vagrant # 相当于本地目录$VAGRANT_HOME
exit # 从Ubuntu系统返回本地
vagrant suspend # 关闭Ubuntu系统