标签 install 下的文章

centos python3.4安装pip和pyaudio

从官方github获取具体版本的pip:

wget  https://raw.githubusercontent.com/pypa/get-pip/master/2.6/get-pip.py

运行刚才获取的pip文件:

python3.4 get-pip.py

然后:

git clone http://people.csail.mit.edu/hubert/git/pyaudio.git
cd pyaudio/
sudo yum -y install portaudio portaudio-devel
python setup.py install

CentOS6 安装gnutls

wget http://download.savannah.gnu.org/releases/lzip/lzip-1.20.tar.gz
tar zxvf lzip-1.20.tar.gz
cd lzip-1.20
./configure
make
make install

官网:https://gmplib.org/

wget https://gmplib.org/download/gmp/gmp-6.1.2.tar.lz
lzip -d gmp-6.1.2.tar.lz
tar xvf gmp-6.1.2.tar
cd gmp-6.1.2
./configure
make
make install
wget https://ftp.gnu.org/gnu/nettle/nettle-3.4.tar.gz
tar zxvf nettle-3.4.tar.gz
cd nettle-3.4
./configure
make
make check #测试一下
make install

官网:https://www.gnutls.org/download.html

wget ftp://ftp.gnutls.org/gcrypt/gnutls/v3.5/gnutls-3.5.9.tar.xz
xz -d gnutls-3.5.9.tar.xz
tar xvf gnutls-3.5.9.tar
cd gnutls-3.5.9
PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig ./configure --with-included-libtasn1 --with-included-unistring --without-p11-kit
make
make install

centos pdf阅读器

centos默认的pdf阅读器就很好用,可是自己安装的gnome却没有包含这个软件,
经过搜索,发现这个软件叫evince,所以只要执行:

yum install evince

就可以把这个软件安装回来了.

yum安装rrdtool

[root@localhost]$ cd /etc/yum.repos.d/
[root@localhost]$ vim dag.repo

[dag]
name=Dag RPM Repository for Red Hat Enterprise Linux
baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag
gpgcheck=1
gpgkey=http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt
enabled=1

安装相关依赖:

[root@localhost]$ yum install ntp vim-enhanced gcc gcc-c++ gcc-g77 flex bison autoconf automake bzip2-devel ncurses-devel zlib-devel libjpeg-devel libpng-devel libtiff-devel freetype-devel libXpm-devel gettext-devel  pam-devel

[root@localhost]$ yum install -y rrdtool perl-rrdtool rrdtool-devel

Tcpdump 的用法

yum安装:

yum install tcpdump

源码安装:

# flex
yum -y install flex

# bison
yum -y install bison

wget http://www.tcpdump.org/release/libpcap-1.5.3.tar.gz
wget http://www.tcpdump.org/release/tcpdump-4.5.1.tar.gz
tar -zxvf libpcap-1.5.3.tar.gz
cd libpcap-1.5.3
./configure
sudo make install
cd ..
tar -zxvf tcpdump-4.5.1.tar.gz
cd tcpdump-4.5.1
./configure
sudo make install
yum -y install bison

抓http包:

tcpdump -XvvennSs 0 -i eth0 tcp[20:2]=0x4745 or tcp[20:2]=0x4854 -w /tmp/capture.pcap

通过网卡eth1来监听端口80发出去的host包到192.168.109.8的报文:

tcpdump -i eth1 port 80 and dst host "192.168.109.8"

任意网卡目标是192.168.109.*的 80端口数据:

/usr/local/sbin/tcpdump -i any  port 80 and dst host "192.168.109.*" -w /tmp/capture.pcap

加上源地址IP:

tcpdump -i any -p -s 0 port 80 and dst host "192.168.109.*" and src host "10.70.32.**" -w /tmp/capture.pcap

centos安装setup系统管理小工具

Centos运行不了setup? 那安装setuptool吧,可以节省很多系统管理的时间.
安装setuptool:

yum install setuptool

可以发现执行setup后不全,再安装一个用于系统服务管理:

yum install ntsysv

再安装个防火墙,以及setup中配套的防火墙设置、网络设置:

yum install iptables

安装setup中配套的防火墙设置:

yum install system-config-securitylevel-tui

安装setup中配套的网络设置:

yum install system-config-network-tui