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

最后編輯于
?著作權歸作者所有,轉載或內容合作請聯系作者
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發布,文章內容僅代表作者本人觀點,簡書系信息發布平臺,僅提供信息存儲服務。