debian安装,以及Ubuntu升级系统
2018/07 作者:ihunter 0 次 0
vi /etc/apt/sources.list 阿里云源: deb http://mirrors.aliyun.com/debian/ jessie main non-free contrib deb http://mirrors.aliyun.com/debian/ jessie-updates main non-free contrib deb http://mirrors.aliyun.com/debian/ jessie-backports main non-free contrib deb-src http://mirrors.aliyun.com/debian/ jessie main non-free contrib deb-src http://mirrors.aliyun.com/debian/ jessie-updates main non-free contrib deb-src http://mirrors.aliyun.com/debian/ jessie-backports main non-free contrib deb http://mirrors.aliyun.com/debian-security/ jessie/updates main non-free contrib deb-src http://mirrors.aliyun.com/debian-security/ jessie/updates main non-free contrib deb http://mirrors.aliyun.com/debian wheezy main contrib non-free deb-src http://mirrors.aliyun.com/debian wheezy main contrib non-free deb http://mirrors.aliyun.com/debian wheezy-updates main contrib non-free deb-src http://mirrors.aliyun.com/debian wheezy-updates main contrib non-free deb http://mirrors.aliyun.com/debian-security wheezy/updates main contrib non-free deb-src http://mirrors.aliyun.com/debian-security wheezy/updates main contrib non-free deb http://ftp.cn.debian.org/debian/ jessie main non-free contrib deb http://ftp.uk.debian.org/debian/ jessie main non-free contrib 官方源: deb http://ftp.us.debian.org/debian/ wheezy main deb-src http://ftp.us.debian.org/debian/ wheezy main deb http://security.debian.org/ wheezy/updates main deb-src http://security.debian.org/ wheezy/updates main deb http://ftp.us.debian.org/debian/ wheezy-updates main deb-src http://ftp.us.debian.org/debian/ wheezy-updates main deb http://ftp.cn.debian.org/debian/ jessie main non-free contrib deb http://ftp.uk.debian.org/debian/ jessie main non-free contrib 香港源: deb http://ftp.hk.debian.org/debian/ jessie main deb-src http://ftp.hk.debian.org/debian/ jessie main deb http://security.debian.org/ jessie/updates main deb-src http://security.debian.org/ jessie/updates main # jessie-updates, previously known as 'volatile' deb http://ftp.hk.debian.org/debian/ jessie-updates main deb-src http://ftp.hk.debian.org/debian/ jessie-updates main deb http://ftp.cn.debian.org/debian/ jessie main non-free contrib deb http://ftp.uk.debian.org/debian/ jessie main non-free contrib
apt-get update -y # 更新软件信息数据库 apt-get dist-upgrade -y # 这一步安装所有可用更新,包括新内核 apt-get upgrade -y # 进行系统升级 cat /etc/debian_version # 查看内核版本 apt-get install -y wget vim net-tools cron apt-get install cmake apt-get install build-essential # 内核编译环境 apt-get install zlib1g-dev apt-get install git apt-get install package=version # 指定版本更新 rm -f /usr/bin/gcc ln -s /usr/bin/gcc-4.9 /usr/bin/gcc rm -f /usr/bin/g++ ln -s /usr/bin/g++-4.9 /usr/bin/g++
apt-get install softname #安装软件 apt-get remove softname #删除软件包,但是不删除软件的配置文件:如果再想安装,可能会出现问题。 apt-get remove --purge softname #删除软件包,并删除相应的配置文件: apt-get autoremove softname #将依赖的软件包卸载掉,这样就可以完全卸载一个软件 apt-cache search #搜索软件包 dpkg -i package_file.deb # debian下deb包如何安装 在包含有依赖关系的安装包异常,需命令:apt-get -f install 待命令执行完成,软件也就安装成功了. dpkg -r package_name # debian下卸载deb包
安装php5.6: apt-get install python-software-properties add-apt-repository ppa:ondrej/php apt-get -y update apt-get -y install php5.6 php5.6-mcrypt php5.6-mbstring php5.6-curl php5.6-cli php5.6-mysql php5.6-gd php5.6-intl php5.6-xsl php5.6-zip
Ubuntu升级系统 apt update apt upgrade apt dist-upgrade apt autoremove apt install update-manager-core do-release-upgrade -d # 直升新版本