系统相关
首页 > 系统相关> > 2021年Ubuntu16.04最全安装(配置,更换源)

2021年Ubuntu16.04最全安装(配置,更换源)

作者:互联网

1.ctrl+alt+t,打开终端,设置root用户的初始密码

sudo passwd

2.卸载不需要的软件

sudo apt-get remove libreoffice-common
sudo rm -f /usr/share/applications/com.canonical.launcher.amazon.desktop
sudo rm -f /usr/share/applications/ubuntu-amazon-default.desktop
sudo apt-get -y purge thunderbird*#邮件sudo apt-get -y purge firefox#火狐浏览器sudo apt-get -y purge deja-dup#备份sudo apt-get -y purge simple-scan#扫描sudo apt-get -y purge hplip* #打印sudo apt-get -y purge printer-driver* #打印驱动sudo apt-get -y purge rhythmbox* #音乐播放sudo apt-get -y purge gedit* #文本编辑sudo apt-get -y purge libreoffice* #办公套件sudo apt-get -y purge gnome-orca #屏幕阅读sudo apt-get -y purge onboard #屏幕键盘sudo apt-get -y purge mahjongg #对对碰sudo apt-get -y purge aisleriot #纸牌王sudo apt-get -y purge gnome-sudoku #数独sudo apt-get -y purge gnomine #扫雷sudo apt-get -y purge wodim #命令刻碟

3.国内源(能fq就不用改)

sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
sudo chmod 777 /etc/apt/sources.list   
sudo gedit /etc/apt/sources.list

1

2

3

4

5

6

7

8

9

10

deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse

 

4.基础环境

#安装Vim文本编译器(卸载系统自带的Vim-tiny,重新安装)

sudo apt-get remove vim-common

sudo apt-get install vim

#python 3.5(将默认的python2.5升级到3.5)

sudo rm  /usr/bin/python

sudo ln -s /usr/bin/python /usr/bin/python

#安装java

sudo apt-get install oracle-java8-installer

【error fixed】E: Package 'oracle-java8-installer' has no installation candidate

原因:没有该软件的ppa源

sudo add-apt-repository ppa:ts.sch.gr/ppa
sudo apt-get update
sudo apt-get install oracle-java8-installer

# 安装 mysql

sudo apt-get install mysql-server

# 安装phpmyadmin

sudo apt-get install phpmyadmin

# 添加软连接

sudo ln -s /usr/share/phpmyadmin /var/www/

# 安装php7.2

sudo apt-get install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install -y php7.2
sudo apt-get -y  install php7.2-fpm php7.2-mysql php7.2-curl php7.2-json php7.2-mbstring php7.2-xml  php7.2-intl

# 安装 composer 

wget https://getcomposer.org/composer.phar
mv composer.phar composer
chmod +x composer
sudo mv composer /usr/local/bin 

# 安装nginx

sudo apt-get update
sudo apt-get install nginx

# 安装nodejs

sudo apt update
sudo apt install nodejs
sudo apt install npm 

# 使用n来管理node版本

/**
* sudo n lts 长期支持
* sudo n stable 稳定版
* sudo n latest 最新版
* sudo n 8.4.0 直接指定版本下载
*/
sudo npm install -g n

# 升级npm

sudo npm i -g npm

 

标签:Ubuntu16.04,get,最全,sudo,apt,purge,2021,install,ubuntu
来源: https://blog.csdn.net/rrrrr11111jjjjjj/article/details/116951836