外观
git
305字约1分钟
2020-09-06
GIT
- 安装
yum install -y git
git version- 上传
初始化 -- git init
添加 -- git add -A
评论 -- git commit -m "comment"
连接 -- git remote add origin https://github.com/OrthogonalAndParallel/OrthogonalAndParallel.github.io.git
提交 -- git push -f origin master- 下载
配置 --
git config --global user.name 'itcats_cn'
git config --global user.email 'itcats_cn@itcats.cn'
ssh-keygen -t rsa -C 'itcats_cn@itcats.cn'
复制公钥到gitlab
初始化 -- git init
克隆 -- git clone http://jinchen:jc19940116@193.112.118.128:8888/jinchen/static_blog.git- 显示改动文件路径
# 直接进入仓库目录
cd /path/to/your/project
git show e252baa5 --name-only --onelineGitLab
预备
- ssh
sudo yum install -y curl policycoreutils-pythonopenssh-server
sudo systemctl enable sshd
sudo systemctl start sshd- firewalld
yum install firewalld systemd -ycd
service firewalld start
sudo firewall-cmd --permanent --add-service=http
firewall-cmd --zone=public --add-port=80/tcp --permanent
sudo systemctl reload firewalld- postfix
sudo yum install postfix
sudo systemctl enable postfix
sudo systemctl start postfix- wget
yum -y install wget- vim
yum install vim -y安装
下载 -- wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-12.8.10-ce.0.el7.x86_64.rpm
依赖 -- yum install policycoreutils-python
安装 -- rpm -ivh gitlab-ce-12.8.10-ce.0.el7.x86_64.rpm
配置 -- vim /etc/gitlab/gitlab.rb
生效 -- gitlab-ctl reconfigure
重启 -- gitlab-ctl restart
登录 -- root/jc19940116/5iveL!fe问题
- 内存小于2g,交换分区解决
创建 -- dd if=/dev/zero of=/data/swap bs=512 count=8388616
制作 -- mkswap /data/swap
设置内涵参数 --
cat /proc/sys/vm/swappiness
sysctl -w vm.swappiness=60
启用 --
swapon /data/swap
echo “/data/swap swap swap defaults 0 0” >> /etc/fstab
验证 -- cat /proc/swaps