
linux
文章平均质量分 51
chaoaitiantong
这个作者很懒,什么都没留下…
展开
-
http,https
一:mkdir -p /www/openlabehco welcome to openalab > index.htmlvim /etc/hosts172.24.8.130 www.openlab.comsystemctl stop firewalldmount /dev/sr0 /mntyum install httpd -yvim /etc/httpd/conf.d/openlab.confsystemctl restart httpdsetenforce 0二:...原创 2021-10-30 16:37:00 · 273 阅读 · 0 评论 -
RHCE笔记
http协议请求的工作流程:(1)终端客户在web浏览器地址栏输入访问地址http://www.ceshi.com:80/index.html(2)web浏览器请求DNS服务器把域名www.ceshi.com解析成web服务器的IP地址(3)web浏览器将端口号(默认是80)从访问地址(URL)中解析出来(4)web浏览器通过解析后的ip地址及端口号与web服务器之间建立一条TCP连接(5)建立TCP连接后,web浏览器向web服务器发送一条HTTP请求报文(6)web服务器响应并读取浏览器的请原创 2021-08-15 15:33:22 · 174 阅读 · 0 评论 -
RHCSA笔记
alias 别名bash 执行shell脚本cut 切割cal 看日历cat 查看文件cd 切换目录chattr 修改文件属性(+a :仅供追加 +i :不得任意更动文件或目录)chmod 修改文件权限 rwx: 421(suid: u+s,u-s 让普通用户可以以root(或其他)的用户角色运行程原创 2021-08-14 15:50:21 · 163 阅读 · 0 评论 -
nfs
服务端:172.24.8.129/24客户端:172.24.8.130/24server:yum install rpcbindyum install nfs-utilsmkdir -p /nfs/shared /nfs/uploadvim /etc/exports* 代表所有vim /etc/exportsuseradd -u 2001 nfs-uploadid nfs-uploadchmod o+w /nfs/upload/systemctl stop firewallds.原创 2021-08-08 15:49:46 · 102 阅读 · 0 评论 -
ftp nfs
yum install vsftpd -yvim /etc/vsftpd/vsftpd.conf:wqcd /var/ftp/chmod o+w pub/服务端:172.24.8.129yum install rpcbind -yyum install nfs-utils -ymkdir -p /nfs/shared /nfs/uploadvim /etc/exportscd /nfschmod o+w upload/setenforce 0systemctl sto.原创 2021-08-07 19:00:42 · 96 阅读 · 0 评论 -
samba & LVM
服务端:172.24.8.130/24客户端:172.24.8.129/24server端:yum install samba -yvim /etc/samba/smb.conf:wq添加一个用户useradd xiaomingsmbpasswd -a xiaoming systemctl stop firewalld setenforce 0 systemctl restart smb nmb客户端:yum install samba-client -ysmbclien.原创 2021-08-07 00:17:53 · 146 阅读 · 0 评论 -
DNS
俩台虚拟机客户端: 172.24.8.128创一个web网站改DNS地址服务端:172.24.8.129yum install bind -yvim /etc/named.conf主配置文件域名解析文件在/var/named目录下的叫named.zuoye.com文件里(文件自己起名:前缀带named)对zuoye.com解析vim /var/named/named.zuoye.comvim /etc/resolv.confsystemctl stop firewalld原创 2021-08-05 16:33:30 · 91 阅读 · 0 评论 -
dhcp服务配置
做这个实验用仅主机模式和nat模式把网段设置到192.168.168.0 和 172.24.8.0把(使用本地DHCP服务将IP地址分配给虚拟机)的√ 去掉把俩台虚拟机都配置仅主机模式和nat模式server 端: yum install dhcp-server -yclient 端:yum install dhcp-client -yserver 端:俩个网卡的配置vim /etc/dhcp/dhcpd.confddns-update-style none;ignore .原创 2021-08-03 17:02:25 · 710 阅读 · 0 评论 -
ssh
server端yum install openssh-service -y 安装ssh包useradd xiaoming 添加xiaoming,xiaohei俩个用户useradd xiaoheiecho redhat | passwd --stdin xiaomingecho redhat | passwd --stdin xiaoheivim /etc/ssh/sshd_config添加端口2000在文件的最后一行(一定要在最后一行)添.原创 2021-07-30 12:19:22 · 90 阅读 · 0 评论 -
https
mount /dev/sr0 /mnt 挂载安装yum install httpd -yyum install mod_ssl -ymkdir -p /www/httpsmkdir -p /www/secretecho he > /www/https/index.htmlecho he > /www/secret/index.htmlcd /etc/pki/tls/certs 创私钥/usr/bin/openssl genrsa -原创 2021-07-29 14:27:03 · 103 阅读 · 0 评论 -
https
yum install httpd -y 安装挂载yum install mod_ssl -ymount /dev/sr0 /mntmkdir -p /www/httpsecho he > /www/https/index.htmlcd /etc/pki/tls/certs 创私钥/usr/bin/openssl genrsa -aes128 2048 > zuoye.key输入密码openssl req原创 2021-07-28 22:08:00 · 291 阅读 · 0 评论 -
linux的yum源
cd /etc/yum.repos.d/vim haha.repo (haha 文件名)mount /dev/sr0 /mnt 挂载原创 2021-07-28 15:49:21 · 111 阅读 · 0 评论 -
访问ip地址主机位为100,200的网站
第一步:添加俩个ip地址nmcli connection modify haha ipv4.addresses 192.168.118.200/24 +ipv4.addresses 192.168.118.100/24 ipv4.gateway 192.168.118.254 ipv4.dns 192.168.118.1 ipv4.method manual autoconnect yes(配置文件名为haha)nmcli connection up haha第二步:创建目录与文件mkdir -.原创 2021-07-26 18:46:26 · 329 阅读 · 0 评论 -
虚拟机的3种网络模式:仅主机,桥接,nat
VMnet0 桥接模式VMnet1 仅主机模式VMnet8 nat模式编辑–虚拟网络编辑器 可编辑三个模式的例如ip范围的一些配置route 看路由cat /etc/resolv.conf 看DNSnmcli connection add con-name haha ifname ens224 type ethe原创 2021-07-26 12:18:31 · 267 阅读 · 0 评论 -
static,dhcp
/etc/sysconfig/network-scriptsvim ifcfg-ens160DHCP主要是该:BOOTPROTO=DHCPONBOOT=YESSTATIC不建议静态路由原创 2021-07-25 12:39:17 · 691 阅读 · 0 评论 -
sudo su useradd groupadd
1: groupadd xiyoujiuseradd wukong -g xiyoujiuseradd wuneng -g xiyoujiuseradd wujing -g xiyoujiusermod -s /sbin/nologin wujing2: passwd wukongpasswd wuneng3: sudo -u wuneng touch /home/wuneng/filesudo -u wujing touch /home/wuneng/file4: sudo -u.原创 2021-07-22 13:55:27 · 123 阅读 · 0 评论 -
mkdir,mv,cp,tar
1: cd /mkdir -p ceshi/usercp /etc/passwd /ceshi/usercp /etc/shadow /ceshi/userln -d /ceshi/user/passwd /passwd.bakln -s /ceshi/user/shadow /sh.link2: cp /etc/ssh/sshd_config /ceshimv /ceshi/sshd_config /ceshi/sshd3: touch.原创 2021-07-20 16:34:34 · 98 阅读 · 0 评论 -
重置root密码
在这个界面按e,进入编辑模式在linuxz这一行的最后输入: rd.break为了好看我打了俩个空格,其实多少个空格都行输入:mount -o remount,rw /sysrootchroot /sysrootpasswd root输入俩次密码最后退出:exitexit...原创 2021-07-18 18:19:37 · 66 阅读 · 0 评论 -
创建虚拟机
这里选自定义选择版本已经下载镜像的选第二个,或者选第三个,等会再装镜像选linuxnat可上网磁盘别小于10g点自定义选择镜像文件,镜像文件是压缩包,镜像文件不需要解压选择自己喜欢的语言,汉语可能会出现乱码Server with GUI 图形界面,同时安装的包比较多,新手常用Minimal Install 迷你界面选择时区Automatic 系统自动分区Custom 手动分区设置root用户和一般用户同意协原创 2021-07-18 13:28:13 · 215 阅读 · 0 评论 -
vsftpd
mount /dev/sr0 /mnt 挂载yum install vsftpd -y 安装systemctl stop firewalld 关防火墙sentenforce 0 临时关闭selinux防火墙原创 2021-07-17 11:53:24 · 58 阅读 · 0 评论