Do Not Think!!!

Posted
Filed under 01010101
ntp 설치
$ sudo apt-get install ntp

ntp 실행
$ sudo service ntp start

처음 시간맞추기
$ sudo service ntp stop
$ sudo ntpd -gq
$ sudo service ntp start
Posted
Filed under 01010101
location /
proxy_pass http://wsbackend;

proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
Posted
Filed under 01010101

Open JDK 8

$ sudo add-apt-repository ppa:openjdk-r/ppa
$ sudo apt-get update
$ sudo apt-get install openjdk-8-jdk


Nginx Latest Stable

$ sudo apt-get install software-properties-common
$ sudo add-apt-repository ppa:nginx/stable
$ sudo apt-get update
$ sudo apt-get install nginx


Gradle Latest Stable

$ sudo add-apt-repository ppa:cwchien/gradle
$ sudo apt-get update
$ sudo apt-get install gradle
Posted
Filed under 01010101

install nginx

$ sudo apt-get install nginx

install mariadb

$ sudo apt-get install software-properties-common
$ sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db
$ sudo add-apt-repository 'deb http://ftp.osuosl.org/pub/mariadb/repo/10.0/ubuntu trusty main'

$ sudo apt-get update
$ sudo apt-get install mariadb-server

install tomcat

$ sudo apt-get install tomcat7
download tomcat8
https://tomcat.apache.org/download-80.cgi

install java

$ sudo add-apt-repository ppa:openjdk-r/ppa
$ sudo apt-get update
$ sudo apt-get install openjdk-8-jdk

configure nginx

$ sudo vi /etc/nginx/sites-enable/example.com
server {
    server_name example.com;
    rewrite ^ http://www.example.com$request_uri? permanent;
}

server {
    server_name *.example.com;

    root /var/lib/tomcat-8/webapps/ROOT/;
    index index.html;

    location / {
        proxy_set_header X-Forwarded-Host $host;
        proxy_set_header X-Forwarded-Server $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_pass http://127.0.0.1:8080/;
    }
}

configure tomcat

...



Posted
Filed under 01010101

Install IDE

Install spring tool suite

https://spring.io/tools/eclipse


Install eclipse + spring tool suite plugin

https://www.eclipse.org/downloads/
http://marketplace.eclipse.org/marketplace-client-intro?mpc_install=1794107


Install Tomcat 7

http://tomcat.apache.org/download-70.cgi


Configure Eclipse

UTF-8
Add Servers

사용자 삽입 이미지
사용자 삽입 이미지


Create Spring Project

Hello Spring

사용자 삽입 이미지
사용자 삽입 이미지


Troubleshooting

1. Tomcat 설치 디렉토리 문제

~/workspace/Servers/ 은 eclipse 가 Servers 설정 파일을 저장하는 경로입니다.
설정파일 경로는 /Servers 부터 시작합니다.
~/workspace/Servers/ 에 Tomcat 을 설치 할 경우, classpath 도 /Servers/ 에서 찾는 문제가 있습니다.
따라서, ~/workspace/Servers/ 이외의 경로에 Tomcat 을 설치해야 합니다.

ex) ~/workspace/Tomcats/apache-tomcat-7.0.57

사용자 삽입 이미지
사용자 삽입 이미지

Posted
Filed under 01010101
On a default installation the cron jobs get logged to
/var/log/syslog

Show cron log
$ grep CRON /var/log/syslog

Monitoring cron log
$ tail -f /var/log/syslog | grep CRON



Posted
Filed under 01010101
Host OS: Mac OS X
Guest OS: Ubuntu Server 14.04
VMware Fusion 7


Mac OS X

VMware CD/DVD connect to
/Applications/VMware Fusion.app/Contents/Library/isoimages/linux.iso

VMware Settings - Sharing - share folder


Ubuntu

$ sudo mkdir /mnt/cdrom
$ sudo mount /dev/cdrom /mnt/cdrom
$ cp /mnt/cdrom/VMwareTools-9.8.3-2075148.tar.gz .
$ tar zxvf VMwareTools-9.8.3-2075148.tar.gz
$ cd vmware-tools-distrib
$ sudo ./vmware-install.pl

reboot

$ sudo mkdir /mnt/hgfs
$ sudo mount -t vmhgfs .host:/sharedfolder /mnt/hgfs



Posted
Filed under 01010101
#!/bin/bash

function start() {
    echo "start Ubuntu on VMware"
    /Applications/VMware\ Fusion.app/Contents/Library/vmrun -T fusion start ~/Documents/Virtual\ Machines/Ubuntu\ 64-bit.vmwarevm/Ubuntu\ 64-bit.vmx nogui
}

function stop() {
    echo "stop Ubuntu on VMware"
    /Applications/VMware\ Fusion.app/Contents/Library/vmrun -T fusion stop ~/Documents/Virtual\ Machines/Ubuntu\ 64-bit.vmwarevm/Ubuntu\ 64-bit.vmx nogui
}


if [ "start" = "$1" ] ;
then
    start
elif [ "stop" = "$1" ] ;
then
    stop
else
    echo "usage: $0 { start | stop }"
    exit
fi