일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 |
- KB국민카드
- 복현오거리
- nginx
- KB증권
- OpenWrt
- 아파치
- 램가스초월
- 리눅스
- 킹북이초월
- jQuery
- 윈도우10
- 시놀로지
- 보르비스초월
- 알리익스프레스
- PHP-FPM
- Linux
- php
- 자바스크립트
- mysql
- 소비전력
- Apache
- 가상서버호스팅
- 알뜰폰
- 티스토리
- iptime
- Rocky
- SKT
- proxmox
- 스톤에이지
- centos
- Today
- Total
목록LINUX (34)
맛집 여행 캠핑 일상 생활
도커 php5.6 php7.4 php8.2 아파치 설치 방법입니다.하나의 이미지에 php+apache가 같이 있는 docker image입니다.docker-compose.ymlservices: php56: #image: php:5.6-apache container_name: php56-apache build: context: . dockerfile: ./Dockerfile-php56 ports: - "8156:80" volumes: - ./www:/var/www/html - ./httpd/logs:/etc/apache2/logs - ./httpd/conf/example.conf:/etc/apache2/sites-enable..
도커 허브에는 nginx + php-fpm이 같이 있는 이미지를 못찾겠네요~따로 따로 조합해서 사용하는 방법 말고 하나의 이미지에서 서비스하는 방법입니다.1. docker-compose.ymlservices: nginx: #image: nginx:latest container_name: nginx-php82 build: context: . dockerfile: ./Dockerfile-nginx restart: always ports: - "8080:80" volumes: - ./www:/var/www/html - ./nginx/logs:/var/log/nginx - ./nginx/conf:/etc/nginx/conf...
이것 저것 테스트 한다고 그런지는 모르겠는데 MariaDB가 저도 모르게 죽어있더군요~[root@localhost conf.d]# systemctl restart mariadbJob for mariadb.service failed because the control process exited with error code.See "systemctl status mariadb.service" and "journalctl -xeu mariadb.service" for details.[root@localhost conf.d]# systemctl status mariadb× mariadb.service - MariaDB 10.5 database server Loaded: loaded (/usr/lib/sy..
docker가 설치되어 있지 않다면 docker를 설치합니다.yum config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repoyum -y install docker-ce docker-ce-cli containerd.iosystemctl enable dockersystemctl start dockerdocker compose version 명령어로 버전명이 잘 나오는지 확인합니다.mkdir -p ~/docker/certbot/nginxcd ~/docker/certbotcat ~/docker/certbot/nginx/certbot.confserver { listen 80; server_name example...
duckdns.org 는 무료로 ddns 5개 subdomain을 사용할 수가 있습니다.한가지 아쉬운 점이 있다면 무료인증서 letsencrypt 툴인 certbot 으로는 webroot 방식으로만 가능한 것 같네요~1. Apachecat /etc/httpd/conf.d/certbot.conf ServerName example.duckdns.org DocumentRoot /var/www/certbot ErrorLog logs/certbot-error_log CustomLog logs/certbot-access_log vcommon Require all granted EOF2. NGINXcat /etc/nginx/conf.d/certbot.confserve..
PHP8.2 버전에서는 PHPExcel 이 엄청난 에러를 뿜어내는군요~php 8.x 버전에서는 PhpSpreadSheet 를 사용하면 되네요~먼저 /etc/php.ini 파일에서 allow_url_fopen 을 On 으로 되어 있어야 아래의 composer 가 실행이 됩니다.설치하려는 위치에서 아래 명령어로 설치하면 됩니다. cat /etc/php.ini | grep ^allow_url_fopensed -i 's/^allow_url_fopen\ =\ Off/allow_url_fopen = On/g' /etc/php.iniphp -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"php -r "if (hash_file('sha384',..
CentOS 7 지원 종료로 mirrorlist.centos.org 에서 패키지 검색이 안되는군요~지원이 종료되면서 vault.centos.org 으로 변경해줘야 하네요~yum 유틸을 괜히 업데이트 했나봅니다.서버 두군데가 CentOS 7 인데 한곳은 되고 한곳은 안됩니다~# nslookup mirrorlist.centos.org ;; Got SERVFAIL reply from 168.126.63.1, trying next server Server: 8.8.8.8 Address: 8.8.8.8#53 ** server can't find mirrorlist.centos.org.co.kr: SERVFAIL# nslookup mirrorlist.centos.org 168.126.6..
CentOS 7.x 버전에서는 Rocky 리눅스와 달리 yum install 로 설치를 지원하는 않는군요~yum install make gcc iptables-devel perl-Text-CSV_XS perl-App-cpanminus cpanm NetAddr::IP cpanm Getopt::Long wget mirror.koreaidc.com/iptables/xtables-addons-2.10.tar.gz tar xvfz xtables-addons-2.10.tar.gz cd xtables-addons-2.10 sed -i '/build_TARPIT=m/ s/^/#/' mconfig ./configure make && make install mkdir /usr/share/xt_geoip cd geoip ...
해외 IP 차단을 하려고 해도 수많은 아이피를 전부 iptables 로 차단하려면 수 만 줄이 넘어갑니다.한국 KR 이 아니면 차단하는게 간단해 보이네요~CentOS 7은 yum install 로 안되는데 rocky 9 은 쉽게 설치가 가능합니다.yum install https://download1.rpmfusion.org/free/el/rpmfusion-free-release-9.noarch.rpmyum install iptables-services iptables-devel xtables-addons perl-Text-CSV_XS perl-App-cpanminus cpanm Net::CIDR::Lite cpanm Text::CSV_XS mkdir /usr/share/xt_geoip /usr/libex..
sysctl.conf 에 net.ipv6.conf.all.disable_ipv6 = 1 넣어서 ipv6를 disable 시켰더니 잘되던 sendmail 이 안되는군요~sendmail: fatal: parameter inet_interfaces: no local interface found for ::1메일 발송을 실패하였습니다. # vi /etc/postfix/main.cf inet_interfaces = all #inet_interfaces = localhostinet_interfaces = localhost 주석 처리하고 inet_interfaces = all 로 하니 잘 됩니다.
아파치 로그를 보다보니 아래의 유저에이전트가 있더군요~UserAgent : "Mozilla/5.0 (compatible; CensysInspect/1.1; +https://about.censys.io/)"로그를 카운트해보니 꽤나 많이 접속을 했네요~로그에서 추출한 아이피로 해당 아이피대역을 다 차단시켜줍니다.iptables -I INPUT -s 162.142.125.0/24 -j DROPiptables -I INPUT -s 167.94.138.0/24 -j DROPiptables -I INPUT -s 167.94.145.0/24 -j DROPiptables -I INPUT -s 167.94.146.0/24 -j DROPiptables -I INPUT -s 199.45.154.0/24 -j DROPipta..
CentOS 7.x 버전에서 mrtg 와 snmp 를 설치하고 테스트 하는데 snmpd Connectio from UDP 161 REFUSED 가 되네요~[root@centos ~]# snmpwalk -v2c -c public localhost system Timeout: No Response from localhost [root@centos conf.d]# systemctl status snmpd● snmpd.service - Simple Network Management Protocol (SNMP) Daemon. Loaded: loaded (/usr/lib/systemd/system/snmpd.service; enabled; vendor preset: disabled) Active: activ..
아파치 설정 값 중에 Timeout 을 5초로 했더니 워드프레스에서 부하가 좀 걸리는 작업은 대부분 아래와 같은 에러를 뿜으며 실행이 제대로 안되네요~Service UnavailableThe server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.위 메시지는 웹브라우저에서 보여지는 화면입니다.그리고 아래는 아파치 에러로그입니다.[Wed Oct 16 08:05:45.859829 2024] [proxy_fcgi:error] [pid 3822] (70007)The timeout specified has expired: [client 192.1..
USB 무선랜이 있어서 Proxmox 에서 핫스팟을 설정해서 무선공유기로 변신을 해봤습니다.root@proxmox:~# nmcli device | grep wifiwlx35a35ce08535 wifi disconnected --nmcli d | grep wifi 로 하셔도 됩니다.위의 명령어로 무선랜의 장치명을 알아냅니다.root@proxmox:~# nmcli con add con-name myHotspot ifname wlx35a35ce08535 type wifi ssid myWiFi00 \ mode ap wifi.band bg wifi.channel 5 ipv4.method sharedConnection 'myHotspot' (bb86341a-a30a-4527-9c7e-..
CentOS 7.x 버전에서 pstree 명령어가 안될때 psmisc 설치[root@raspberry yum.repos.d]# pstree-bash: pstree: command not found[root@raspberry yum.repos.d]# yum install psmiscLoaded plugins: fastestmirrorRepository epel is listed more than once in the configurationLoading mirror speeds from cached hostfileResolving Dependencies--> Running transaction check---> Package psmisc.armv7hl 0:22.20-17.el7 will be install..

라즈베리파이2를 재활용 하려니 할게 많네요~더군다나 CentOS 7 버전이라 더 힘드네요~Rocky Linux 는 64bit 부터 지원이 되서 할 수 없이 고난의 길로 갈 수 밖에 없네요~[root@raspberry yum.repos.d]# yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpmLoaded plugins: fastestmirrorCannot open: https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm. Skipping.Error: Nothing to doepel-release 를 설치하려고 하니 안되는군요~브라우저에서 해..
CentOS 업데이트 지원이 중지된다더니 사실인가보네요~[root@localhost ~]# yum updateLoaded plugins: fastestmirrorLoading mirror speeds from cached hostfileCould not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=armhfp&repo=os&infra=stock error was14: curl#6 - "Could not resolve host: mirrorlist.centos.org; Unknown error" One of the configured repositories failed (Unknown), and yum doesn't have enoug..
라즈베리파이2에 CentOS 이미지를 굽고 df -h 로 용량을 확인해보면 microSD 카드 용량 보다 훨씬 작게 잡혀있습니다.루트 공간을 확장 시켜주는 방법입니다.[root@localhost ~]# parted /dev/mmcblk0GNU Parted 3.1Using /dev/mmcblk0Welcome to GNU Parted! Type 'help' to view a list of commands.(parted) unit chs(parted) printModel: SD CBADS (sd/mmc)Disk /dev/mmcblk0: 7650,197,34Sector size (logical/physical): 512B/512BBIOS cylinder,head,sector geometry: 7650,255,6..
Proxmox 에 vnstat 을 한번 설치해보았습니다.NGINX 와 APACHE 둘다 잘 되네요~먼저 네트워크 트래픽 모니터링 툴인 vnstat 유틸을 먼저 설치합니다.# apt-get install vnstat설치후 일정 시간이 지나야 데이터가 쌓여서 확인이 가능합니다.# vnstat rx / tx / total / estimated enp2s0: 2024-07 45.65 MiB / 31.36 MiB / 77.01 MiB / 685.96 MiB yesterday 1.15 MiB / 7.06 MiB / 8.21 MiB today 44.50 ..
mod_cband 를 대체할만한 모듈이 mod_qos 인데요~옵션이 너무 많아서 참고할만한 사이트가 안보여서 대충 했더니 아래와 같은 에러로그가 있네요~[qos:warn] [pid 62100:tid 62100] mod_qos(003): request level rule / has no concurrent request limitations [qos:warn] [pid 62100:tid 62100] mod_qos(003): request level rule \\.iso has no concurrent request limitations [qos:warn] [pid 62100:tid 62100] mod_qos(003): request level rule \\.mp3 has no concurrent reque..