CentOS7重新部署ixgbe驱动

下载并安装

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
yum install gcc make
微软官网下载ixgbe
tar -xvf ixgbe-5.3.7.tar.gz
cd ixgbe-5.3.7/src
make
modinfo ./ixgbe.ko
rmmod ixgbe.ko
modinfo ./ixgbe.ko | grep depend
modprobe dca
insmod ./ixgbe.ko
insmod ./ixgbe.ko FdirPballoc=3 RSS=16
dmesg
make install
modprobe ixgbe
modinfo ixgbe

参考

https://blog.csdn.net/u011846257/article/details/52350369 https://www.linuxidc.com/Linux/2015-06/118300.htm https://blog.csdn.net/zhang_danf/article/details/17758669

CentOS7部署httpd2.4.8(需支持perl)

依赖包安装

1
2
3
4
5
yum -y install  gcc gcc-c++ make zlib zlib-devel openssl expat-devel  openssl-devel pcre pcre-devel
相关包下载地址:https://mirrors.tuna.tsinghua.edu.cn/apache/
apr-1.6.5.tar.gz
apr-util-1.6.1.tar.gz
httpd-2.4.37.tar.gz

安装

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
./configure --prefix=/usr/local/apr
#rm如果报错,修改configure文件,RM='$RM' 修改为RM='$RM -f'
make && make install
安装apr-util
./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr/
make && make install
安装httpd
./configure \
--prefix=/usr/local/apache/ \
--with-apr=/usr/local/apr/ \
--with-apr-util=/usr/local/apr-util/ \
--enable-so \
--enable-ssl\
--enable-alib\
--with-ssl\
--with--pcre\
--enable-deflate=shared \
--enable-expires=shared \
--enable-rewrite=shared \
--enable-static-support
make && make install

mod_perl支持

otrs系统原本使用的是centos yum安装的httpd2.4.6版本,因安全基线要求,编译了2.4.38至/usr/local/apache目录下,因程序是perl,所以需要添加mod_perl支持 cp /usr/lib64/httpd/modules/mod_perl.so /usr/local/apache/modules/

Python 开发环境

python开发环境

1
2
3
4
5
6
7
8
git clone https://github.com/pyenv/pyenv-virtualenv.git $(pyenv root)/plugins/pyenv-virtualenv
echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.bash_profile
echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.zshenv
exec "$SHELL"
pyenv virtualenv 3.6.9 ops-drf-env-3.6.9
pyenv activate ops-drf-env-3.6.9
pip install Django==1.11
pip install MySQLdb

魔方网表api记录

魔方网表API接口记录

1
2
3
/s/json/{spaceId}/forms/{formId}?selector={selector}     ##label就是名字,name就是字段id 
/s/json/{spaceId}/forms/{formId}/records/feed和/s/json/{spaceId}/forms/{formId}/records/feed?{query}    ##是记录列表的JSON接口
/s/json/{spaceId}/forms/{formId}/records/{recordId}      ##单条记录的JSON接口

Pycharm Set

文件信息配置

  1. 打开pycharm,选择File-Settings
  2. 选择Editor–Color&Style–File and Templates–Python-Script
1
2
3
4
5
6
7
##!/usr/bin/python3
# -*- coding: utf-8 -*-
# @Time    : ${DATE} ${TIME}
# @Author  : lin.chen
# @Email   : it@mulinux.com
# @File    : ${NAME}.py
# @Software: ${PRODUCT_NAME}

Deepin安装使用KVM

安装

1
2
3
sudo apt-get install kvm qtemu ##安装kvm和qt前端
apt install qemu-kvm libvirt-clients qemu-utils libvirt-daemon-system    # deepin 15.8
sudo apt-get install qemu-system    #deepin 15.8

卸载

1
2
sudo apt-get remove kvm qtemu ##卸载kvm和qt前端
apt-get install libvirt-bin virt-manager ##工作常用工具

ovf to qcow2

1
2
sudo apt-get install qemu-utils
qemu-img convert -O qcow2 input.vmdk output.qcow2

Docker Image Management

Install Docker

1
2
3
4
5
6
7
8
9
Centos6.6_x64
[root@web1 ~]# uname -a
Linux web1.mulinux.com 2.6.32-504.el6.x86_64 #1 SMP Wed Oct 15 04:27:16 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
[root@web1 ~]# yum install -y epel-release
[root@web1 ~]# yum install -y docker-io
[root@web1 ~]# /etc/init.d/docker start
[root@web1 ~]# ps aux | grep docker
root 1591 1.0 1.4 287656 14224 pts/0 Sl 18:30 0:00 /usr/bin/docker -d
root 1709 0.0 0.0 103244 864 pts/0 S+ 18:31 0:00 grep docker

Image Management

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
[root@web1 ~]# docker pull centos
latest: Pulling from centos
47d44cb6f252: Pull complete 
6fdebd7b0eb5: Pull complete 
a63aae4d216f: Pull complete 
bb3d629a7cbc: Pull complete 
Digest: sha256:381f21e4c7b3724c6f420b2bcfa6e13e47ed155192869a2a04fa10f944c78476
Status: Downloaded newer image for centos:latest
[root@web1 ~]# docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
centos latest bb3d629a7cbc 2 weeks ago 196.6 MB
[root@web1 ~]# docker tag centos mulinux123
[root@web1 ~]# docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
centos latest bb3d629a7cbc 2 weeks ago 196.6 MB
mulinux123 latest bb3d629a7cbc 2 weeks ago 196.6 MB  
[root@web1 ~]# docker run -it centos /bin/bash #start a container from image
[root@32c67b2b18e0 /]# w
 12:30:01 up 2:09, 0 users, load average: 0.06, 0.01, 0.00
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
[root@32c67b2b18e0 /]# exit
exit
[root@web1 ~]# docker ps #list running containers
[root@web1 ~]# docker ps -a #list all containers including stopped
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
32c67b2b18e0 centos "/bin/bash" 2 minutes ago Exited (0) About a minute ago modest_kowalevski 
[root@web1 ~]# docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
centos latest bb3d629a7cbc 2 weeks ago 196.6 MB
mulinux123 latest bb3d629a7cbc 2 weeks ago 196.6 MB
[root@web1 ~]# docker rmi bb3d629a7cbc #deleting by ID removes all images with same ID
[root@web1 ~]# docker rmi mulinux123
Untagged: mulinux123:latest
[root@web1 ~]# docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
centos latest bb3d629a7cbc 2 weeks ago 196.6 MB
[root@web1 ~]# docker tag centos centos:mulinux
[root@web1 ~]# docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
centos latest bb3d629a7cbc 2 weeks ago 196.6 MB
centos mulinux bb3d629a7cbc 2 weeks ago 196.6 MB
[root@web1 ~]# docker rmi centos:mulinux
Untagged: centos:mulinux
[root@web1 ~]# docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
centos latest bb3d629a7cbc 2 weeks ago 196.6 MB