1. 程式人生 > >Linux (CentOS7.5)安裝

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 = "王嘉慶"
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

rz -y #上傳檔案
sz -y filename #下載檔案