首页
学习
活动
专区
工具
TVP
发布

从零开始的linux

专栏作者
103
文章
131608
阅读量
39
订阅数
centos7安装oracle
关闭selinux vim /etc/sysconfig/selinux SELINUX=disabled 关闭防火墙 systemctl stop firewalld.service systemctl disable firewalld.service 创建 oinstall 和 dba 组 /usr/sbin/groupadd oinstall /usr/sbin/groupadd dba 创建用户 /usr/sbin/useradd -g oinstall -G dba oracle pass
零月
2018-04-25
1.6K0
linux进程和线程
查看进程数 [root@alex ~]# ps -ef | grep nginx | wc -l 3 查看线程数 [root@alex ~]# pstree -p 15140 | wc -l 43 查看java程序 [root@alex ~]# jps -l 18340 jdk.jcmd/sun.tools.jps.Jps 15140 org.sonatype.nexus.bootstrap.jsw.JswLauncher 查看进程的线程数 [root@alex ~]# pstree -c | grep
零月
2018-04-25
2.9K0
ansible ad-hoc
定义主机清单 [root@ansible ~]# vim hosts[ceshii]192.168.6.141[docker]192.168.6.142 常用模块 shell模块 [root@ansible ~]# ansible -i hosts docker -m shell -a "ifconfig ens33 | grep inet " 192.168.6.142 | SUCCESS | rc=0 >> inet 192.168.6.142 netmask 255.255.2
零月
2018-04-25
6470
docker overlay
环境说明 hostnameipclient1192.168.6.134client2192.168.6.135 [root@client1 ~]# cat /etc/redhat-release CentOS Linux release 7.3.1611 (Core) [root@client2 ~]# cat /etc/redhat-release CentOS Linux release 7.3.1611 (Core) [root@client1 ~]# docker -v Docker ve
零月
2018-04-25
8790
ansible playbook介绍
ansible playbook介绍 例子 ---- hosts: web remote_user: root tasks: - name: test_playbook shell: touch /tmp/qqq.txt [root@node01 ~]# ansible-playbook test.yml PLAY [web] ************************************************************************TASK [G
零月
2018-04-25
7901
安装nginx
# yum install gcc gcc-c++ autoconf automake zlib zlib-devel openssl openssl-devel pcre* -y cd nginx-1.10.3 ./configure --prefix=/usr/local/nginx --with-http_dav_module --with-http_stub_status_module --with-http_addition_module --with-http_sub_module --wit
零月
2018-04-25
8400
rsync后台服务
192.168.6.71 为服务端 192.168.6.72 为客户端 在服务器启动daemon rsync --daemon 新建配置文件 vim /etc/rsyncd.conf port=8730 log file=var/log/rsync.log pid file=/var/run/rsync.pid [alex] path=/tmp/rsync use chroot=yes max connections=4 read only=no list=yes uid=root gid=root aut
零月
2018-04-25
9630
git创建仓库
创建仓库 mkdir /home/gitroot 进入目录 cd /home/gitroot 初始化仓库 git init 创建一个文件 echo 123456 >> 1.txt 把1.txt添加到仓库 git add 1.txt 提交到仓库 git commit -m "add new file 1.txt" 查看状态 git status 再次修改文件 echo 111111 >> 1.txt 查看仓库状态 git status # On branch master # Changed but not
零月
2018-04-25
7870
用shell添加用户
调试添加用户的脚本 # sh -x useradd.sh alex + '[' 1 -lt 1 ']' + id alex + useradd alex + '[' 0 -eq 0 ']' + passwd --stdin alex + echo alex + echo 'useradd alex add success' useradd alex add success 调试没问题 #!/bin/bash #添加用户 if [ $# -lt 1 ] ; then echo "At le
零月
2018-04-25
1.4K0
netstat命令
显示网络链接 ---- netstat -t:tcp协议相关 -a:所有状态 -n:以数字显示IP和端口 -u:udp相关协议 -l:处于监听状态 -p:显示相关进程以及PID 常用组合: -tan -uan -tnl -tnlp 命令 # netstat -tan Active Internet connections (servers a
零月
2018-04-25
1K0
logstash安装
需要环境 java -versionjava version "1.7.0" 源码安装 wget https://download.elasticsearch.org/logstash/logstash/logstash-1.4.2.tar.gz 解压 tar xf logstash-1.4.2.tar.gz 进入目录 cd logstash-1.4.2 启动 bin/logstash -e 'input{stdin{}}output{stdout{codec=>rubydebug}}' 输入hellow
零月
2018-04-25
7960
免密码登录
创建一个目录存放公钥和私钥 mkdir key 生成公钥和私钥 ssh-keygen -t rsaGenerating public/private rsa key pair.Enter file in which to save the key (/root/.ssh/id_rsa): keyEnter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved
零月
2018-04-25
2.9K0
rpm命令
安装rpm软件 # rpm -ivh /mnt/Packages/lrzsz0.12.2036.el7.x86_64.rpm # rpm --help-i,--install install package(s) -v,--verbose 详细 provide more detailed output -h,--hash print hash marks as package installs (good
零月
2018-04-25
1.5K0
linux磁盘管理
查看磁盘 # fdisk -l Disk /dev/sda: 21.5 GB, 21474836480 bytes 255 heads, 63 sectors/track, 2610 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes
零月
2018-04-25
7.2K0
swap
Swap分区,即交换分区,系统在物理内存不够时,与Swap进行交换。 # free -m total used free shared buffers cached Mem: 981 178 802 0 19 49 -/+ buffers/cache: 109 871 Swap: 2047
零月
2018-04-25
1.1K0
安装ipython和虚拟环境
先epel-release这个包, 通过epel源安装pip: yum install python-pip 然后pip install ipython==1.2.1 pip install ipython==1.2.1 DEPRECATION: Python 2.6 is no longer supported by the Python core team, please upgrade your Python. A future version of pip will drop support fo
零月
2018-04-25
1K0
crontab
cron任务分两类: 系统cron: 定义在/etc/crontab 用户cron: 定义在/var/spool/cron目录中,每个用户都有一个与用户名同名的文件,其功能类似于/etc/crontab 每行定义一个独立的任务: SHELL=/bin/bash PATH=/sbin:/bin:/usr/sbin:/usr/bin MAILTO=root HOME=/
零月
2018-04-25
7920
ssh命令
ssh命令是openssh套件中的客户端连接工具,可以给予ssh机密协议实现安全的远程登录服务器. 语法: ssh (选项) (参数) 选项: -v:显示版本-p:指定远程服务器的登录端口-l:指定远程服务器上的登录用户-C:压缩 参数: 远程主机:指定要连接的远程ssh服务器 指令:要在远程ssh服务器上执行的指令 安装 # yum -y install openssh-client openssh-server # ssh -vOpenSSH_5.3p1, OpenSSL 1.0.1e-fips 11
零月
2018-04-25
1.2K0
算术运算
# num1=3 # num2=13 加法 # let sum=$num1+$num2 # echo $sum 16 乘法 # echo $[$num1*$num2] 39 除法 # echo $(($num2/$num1)) 取余 # echo $(expr $num2 % $num1) 增强型赋值 # count=1 # let count+=1 # echo $count 2 # let count++ # echo $count 3
零月
2018-04-25
4900
alias命令
aslias命令用来设置指令的别名.我们可以使用该命令可以将一些较长的命令简化.使用alias命令时,用户必须使用单引号将原来的命令引起来,防止特殊字符导致错误. alias命令的作用只局限于该次登入的操作.若要每次登入都能使用这些命令的别名,(就是永久生效)则可以将相应的alias命令存放到bash的初始化文件/etc/bashrc. 注意: /etc/bashrc是全局的,改错了,会导致一些不可预料的问题,最好是放在各自用户的家目录下的~/.bashrc中. 语法: alias (选项) (参数) 选项
零月
2018-04-25
7700
点击加载更多
社区活动
腾讯技术创作狂欢月
“码”上创作 21 天,分 10000 元奖品池!
Python精品学习库
代码在线跑,知识轻松学
博客搬家 | 分享价值百万资源包
自行/邀约他人一键搬运博客,速成社区影响力并领取好礼
技术创作特训营·精选知识专栏
往期视频·千货材料·成员作品 最新动态
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档