OSX .DS_Store 파일 삭제

Mac 2022. 4. 13. 07:57

현재 위치 아래에 있는 모든 .DS_Store 파일 삭제

 

$ sudo find ./ -name ".DS_Store" -depth -exec rm {} \;

Password:

 

 

 

블로그 이미지

엘로드넷

,

OSX SVN Server 세팅

Mac 2022. 4. 12. 08:32

맥에서 SVN 서버 구축은 리눅스와 같다.

 

1. svn 저장소로 만들 디렉토리를 만든다.

$ mkdir /home2/svn

디렉토리 위치는 자신의 상황에 맞게.

 

 

2. 프로젝트를 만든다.

$ svnadmin create /home2/svn/프로젝트명

$ svnadmin /home2/svn/egov

 

egov 프로젝트 폴더가 생성이 되고 svn 관련 폴더와 파일들이 생성이 된다.

 

 

3. 해당 프로젝트에 접근할 SVN사용자를 만든다.

$ cd /home2/svn/프로젝트명/conf/

$ cd /home2/svn/egov/conf

 

passwd 파일을 열어서 새로운 사용자 아이디와 비밀번호를 추가한다.

 

아이디 = 비밀번호 

 

와 같은 방식으로 추가한다.

 

$ vi passwd

### This file is an example password file for svnserve.
### Its format is similar to that of svnserve.conf. As shown in the
### example below it contains one section labelled [users].
### The name and password for each user follow, one account per line.

[users]
# harry = harryssecret
# sally = sallyssecret
사용자 아이디 = 사용자 비밀번호

 

 

 

4. 환경설정 파일을 수정한다.

$ vi svnserve.conf

 

19, 20, 27 행을 수정한다.

 

아래와 같이 되어 있는 것을

19 # anon-access = read 또는 none

20 # auth-access = write

 

27 # password-db = passwd

 

 

