Linux (CentOS7.5)安装

#更新镜像源

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
yum makecache
ll /etc/pki/rpm-gpg/ #更新系统状态

#安装更新

yum install update

#安装中文

yum install kde-l10n-Chinese 或 yum groupinstall fonts
localectl  set-locale LANG=zh_CN.UTF8 #需要重启生效
LANG="zh_CN.UTF8" #临时改变语言

#同步系统时间

yum install ntp -y
systemctl enable ntpd
systemctl start ntpd
ntpdate -u cn.pool.ntp.org 

#常用工具

yum install tree telnet dos2unix sysstat lrzsz nc nmap -y
yum install wget
yum install net-tools
yum install docker
yum install ruby -y
yum install python -y
yum install c++
yum install php-cli

#安装git

yum install git
git config --global user.name = "username"
git config --global user.email = "[email protected]"
#保存账号密码信息
git config --global credential.helper store
或
echo "[credential]" >> .git/config
echo "    helper = store" >> .git/config

#安装nodejs

wget -p /usr/downloads/ https://nodejs.org/dist/v8.12.0/node-v8.12.0-linux-x64.tar.xz 
cd /usr/downloads/
xz -d  node-v8.12.0-linux-x64.tar.xz 
tar -xvf   node-v8.12.0-linux-x64.tar
mkdir /usr/lib/nodejs
mv node-v8.12.0-linux-x64 /usr/lib/nodejs
cd /usr/lib/nodejs
ln -s  /usr/lib/nodejs/node-v8.12.0-linux-x64/bin/npm  /usr/local/bin/  #添加软链接
ln -s  /usr/lib/nodejs/node-v8.12.0-linux-x64/bin/node  /usr/local/bin/ 
node -v
npm install -g forever
forever start app.js

客户端工具:XShell、SecureCRT

yum install lrzsz
rz -y #上传文件
sz -y filename #下载文件

https://jingyan.baidu.com/article/219f4bf7eedef9de442d380f.html
修改 root 密码
https://blog.csdn.net/shanvlang/article/details/80385913
修改主机名 hostnamectl set-hostname centos7.demo.com
修改DNS echo “nameserver 114.114.114.114\nnameserver 8.8.8.8” > /etc/resov.conf
systemctl restart NetworkManager.service

yum install java-1.8.0-openjdk* -y
yum install nodejs

你可能感兴趣的:(运维,Linux,CentOS7.5)