/var/run/yum.pid 已被锁定,PID 为 3355 的另一个程序正在运行。
Another app is currently holding the yum lock; waiting for it to exit...
另一个应用程序是:PackageKit
内存:155 M RSS (717 MB VSZ)
已启动: Sun Apr 28 15:01:12 2019 - 04:40之前
状态 :运行中,进程ID:3355
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
企业版 Linux 附加软件包(以下简称 EPEL)是一个 Fedora 特别兴趣小组,用以创建、维护以及管理针对企业版 Linux 的一个高质量附加软件包集,面向的对象包括但不限于 红帽企业版 Linux (RHEL)、 CentOS、Scientific Linux (SL)、Oracle Linux (OL) 。
EPEL 的软件包通常不会与企业版 Linux 官方源中的软件包发生冲突,或者互相替换文件。EPEL 项目与 Fedora 基本一致,包含完整的构建系统、升级管理器、镜像管理器等等。
遇到”Repository base is listed more than once in the configuration”的问题要考虑系统中是否存在重复的软件源, 遇到”没有可用软件包 XXX”的问题首先要确认要安装的软件包名称是否写对了, 例如安装 pip 的命令不是 yum install pip, 而是 yum install python-pip, 在此之后如果问题仍然存在就需要考虑当前系统中是否正确配置了 YUM 和 EPEL 两个软件源.
#阿里云源
deb http://mirrors.aliyun.com/ubuntu/ disco main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ disco main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ disco-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ disco-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ disco-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ disco-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ disco-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ disco-backports main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ disco-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ disco-proposed main restricted universe multiverse
#中科大源
deb https://mirrors.ustc.edu.cn/ubuntu/ disco main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ disco main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ disco-updates main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ disco-updates main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ disco-backports main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ disco-backports main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ disco-security main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ disco-security main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ disco-proposed main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ disco-proposed main restricted universe multiverse
#163源
deb http://mirrors.163.com/ubuntu/ disco main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ disco-security main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ disco-updates main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ disco-proposed main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ disco-backports main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ disco main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ disco-security main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ disco-updates main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ disco-proposed main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ disco-backports main restricted universe multiverse
#清华源
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ disco main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ disco main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ disco-updates main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ disco-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ disco-backports main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ disco-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ disco-security main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ disco-security main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ disco-proposed main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ disco-proposed main restricted universe multiverse
Xfce 不是最华丽的 Linux 桌面环境,但却是相当节省系统资源的 Linux 桌面环境。就我个人的使用习惯而言,在 Linux 上,特别是 Linux 虚拟机中使用 Xfce 桌面是一个极佳的选择,因为这样可以把有限的系统资源更多地用于处理生产性作业。
Xfce 最新的版本是 “4.12”.
Kali Linux 2019.1 以及该版本之前的一些版本使用的都是 Gnome 桌面环境而不是 Xfce, 因此,本文就从降低系统资源占用的角度出发,介绍一下将 Kali 的桌面环境从 Gnome 更换到 Xfce 4 的过程。
在安装的过程中(可能)会要求我们选择提供图形化系统登录界面的图形管理程序(A display manage is a program that provides graphical login for the X Windows System.),只有一个显示管理器可以管理给定的 X server (X server 是用于管理图形化界面的服务器端程序),但是如果当前系统中安装了多个显示管理器包,就需要选择一个默认的显示管理器(Only one display manage can manage a given X server, but multiple display manager packages are installed. Please select which display manager should run by default.),这里我选择的默认显示管理器是 “gdm3”, 如图 1:
切换桌面:
update-alternatives --config x-session-manager
回显如下:
root@kali:~# update-alternatives --config x-session-manager
There are 3 choices for the alternative x-session-manager (providing /usr/bin/x-session-manager).
Selection Path Priority Status
------------------------------------------------------------
* 0 /usr/bin/gnome-session 50 auto mode
1 /usr/bin/gnome-session 50 manual mode
2 /usr/bin/startxfce4 50 manual mode
3 /usr/bin/xfce4-session 40 manual mode
Press <enter> to keep the current choice[*], or type selection number:
输入 3 以启动 Xfce4,回显如下:
root@kali:~# update-alternatives --config x-session-manager
There are 3 choices for the alternative x-session-manager (providing /usr/bin/x-session-manager).
Selection Path Priority Status
------------------------------------------------------------
* 0 /usr/bin/gnome-session 50 auto mode
1 /usr/bin/gnome-session 50 manual mode
2 /usr/bin/startxfce4 50 manual mode
3 /usr/bin/xfce4-session 40 manual mode
Press <enter> to keep the current choice[*], or type selection number: 3
update-alternatives: using /usr/bin/xfce4-session to provide /usr/bin/x-session-manager (x-session-manager) in manual mode
卸载 Gnome 桌面环境:
apt remove gnome-core
apt remove gnome-shell
重启系统:
reboot
重新登录系统之后可以看到已经成功地将 Kali Linux 的桌面环境更换为 Xfce 4,如图 2:
对于记录 IP 地址这个功能, 我们可以使用第三方的网站统计服务来实现. 我们可以申请一个统计代码, 而且只将这个统计代码放在登录页面, 这样就可以记录到所有访问过登录界面的 IP 地址, 根据这些 IP 地址和登陆时间就可以大致判断网站的登录界面是否已经被攻击者掌握. 但是, 使用第三方服务也就意味着我们的后台登录地址将上传到第三方平台的服务器, 从而增大了后台登录地址可能受到攻击的攻击面, 在这里我们通过一段 PHP 代码实现对访问了登录页面的 IP 地址进行记录的功能.
I use ownCloud in Ubuntu and I add one account to it. But whenever I reboot Ubuntu, ownCloud will tell me: “No keychain service available” and I’ll be asked to enter the password once, as show in the figure 1:
Once I enter the password, ownCloud will work properly. But once I restart Ubuntu Linux, that happens again and again. Passwords should be stored, but it didn’t.
Solve the Problem
I found a solution on Github through Bing and that link is HERE. It seems that I am not the only one who has encountered this problem.
The solution is very simple, installing:
sudo apt install libgnome-keyring0
Then, reboot Ubuntu Linux, after you log in to the system, you will be asked to enter a password once, only once, whether you restart Ubuntu or not, you will not be asked to enter ownCloud’s password again unless you exit ownCloud account.