欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

Linux (CentOS7.5)安装

程序员文章站 2022-03-12 10:39:06
...

#更新镜像源

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/
tar -xvf   node-v8.12.0-linux-x64.tar.xz 
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 forever
forever start app.js

客户端工具:XShell、SecureCRT

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

https://jingyan.baidu.com/article/219f4bf7eedef9de442d380f.html