centos 7新机使用前操作
關閉防火墻
systemctl stop firewalld(停服務)
?systemctl status firewalld(看狀態)
?systemctl disable firewalld.service (永久關閉)
?
?
selinux
getenforce(查狀態)
vi /etc/selinux/conf
? ?將登號后改為=disabled
?
安裝vim?
yum install -y vim
?
更改阿里云yum源
cd /etc/yum.repos.d?
備份舊的配置文件:mv CentOS-Base.repo CentOS-Base.repo.bak?
下載阿里源的文件: wget -O CentOS-Base.repo?http://mirrors.aliyun.com/repo/Centos-7.repo?
清理緩存?
yum clean all?
重新生成緩存?
yum makecache
?
?
1,更新內核,并升級CentOS
2,安裝命令行Web瀏覽器
如果你之前沒有安裝圖形化用戶界面(GUI),就需要一個基于命令行的Web瀏覽器,通過終端來瀏覽互聯網。為此,我們要用到兩個工具“links”或“elinks”中的一個。
3,安裝rz&&sz命令
? ? ? ? ? ? yum -y install lrzsz
?4,安裝telnet&&netstat
?
?
? 4.1安裝netstat命令
?yum install -y net-tools
?
?
?
??先檢查CentOS7.0是否已經安裝以下兩個安裝包:telnet-server、xinetd。命令如下:
rpm -qa telnet-serverrpm -qa xinetd?? ?如果沒有安裝,則先安裝。安裝命令:
1.1 安裝telnet
yum list |grep telnet yum install telnet-server.x86_64yum install telnet.x86_64
?1.2 安裝xinetd?
這里安裝xinetd
yum list |grep xinetd yum install xinetd.x86_64安裝完成后,將xinetd服務加入開機自啟動:
systemctl enable xinetd.service將telnet服務加入開機自啟動:
systemctl enable telnet.socket1.3 重啟服務
最后,啟動以上兩個服務即
由于telnet服務也是由xinetd守護的,所以安裝完telnet-server,要啟動telnet服務就必須重新啟動xinetd 。
systemctl start telnet.socket systemctl start xinetd(或service xinetd start)
轉載于:https://www.cnblogs.com/wanganshi/p/10072624.html
總結
以上是生活随笔為你收集整理的centos 7新机使用前操作的全部內容,希望文章能夠幫你解決所遇到的問題。