<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://purl.org/rss/1.0/"
xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel rdf:about="https://eblog.ink/feed/rss/category/centos-7/">
<title>Eric&#039;s Blog - centos 7</title>
<link>https://eblog.ink/category/centos-7/</link>
<description></description>
<items>
<rdf:Seq>
<rdf:li resource="https://eblog.ink/archives/316/"/>
<rdf:li resource="https://eblog.ink/archives/303/"/>
<rdf:li resource="https://eblog.ink/archives/286/"/>
<rdf:li resource="https://eblog.ink/archives/210/"/>
<rdf:li resource="https://eblog.ink/archives/206/"/>
<rdf:li resource="https://eblog.ink/archives/151/"/>
<rdf:li resource="https://eblog.ink/archives/119/"/>
<rdf:li resource="https://eblog.ink/archives/117/"/>
<rdf:li resource="https://eblog.ink/archives/105/"/>
<rdf:li resource="https://eblog.ink/archives/103/"/>
</rdf:Seq>
</items>
</channel>
<item rdf:about="https://eblog.ink/archives/316/">
<title>Linux 下载Bt或者磁力连接文件</title>
<link>https://eblog.ink/archives/316/</link>
<dc:date>2022-05-13T09:31:27+00:00</dc:date>
<description>安装npmapt install -y npm

安装tget：npm install -g t-get

迅雷torrent种子文件的下载：wgethttp://releases.ubuntu.com/16.04/ubuntu-16.04.1-desktop-amd64.iso.torrent $ tgetubuntu-16.04.1-desktop-amd64.iso.torrent 

tget-用于BT种子/磁力链接下载的wget磁力链接的下载tget &#039;magnet:?xt=urn:btih:0403fb4728bd788fbcb67e87d6feb241ef38c75a&#039;

如果是大文件，下载会很费时间，占用连接的终端，断开连接就会导致下载失败。我们可以将下载命令写入到脚本中，然后后台运行即可。当top中搜索不到node程序就是下载完成了。后台执行脚本或者screen下载文件原文链接：原文</description>
</item>
<item rdf:about="https://eblog.ink/archives/303/">
<title>Centos7 更换国内yum源</title>
<link>https://eblog.ink/archives/303/</link>
<dc:date>2021-10-13T05:18:00+00:00</dc:date>
<description>一、阿里云源1、备份mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
2、下载新的CentOS-Base.repo 到/etc/yum.repos.d/wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

3、生成缓存yum makecache

二、清华大学源【推荐】（1）、首先备份 CentOS-Base.repomv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
1（2）、之后启用 TUNA 软件仓库， 将清华大学镜像仓库信息写入 /etc/yum.repos.d/CentOS-Base.repovim /etc/yum.repos.d/CentOS-Base.repo
1将 CentOS-Base.repo 中的内容 更新为 下面的内容：# CentOS-Base.repo
#
# 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
baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/os/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&amp;arch=$basearch&amp;repo=os
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

