[ubuntu安装教程]Ubuntu使用安装学习笔记

更新时间:2018-09-19    来源:Ubuntu    手机版     字体:

【www.bbyears.com--Ubuntu】


一些操作的记录,只为个人所用,勿喷,持续不定时updating….

新建用户git:
useradd git
修改git用户密码: passwd git
git用户添加到管理组: gpasswd -a git admin
给git用户创建自己的目录:
cd /home
mkdir git
chown git /home/git
删除用户git
userdel -r  git(-r 删除与git用户相关的文件)

—————————————————————–

ssh生成密钥
ssh-keygen -t rsa -C “zsw.scorpio@gmail.com”
ssh公钥复制到服务器
ssh-copy-id -i .ssh/id_rsa.pub scorpio@192.168.137.60
修改密钥口令(以前的密钥一直有密码的….太烦了,所以想删掉)
ssh-keygen -p
ssh服务器配置文件
/etc/ssh/sshd_config
ssh服务器开始重启关闭
/etc/init.d/ssh start(restart)(stop)

—————————————————————–

# the PS1

export PS1=’n[e[01;37m][`a=$?;if [ $a -ne 0 ]; then echo -n -e “[e[01;32;41m]{$a}”; fi`[33[01;32m]u[33[01;33m]@[33[01;35m]h[33[00m] [33[01;34m]`pwd“B=$(git branch 2>/dev/null | sed -e “/^ /d” -e “s/* (.*)/1/”); if [ "$B" != "" ]; then S=”git”; elif [ -e .bzr ]; then S=bzr; elif [ -e .hg ]; then S=”hg”;B=”$(hg branch)”; elif [ -e .svn ]; then S=”svn”; else S=”"; fi; if [ "$S" != "" ]; then if [ "$B" != "" ]; then M=$S:$B; else M=$S; fi; fi; [[ "$M" != "" ]] && echo -n -e “[e[33;40m($M)[33[01;32m][e[00m]“`[33[01;34m][e[01;37m]]n[e[01;34m]$ [e[00m]‘
if [ $UID -eq 0 ]
then
export PS1=’n[e[01;37m][`a=$?;if [ $a -ne 0 ]; then echo -n -e “[e[01;32;41m]{$a}”; fi`[33[01;31m]u[33[01;33m]@[33[01;31m]h[33[00m] [33[01;34m]`pwd“B=$(git branch 2>/dev/null | sed -e “/^ /d” -e “s/* (.*)/1/”); if [ "$B" != "" ]; then S=”git”; elif [ -e .bzr ]; then S=bzr; elif [ -e .hg ]; then S=”hg”;B=”$(hg branch)”; elif [ -e .svn ]; then S=”svn”; else S=”"; fi; if [ "$S" != "" ]; then if [ "$B" != "" ]; then M=$S:$B; else M=$S; fi; fi; [[ "$M" != "" ]] && echo -n -e “[e[33;40m]($M)[33[01;32m][e[00m]“`[33[01;34m][e[01;37m]]n[e[01;34m]$ [e[00m]‘
fi

—————————————————————–

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the ECDSA key sent by the remote host is
c1:87:72:73:01:cf:96:f8:62:23:92:db:8f:a7:3a:11.
Please contact your system administrator.
Add correct host key in /home/Scorpio/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /home/Scorpio/.ssh/known_hosts:9
ECDSA host key for 192.168.137.60 has changed and you have requested strict checking.
Host key verification failed.晚上登录出现这个情况,好像是因为本地known_hosts里面有虚拟主机的信息,但是虚拟主机没pubkey所以错误,只要删除known_hosts记录就好了。-

----------------------------------------------------------------Ubuntu11.10源
deb http://mirrors.163.com/ubuntu/ oneiric main universe restricted multiverse
deb-src http://mirrors.163.com/ubuntu/ oneiric main universe restricted multiverse
deb http://mirrors.163.com/ubuntu/ oneiric-security universe main multiverse restricted
deb-src http://mirrors.163.com/ubuntu/ oneiric-security universe main multiverse restricted
deb http://mirrors.163.com/ubuntu/ oneiric-updates universe main multiverse restricted
deb http://mirrors.163.com/ubuntu/ oneiric-proposed universe main multiverse restricted
deb-src http://mirrors.163.com/ubuntu/ oneiric-proposed universe main multiverse restricted
deb http://mirrors.163.com/ubuntu/ oneiric-backports universe main multiverse restricted
deb-src http://mirrors.163.com/ubuntu/ oneiric-backports universe main multiverse restricted
deb-src http://mirrors.163.com/ubuntu/ oneiric-updates universe main multiverse restricted-----------------------------------------------------------------修改系统登录信息: 

sudo vim /etc/motd-----------------------------------------------------------------     ./configure在输入:make 
     make:   ***   No   targets   specified   and   no   makefile   found.     Stop.     这是因为make出错了!木有makefile

本文来源:http://www.bbyears.com/caozuoxitong/44446.html

猜你感兴趣