quick install

when you reinstall your ubuntu system, you can bakup your app

 

their location is : /var/cache/apt/archives

 

and you can use this script to install some commen tools:

 

 

#!/bin/bash

# error: 动态 MMap 没有空间了。请增大 APT::Cache-Limit 的大小。当前值:25165824
(echo '$a';
echo 'APT::Cache-Limit 99999999;';
echo '.';
echo 'wq')|sudo ed -s /etc/apt/apt.conf
 

# install vim
sudo apt-get install vim --force-yes -y

# update source.list
(echo '$a';

echo '#网易源';
echo 'deb http://mirrors.163.com/ubuntu/ karmic main restricted universe multiverse';
echo 'deb http://mirrors.163.com/ubuntu/ karmic-security main restricted universe multiverse';
echo 'deb http://mirrors.163.com/ubuntu/ karmic-updates main restricted universe multiverse';
echo 'deb http://mirrors.163.com/ubuntu/ karmic-proposed main restricted universe multiverse';
echo 'deb http://mirrors.163.com/ubuntu/ karmic-backports main restricted universe multiverse';
echo 'deb-src http://mirrors.163.com/ubuntu/ karmic main restricted universe multiverse';
echo 'deb-src http://mirrors.163.com/ubuntu/ karmic-security main restricted universe multiverse';
echo 'deb-src http://mirrors.163.com/ubuntu/ karmic-updates main restricted universe multiverse';
echo 'deb-src http://mirrors.163.com/ubuntu/ karmic-proposed main restricted universe multiverse';
echo 'deb-src http://mirrors.163.com/ubuntu/ karmic-backports main restricted universe multiverse';
echo '#台湾';
echo 'deb http://tw.archive.ubuntu.com/ubuntu/ karmic main universe restricted multiverse';
echo 'deb http://tw.archive.ubuntu.com/ubuntu/ karmic-updates universe main multiverse restricted';
echo 'deb http://tw.archive.ubuntu.com/ubuntu/ karmic-proposed universe main multiverse restricted';
echo 'deb http://tw.archive.ubuntu.com/ubuntu/ karmic-security universe main multiverse restricted';
echo 'deb http://tw.archive.ubuntu.com/ubuntu/ karmic-backports main multiverse restricted universe';
echo 'deb-src http://tw.archive.ubuntu.com/ubuntu/ karmic main universe restricted multiverse';
echo 'deb-src http://tw.archive.ubuntu.com/ubuntu/ karmic-security universe main multiverse restricted';
echo 'deb-src http://tw.archive.ubuntu.com/ubuntu/ karmic-updates universe main multiverse restricted';
echo 'deb-src http://tw.archive.ubuntu.com/ubuntu/ karmic-proposed universe main multiverse restricted';
echo 'deb-src http://tw.archive.ubuntu.com/ubuntu/ karmic-backports universe main multiverse restricted';
echo '#搜狐源';
echo 'deb http://mirrors.sohu.com/ubuntu/ karmic main restricted';
echo 'deb-src http://mirrors.sohu.com/ubuntu/ karmic main restricted';
echo 'deb http://mirrors.sohu.com/ubuntu/ karmic-updates main restricted';
echo 'deb-src http://mirrors.sohu.com/ubuntu/ karmic-updates main restricted';
echo 'deb http://mirrors.sohu.com/ubuntu/ karmic universe';
echo 'deb-src http://mirrors.sohu.com/ubuntu/ karmic universe';
echo 'deb http://mirrors.sohu.com/ubuntu/ karmic-updates universe';
echo 'deb-src http://mirrors.sohu.com/ubuntu/ karmic-updates universe';
echo 'deb http://mirrors.sohu.com/ubuntu/ karmic multiverse';
echo 'deb-src http://mirrors.sohu.com/ubuntu/ karmic multiverse';
echo 'deb http://mirrors.sohu.com/ubuntu/ karmic-updates multiverse';
echo 'deb-src http://mirrors.sohu.com/ubuntu/ karmic-updates multiverse';
echo '#北京交通大学';
echo 'deb http://mirror.bjtu.edu.cn/ubuntu/ karmic main multiverse restricted universe';
echo 'deb http://mirror.bjtu.edu.cn/ubuntu/ karmic-backports main multiverse restricted universe';
echo 'deb http://mirror.bjtu.edu.cn/ubuntu/ karmic-proposed main multiverse restricted universe';
echo 'deb http://mirror.bjtu.edu.cn/ubuntu/ karmic-security main multiverse restricted universe';
echo 'deb http://mirror.bjtu.edu.cn/ubuntu/ karmic-updates main multiverse restricted universe';
echo 'deb-src http://mirror.bjtu.edu.cn/ubuntu/ karmic main multiverse restricted universe';
echo 'deb-src http://mirror.bjtu.edu.cn/ubuntu/ karmic-backports main multiverse restricted universe';
echo 'deb-src http://mirror.bjtu.edu.cn/ubuntu/ karmic-proposed main multiverse restricted universe';
echo 'deb-src http://mirror.bjtu.edu.cn/ubuntu/ karmic-security main multiverse restricted universe';
echo 'deb-src http://mirror.bjtu.edu.cn/ubuntu/ karmic-updates main multiverse restricted universe';
echo '#电子科技大学';
echo 'deb http://ubuntu.uestc.edu.cn/ubuntu/ karmic main restricted universe multiverse';
echo 'deb http://ubuntu.uestc.edu.cn/ubuntu/ karmic-backports main restricted universe multiverse';
echo 'deb http://ubuntu.uestc.edu.cn/ubuntu/ karmic-proposed main restricted universe multiverse';
echo 'deb http://ubuntu.uestc.edu.cn/ubuntu/ karmic-security main restricted universe multiverse';
echo 'deb http://ubuntu.uestc.edu.cn/ubuntu/ karmic-updates main restricted universe multiverse';
echo 'deb-src http://ubuntu.uestc.edu.cn/ubuntu/ karmic main restricted universe multiverse';
echo 'deb-src http://ubuntu.uestc.edu.cn/ubuntu/ karmic-backports main restricted universe multiverse';
echo 'deb-src http://ubuntu.uestc.edu.cn/ubuntu/ karmic-proposed main restricted universe multiverse';
echo 'deb-src http://ubuntu.uestc.edu.cn/ubuntu/ karmic-security main restricted universe multiverse';
echo 'deb-src http://ubuntu.uestc.edu.cn/ubuntu/ karmic-updates main restricted universe multiverse';
echo '#官方源';
echo 'deb http://archive.ubuntu.com/ubuntu/ karmic main restricted universe multiverse';
echo 'deb http://archive.ubuntu.com/ubuntu/ karmic-security main restricted universe multiverse';
echo 'deb http://archive.ubuntu.com/ubuntu/ karmic-updates main restricted universe multiverse';
echo 'deb http://archive.ubuntu.com/ubuntu/ karmic-proposed main restricted universe multiverse';
echo 'deb http://archive.ubuntu.com/ubuntu/ karmic-backports main restricted universe multiverse';
echo '.'; echo 'wq') | sudo ed -s /etc/apt/sources.list

# update
sudo apt-get update

# upgrade
sudo apt-get upgrade

# install rar
sudo apt-get install rar unrar --force-yes -y

# install jdk
sudo apt-get install sun-java6-jdk --force-yes -y

# install ftp server
sudo apt-get install vsftpd --force-yes -y

(echo '$a';
 echo '###Enable anonymous read';
 echo 'anonymous_enable=YES';
 echo 'anon_root=/';
 echo 'anon_world_readable_only=YES';
 echo 'anon_mkdir_write_enable=YES';
 echo 'anon_upload_enable=YES';

 echo '###Enable local user read and write';
 echo 'local_enable=YES';
 echo 'write_enable=YES';
 echo '.'; echo 'wq') | sudo ed -s /etc/vsftpd.conf

/etc/init.d/vsftpd restart



 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值