1.部署Centos7

1 系统更新

1.1 更新到最新版本

yum update 
yum upgrade

1.2 添加epel更新源

yum install epel-release
yum update

1.3 安装开发环境所需的软件

yum install gcc gcc-c++ gdb svn libtool intltool make autoconf lsb htop p7zip vim automake net-tools lrzsz htop bzip2 cmake cmake3 zlib zlib-devel icu libicu-devel openssl-devel pcre-devel zlib-devel wget mesa-libGL-devel mesa-libGLU-devel freeglut-devel opemmpi opemmpi-devel protobuf protobuf-devel tbb tbb-devel libcurl-devel jsoncpp-devel hiredis-devel

2 添加新用户fastdfs

  1. 添加用户组:groupadd fastdfs
  2. 添加用户fastdfs:adduser -g fastdfs fastdfs
  3. 设置fastdfs用户密码:passwd fastdfs
  4. 进入fastdfs的home目录:su fastdfs

3防火墙设置

3.1 安装

yum install firewalld firewall-config

3.2 启动

systemctl enable firewalld #自动启动
systemctl start firewalld  #启动

3.3 状态维护

systemctl status firewalld #状态
systemctl disable firewalld #停止
systemctl stop firewalld #禁用
systemctl restart firewalld or firewall-cmd --reload #重新载入

3.4 开发端口

firewall-cmd --zone=public --add-port=22122/tcp --permanent
firewall-cmd --zone=public --add-port=23000/tcp --permanent
firewall-cmd --zone=public --add-port=8081/tcp --permanent
firewall-cmd --zone=public --add-port=8085/tcp --permanent
firewall-cmd --zone=public --add-port=11300/tcp --permanent

boost编译

Centos自带boost 1.53,版本有些老了,有些程序最新版本需要更新的boost版本,所以需要自己编译。
http://www.boost.org/
./bootstrap.sh
./b2 -s HAVE_ICU=1
./b2 install
ldconfig

你可能感兴趣的:(1.部署Centos7)