Giter VIP home page Giter VIP logo

centos7-fast-init's Introduction

centos7-fast-init

最小化安装centos7 之后, 快速初始化环境, 使新机器最短时间可以上线作为开发机/生产机使用

一键安装

yum install -y wget git vim lrzsz screen net-tools telnet iftop bind-utils &&\
wget "https://raw.githubusercontent.com/terry2010/centos7-fast-init/master/vps/fast.sh" &&\
screen sh fast.sh
ip a


快速上线

需要先修改 vps.sh

yum install -y wget git vim lrzsz screen net-tools telnet iftop &&\
git clone https://github.com/terry2010/centos7-fast-init.git &&\
screen  scp  [email protected]:/data1.tar.gz /data1.tar.gz 
 


 
cd /  &&\
tar -xzf data1.tar.gz &&\
cd /root/centos7-fast-init/vps/ 
####需要先修改 vps.sh 
vim vps.sh


screen sh vps.sh


screen sh lnmp.sh 




新上架机器后, 启用网卡

vi /etc/sysconfig/network-scripts/ifcfg-ens33

#修改 ONBOOT=no 为 ONBOOT=yes

#重启网络服务

service network restart

#查看ip

ip addr

#可选项目

yum install -y wget  git vim lrzsz screen net-tools telnet

替换yum源为ali源

#备份

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

#替换

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

#下载fedora的epel仓库

yum install -y epel-release

#刷新数据

yum makecache

#更新到最新

screen yum update -y

可选操作:

更新时区

yum install -y ntp
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
echo 'Asia/Shanghai' >/etc/timezone
ntpdate time.windows.com

centos7-fast-init's People

Contributors

terry2010 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.