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
- 添加用戶組:groupadd fastdfs
- 添加用戶fastdfs:adduser -g fastdfs fastdfs
- 設置fastdfs用戶密碼:passwd fastdfs
- 進入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