初始linux需要安装的插件

安装Ubuntu系统

安装前需要更新库     apt-get update

安装ssh

apt-get install openssh-server

安装sudo

apt-get install sudo

 安装vim

apt-get install vim

 

安装CentOs系统

安装ssh

yum install openssh-server

yum install openssh-clients

启动ssh

/etc/init.d/sshd start

关闭防火请

/etc/init.d/iptables stop

安装sudo

yum install sudo

安装wget

yum -y install wget

安装passwd

yum install passwd Setting up Install Process Setting up

设置初始密码

sudo passwd

 

卸载命令:

  1.查询已安装

    rpm -qa    =>   rpm -qa|grep  mysql

  2.删除已安装

    yum -y remove xxxx    将查询的软件及版本输入

    yum -y remove mysql-libs-5.1.73-8.el6_8.x86_64

 

 

在docker中安装centos,使用yum -y install ***都会报错

1 [root@1bdcca10ab2b ~]# yum -y install tar
2 Loaded plugins: fastestmirror
3 Setting up Install Process
4 Determining fastest mirrors
5 YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
6  Eg. Invalid release/repo/arch combination/
7 removing mirrorlist with no valid mirrors: /var/cache/yum/x86_64/6/base/mirrorlist.txt
8 Error: Cannot find a valid baseurl for repo: base

 

使用vi打开/ect/yum.repos.d拷贝下面内容直接覆盖原有文件

# The mirror system uses the connecting IP address of the client and the  
# update status of each mirror to pick mirrors that are updated to and  
# geographically close to the client.  You should use this for CentOS updates  
# unless you are manually picking other mirrors.  
#  
# If the mirrorlist= does not work for you, as a fall back you can try the   
# remarked out baseurl= line instead.  
#  
#  
 
 
[base]  
name=CentOS-$releasever - Base  
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os  
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/  
baseurl=http://vault.centos.org/6.7/os/$basearch/  
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6  
 
 
#released updates   
[updates]  
name=CentOS-$releasever - Updates  
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates  
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/  
baseurl=http://vault.centos.org/6.7/updates/$basearch/  
gpgcheck=1  
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6  
 
 
#additional packages that may be useful  
[extras]  
name=CentOS-$releasever - Extras  
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras  
#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/  
baseurl=http://vault.centos.org/6.7/extras/$basearch/  
gpgcheck=1  
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6  
 
 
 
 
#additional packages that extend functionality of existing packages  
[centosplus]  
name=CentOS-$releasever - Plus  
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus  
#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/  
baseurl=http://vault.centos.org/6.7/centosplus/$basearch/  
gpgcheck=1  
enabled=0  
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6  
 
 
 
 
#contrib - packages by Centos Users  
[contrib]  
name=CentOS-$releasever - Contrib  
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib  
#baseurl=http://mirror.centos.org/centos/$releasever/contrib/$basearch/  
baseurl=http://vault.centos.org/6.7/contrib/$basearch/  
gpgcheck=1  
enabled=0  
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6</span></strong></span>
View Code

 

 

 

转自:https://blog.csdn.net/weixin_30482181/article/details/97460928?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromBaidu-2.control&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromBaidu-2.control

 

posted @ 2019-05-05 15:05  嬴安  阅读(349)  评论(0编辑  收藏  举报