정보기술

Morphological Analysis Installation and Usage (PHP)

Installation Environment: CentOS 7 default, PHP 7 yum install gcc-c++ java-1.7.0-openjdk-devel python-devel zlib-devel openssl openssl-devel git -y wget https://www.python.org/ftp/python/3.6.1/Python-3.6.1.tgz tar xf Python-3.* cd Python-3.* ./configure make make altinstall pip3.6 install JPype1-py3 pip3.6 install konlpy cd .. wget https://bitbucket.org/eunjeon/mecab-ko/downloads/mecab-0.996-ko-0.9.2.tar.gz tar zxfv mecab-0.996-ko-0.9.2.tar.gz cd mecab-0.996-ko-0.9.2 ./configure make make install cd .. wget https://bitbucket.org/eunjeon/mecab-ko-dic/downloads/mecab-ko-dic-2.0.1-20150920.tar.gz tar zxfv mecab-ko-dic-2.0.1-20150920.tar.gz cd...

Installing and Using Delphi 10.2 Tokyo Linux PAServer

Delphi has been updated to version 10.2. This is the first installation method for use on CentOS 7. # yum -y update # yum install -y firewalld # systemctl unmask firewalld # systemctl enable firewalld # systemctl start firewalld # firewall-cmd --permanent --add-port=64211/tcp # firewall-cmd --reload # yum group install "Development Tools" # yum install...

PHP Hacking: Risk Code Check Program

This program was created to easily monitor whether malicious PHP has been installed through server hacking and to check for potentially risky code. Upload the following code to your server account. <? /** * Name: Kilho's PHP Diagnosis * Author: Kilho Oh (prince@kilho.net) * Author URI: http://kilho.net/ */ class TDiagnosis { public $dir;public function __construct()...

SSHScript - Simplifying Linux (Web Hosting) Backups

How to Use Run the program. Click the File button, fill out the tasks as shown below and save it. (If you have multiple accounts, just repeat the process.) # Connect to the account to create a backup file. ssh://{username}:{password}@{ip}:{port} # Navigate to the location of the file you want to back up. cd {path}...

A Simple CDN Service Module Made with PHP

To reduce traffic load, I used CloudFlare, but I noticed that the connection at LAX (Los Angeles) was slowing things down significantly. In a hurry, I decided to create a CDN-like service. The server is located in Tokyo (Vultr). The principle is to connect kilho.net/{file} to cdn.kilho.net/{file}, which distributes the traffic of the main hosting....

HTTP Connection Information Logging

This is to check if the connection information is correct for testing when using OpenAPI. Method values, host, POST values upon connection. [PHP] <? $log = $_SERVER['REQUEST_METHOD'].' '.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'].' n'; foreach($_SERVER as $k => $v) { if($k=='HTTP_HOST') continue; if(substr($k, 0,5)!='HTTP_') continue; $log .= '$k: $v'." "; } $log .= " "; $post = array_map('urldecode', explode('&', file_get_contents('php://input')));...

Editing a WordPress Theme

This is a method for editing WordPress themes by modifying backup files (referred to as child themes) without touching the original. To easily identify the child theme in use, create a new folder in the “wp-content/themes” directory by combining the theme names. (For example, if the original theme is “twentyfifteen”, create a folder named “twentyfifteen-child”)...

Changing SSH Port (CentOS)

SSHD Configuration vi /etc/ssh/sshd_config Port {port_number} service sshd restart Firewall Configuration vi /etc/sysconfig/iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport {port} -j ACCEPT service iptables restart * After changing the SSH port, ensure that the firewall is configured to allow traffic on that port.

php.ini File Configuration

Check after server installation short_open_tag = On Enables the use of "<?php" and "<?". display_errors = On Outputs error messages if they occur during PHP script execution. (If set to Off, it will display HTTP 500 Internal Server Error) date.timezone = Asia/Seoul Sets the specified timezone. error_reporting=E_ALL & ~E_NOTICE & ~E_DEPRECATED Ignores notice errors. (*...

WordPress and GnuBoard Integration

This is the method to integrate WordPress with GnuBoard currently used on KilhoNet. I was planning to share the source after stabilizing the site, but due to a request from a GnuBoard user, I hastily put this together. (http://sir.co.kr/bbs/board.php?bo_table=cm_free&wr_id=741180) In the future, I am considering directly loading pages created in WordPress from the head.php and...