다음과 같이 변경한다.(#과 공백을 제거함)

19 anon-access = none

20 auth-access = write

 

27 password-db = passwd

 

  1 ### This file controls the configuration of the svnserve daemon, if you
  2 ### use it to allow access to this repository.  (If you only allow
  3 ### access through http: and/or file: URLs, then this file is
  4 ### irrelevant.)
  5 
  6 ### Visit http://subversion.apache.org/ for more information.
  7 
  8 [general]
  9 ### The anon-access and auth-access options control access to the
 10 ### repository for unauthenticated (a.k.a. anonymous) users and
 11 ### authenticated users, respectively.
 12 ### Valid values are "write", "read", and "none".
 13 ### Setting the value to "none" prohibits both reading and writing;
 14 ### "read" allows read-only access, and "write" allows complete
 15 ### read/write access to the repository.
 16 ### The sample settings below are the defaults and specify that anonymous
 17 ### users have read-only access to the repository, while authenticated
 18 ### users have read and write access to the repository.
 19 anon-access = read
 20 auth-access = write
 21 ### The password-db option controls the location of the password
 22 ### database file.  Unless you specify a path starting with a /,
 23 ### the file's location is relative to the directory containing
 24 ### this configuration file.
 25 ### If SASL is enabled (see below), this file will NOT be used.
 26 ### Uncomment the line below to use the default password file.
 27 password-db = passwd
 28 ### The authz-db option controls the location of the authorization
 29 ### rules for path-based access control.  Unless you specify a path
 30 ### starting with a /, the file's location is relative to the
 31 ### directory containing this file.  The specified path may be a
 32 ### repository relative URL (^/) or an absolute file:// URL to a text
 33 ### file in a Subversion repository.  If you don't specify an authz-db,
 34 ### no path-based access control is done.
 35 ### Uncomment the line below to use the default authorization file.

 

 

 

5. snv 서버를 실행한다.

$ svnserve -d -r /home2/svn

 

$ svnserve -d -r /home2/svn
svnserve: E000048: Can't bind server socket: Address already in use

 

svn이 동작중이라면 이미 사용중이라는 메시지가 뜰 수 있다.

 

 

끝.

 

블로그 이미지

엘로드넷

,

개발자 중에 영포자들이 많아서 그런지 틀리게 발음하는 것들이 많음.

 

표준말 사용하는 사람들에게 사투리가 바로 표시가 나듯

정확한 발음을 알고 있는 사람들에게는 틀린 발음이 거슬림.

 

애매한 것은 사전을 찾아보는 습관을 들이자.

 

 

* 대표적으로 틀리게 발음하는 것들

단어 틀린발음 올바른 발음
disable 디저블 디스에이블
width 와이드th 위드th
height 헤이트 하이트
ajax 아작스, 에이작스 에이잭스

 

 

 

블로그 이미지

엘로드넷

,

1. 키파일생성

[root@localhost ellord]# keytool -genkey -alias tomcat -keyalg RSA -validity 3650 -keystore tomcat.keystore
Enter keystore password:  

비밀번호를 두 번 입력한 후 추가 정보를 입력한다.

 

사설인증서이므로 국가코드 외에는 임의의 정보로 입력한다.

What is your first and last name?
  [Unknown]:   Yang
What is the name of your organizational unit?
  [Unknown]:  Devel
What is the name of your organization?
  [Unknown]:  EL
What is the name of your City or Locality?
  [Unknown]:  SE
What is the name of your State or Province?
  [Unknown]:  SE
What is the two-letter country code for this unit?
  [Unknown]:  KR
Is CN=Yang, OU=Devel, O=EL, L=SE, ST=SE, C=KR correct?
  [no]:  y

Enter key password for <tomcat>
	(RETURN if same as keystore password):  

 

키파일 생성시 만들었던 비밀번호를 두 번 입력하면 완료된다.

 

현재 폴더에 tomcat.keystore 라는 파일이 만들어졌다.

다음과 같이 만들어져 있다.

[root@localhost ellord]# pwd tomcat.keystore
/home/ellord
[root@localhost ellord]# 

 

 

 

 

2. 톰캣에 적용

 

톰캣/conf/server.xml 파일을 연다.

    <!--
    <Connector port="8443" protocol="org.apache.coyote.http11.Http11Protocol"
               maxThreads="150" SSLEnabled="true" scheme="https" secure="true"
               clientAuth="false" sslProtocol="TLS" />
    -->

 

위와 같이 주석으로 처리된 부분을 찾아 주석을 풀고 끝부분에 아래 항목을 추가한다.

    <Connector port="8443" protocol="org.apache.coyote.http11.Http11Protocol"
               maxThreads="150" SSLEnabled="true" scheme="https" secure="true"
               clientAuth="false" sslProtocol="TLS" keystoreFile="/home/ellord/tomcat.keystore" keystorePass="비밀번호"/>

 

비밀번호는 키파일 생성시 만든 비밀번호를 입력한다.

 

 

 

3. 이클립스에서 확인해 본다.

SSL 포트로 8443이 할당되었고, 서버가 시작되었다.

 

 

 

 

 

4. 브라우저에서 확인해 본다.

 

 

된다.

 

'JSP' 카테고리의 다른 글

jsp 형변환  (0) 2015.04.23
JSP 이미지 크기 측정  (0) 2015.04.18
JSP htmlspecialchars  (0) 2015.04.18
JSP 확장자 구하기  (0) 2015.04.18
블로그 이미지

엘로드넷

,
<body>
  <div id="parent">
    <div id="childRightCol">
      /*Content*/
    </div>
    <div id="childLeftCol">
      /*Content*/
    </div>
  </div>
</body>

 

$("#parent").css("overflow", "auto");

 

 

또는

 

$("#parent").css("display", "table");

$("#childRightCol").css("display", "table-row");

$("#childLeftCol").css("display", "table-row");

'퍼블리싱' 카테고리의 다른 글

IE 문서모드  (0) 2015.04.17
블로그 이미지

엘로드넷

,

한번의 쿼리로는 불가능함.

 

삭제쿼리문을 만든 다음 일괄 수행한다.

 

1. 삭제쿼리 만들기

SQLDeveloper 와 같은 툴을 사용하여 자신의 계정으로 로그온한다.

 

아래 쿼리문을 수행한다.

SELECT 'DROP TABLE "' || TABLE_NAME || '" CASCADE CONSTRAINTS;' FROM user_tables;


2. 1번의 쿼리문 결과를 모두 복사하여, 다시 쿼리를 수행한다.

 

 

끝.

블로그 이미지

엘로드넷

,

1. pom.xml

 

아래 기존 jackson 1.x 버전은

<dependency>

<groupId>org.codehaus.jackson</groupId>

<artifactId>jackson-mapper-asl</artifactId>

<version>1.9.2</version>

</dependency>

보안이슈가 있으므로 스프링 4.x 부터   jackson 2.x 로 변경해줌.

 

		<dependency>
		       <groupId>com.fasterxml.jackson.core</groupId>
		      <artifactId>jackson-core</artifactId>
		      <version>2.9.10</version>
		</dependency>
		<dependency>
		  <groupId>com.fasterxml.jackson.core</groupId>
		  <artifactId>jackson-databind</artifactId>
		  <version>2.9.10</version>
		</dependency>
		<dependency>
		    <groupId>com.fasterxml.jackson.core</groupId>
		    <artifactId>jackson-annotations</artifactId>
		    <version>2.9.10</version>
		</dependency>

 

 

2. WEB-INF/config/egovframework/springmvc/egov-com-servlet.xml

 

기존 : 

	<bean class="org.springframework.web.servlet.view.BeanNameViewResolver" p:order="0"/>

	<bean class="org.springframework.web.servlet.view.UrlBasedViewResolver" p:order="1" 
    p:prefix="/WEB-INF/jsp/" 
    p:suffix=".jsp" 
    p:viewClass="org.springframework.web.servlet.view.JstlView"/>

 

 

변경 : jsonView 추가 및 order 순서 변경

 

    
	<bean id="jsonView" class="org.springframework.web.servlet.view.json.MappingJackson2JsonView">
	
		<property name="contentType" value="application/json;charset=UTF-8" />

	</bean>
   
    <bean class="org.springframework.web.servlet.view.BeanNameViewResolver">
		<property name="order" value="1">
	</property></bean>
	

    <!-- 화면처리용 JSP 파일명의  prefix, suffix 처리에 대한 mvc 설정  -->
    <bean class="org.springframework.web.servlet.view.UrlBasedViewResolver" p:order="2"
	    p:viewClass="org.springframework.web.servlet.view.JstlView"
	    p:prefix="/WEB-INF/jsp/" p:suffix=".jsp"/>
    		

 

3. Controller

 

ModelAndView 형태의 메소드 사용

@RequestMapping(value="/test.do", method=RequestMethod.POST)
	public ModelAndView testList(
			@RequestParam(value="test", required=false) final String test,
            @ModelAttribute("TestVO") TestVO testVO, 
			HttpServletRequest request, HttpServletResponse response, ModelMap model) throws Exception {
				
		
				
		//검색 목록
		List<TestVO> result = testService.testList(testVO);
		
		int resultCnt = testService.testListCnt(testVO);
		

		ModelAndView mav = new ModelAndView("jsonView");
		mav.addObject("resultList", result);		//목록리스트
		mav.addObject("resultCnt", resultCnt);		//목록 수
		mav.addObject("testVO", testVO);	//해당 VO

		
		return mav;
		
		
	}

 

블로그 이미지

엘로드넷

,

리눅스 swapfile 추가

Linux 2020. 9. 1. 18:52

스왑파티션 확인

 

[root@localhost /]# swapon -s
Filename				Type		Size	Used	Priority
/dev/dm-1                              	partition	16318460	0	-2

 

스왑파일을 추가로 만든다.

 

[root@localhost /]# fallocate -l 1GB /swapfile

swapon: /swapfile: read swap header failed: Invalid argument 와 같은 에러 방지를 위해 다음과 같이 해준다.

 

[root@localhost /]# sudo dd if=/dev/zero of=/swapfile count=1024 bs=1MiB

 

스왑파일 퍼미션 변경

[root@localhost /]# chmod 600 /swapfile

 

스왑파일로 변경

[root@localhost /]# mkswap /swapfile 
Setting up swapspace version 1, size = 1048572 KiB
no label, UUID=ed717676-8540-48c3-8034-94d0dea8e5b5

 

스왑파일 적용

[root@localhost /]# swapon /swapfile

 

스왑메모리 확인

[root@localhost /]# swapon -s
Filename				Type		Size	Used	Priority
/dev/dm-1                              	partition	16318460	0	-2
/swapfile                              	file	1048572	0	-3
[root@localhost /]# 

/swapfile 이 추가되어 있다.

 

 

부팅시 적용

[root@localhost /]# vi /etc/fstab

 

하단에 아래 항목 추가

/swapfile swap swap defaults 0 0


#
# /etc/fstab
# Created by anaconda on Mon Aug 31 16:53:23 2020
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/centos-root /                       xfs     defaults        0 0
UUID=7d8e34c6-1c5e-43ed-9bb2-296a8e3be09a /boot                   xfs     defaults        0 0
UUID=C6F0-811D          /boot/efi               vfat    umask=0077,shortname=winnt 0 0
/dev/mapper/centos-home /home                   xfs     defaults        0 0
/dev/mapper/centos-swap swap                    swap    defaults        0 0
/swapfile		swap			swap	defaults	0 0

 

스왑을 적용한다.

[root@localhost /]# swapon -a

 

 

블로그 이미지

엘로드넷

,

osx 에서 리눅스 터미널 접속시 아래와 같은 에러가 날때.

 

ellord@192.168.0.10's password: 
Last login: Tue Sep  1 17:24:58 2020 from 192.168.0.1
-bash: warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory

 

맥의 ssh config를 아래와 같이 변경한다.

 

ellords-Mac-mini:~ ellord$ sudo vi /etc/ssh/ssh_config
ellords-Mac-mini:~ ellord$ Password:

 

SendEnv LANG LC_* 부분을 찾아서 아래와 같이 주석 처리해 준다.

Host *
        SendEnv LANG LC_*

이부분을 아래처럼

Host *
#        SendEnv LANG LC_*

저장하고 빠져나온다.

 

끝.

'Mac' 카테고리의 다른 글

OSX .DS_Store 파일 삭제  (0) 2022.04.13
OSX SVN Server 세팅  (0) 2022.04.12
osx mojave php 7.3 upgrade  (0) 2019.03.02
원격 타임머신으로 복구하기  (0) 2019.01.08
원격 타임머신 백업 두번째  (0) 2019.01.08
블로그 이미지

엘로드넷

,

1. 오라클 사이트에서 다운로드

 

http://www.oracle.com/java/technologies/javase7-archive-downloads.html 

 

jdk-7u80-linux-x64.tar.gz 를 다운받는다.

 

 

2. 서버에 업로드

 

3. 압축을 푼다.

 

[root@localhost ellord]# tar xvfz jdk-7u80-linux-x64.tar.gz 

 

 

4. 압축이 풀린 폴더를 /usr/local 로 이동시켜 준다.

 

[root@localhost ellord]# mv jdk1.7.0_80/ /usr/local/

 

5. 심볼릭 링크를 만든다. java여러 버전을 관리하기 위해서.

 

[root@localhost local]# ln -s jdk1.7.0_80/ ./java

아래와 같이 java 심볼릭 링크가 생성되었다.

 

[root@localhost local]# ll
total 0
drwxr-xr-x. 2 root root   6 Apr 11  2018 bin
drwxr-xr-x. 2 root root   6 Apr 11  2018 etc
drwxr-xr-x. 2 root root   6 Apr 11  2018 games
drwxr-xr-x. 2 root root   6 Apr 11  2018 include
lrwxrwxrwx. 1 root root  12 Sep  1 15:48 java -> jdk1.7.0_80/
drwxr-xr-x. 8   10  143 233 Apr 11  2015 jdk1.7.0_80
drwxr-xr-x. 2 root root   6 Apr 11  2018 lib
drwxr-xr-x. 2 root root   6 Apr 11  2018 lib64
drwxr-xr-x. 2 root root   6 Apr 11  2018 libexec
drwxr-xr-x. 2 root root   6 Apr 11  2018 sbin
drwxr-xr-x. 5 root root  49 Aug 31 16:53 share
drwxr-xr-x. 2 root root   6 Apr 11  2018 src
[root@localhost local]# 

 

6. 현재 자바 버전을 확인해 본다.

 

[root@localhost local]# java -version
openjdk version "1.8.0_242"
OpenJDK Runtime Environment (build 1.8.0_242-b08)
OpenJDK 64-Bit Server VM (build 25.242-b08, mixed mode)
[root@localhost local]# 

openjdk 1.8이 설치되어 있다.

 

방금 설치한 jdk1.7로 변경하려고 한다.

 

7. alternatives 심볼릭 링크 생성

[root@localhost local]# alternatives --install /usr/bin/java java /usr/local/java/bin/java 2
[root@localhost local]# alternatives --install /usr/bin/java javac /usr/local/java/bin/javac 2
[root@localhost local]# alternatives --install /usr/bin/java javaws /usr/local/java/bin/javaws 2
[root@localhost local]# 
[root@localhost local]# alternatives --set java /usr/local/java/bin/java
[root@localhost local]# alternatives --set javac /usr/local/java/bin/javac
[root@localhost local]# alternatives --set javaws /usr/local/java/bin/javaws
[root@localhost local]# 

 

8. 심볼릭 링크 확인

[root@localhost local]# alternatives --config java

There are 2 programs which provide 'java'.

  Selection    Command
-----------------------------------------------
*  1           java-1.8.0-openjdk.x86_64 (/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.242.b08-1.el7.x86_64/jre/bin/java)
 + 2           /usr/local/java/bin/java

Enter to keep the current selection[+], or type selection number: 2

2번에 등록된 것 확인할 수 있다. 

2를 입력하고 엔터.

 

확인해 본다.

[root@localhost local]# java -version
java version "1.7.0_80"
Java(TM) SE Runtime Environment (build 1.7.0_80-b15)
Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode)
[root@localhost local]# 

변경이 잘 되었다.

 

 

 

 

 

 

 

 

 

 

 

 

 

블로그 이미지

엘로드넷

,