Install Scrapy
Install Scrapy
#!/bin/bash
yum install -y python3 || yum install -y platform-python || yum install -y python2
if [ ! -e /usr/bin/python ];then
if [ -e "/usr/bin/python3" ];then
ln -s /usr/bin/python3 /usr/bin/python
elif [ -e "/usr/libexec/platform-python" ];then
ln -s /usr/libexec/platform-p...
Install Apache+PHP+MySql
Installa Apache
#!/bin/bash
yum install -y httpd
export username=liliang
export groupname=liliang
# add apache user,group
groupadd liliang
useradd liliang -g liliang
sed -i "s/User apache/User ${username}/" /etc/httpd/conf/httpd.conf
sed -i "s/User apache/User ${groupname}/" /etc/httpd/conf/httpd.conf
echo ">>>start copy web files"...
Gitlab API
install
pip install python-gitlab
Documentation
API
# 通过UMB里面的stream找到project:
"stream": "rhel8"
# 创建gitlab对象
gl=gitlab.Gitlab('https://gitlab.com/', private_token='dsfd')
gl.auth()
# 创建工程对象
project = gl.projects.get(project_id)
通过UMB得到mr_id
# 得到merge request对象
mr = project.mergerequests.get(mr_id)
# 获取mr的changes
changes = mr.chan...
Bugzilla API
install
pip install python-bugzilla
github
API
# api address
BZ = 'https://bugzilla.xxx.com'
BZ_API = 'https://bugzilla.xxx.com/xmlrpc.cgi'
# create bugzilla
bzapi = bugzilla.Bugzilla(BZ_API,user=user,password=pwd)
#bzapi.login(user,pwd)
# query bug
query = bzapi.build_query(bug_id=bugs)
query['include_fields'] = ['id', 'status', 'qa_contac...
Execute Script On Boot
Steps
1, create your srcipt under /usr/local/bin
[root@dhcp-128-17 ~]# cat /usr/local/bin/start_job_scheduler.sh
#!/bin/bash
klogin liali 123456
pgrep watchdog.sh || { cd /var/www/html/job_scheduler; ./watchdog.sh & }
pgrep ci-manager.sh || { cd /var/www/html/job_scheduler/ci; ./ci-manager.sh &}
2, call your script in /etc/rc.d/rc.loca...
Container
Namespace
A namespace wraps a global system resource in an abstraction that
makes it appear to the processes within the namespace that they
have their own isolated instance of the global resource. Changes
to the global resource are visible to other processes that are
members of the namespace, but are invisible to oth...
PCI,PCIe扫盲
PCI和PCIe
PCI即Peripheral Component Interconnect,中文意思是“外围器件互联”,是由PCISIG (PCI Special Interest Group)推出的一种局部并行总线标准。
它曾经是个人电脑中使用最为广泛的接口,几乎所有的主板产品上都带有这种插槽。目前该总线已经逐渐被PCI Express总线所取代。
PCI-Express是继ISA和PCI总线之后的第三代I/O总线,即3GIO。 由Intel在2001年的IDF上提出,由PCI-SIG(PCI特殊兴趣组织)认证发布后才改名为“PCI-Express”。它的主要优势就是数据传输速率高,另外还有抗干扰能力强,传输距离远,功耗低等优点。
PCI做的工作
0、Driver通过pci_r...
devlink
devlink-dev:
1. devlink dev show - display devlink device attributes
# devlink dev show
pci/0000:01:00.0
2. devlink dev eswitch set - sets devlink device eswitch attributes
# devlink dev eswitch set pci/0000:5e:00.0 mode switchdev
3. devlink dev param show - display devlink device supported configuration parameters attributes
# dev...
共计 106 篇文章,14 页。