RHEL7相关--安装/命令

安装linux系统之RHEL7或CENTOS7系统(完整版)
http://jingyan.baidu.com/article/c35dbcb0f3565a8916fcbca4.html

查看Linux Kernel Version

cat /etc/redhat-release

cat /proc/version

uname -a




System Information: (不占用硬盘,保存在内存中)

/proc --> 蓝色为进程

/proc中的参数被修改,下次重启失效

Note: 修改icmp_all,防止被ping通

echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_all

开机 调用的command: /etc/sysctl.conf

 

/sys

 

rm -i file (interactive)

 stat [file_name]


Access / Modify / Update date

 

mkdir /a/b/c –p

修改用户组

[root@lgtca1ows11 BC_LOG02]# usermod -g bconsole nagios  //把user加到某个组

[root@lgtca1ows11 BC_LOG02]# groups nagios  //查看用户的group

nagios : bconsole oinstall


usermod –G linux user1 --> 建主要组user1,并附加组linux

usermod –aG linux user1 --> 添加附加组linux

usermod –G rhcsa user1 --> 修改附加组为rhcsa

useradd –g rhcsa user3--> 建主要组rhcsa

useradd – s /sbin/nologin user4  --> 使用户不能登陆系统


useradd –M user5 --> 强行不建立/home

userdel –r user3 --> 删除用户及其/home目录

 

>file 2>&1

>>file 2>&1 --> 2和1都写入file

 

(): 括号中的命令可以在子进程中进行

 

tr ‘A-Z’ ‘a-z’ < .bash_profile 

cat .bash_profile|tr ‘A-Z’ ‘a-z’

 

mail – s “root” root <<linux <="" linux

hello root

hello root

LINUX

Note: <

<linux 和="" linux="" 之间为文本文件=""

vim 命令

:set nu  --> 显示行号
:set paste --> 格式粘贴

u --> 删除后有问题撤销

%s/A/B/g --> Replacement

%s/A/B/gc --> confirm replacement


设置vim显示行号

vim /root/.vimrc

:set nu

改密码 --root

passwd [user_name]

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/26477398/viewspace-2121244/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/26477398/viewspace-2121244/

为什么会这样[user_mongo@nosql01 replicaset]$ cd /opt [user_mongo@nosql01 opt]$ ll total 0 drwxr-xr-x. 3 root root 25 Mar 16 17:08 servers drwxr-xr-x. 2 root root 51 Mar 16 17:10 software [user_mongo@nosql01 opt]$ tar -zxvf /opt/software/mongodb-linux-x86_64-rhel70-4.4.12.tgz -C /opt/servers/mongodb_demo/replicaset/ mongodb-linux-x86_64-rhel70-4.4.12/LICENSE-Community.txt tar: mongodb-linux-x86_64-rhel70-4.4.12: Cannot mkdir: Permission denied tar: mongodb-linux-x86_64-rhel70-4.4.12/LICENSE-Community.txt: Cannot open: No such file or directory mongodb-linux-x86_64-rhel70-4.4.12/MPL-2 tar: mongodb-linux-x86_64-rhel70-4.4.12: Cannot mkdir: Permission denied tar: mongodb-linux-x86_64-rhel70-4.4.12/MPL-2: Cannot open: No such file or directory mongodb-linux-x86_64-rhel70-4.4.12/README tar: mongodb-linux-x86_64-rhel70-4.4.12: Cannot mkdir: Permission denied tar: mongodb-linux-x86_64-rhel70-4.4.12/README: Cannot open: No such file or directory mongodb-linux-x86_64-rhel70-4.4.12/THIRD-PARTY-NOTICES tar: mongodb-linux-x86_64-rhel70-4.4.12: Cannot mkdir: Permission denied tar: mongodb-linux-x86_64-rhel70-4.4.12/THIRD-PARTY-NOTICES: Cannot open: No such file or directory mongodb-linux-x86_64-rhel70-4.4.12/bin/install_compass tar: mongodb-linux-x86_64-rhel70-4.4.12: Cannot mkdir: Permission denied tar: mongodb-linux-x86_64-rhel70-4.4.12/bin/install_compass: Cannot open: No such file or directory mongodb-linux-x86_64-rhel70-4.4.12/bin/mongo tar: mongodb-linux-x86_64-rhel70-4.4.12: Cannot mkdir: Permission denied tar: mongodb-linux-x86_64-rhel70-4.4.12/bin/mongo: Cannot open: No such file or directory mongodb-linux-x86_64-rhel70-4.4.12/bin/mongod tar: mongodb-linux-x86_64-rhel70-4.4.12: Cannot mkdir: Permission denied tar: mongodb-linux-x86_64-rhel70-4.4.12/bin/mongod: Cannot open: No such file or directory mongodb-linux-x86_64-rhel70-4.4.12/bin/mongos tar: mongodb-linux-x86_64-rhel70-4.4.12: Cannot mkdir: Permission denied tar: mongodb-linux-x86_64-rhel70-4.4.12/bin/mongos: Cannot open: No such file or directory tar: Exiting with failure status due to previous errors [user_mongo@nosql01 opt]$ tar -zcvf /opt/software/mongodb-linux-x86_64-rhel70-4.4.12.tgz -C /opt/servers/mongodb_demo/replicaset/ tar: Cowardly refusing to create an empty archive Try `tar --help' or `tar --usage' for more information.
06-01
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值