#released updates
[updates]
name=CentOS-$releasever - Updates
baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/updates/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&amp;arch=$basearch&amp;repo=updates
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/extras/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&amp;arch=$basearch&amp;repo=extras
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/centosplus/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&amp;arch=$basearch&amp;repo=centosplus
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
（3）、清除缓存yum clean all     # 清除系统所有的yum缓存yum makecache     # 生成yum缓存原文</description>
</item>
<item rdf:about="https://eblog.ink/archives/286/">
<title>CentOS7.4 上部署 Cisco AnyConnect</title>
<link>https://eblog.ink/archives/286/</link>
<dc:date>2021-06-25T06:29:00+00:00</dc:date>
<description>部署 - 证书现有的教程多半使用编译方式来安装 ocserv，实际上 EPEL 源中已经包含了这个包，而且还是最新的，因此只需要安装 EPEL 在安装 ocserv 即可执行以下命令即可：yum install epel-release -y
yum install ocserv -y
现有的教程还有另一个坑，都是教你使用 certtool 生成自签名证书来使用的；如果你不想被中间人攻击的话，最好别这么干事实上有效的证书很容易获得，以前介绍过的 Let's Encrypt 就是很可靠的一个签发机构如果你还不知道如何获取 Let's Encrypt 的证书，你可以参考此文章：https://e2c.net/2019/08/24/160.html获取到证书后，你需要将证书复制进 /etc/ocserv/ssl 这个文件夹(其他文件夹也可以，记得改配置文件就行)，没有的话用以下命令创建mkdir -p /etc/ocserv/ssl
cd /etc/ocserv/ssl
完成后的 /etc/ocserv/ssl 目录应该是这样的：部署 - 配置文件完成证书配置之后，下一步就是对配置文件进行修改默认情况下，配置文件位于 /etc/ocserv/ocserv.conf，以下的配置字段需要重点关注*# 将验证方式设为用户名+密码auth = &quot;plain[passwd=/etc/ocserv/ocpasswd]&quot;
*# TCP/UDP端口，默认为443tcp-port = 443
udp-port = 443
*# 在上一步中添加的证书，请根据实际情况自行修改server-cert = /etc/ocserv/ssl/server-cert.pem
server-key = /etc/ocserv/ssl/server-key.pem
*# 最大连接数max-clients = 20
*# 每个用户的最大设备数max-same-clients = 3
*# MTU自动配置，不是True的话会奇慢无比try-mtu-discovery = true
*# 很多教程没有提及的点，默认是会启用TLS1.0的*# 还有RSA类无前向保密的算法，为了安全起见*# 此配置只启用了TLS1.2和128位以上具有前向保密的算法tls-priorities = &quot;SECURE128:+SECURE256:-VERS-ALL:+VERS-TLS1.2&quot;
*# 默认域名，建议设置位前一步中证书签发的域名default-domain = ocserv.xxx.com
*# 网段信息：建议修改以避免域现有网段冲突ipv4-network = 172.31.0.0
ipv4-netmask = 255.255.255.0
*# 路由信息：此配置位绕过局域网route = 0.0.0.0/192.0.0.0
route = 64.0.0.0/192.0.0.0
route = 128.0.0.0/192.0.0.0
route = 192.0.0.0/192.0.0.0
no-route = 192.168.0.0/255.255.0.0
之后需要创建一个新用户，使用以下命令ocpasswd -c /etc/ocserv/ocpasswd iclart
输入两遍密码即可，此时 /etc/ocserv 目录结构应该如下图：部署 - 系统配置完成 ocserv 的配置文件编辑后，我们需要对系统进行一些配置首先，需要开启 IPv4 转发vim /etc/sysctl.conf

net.ipv4.ip_forward = 1
使配置生效sysctl -p
其次需要对转发进行配置*# 启动 firewalldsystemctl start firewalld
*# 放通端口，注意修改firewall-cmd --permanent --zone=public --add-port=443/tcp
firewall-cmd --permanent --zone=public --add-port=443/udp
*# 转发配置，注意将 eth0 修改位你的网卡接口firewall-cmd --permanent --add-masquerade
firewall-cmd --permanent --direct --passthrough ipv4 -t nat -A POSTROUTING -o eth0 -j MASQUERADE
*# 使配置生效firewall-cmd --reload
确定没有问题之后，就可以启动 ocserv 了systemctl enable ocserv
systemctl start ocserv
启动后执行此命令，应该得到类似输出netstat -tunlp | grep 443

至此，服务端配置已全部完成，在配置客户端时，注意服务器应该填写域名原文链接:原文 原文2</description>
</item>
<item rdf:about="https://eblog.ink/archives/210/">
<title>Centos安装lrzsz遇到的问题</title>
<link>https://eblog.ink/archives/210/</link>
<dc:date>2019-12-17T05:36:00+00:00</dc:date>
<description>cd /var/lib/rpm 
    # rpmdb所在目录rm -f __db.*
     # 清除原rpmdb文件rpm --rebuilddb 
    # 重建rpm数据库yum clean all 
    # 清除所有yum的缓存yum -y install lrzsz

