CentOS7.4开发环境搭建

工作笔记

配置centos网络

vi /etc/sysconfig/network-scripts/ifcfg-enp0s3

TYPE=Ethernet
BOOTPROTO=static
NAME=enp0s3
DEVICE=enp0s3
ONBOOT=yes
IPADDR=192.168.19.208
NETMASK=255.255.255.0
GATEWAY=192.168.19.1
DNS1=192.168.5.221

sudo nmcli connection reload
sudo nmcli connection up enp0s3

换软件源

cd /etc/yum.repos.d/
mkdir backup
mv *.repo backup
# wget -O /etc/yum.repos.d/CentOS-Linux-BaseOS.repo http://mirrors.aliyun.com/repo/Centos-8.repo
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
yum makecache
yum repolist

配置ssh登录证书

上传电脑的公钥

cat lyl_vivobook.pub >>~/.ssh/authorized_keys

安装centos工具

yum install -y lrzsz
yum install -y gcc
gcc -v
yum install -y gcc-c++
g++ -v
yum install -y make
make -v
yum install -y cmake
cmake --version 

安装版本控制工具

yum install -y git
git --version
yum install -y subversion
svn --version

安装zsh环境

yum install -y zsh
# shell chsh -s $(which zsh) 不管用,没有shell命令
sh -c "$(wget https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"

修改一下主题 vi ~/.zshrc 个人喜好ys主题

ZSH_THEME="ys"

Cmake版本太低

yum remove cmake
wget https://cmake.org/files/v3.26/cmake-3.26.4.tar.gz
tar -xzvf cmake-3.26.4.tar.gz
cd cmake-3.26.4
./configure --prefix=/usr/local/cmake
make && make install
ln -s /usr/local/cmake/bin/cmake /usr/bin/cmake
cmake -version

报错,需要openssl,装一下

 yum install -y openssl

好像已经装过了,可能是openssl的版本太低

装个开发库试试

yum install openssl-devel

autoreconf

编译protobuf是,缺少命令autoreconf

yum install -y autoconf
yum install -y automake
yum install -y libtool

终端英文修改

1、先备份语言配置文件

cp /etc/locale.conf /home/locale.conf.backup

2、打开配置文件

vim /etc/locale.conf

3、把“zh_CN.UTF-8”修改为“en_US.UTF-8”  

4、esc :wq 保存并退出

5、shutdown -r now 重启

转载于:https://my.oschina.net/u/4135649/blog/3068935

安装sngrep

下载依赖库

sudo yum install ncurses-devel make libpcap-devel pcre-devel openssl-devel git gcc autoconf automake

添加 sngrep 的源

vim /etc/yum.repos.d/irontec.repo

源内容

[irontec]

name=Irontec RPMs repository

baseurl=http://packages.irontec.com/centos/$releasever/$basearch/

导入源仓库的公钥

sudo rpm --import http://packages.irontec.com/public.key

安装 sngrep

yum install  -y sngrep

安装tree

yum install -y tree

安装golang开发环境

# curl -s https://mirror.go-repo.io/centos/go-repo.repo | tee /etc/yum.repos.d/go-repo.repo
# rpm --import https://mirror.go-repo.io/centos/RPM-GPG-KEY-GO-REPO
# yum install -y golang
# go version

你可能感兴趣的:(centos)