rm -f /etc/localtime cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
yum install wget rm -f /etc/yum.repos.d/CentOS-Base.repo wget -P /etc/yum.repos.d/ http://mirrors.163.com/.help/CentOS6-Base-163.repo wget -P /etc/yum.repos.d/ http://mirrors.aliyun.com/repo/epel-6.repo
或者python
curl http://mirrors.163.com/.help/CentOS6-Base-163.repo >/etc/yum.repos.d/comratings.repo curl http://mirrors.aliyun.com/repo/epel-6.repo > /etc/yum.repos.d/epel-6.repo
如何須要最新版本的rpm包,請安裝下面的倉庫linux
rpm -Uvh http://repo.webtatic.com/yum/el6/latest.rpm
sed -i 's#SELINUX=enforcing#SELINUX=disabled#g' /etc/selinux/config setenforce 0
service iptables stop iptables -L service iptables save
yum install -y vim openssh-clients ntpdate man lrzsz
echo "$((RANDOM%60)) $((RANDOM%24)) * * * /usr/sbin/ntpdate time1.aliyun.com" >> /var/spool/cron/root
#臨時修改,馬上生效 ulimit -n 655350 #永久修改 echo "* soft nofile 655360" >> /etc/security/limits.conf echo "* hard nofile 655360" >> /etc/security/limits.conf
cat >> /etc/modprobe.d/ipv6.conf <<EOF alias net-pf-10 off alias ipv6 off EOF
sed -i 's/#UseDNS yes/UseDNS no/g' /etc/ssh/sshd_config sed -i 's/GSSAPIAuthentication yes/GSSAPIAuthentication no/g' /etc/ssh/sshd_config service sshd restart
yum install openldap-clients nss-pam-ldapd -y
authconfig --enablemkhomedir \ --disableldaptls \ --enablemd5 \ --enableldap \ --enableldapauth \ --ldapserver=ldap://xxx.x.x.27:8389 \ --ldapbasedn="dc=wzlinux,dc=com" \ --enableshadow \ --update
yum install https://centos6.iuscommunity.org/ius-release.rpm -y
yum install -y python36u python36u-libs python36u-devel python36u-pip
[root@monitor ~]# python3.6 Python 3.6.5 (default, Apr 10 2018, 17:08:20) [GCC 4.4.7 20120313 (Red Hat 4.4.7-18)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> exit() [root@monitor ~]# python3.6 -V Python 3.6.5