</description>
</item>
<item rdf:about="https://eblog.ink/archives/206/">
<title>Centos 7 Python2.x升级3.x</title>
<link>https://eblog.ink/archives/206/</link>
<dc:date>2019-03-12T04:06:00+00:00</dc:date>
<description>1.安装支持文件：yum install gcc gcc-c++ -y2.下载python3.7.4程序wget https://www.python.org/ftp/python/3.7.4/Python-3.7.4.tgz3.解压tar zxvf Python-3.7.4.tgz
4.进入程序安装目录cd Python-3.7.4
5.编译./configure
6.安装make &amp;&amp; make install
7.查看 Python 的路径ls -al /usr/bin | grep python
8.备份原来的链接mv /usr/bin/python /usr/bin/python.bak
9.创建python3链接ln -s /usr/local/bin/python3 /usr/bin/python
10.yum报错问题解决升级 Python 之后，由于将默认的 python 指向了 python3，yum 不能正常使用，需要编辑 yum 的配置文件，此时： yum list
  File &quot;/usr/bin/yum&quot;, line 30
    except KeyboardInterrupt, e:

SyntaxError: invalid syntax修改/usr/bin/yum和/usr/libexec/urlgrabber-ext-down，将 #!/usr/bin/python 改为 #!/usr/bin/python2.7，保存退出即可。</description>
</item>
<item rdf:about="https://eblog.ink/archives/151/">
<title>Linux Centos更新内核版本&amp;amp;&amp;amp;删除多余的内核</title>
<link>https://eblog.ink/archives/151/</link>
<dc:date>2019-01-22T09:08:00+00:00</dc:date>
<description>方法一：更新至最新主线版本1.启用 ELRepo 仓库# rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
# rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm
2.列出可用的内核相关包yum --disablerepo=&quot;*&quot; --enablerepo=&quot;elrepo-kernel&quot; list available
3.安装最新的主线稳定内核yum --enablerepo=elrepo-kernel install kernel-ml4.设置 GRUB 默认的内核版本打开并编辑 /etc/default/grub 并设置 GRUB_DEFAULT=0。意思是 GRUB 初始化页面的第一个内核将作为默认内核。
GRUB_TIMEOUT=5
GRUB_DEFAULT=0
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT=&quot;console&quot;
GRUB_CMDLINE_LINUX=&quot;rd.lvm.lv=centos/root rd.lvm.lv=centos/swap crashkernel=auto rhgb quiet&quot;
GRUB_DISABLE_RECOVERY=&quot;true&quot;
5.重新创建内核配置grub2-mkconfig -o /boot/grub2/grub.cfg
6.查找已安装的内核rpm -qa | grep kernel
7.查看正在使用的内核版本uname -a
7.删除内核（删除时候不要删除到正在使用的内核）yum remove kernelxxxx




</description>
</item>
<item rdf:about="https://eblog.ink/archives/119/">
<title>如何在CentOS 7上安装Nginx</title>
<link>https://eblog.ink/archives/119/</link>
<dc:date>2018-06-21T12:01:00+00:00</dc:date>
<description>第一步 - 添加Nginx存储库要添加CentOS 7 EPEL仓库，请打开终端并使用以下命令：sudo yum install epel-release第二步 - 安装Nginx现在Nginx存储库已经安装在您的服务器上，使用以下yum命令安装Nginx ：sudo yum install nginx在对提示回答yes后，Nginx将在服务器上完成安装。第三步 - 启动NginxNginx不会自行启动。要运行Nginx，请输入：sudo systemctl start nginx原文链接https://blog.csdn.net/oldguncm/article/details/78855000</description>
</item>
<item rdf:about="https://eblog.ink/archives/117/">
<title>Centos 7 编译安装Apache2.4.33</title>
<link>https://eblog.ink/archives/117/</link>
<dc:date>2018-06-21T07:41:00+00:00</dc:date>
<description>yum install zlib-devel    #error: mod_deflate 
yum install openssl-devel    #error: mod_ssl
1.安装前期编译准备wget http://mirrors.tuna.tsinghua.edu.cn/apache//apr/apr-1.6.3.tar.gz
tar -zxvf apr-1.6.3.tar.gz
cd apr-1.6.3
./configure --prefix=/usr/local/apr
make &amp;&amp; make install

