热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

文本处理与软件管理

1、自建yum仓库,分别为网络源和本地源本地源:       网络源:[root@openvpn~]#catetcyum.repos.dCentOS-Base.repo#CentO

1、自建yum仓库,分别为网络源和本地源

本地源:

 

 

 

 

 

 

 

网络源:

[root@openvpn ~]# cat /etc/yum.repos.d/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-6.8 - Base - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos-vault/6.8/os/$basearch/
http://mirrors.aliyuncs.com/centos-vault/6.8/os/$basearch/
http://mirrors.cloud.aliyuncs.com/centos-vault/6.8/os/$basearch/
gpgcheck=1
gpgkey=http://mirrors.aliyun.com/centos-vault/RPM-GPG-KEY-CentOS-6

#released updates
[updates]
name=CentOS-6.8 - Updates - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos-vault/6.8/updates/$basearch/
http://mirrors.aliyuncs.com/centos-vault/6.8/updates/$basearch/
http://mirrors.cloud.aliyuncs.com/centos-vault/6.8/updates/$basearch/
gpgcheck=1
gpgkey=http://mirrors.aliyun.com/centos-vault/RPM-GPG-KEY-CentOS-6

#additional packages that may be useful
[extras]
name=CentOS-6.8 - Extras - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos-vault/6.8/extras/$basearch/
http://mirrors.aliyuncs.com/centos-vault/6.8/extras/$basearch/
http://mirrors.cloud.aliyuncs.com/centos-vault/6.8/extras/$basearch/
gpgcheck=1
gpgkey=http://mirrors.aliyun.com/centos-vault/RPM-GPG-KEY-CentOS-6

#additional packages that extend functionality of existing packages
[centos-vaultplus]
name=CentOS-6.8 - Plus - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos-vault/6.8/centos-vaultplus/$basearch/
http://mirrors.aliyuncs.com/centos-vault/6.8/centos-vaultplus/$basearch/
http://mirrors.cloud.aliyuncs.com/centos-vault/6.8/centos-vaultplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirrors.aliyun.com/centos-vault/RPM-GPG-KEY-CentOS-6

#contrib - packages by Centos Users
[contrib]
name=CentOS-6.8 - Contrib - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos-vault/6.8/contrib/$basearch/
http://mirrors.aliyuncs.com/centos-vault/6.8/contrib/$basearch/
http://mirrors.cloud.aliyuncs.com/centos-vault/6.8/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirrors.aliyun.com/centos-vault/RPM-GPG-KEY-CentOS-6

 

2、编译安装http2.4,实现可以正常访问,并将编译步骤和结果提交。

cat /etc/redhat-release 

dnf -y install lrzsz

136 rz -be
137 tar -xf httpd-2.4.49.tar.gz
138 yum install gcc openssl-devel pcre-devel apr-devel apr-util-devel -y
139 cd httpd-2.4.49/
140 ./configure
141 make && make install
142 ll
143 make
144 yum -y install gcc automake autoconf libtool make
145 make && make install
146 #dnf install gcc make autoconf apr-devel apr-util-devel pcrdevel openssl-devel redhat-rpm-confige
147 dnf install gcc make autoconf apr-devel apr-util-devel pcrdevel openssl-devel redhat-rpm-confige
148 cd
149 tar -xvf httpd-2.4.49.tar.gz -C /usr/local/src/
150 cd /usr/local/src/
151 ll
152 cd httpd-2.4.49/
153 mkdir -vp /apps/httpd
154 ./configure --prefix=/apps/httpd/ --syscOnfdir=/etc/httpd --enable-ssl
155 make -j 4 && make install
156 dnf install gcc make autoconf apr-devel apr-util-devel pcrdevel openssl-devel redhat-rpm-confie
157 dnf install redhat-rpm-confie
158 dnf install redhat-rpm-config
159 make -j 4 && make install
160 echo `PATH=/apps/httpd/bin:$PATH` > /etc/profile.d/httpd.sh
161 . /etc/profile.d/httpd.sh
162 cd
163*
164 ./etc/profile.d/httpd.sh
165 . /etc/profile.d/httpd.sh
166 echo `PATH=/apps/httpd/bin:$PATH` > /etc/profile.d/httpd.sh
167 . /etc/profile.d/httpd.sh
168 /apps/httpd/bin/apachectl start
169 useradd -r -s /sbin/nologin -d /var/www -c Apache -u 48 apache
170 /apps/httpd/bin/apachectl restart
171 ps aux
172 netstat -antlp

 

3、利用sed 取出ifconfig命令中本机的IPv4地址

[root@10-100-13-200 ~]# ifconfig eth0 | sed -nr "2s/[^0-9]+([0-9.]+).*/\1/p"
10.100.13.200

4、删除/etc/fstab文件中所有以#开头,后面至少跟一个空白字符的行的行首的#和空白字符

 

[root@10-100-13-200 ~]# sed -nr 's/^#[[:space:]]+(.*)/\1/p' /etc/fstab
/etc/fstab
Created by anaconda on Fri Jun 5 04:06:04 2020
Accessible filesystems, by reference, are maintained under '/dev/disk/'.
See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info.
After editing this file, run 'systemctl daemon-reload' to update systemd
units generated from this file.

