對于新安裝centos7的服務(wù)器,上面一些常用軟件需要自己安裝:
對于有些需要更換YUM源的,可以先安裝wget:
yum -y install wget
更換aliyun鏡像源地址:
1礁遵、備份
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
2闷畸、下載新的CentOS-Base.repo 到/etc/yum.repos.d/
CentOS 7
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
3牌芋、之后運行yum makecache生成緩存
其他軟件:
yum -y install vim epel-release bash-completion net-tools psmisc
調(diào)試階段可以關(guān)閉防火墻和安全機制:
1.關(guān)閉FirewallD防火墻并關(guān)閉開機啟動:
- systemctl stop firewalld.service
- systemctl disable firewalld.service
2.關(guān)閉SELinux安全機制(為避免出現(xiàn)不必要麻煩):
- 查看SLlinux狀態(tài):
/usr/sbin/sestatus -v ##如果SELinux status參數(shù)為enabled即為開啟狀態(tài)
getenforce ##也可以用這個命令檢查 - 1.臨時關(guān)閉:
setenforce 0 ##(設(shè)置SELinux 成為permissive模式)
##(setenforce 1 設(shè)置SELinux 成為enforcing模式) - 2.永久關(guān)閉(修改配置文件需要重啟機器):
修改/etc/selinux/config
文件將SELINUX=enforcing改為SELINUX=disabled
重啟服務(wù)器即可