본문 바로가기

728x90

리눅스

[리눅스] 킥스타트로 설치 자동화하기 킥스타트로 설치 자동화하기 selinux perl -pi -e 's/^SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config reboot reboot Packages Installation yum install -y tftp tftp-server syslinux-tftpboot xinetd dhcp dhcp-devel syslinux yum install -y epel-release yum install -y nginx tftp sed -i '/disable/ s/yes/no/' /etc/xinetd.d/tftp dhcpd cat /usr/share/doc/dhcp*/dhcpd.conf.example > /etc/dhcp/dhcpd.conf cat > /e.. 더보기
[리눅스] CentOS 7 런레벨(runlevel) 변경 CentOS 7 런레벨(runlevel) 변경 1. RunLevel config 파일 (CentOS 7 부터 systemctl 명령을 통해 RunLevel를 변경하도록 안내) vim /etc/inittab # inittab is no longer used when using systemd. # # ADDING CONFIGURATION HERE WILL HAVE NO EFFECT ON YOUR SYSTEM. # # Ctrl-Alt-Delete is handled by /usr/lib/systemd/system/ctrl-alt-del.target # # systemd uses 'targets' instead of runlevels. By default, there are two main targets: # .. 더보기
[리눅스] php 임의(랜덤)의 패스워드 생성 php 임의(랜덤)의 패스워드 생성 vim passwdcreate.php 더보기
[리눅스] named(bind) zone file ip change scripte named(bind) zone file ip change scripte vim ipswap.sh #!/bin/bash for files in `ls /var/named/aa04` do sed "s/10.0.10.124/192.168.0.20/g" $files > /tmp/named/aa04/$files done 더보기
[리눅스] named(bind)에 geoip 기능 사용하기 named(bind)에 geoip 기능 사용하기 yum install gcc epel-release yum install zlib-devel openssl-devel yum install GeoIP GeoIP-devel yum install bind bind-utils [bind download site] http://ftp.isc.org/isc/bind9/9.10.4-P6/ cd /usr/local/src/ wget http://ftp.isc.org/isc/bind9/9.10.4-P6/bind-9.10.4-P6.tar.gz tar xfz bind-9.10.4-P6.tar.gz cd bind-9.10.4-P6 ./configure --prefix=/usr/local/bind-9.10.4-P6 --sysc.. 더보기
[리눅스] named(bind) 백업 스크립트 named(bind) 백업 스크립트 vim dns_backup.sh #!/bin/bash set -x DIR="fvm01.scbyun.com-`date +%Y%m%d`" cd /root/.nl/ mkdir $DIR mkdir $DIR/sbin mkdir $DIR/etc cp -rpf /var/named $DIR cp /etc/named.conf $DIR/etc cp /etc/named.logging.conf $DIR/etc cp /etc/named.root.key $DIR/etc cp /etc/named.iscdlv.key $DIR/etc cp /etc/rndc.* $DIR/etc cp /usr/sbin/named $DIR/sbin #cp -pr /usr/local/nbind $DIR #rm -rf $D.. 더보기
[리눅스] How to Install python 3.7 on CentOS 7 How to Install python 3.7 on CentOS 7 Step 1 — Install Prerequisites yum install gcc openssl-devel bzip2-devel libffi-devel Step 2 — Download Python 3.x cd /usr/local/src/ wget https://www.python.org/ftp/python/3.7.2/Python-3.7.2.tgz tar xfz Python-3.7.2.tgz Step 3 — Install Python3.x cd Python-3.7.2 ./configure --enable-optimizations make altinstall Step 4 — Using Python 3.x ./python --version .. 더보기
[리눅스] bind rndc(rndc.conf) 설정 및 rndc 명령 bind rndc(rndc.conf) 설정 및 rndc 명령 rndc reload rndc reload $ rndc reload server reload successful rndc statsus rndc status $ rndc status version: BIND 9.18.1-1ubuntu1.2-Ubuntu (Stable Release) (byunsangchul) running on vamocha-prod-gitlab-01: Linux x86_64 5.15.0-1019-aws #23-Ubuntu SMP Wed Aug 17 18:33:13 UTC 2022 boot time: Wed, 23 Nov 2022 02:19:36 GMT last configured: Wed, 23 Nov 2022 04:04:01.. 더보기