1. 程式人生 > >centos安裝實用總結

centos安裝實用總結

火墻 stop roo hostname 總結 rep iptables dos2unix expec

1.常用軟件安裝:

yum install -y bash-completion vim lrzsz wget expect net-tools nc nmap tree dos2unix htop iftop iotop unzip telnet sl psmisc nethogs glances bc

2.主機名和網絡

hostnamectl set-hostname XXXXX
echo "10.0.0.100 XXXXX">>/etc/hosts


3.關閉防火墻
iptables -L
iptables -F
systemctl disable firewalld


[[email protected]~]# getenforce

Enforcing
[[email protected]~]# setenforce 0
[[email protected]~]# getenforce
[[email protected]~]# vim /etc/selinux/config

4.程序管理
ps -ef|grep mysql
kill 1234
kill -9 1234
pkill mysqld

yum install -y httpd

[[email protected]~]# systemctl start httpd
[[email protected]~]# systemctl restart httpd

[[email protected]~]# systemctl stop httpd
[[email protected]~]# systemctl restart httpd

5.網絡管理
ip a
ifconfig
ping
vim /etc/sysconfig/network-scripts/ifcfg-eth0
systemctl restart network

centos安裝實用總結