리눅스 사용시 권한 속성을 변경 하는 경우 파일과 폴더의 속성을 다르게 설정해야 하는 경우가 생깁니다.
이런 경우 사용 find 명령을 통해서 검색 결과에 명령을 실행하도록 해주면 됩니다.
파일만 권한 속성 변경 하기
find ./ -type f -exec chmod 640 {} \;
폴더만 권한 속성 변경 하기
find ./ -type d -exec chmod 750 {} \;
find ./ -type f -exec chmod 640 {} \;
find ./ -type d -exec chmod 750 {} \;
<Host name="localhost" appBase="/home/user/tomcat/webapps" unpackWARs="true" autoDeploy="false" >
<Context path="/appTest" docBase=“app1" reloadable="true" />
</Host>
<Host name="localhost" appBase="/home/user/tomcat/webapps" unpackWARs="true" autoDeploy="false" deployOnStartup="false">
<Context path="/appTest" docBase=“app1" reloadable="true" />
</Host>
@Scheduled(cron="1 0 0 * * *")
private void SchedulerEndDayOfMonth() {
Calendar cal = Calendar.getInstance();
// 오늘이 월의 마지막 일인지 확인
boolean isLastDay = cal.get(Calendar.DATE) == cal.getActualMaximum(Calendar.DATE);
if(isLastDay) {
// 실행 내용
}
}
var person = {
name : "joe",
age : 30,
tag : "very good man"
}
{{: name}} => joe
{{:"Hi! " +name}} => Hi! joe
{{:age + 10}} => 40
{{:: name == 'peter'}} => false
{{:tag}} => very good man
{{>tag}} => very <b>good</b> man
sudo yum install curl policycoreutils openssh-server openssh-clients
sudo systemctl enable sshd
sudo systemctl start sshd
sudo yum install postfix
sudo systemctl enable postfix
sudo systemctl start postfix
sudo firewall-cmd --permanent --add-service=http
sudo systemctl reload firewalld
curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash
sudo yum install gitlab-ce
sudo gitlab-ctl reconfigure
http://[gitserverIP]
sudo gitlab-ctl start
sudo gitlab-ctl stop
sudo gitlab-ctl restart
- 설치는 /opt/gitlab 에 됩니다.
- 설정 변경시 /etc/gitlab/gitlab.rb 를 수정해 주고
sudo gitlab-ctl reconfigure 해 주시면 됩니다.
visudo -f /etc/sudoersyum list git
yum -y remove git
https://www.kernel.org/pub/software/scm/git
cd /usr/src
wget https://www.kernel.org/pub/software/scm/git/git-2.11.0.tar.gz
yum -y install gettext-devel openssl-devel perl-CPAN perl-devel zlib-devel
yum -y install gcc
tar xvf git-2.11.0.tar.gz
cd git-2.11.0
make configure
./configure --prefix=/usr/local
make install
yum -y install autoconf
yum list git
yum install git
git version
rpm -ql git
git config --global user.name "[Name]"
git config --global user.email "[e-mail]"
git config -l
mkdir gittest
cd gittest
git init
public class Hello {
native void helloFromC(int iValue, String sValue);
static {
System.loadLibrary("chello");
}
static public void main(String argv[]) {
int i = 1;
String s = "testval";
Hello helloWorld = new Hello();
helloWorld.helloFromC(i, s);
}
}
#include "Hello.h"
JNIEXPORT void JNICALL Java_Hello_helloFromC
(JNIEnv * env, jobject jobj, jint ival, jstring sval)
{
const char *name = (*env)->GetStringUTFChars(env, sval, NULL);
printf("Hello from C!\n");
printf("%d ____ %s \n",ival,name);
printf("Hello from C exit\n");
}
$ /usr/local/j2sdk1.4.2_19/bin/java Hello
Exception in thread "main" java.lang.UnsatisfiedLinkError: /home/temp/TT/libchello.so: /home/temp/TT/libchello.so: wrong ELF class: ELFCLASS64
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1511)
at java.lang.Runtime.loadLibrary0(Runtime.java:788)
at java.lang.System.loadLibrary(System.java:834)
at Hello.(Hello.java:4)
#!/bin/bash
set SCRIPT_PATH = '/home/user/util/'
awk -f ${SCRIPT_PATH}disp.awk ${SCRIPT_PATH}proc.prop
# Title processKey
tomcat tomcat
apache httpd
#!/bin/awk
#
# This Program is display WEB status
BEGIN {
# width 66
pFormat = "%12s|%12s|%14s|%10s|%12s|\n";
pStar = "*****************************************************************"
pBar = "-----------------------------------------------------------------";
print "";
print pStar;
print "* Display WEB Applicatin Status *";
print pStar;
printf(pFormat ,"PROCESS", "PID", "START TIME", "COUNT", "STATUS");
print pBar;
}
# ROUTINE
{
#if ( $1 == "#" ) {
if ( $1 ~ /^#/ || $1 == "") {
# print "Skip....";
} else {
cmd = "ps -e -o pid,start,command |grep " $2 " | grep -v grep" ;
#system(cmd) | getline psResult;
count = 0;
while (cmd | getline line) {
# print line;
split (line , res, " ");
if (count == 0 ) {
pid = res[1];
sTime = res[2];
}
count++;
}
close(cmd)
status= " \033[1;31mUNKNOWN\033[0m";
if( count > 0 ) {
status = "ALIVE";
}
printf(pFormat , $1, pid, sTime, count, status);
}
}
END {
print pBar;
print pStar;
print "";
}
*************************************************************
* Display WEB Applicatin Status *
*************************************************************
PROCESS| PID| START TIME| COUNT| STATUS|
-------------------------------------------------------------
tomcat| | | 0| UNKNOWN|
apache| 37| 5:39PM| 113| ALIVE|
-------------------------------------------------------------
*************************************************************