centos7-linux使用遇到的问题

问题:使用rpm -qa 时内容超出窗口,看不到。

解决方法:在命令后面加more;其他的应该也一样可以试一下。

rpm -qa | more 

问题:yum -y install wget时说资源缺少

解决方法:使用yum -y update更新库

查看ip:

 卸载linux原有数据库:rpm -e [原有数据库] --nodeps

[root@localhost ~]# rpm -e mariadb-libs-5.5.60-1.el7_5.x86_64 -nodeps
rpm: -nodeps: 未知的选项
[root@localhost ~]# rpm -qa|grep mariadb
mariadb-libs-5.5.60-1.el7_5.x86_64
[root@localhost ~]# rpm -e mariadb-libs-5.5.60-1.el7_5.x86_64 --nodeps
[root@localhost ~]# rpm -qa|grep mariadb
[root@localhost ~]#

解压:

解压

tar -xvf file.tar //解压 tar包

tar -xzvf file.tar.gz //解压tar.gz

tar -xjvf file.tar.bz2   //解压 tar.bz2

tar -xZvf file.tar.Z   //解压tar.Z

unrar e file.rar //解压rar

unzip file.zip //解压zip

总结

1、*.tar 用 tar -xvf 解压

2、*.gz 用 gzip -d或者gunzip 解压

3、*.tar.gz和*.tgz 用 tar -xzf 解压

4、*.bz2 用 bzip2 -d或者用bunzip2 解压

5、*.tar.bz2用tar -xjf 解压

6、*.Z 用 uncompress 解压

7、*.tar.Z 用tar -xZf 解压

8、*.rar 用 unrar e解压

9、*.zip 用 unzip 解压

设置MySQL密码

/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h localhost.localdomain password 'new-password'

猜你喜欢

转载自blog.csdn.net/voidL123/article/details/89501877
今日推荐