5、处理/etc/fstab路径,使用sed命令取出其目录名和基名

 [root@10-100-14-129 ~]# echo /etc/fstab | sed -nr 's#(.*)/.*$#\1#p'

/etc
[root@10-100-14-129 ~]# echo /etc/fstab | sed -nr 's#.*/([^/]+)/?$#\1#p'
fstab

 

6、列出ubuntu软件管理工具apt的一些用法(自由总结)

apt-get 是常用的命令行工具,
apt install 安装软件包
apt remove 移除软件包
apt purge 移除软件包及配置文件
apt update 刷新存储库索引
apt upgrade 升级所有可升级的软件包
apt autoremove 自动删除不需要的包
apt full-upgrade 在升级软件中自动处理依赖关系
apt search 搜索应用程序
apt show 显示安装细节

 



推荐阅读
  • 本文介绍了在mac环境下使用nginx配置nodejs代理服务器的步骤,包括安装nginx、创建目录和文件、配置代理的域名和日志记录等。 ... [详细]
  • 本文介绍了在CentOS上安装Python2.7.2的详细步骤,包括下载、解压、编译和安装等操作。同时提供了一些注意事项,以及测试安装是否成功的方法。 ... [详细]
  • Vagrant虚拟化工具的安装和使用教程
    本文介绍了Vagrant虚拟化工具的安装和使用教程。首先介绍了安装virtualBox和Vagrant的步骤。然后详细说明了Vagrant的安装和使用方法,包括如何检查安装是否成功。最后介绍了下载虚拟机镜像的步骤,以及Vagrant镜像网站的相关信息。 ... [详细]
  • 本文介绍了网页播放视频的三种实现方式,分别是使用html5的video标签、使用flash来播放以及使用object标签。其中,推荐使用html5的video标签来简单播放视频,但有些老的浏览器不支持html5。另外,还可以使用flash来播放视频,需要使用object标签。 ... [详细]
  • centos6.8 下nginx1.10 安装 ... [详细]
  • 交换机配置:intg100unshintvlani1ipadd192.168.56.177qstelseuser-iv4authaaaproinsshupl3qsshuserpyt ... [详细]
  • Metasploit攻击渗透实践
    本文介绍了Metasploit攻击渗透实践的内容和要求,包括主动攻击、针对浏览器和客户端的攻击,以及成功应用辅助模块的实践过程。其中涉及使用Hydra在不知道密码的情况下攻击metsploit2靶机获取密码,以及攻击浏览器中的tomcat服务的具体步骤。同时还讲解了爆破密码的方法和设置攻击目标主机的相关参数。 ... [详细]
  • 成功安装Sabayon Linux在thinkpad X60上的经验分享
    本文分享了作者在国庆期间在thinkpad X60上成功安装Sabayon Linux的经验。通过修改CHOST和执行emerge命令,作者顺利完成了安装过程。Sabayon Linux是一个基于Gentoo Linux的发行版,可以将电脑快速转变为一个功能强大的系统。除了作为一个live DVD使用外,Sabayon Linux还可以被安装在硬盘上,方便用户使用。 ... [详细]
  • 本文介绍了如何通过conda安装Selenium的wheel文件,包括查看环境、卸载旧版本、下载新版本的wheel文件以及安装操作的步骤。同时提供了使用清华源的方法。 ... [详细]
  • 本文介绍了使用cacti监控mssql 2005运行资源情况的操作步骤,包括安装必要的工具和驱动,测试mssql的连接,配置监控脚本等。通过php连接mssql来获取SQL 2005性能计算器的值,实现对mssql的监控。详细的操作步骤和代码请参考附件。 ... [详细]
  • 篇首语:本文由编程笔记#小编为大家整理,主要介绍了软件测试知识点之数据库压力测试方法小结相关的知识,希望对你有一定的参考价值。 ... [详细]
  • python3 nmap函数简介及使用方法
    本文介绍了python3 nmap函数的简介及使用方法,python-nmap是一个使用nmap进行端口扫描的python库,它可以生成nmap扫描报告,并帮助系统管理员进行自动化扫描任务和生成报告。同时,它也支持nmap脚本输出。文章详细介绍了python-nmap的几个py文件的功能和用途,包括__init__.py、nmap.py和test.py。__init__.py主要导入基本信息,nmap.py用于调用nmap的功能进行扫描,test.py用于测试是否可以利用nmap的扫描功能。 ... [详细]
  • 摘要1:ElasticSearch比较两个时间的大小_gaojie_csdn的博客-CSDN博客_es时间比较摘要2:zlasticsearch脚本教 ... [详细]
  • Jquery 跨域问题
    为什么80%的码农都做不了架构师?JQuery1.2后getJSON方法支持跨域读取json数据,原理是利用一个叫做jsonp的概念。当然 ... [详细]
  • Python中的PyInputPlus模块原文:https ... [详细]
author-avatar
,,,,,,,,,,,,,,,
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有