很久没写博客了,今天写一个经验篇
以ubuntu12.10 64bit为例,
一、以root用户登录
启动root帐号:
$sudo passwd root #根据提示输入roott帐号密码。
$sudo gedit /etc/lightdm/lightdm.conf
[SeatDefaults]
greeter-session=unity-greeter
user-session=ubuntu
greeter-show-manual-login=true #手工输入登陆系统的用户名和密码
allow-guest=false #不允许guest登录
重启ubuntu,登录窗口会有“登录”选项,这时候我们就可以通过root登录了。
二、安装android编译环境
1、更新下载源,详见附录。
<1>. 备份
# cp /etc/apt/sources.list /etc/apt/sources.list_back
<2>. 编辑和添加更新源
# gedit /etc/apt/sources.list
编辑你的源列表,在原来的内容前(或者全部删除原有内容),添加下面列表中最适合你的源(注意不要全部添加),选择合适你的即可,复制到你的列表中,然后保存列表。
<3>. 更新源列表信息
# apt-get update
可以在运行“sudo apt-get update ”时查看一下错误信息,把不能连接的源删除再重新运行“sudo apt-get update ”。
2、安装java6
# add-apt-repository ppa:webupd8team/java安装成功后查看 #java -version# apt-get update# apt-get install oracle-java6-installer
如果有openjdk VM字样,则要切用切换成java VM字样 #update-alternatives --config java
添加路径变量:#gedit ~/.bashrc
export JAVA_HOME=/usr/lib/jvm/java-6-sun
export PATH=$PATH:$JAVA_HOME/bin
添加好后,执行source ~/.bashrc
3、安装支持包
新建批处理文件
#gedit setenv.sh
添加内容如下,然后执行 #./setenv.sh:
#!/bin/bash
apt-get install ant
apt-get install ant-optional
apt-get install bison
apt-get install build-essential
apt-get install ca-certificates-java
apt-get install curl
apt-get install flex
apt-get install fusesmb
apt-get install g++-4.4-multilib
apt-get install g++-multilib
apt-get install gcc-4.4-multilib
apt-get install gcc-multilib
apt-get install git-core
apt-get install git-gui
apt-get install gitk
apt-get install gnuit
apt-get install gnupg
apt-get install gperf
apt-get install ia32-libs
apt-get install lib32ncurses5-dev
apt-get install libreadline-gplv2-dev
apt-get install lib32readline-gplv2-dev
apt-get install lib32z1
apt-get install lib32z1-dev
apt-get install libc6-dev-i386
apt-get install libesd0-dev
apt-get install libmotif4
apt-get install libncurses5-dev
apt-get install libsasl2-modules-gssapi-mit
apt-get install libsdl1.2-dev
apt-get install libx11-dev
apt-get install meld
apt-get install menu
apt-get install tsocks
apt-get install valgrind
apt-get install vim
apt-get install x11proto-core-dev
apt-get install zip
apt-get install zlib1g-dev
apt-get install diffstat
三、安装常用软件
1、 安装Skype聊天工具
#add-apt-repository "deb http://archive.canonical.com/ $(lsb_release -sc) partner"
#apt-get update && sudo apt-get install skype
2、安装Kscope代码阅读工具
#add-apt-repository ppa:fbirlik/kscope
#apt-get update
#apt-get install kscope-trinity
3、安装飞信openfetion
#apt-get install openfetion
4、安装压缩软件
#apt-get install p7zip
#apt-get install rar
5、安装ibus输入法 wiki:http://wiki.ubuntu.org.cn/IBus
增加中文支持语言包:“System”->“系统管理”->“Language Support”,系统会自动加载所需语言文件。
#apt-get install ibus ibus-clutter ibus-gtk ibus-gtk3 ibus-qt4
#im-switch -s ibus
#apt-get install ibus-pinyin
#/usr/lib/ibus-pinyin/ibus-setup-pinyin
#apt-get install ibus-table-wubi
#ibus-setup
6、安装viualbox
Add one of the following lines according to your distribution to your /etc/apt/sources.list:
deb http://download.virtualbox.org/virtualbox/debian precise contrib
deb http://download.virtualbox.org/virtualbox/debian oneiric contrib
deb http://download.virtualbox.org/virtualbox/debian natty contrib
deb http://download.virtualbox.org/virtualbox/debian maverick contrib non-free
deb http://download.virtualbox.org/virtualbox/debian lucid contrib non-free
deb http://download.virtualbox.org/virtualbox/debian karmic contrib non-free
deb http://download.virtualbox.org/virtualbox/debian hardy contrib non-free
deb http://download.virtualbox.org/virtualbox/debian wheezy contrib
deb http://download.virtualbox.org/virtualbox/debian squeeze contrib non-free
deb http://download.virtualbox.org/virtualbox/debian lenny contrib non-free
#wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | apt-key add -
The key fingerprint is
7B0F AB3A 13B9 0743 5925 D9C9 5442 2A4B 98AB 5139
Oracle Corporation (VirtualBox archive signing key) <[email protected]>
To install VirtualBox, do
# apt-get update
# apt-get install virtualbox-4.2
#apt-get install linux-headers-3.5.0-17-generic 这一步很重要,不然virtulbox起不来
7、安装QQ wiki:http://wiki.ubuntu.org.cn/QQ
下载安装文件 http://im.qq.com/qq/linux/download.shtml
首先安装32位库
#apt-get install ia32-libs*
然后就可以安装32位包,安装时加–force-architecture
进入安装包所在的目录
#dpkg -i --force-all linuxqq_v1.0.2-beta1_i386.deb
四、更新源
deb http://archive.ubuntu.com/ubuntu/ oneiric main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ oneiric-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ oneiric-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ oneiric-proposed main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ oneiric-backports main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ oneiric main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ oneiric-security main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ oneiric-updates main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ oneiric-proposed main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ oneiric-backports main restricted universe multiverse
#lupaworld 源,提供 ArchLinux,Everest,FreeBSD,Fedora,LFS,Magiclinux,Mandriva,OpenOffice,openSUSE,Puppy,Red Hat,Slitaz,Turbolinux,Ubuntu,中标普华
deb http://mirror.lupaworld.com/ubuntu/ natty main universe restricted multiverse
deb-src http://mirror.lupaworld.com/ubuntu/ natty main universe restricted multiverse
deb http://mirror.lupaworld.com/ubuntu/ natty-security universe main multiverse restricted
deb-src http://mirror.lupaworld.com/ubuntu/ natty-security universe main multiverse restricted
deb http://mirror.lupaworld.com/ubuntu/ natty-updates universe main multiverse restricted
deb http://mirror.lupaworld.com/ubuntu/ natty-proposed universe main multiverse restricted
deb-src http://mirror.lupaworld.com/ubuntu/ natty-proposed universe main multiverse restricted
deb http://mirror.lupaworld.com/ubuntu/ natty-backports universe main multiverse restricted
deb-src http://mirror.lupaworld.com/ubuntu/ natty-backports universe main multiverse restricted
deb-src http://mirror.lupaworld.com/ubuntu/ natty-updates universe main multiverse restricted
deb http://tw.archive.ubuntu.com/ubuntu hardy main restricted universe multiverse
deb http://tw.archive.ubuntu.com/ubuntu hardy-security main restricted universe multiverse
deb http://tw.archive.ubuntu.com/ubuntu hardy-updates main restricted universe multiverse
deb http://tw.archive.ubuntu.com/ubuntu hardy-backports main restricted universe multiverse
deb http://tw.archive.ubuntu.com/ubuntu hardy-proposed main restricted universe multiverse
deb-src http://tw.archive.ubuntu.com/ubuntu hardy main restricted universe multiverse
deb-src http://tw.archive.ubuntu.com/ubuntu hardy-security main restricted universe multiverse
deb-src http://tw.archive.ubuntu.com/ubuntu hardy-updates main restricted universe multiverse
deb-src http://tw.archive.ubuntu.com/ubuntu hardy-backports main restricted universe multiverse
deb-src http://tw.archive.ubuntu.com/ubuntu hardy-proposed main restricted universe multiverse
deb http://mirrors.sohu.com/ubuntu/ precise main restricted
deb-src http://mirrors.sohu.com/ubuntu/ precise main restricted
deb http://mirrors.sohu.com/ubuntu/ precise-updates main restricted
deb-src http://mirrors.sohu.com/ubuntu/ precise-updates main restricted
deb http://mirrors.sohu.com/ubuntu/ precise universe
deb-src http://mirrors.sohu.com/ubuntu/ precise universe
deb http://mirrors.sohu.com/ubuntu/ precise-updates universe
deb-src http://mirrors.sohu.com/ubuntu/ precise-updates universe
deb http://mirrors.sohu.com/ubuntu/ precise multiverse
deb-src http://mirrors.sohu.com/ubuntu/ precise multiverse
deb http://mirrors.sohu.com/ubuntu/ precise-updates multiverse
deb-src http://mirrors.sohu.com/ubuntu/ precise-updates multiverse
deb http://mirrors.sohu.com/ubuntu/ precise-backports main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ precise-backports main restricted universe multiverse
deb http://mirrors.sohu.com/ubuntu/ precise-security main restricted
deb-src http://mirrors.sohu.com/ubuntu/ precise-security main restricted
deb http://mirrors.sohu.com/ubuntu/ precise-security universe
deb-src http://mirrors.sohu.com/ubuntu/ precise-security universe
deb http://mirrors.sohu.com/ubuntu/ precise-security multiverse
deb-src http://mirrors.sohu.com/ubuntu/ precise-security multiverse
deb http://extras.ubuntu.com/ubuntu precise main
deb-src http://extras.ubuntu.com/ubuntu precise main
deb http://debian.ustc.edu.cn/ubuntu/ quantal main restricted universe multiverse
deb http://debian.ustc.edu.cn/ubuntu/ quantal-backports restricted universe multiverse
deb http://debian.ustc.edu.cn/ubuntu/ quantal-proposed main restricted universe multiverse
deb http://debian.ustc.edu.cn/ubuntu/ quantal-security main restricted universe multiverse
deb http://debian.ustc.edu.cn/ubuntu/ quantal-updates main restricted universe multiverse
deb-src http://debian.ustc.edu.cn/ubuntu/ quantal main restricted universe multiverse
deb-src http://debian.ustc.edu.cn/ubuntu/ quantal-backports main restricted universe multiverse
deb-src http://debian.ustc.edu.cn/ubuntu/ quantal-proposed main restricted universe multiverse
deb-src http://debian.ustc.edu.cn/ubuntu/ quantal-security main restricted universe multiverse
deb-src http://debian.ustc.edu.cn/ubuntu/ quantal-updates main restricted universe multiverse