cd ..
wget http://mirrors.tuna.tsinghua.edu.cn/apache//apr/apr-iconv-1.2.2.tar.gz
tar -zxvf apr-iconv-1.2.2.tar.gz
cd apr-iconv-1.2.2  
./configure --prefix=/usr/local/apr-iconv --with-apr=/usr/local/apr  
make &amp;&amp; make install

cd ..
wget http://mirrors.tuna.tsinghua.edu.cn/apache//apr/apr-util-1.6.1.tar.gz  
tar -zxvf apr-util-1.6.1.tar.gz  
cd apr-util-1.6.1
./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr/
make &amp;&amp; make install

cd ..
wget https://ftp.pcre.org/pub/pcre/pcre-8.33.tar.gz
tar -zxvf pcre-8.33.tar.gz
cd pcre-8.33
./configure --prefix=/usr/local/pcre
make &amp;&amp; make install

下载Apache2.4.33wget http://www.apache.org/dist/httpd/httpd-2.4.33.tar.gz
tar -zxvf httpd-2.4.33.tar.gz
cd httpd-2.4.33
 ./configure --prefix=/usr/local/apache --enable-rewrite --enable-so --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --with-pcre=/usr/local/pcre/ --enable-ssl --enable-deflate --enable-expires --with-mpm=event 
make &amp;&amp; make install

cd ..
yum -y install epel-release   #安装源文件支持包
yum install libnghttp2-devel   #安装mod_http2模块

cd httpd-2.4.33
./configure --enable-http2 --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --with-pcre=/usr/local/pcre/
./configure --with-nghttp2=/var/www/html  --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --with-pcre=/usr/local/pcre/
./configure  --enable-nghttp2-staticlib-deps --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --with-pcre=/usr/local/pcre/
make &amp;&amp; make install 
编译OpenSSLwget http://www.openssl.org/source/openssl-1.0.2j.tar.gz
tar -xzf openssl-1.0.2j.tar.gz
cd openssl-1.0.2j
./config --prefix=/usr/local/openssl
./config -t
make &amp;&amp; make install

</description>
</item>
<item rdf:about="https://eblog.ink/archives/105/">
<title>Centos7 防火墙开启端口</title>
<link>https://eblog.ink/archives/105/</link>
<dc:date>2018-06-14T03:16:00+00:00</dc:date>
<description>方法一：1：查看firewall防火墙状态                       firewall-cmd --state

                    或者                       systemctl status firewalld

            2：打开防火墙                       systemctl start firewalld

            3：关闭防火墙                       systemctl stop firewalld

            4：重启防火墙                       firewall-cmd --relaod

                    或者                       systemctl reload firewalld

            5：开机自启动防火墙systemctl enable firewalld

        6：禁止开机启动防火墙                       systemctl disable firewalld

            6：查看已打开的端口                       firewall-cmd --list-ports

            7：打开端口                       firewall-cmd --permanent --zone=public --add-port=8080/tcp

                    其中permanent表示永久生效，public表示作用域，8080/tcp表示端口和类型                8：关闭端口 firewall-cmd --permanent --zone=public --remove-port=8080/tcp
方法二：            
1.查看某个端口的状态            


firewall-cmd --query-port=9998/udp

        
            
2.开启端口            


firewall-cmd --add-port=9998/udp --permanent

        
`--permanent`表示永久生效，重启不会丢失配置。            
            
3.关闭端口            


firewall-cmd --remove-port=9998/udp --permanent

        
            
4.重新加载配置            


firewall-cmd --reload            

</description>
</item>
<item rdf:about="https://eblog.ink/archives/103/">
<title>Centos 删除自带的 Apache</title>
<link>https://eblog.ink/archives/103/</link>
<dc:date>2018-06-12T07:33:00+00:00</dc:date>
<description>1.rpm -qa|grep httpd查看与httpd相关软件包。httpd-tools-2.2.15-15.el6.centos.i686
httpd-2.2.15-15.el6.centos.i686
2.然后删除httpdrpm -e httpd
（如果有报错就先执行 rpm -e gnome-user-share 后在执行删除httpd）</description>
</item>
</rdf:RDF>