随笔分类 -  Linux

摘要:#修改主机名hostnamectl set-hostname test.server.com#修改主机列表cat <<EOF >> /etc/hosts192.168.2.120 test.server.comEOF #修改IP地址cat <<EOF > /etc/sysconfig/network 阅读全文
posted @ 2019-09-21 11:48 BicycleBoy 阅读(267) 评论(0) 推荐(0)
摘要:1、为已创建分区扩容#查看磁盘信息fdisk -l#查看磁盘分区lsblk#对新增磁盘进行分区,划出sdb1分区fdisk /dev/sdb#重新读分区表partprobe#查看磁盘信息df -Th#创建pvpvcreate /dev/sdb1#扩展原有vgvgextend centos /dev/ 阅读全文
posted @ 2019-09-19 21:13 BicycleBoy 阅读(211) 评论(0) 推荐(0)
摘要:编制脚本并给予执行权限,增加服务脚本vi /usr/lib/systemd/system/my.service [Unit]Description=this is my self start serviceAfter=network.target remote-fs.target nss-looku 阅读全文
posted @ 2019-08-07 10:25 BicycleBoy 阅读(1121) 评论(0) 推荐(0)
摘要:文件存储服务器配置: 安装NFSyum install -y rpcbind nfs-utils创建共享目录mkdir /root/sharefile修改目录权限chmod 0755 -R sharefile修改NFS配置文件vi /etc/exports /root/sharefile/ 192. 阅读全文
posted @ 2019-07-28 23:43 BicycleBoy 阅读(1949) 评论(0) 推荐(0)
摘要:修改rsync配置文件vi /etc/rsyncd.conf uid = nobodygid = nobodyuse chroot = yesmax connections = 4pid file = /var/run/rsyncd.pidlog file = /var/log/rsyncexclu 阅读全文
posted @ 2019-07-28 15:39 BicycleBoy 阅读(252) 评论(0) 推荐(0)
摘要:修改系统日志时间格式vi /etc/rsyslog.conf$template CustomFormat,"%$NOW% %TIMESTAMP:8:15% %HOSTNAME% %syslogtag% %msg%\n"$ActionFileDefaultTemplate CustomFormat 将 阅读全文
posted @ 2019-07-16 00:07 BicycleBoy 阅读(405) 评论(0) 推荐(0)
摘要:ansible安装 yum install ansible -y 优化ssh运行效率vim /etc/ssh/sshd_configGSSAPIAuthentication noUseDNS no vi /etc/ansible/ansible.cfg#主配置文件 vim /etc/ansible/ 阅读全文
posted @ 2019-07-10 10:47 BicycleBoy 阅读(279) 评论(0) 推荐(0)
摘要:安装zabbix的yum源rpm -ivh http://repo.zabbix.com/zabbix/4.0/rhel/7/x86_64/zabbix-release-4.0-1.el7.noarch.rpmyum-config-manager --enable rhel-7-server-opt 阅读全文
posted @ 2019-07-10 10:39 BicycleBoy 阅读(243) 评论(0) 推荐(0)
摘要:Docker安装及管理yum install docker-io -yvim /etc/sysconfig/docker#修改静像获取源地址other_args="--registry-mirror=https://wgcscytr.mirror.aliyuncs.com" docker searc 阅读全文
posted @ 2019-07-09 11:27 BicycleBoy 阅读(194) 评论(0) 推荐(0)
摘要:环境准备:服务器1:192.168.2.121,nginx+keepalived服务器2:192.168.2.122,nginx+keepalived服务器3:192.168.2.123,httpd服务器4:192.168.2.124,httpdvip:192.168.2.881、keepalive 阅读全文
posted @ 2019-07-08 13:39 BicycleBoy 阅读(750) 评论(0) 推荐(0)
摘要:配置nginx的yum源vi /etc/yum.repos.d/nginx.repo[nginx-stable]name=nginx stable repobaseurl=http://nginx.org/packages/centos/$releasever/$basearch/gpgcheck= 阅读全文
posted @ 2019-07-07 12:00 BicycleBoy 阅读(131) 评论(0) 推荐(0)
摘要:加载系统iso文件mkdir /mnt/cdrom/mount /dev/sr0 /mnt/cdrom/cd /etc/yum.repos.d/rename repo repo.bakvi CentOS-Media.repo [c7-media]name=CentOS-$releasever - M 阅读全文
posted @ 2019-07-05 10:27 BicycleBoy 阅读(181) 评论(0) 推荐(0)
摘要:LVS(NAT网络地址转换)负载均衡搭建三台服务器:1台调度服务器,2台真实服务器,对外服务IP》192.168.2.188调度服务器配置:IP地址配置,桥接模式:192.168.2.188,主机模式:192.168.30.200DEVICE=ens33BOOTPROTO=staticIPADDR= 阅读全文
posted @ 2019-07-04 17:51 BicycleBoy 阅读(614) 评论(0) 推荐(0)
摘要:#安装apache yum install httpd #打开防火墙80端口 firewall-cmd --zone=public --add-port=80/tcp --permanent #重启防火墙 systemctl restart firewalld.service #重启apache服务 阅读全文
posted @ 2019-06-14 08:31 BicycleBoy 阅读(117) 评论(0) 推荐(0)
摘要:查看当前所有虚拟机:virsh list --all克隆新虚拟机:virt-clone -o guest01 -n guest02 -f /var/lib/libvirt/images/guest02.img #guest01为原虚拟机查看磁盘空间:ll -h /path启动克隆虚拟机:virsh ... 阅读全文
posted @ 2015-04-28 16:03 BicycleBoy 阅读(178) 评论(0) 推荐(0)
摘要:1、查看ftp是否已安装:rpm -qa | grep vsftpd2、安装ftp:rpm -ivh vsftpd 或yum install vsftpd3、匿名用户配置文件主要参数:anonymous_enable=YESanon_umask=022anon_upload_enable=YESan... 阅读全文
posted @ 2015-03-24 16:56 BicycleBoy 阅读(335) 评论(0) 推荐(0)
摘要:查看是否安装VNC:rpm -qa | grep vnc安装VNC:rpm -ivh vnc-4.1.2-14.el5_3.1.i386.rpm ,rpm -ivh vnc-server-4.1.2-14.el5_3.1.i386.rpm编辑配置文件:/etc/sysconfig/vncserver... 阅读全文
posted @ 2015-03-24 11:28 BicycleBoy 阅读(321) 评论(0) 推荐(0)
摘要:1、运行:yum-yinstallmysql-servermysqlmysql-devel2、启动或停止mysql服务:servicemysqld start/stop3、创建root管理员:mysqladmin-urootpassword1234564、登录mysql数据库:mysql -u ro... 阅读全文
posted @ 2015-03-20 17:18 BicycleBoy 阅读(101) 评论(0) 推荐(0)
摘要:vi filename :打开或新建文件,并将光标置于第一行首 vi +n filename :打开文件,并将光标置于第n行首 vi + filename :打开文件,并将光标置于最后一行首 vi +/pattern filename:打开文件,并将光标置于第一个与pattern匹配的串处 vi -... 阅读全文
posted @ 2015-03-19 10:36 BicycleBoy 阅读(192) 评论(0) 推荐(1)
摘要:查看日志tail -fn 100 /var/log/zabbix/zabbix_agentd.log启动nfs服务systemctl start nfs-server.service设置开机自启动systemctl enable nfs-server.service停止开机自启动systemctl 阅读全文
posted @ 2015-03-19 10:07 BicycleBoy 阅读(194) 评论(0) 推荐(0)