Posted
Filed under centos7
yum install vsftpd

vi /etc/vsftpd/vsftpd.conf


[root@www ~]#
yum -y install vsftpd
[root@www ~]#
vi /etc/vsftpd/vsftpd.conf

# line 12: no anonymous
anonymous_enable=NO
# line 82,83: uncomment ( allow ascii mode )

ascii_upload_enable=YES
ascii_download_enable=YES
# line 100, 101: uncomment ( enable chroot )

chroot_local_user=YES
chroot_list_enable=YES
# line 103: uncomment ( specify chroot list )

chroot_list_file=/etc/vsftpd/chroot_list
# line 109: uncomment

ls_recurse_enable=YES
# line 114: change ( if use IPv4 )

listen=
YES
# line 123: change ( turn to OFF if it's not need )

listen_ipv6=
NO
# add follows to the end

# specify root directory ( if don't specify, users' home directory become FTP home directory)

local_root=public_html
# use localtime

use_localtime=YES
# turn off for seccomp filter ( if you cannot login, add this line )

seccomp_sandbox=NO
[root@www ~]#
vi /etc/vsftpd/chroot_list
# add users you allow to move over their home directory

cent



2015/05/07 22:23 2015/05/07 22:23
Posted
Filed under centos7

방화벽 추가

firewall-cmd --permanent --zone=public --add-port=80/tcp

firewall-cmd --permanent --zone=public --add-port=8080/tcp

 firewall-cmd --permanent --zone=public --add-port=21/tcp

방화벽 확인

cat /etc/firewalld/zones/public.xml

 

방화벽 재시작

systemctl restart firewalld

2015/05/07 22:05 2015/05/07 22:05
Posted
Filed under JSP, JAVA
create file from /usr/local/tomcat/bin/setenv.sh
chmod 707 setenv.sh

export JAVA_OPTS="-Dfile.encoding=UTF-8 -Xms128m -Xmx1024m -XX:PermSize=64m -XX:MaxPermSize=512m"

java out of memeory  문제 해결 방법

2015/04/24 15:51 2015/04/24 15:51
Posted
Filed under Linux
00 09 * * * root rdate -s time.bora.net && /sbin/clock -w
2015/04/15 10:25 2015/04/15 10:25
Posted
Filed under Linux

[원문]http://openwiki.kr/tech/sulinux#rewrite_module_활성화

Rewrite module 활성화

* 일단 모듈이 올라가있는지 확인..(phpinfo) * /usr/local/apache/conf/httpd.conf 수정

# rewriteEngine On
<IfModule mod_rewrite.c>
rewriteEngine On
</IfModule>

* 다음을 찾아서 AllowOverride All로 수정

<Directory />
    Options FollowSymLinks
    AllowOverride All
    Order deny,allow
    #Deny from all
</Directory>
2015/04/14 09:12 2015/04/14 09:12
Posted
Filed under Htm&Javascript

delimiter $$
create trigger update_check BEFORE UPDATE on tb_list FOR EACH ROW
BEGIN
 
 IF NEW.tname <> OLD.tname THEN
           SET NEW.tname = OLD.tname;
 END IF;
END$$

delimiter ;

2015/03/31 23:08 2015/03/31 23:08
Posted
Filed under Htm&Javascript

[원문]http://stackoverflow.com/questions/1649086/detect-rotation-of-android-phone-in-the-browser-with-javascript
[설명] 크롬 <-- 안드로이드 에서 모바일 환경에서 핸드폰 회전할 때  width 값을  구할 수 있는 스크립트


var isMobile = {
    Android: function() {
        return /Android/i.test(navigator.userAgent);
    },
    iOS: function() {
        return /iPhone|iPad|iPod/i.test(navigator.userAgent);
    }
};
if(isMobile.Android())
    {
        var previousWidth=$(window).width();
        $(window).on({
        resize: function(e) {
        var YourFunction=(function(){

            var screenWidth=$(window).width();
            if(previousWidth!=screenWidth)
            {
                previousWidth=screenWidth;
                alert("oreientation changed");
            }

        })();

        }
    });

    }
    else//mainly for ios
    {
        $(window).on({
            orientationchange: function(e) {
               alert("orientation changed");
            }  
        });
    }

2015/03/26 10:11 2015/03/26 10:11
Posted
Filed under Mysql

1. MySQL Replication 환경에서 지우기

  - MySQL Replication MASTER 서버
    shell> mysql -u root -p
    mysql> RESET MASTER;

  - MySQL Replication SLAVE 서버
    shell> mysql -u root -p
    mysql> RESET MASTER;

2. MySQL Binary Log sequence number 또는 특정 일자로 지우기

  shell> mysql -u root -p
  mysql> PURGE BINARY LOGS TO 'mysql-bin.000015';
  shell> mysql -u root -p
  mysql> PURGE BINARY LOGS BEFORE '2009-05-01 00:00:00';

3. mysqladmin flush-logs 명령어를 통해서 MySQL Binary Log 지우기

   shell> mysqladmin -u root -p flush-logs

4. MySQL Binary Log 생성을 방지하는 방법

  /etc/my.cnf 파일에서 아래 라인을 주석 처리
  log-bin

5. MySQL Binary Log 를 특정 1주일까지만 생성 및 보관하기
  /etc/my.cnf 파일에서 아래 라인을 추가
  expire_logs_days = 7

[원문] http://faq.hostway.co.kr/Linux_DB/1307

 

2015/03/12 09:05 2015/03/12 09:05
Posted
Filed under Linux
SSL 인증서 발급 절차
 
1. 서버에서 인증서 CSR 발급
 1) openssl genrsa -des3 -out www.abc.co.kr.key 2048
 2) openssl rsa -noout -text -in www.abc.co.kr.key
 3) openssl req -new -days 365 -key www.abc.co.kr.key -out www.abc.co.kr.csr
 * CN 값은 도메인명 입력
 4) openssl req -noout -text -in www.abc.co.kr.csr
 
2. PC로 CSR 다운로드
 
3. 신청 사이트에서 SSL 발급 신청
 
4. 인증서 발급 받은 후 key 파일과 함게 제공
2015/02/25 15:50 2015/02/25 15:50