Want to Pay Off Debt? 45 Honest Ways to Make Extra Money Online


Sent from my iPhone

How to Install Multiple Bootable Operating Systems on One USB Stick

I saw this and thought of you! https://www.makeuseof.com/tag/how-to-install-multiple-bootable-operating-systems-on-one-usb-stick/

Sent from my iPhone


NGINX with openssl

openssl req -new -x509 -days 365 -key certs/ca.key -out certs/ca.crt -subj "/C=DE/ST=Korea/L=Seoul/O=steve group/OU=stevebooks/CN=stevebooks_CA"

openssl req -new -key certs/server.key -out certs/server.csr -subj "/C=DE/ST=Korea/L=Seoul/O=steve group/OU=stevebooks/CN=server_proxy"

openssl req -new -key certs/client.key -out certs/client.csr -subj "/C=DE/ST=Korea/L=Seoul/O=steve group/OU=stevebooks/CN=server_proxy"

echo 'create certs dir'
mkdir -p certs

echo 'Create the CA Key and Certificate for signing Client Certs'
openssl genrsa -out certs/ca.key 4096
openssl req -new -x509 -days 365 -key certs/ca.key -out certs/ca.crt -subj "/C=DE/ST=Nordrhein-Westfalen/L=Duesseldorf/O=test group/OU=testcomapny/CN=localhostCA"

echo 'Create the Server Key, CSR, and Certificate'
openssl genrsa -out certs/server.key 1024
openssl req -new -key certs/server.key -out certs/server.csr -subj "/C=DE/ST=Nordrhein-Westfalen/L=Duesseldorf/O=test group/OU=testcomapny/CN=server_proxy"

echo 'Were self signing our own server cert here. This is a no-no in production'
openssl x509 -req -days 365 -in certs/server.csr -CA certs/ca.crt -CAkey certs/ca.key -set_serial 01 -out certs/server.crt

echo 'Create the Client Key and CSR'
openssl genrsa -out certs/client.key 1024
openssl req -new -key certs/client.key -out certs/client.csr -subj "/C=DE/ST=Nordrhein-Westfalen/L=Duesseldorf/O=test group/OU=testcomapny/CN=server_proxy"

echo 'Sign the client certificate with our CA cert.  Unlike signing our own server cert, this is what we want to do.'
# Serial should be different from the server one, otherwise curl will return NSS error -8054
openssl x509 -req -days 365 -in certs/client.csr -CA certs/ca.crt -CAkey certs/ca.key -set_serial 02 -out certs/client.crt

echo 'Verify Server Certificate'
openssl verify -purpose sslserver -CAfile certs/ca.crt certs/server.crt

echo 'Verify Client Certificate'
openssl verify -purpose sslclient -CAfile certs/ca.crt certs/client.crt

echo 'create certs dir in server-proxy'
rm -R server-proxy/nginx/certs/
mkdir -p server-proxy/nginx/certs/

echo 'copy certs server-proxy dir'
cp certs/ca.crt server-proxy/nginx/certs/
cp certs/server.crt server-proxy/nginx/certs/
cp certs/server.key server-proxy/nginx/certs/

echo 'create certs dir in client-proxy'
rm -R client-proxy/nginx/certs/
mkdir -p client-proxy/nginx/certs/

echo 'copy certs client-proxy dir'
cp certs/ca.crt client-proxy/nginx/certs/
cp certs/client.crt client-proxy/nginx/certs/
cp certs/client.key client-proxy/nginx/certs/


[AWS] EC2처럼 SSH 사용하기 및 패스워드 인증 방식으로 로그인

AWS EC2처럼 SSH 사용하기

[AWS] EC2 Instance에 key-pair 없이 로그인 하기(Ubuntu)

1. root 패스워드 설정
sudo passwd root

2. ssh 패스워드 방식으로 접근 허용
vi /etc/ssh/sshd_config
PasswordAuthentication yes

LoginGraceTime 2m (120)
PermitRootLogin forced-commands-only <= centos 일 경우
PermitRootLogin prohibit-password  <= ubuntu 일 경우
StrictModes yes

=> 인증서도 같이 사용하기 위해서
RSAAuthentication yes
PubkeyAuthentication yes
# AuthorizedKeysFile .ssh/authorized_keys <= 주석처리 해줌.

3. 유저(ec2-user, ubuntu)의 인증서를 root의 .ssh로 복사
sudo cp /home/ubuntu/.ssh/authorized_keys /root/.ssh/
sudo cp /home/ec2-user/.ssh/authorized_keys /root/.ssh/

4. 필요하면 문구 추가해줌.
=> After that make sure the "/root/.ssh/authorized_keys" file should start with ssh-rsa content
no-port-forwarding,no-agent-forwarding,no-X11-forwarding,command="echo 'Please login as the user \"ubuntu\" rather than the user \"root\".';echo;sleep 10"

5. ssh restart
sudo service ssh restart


AWS Nginx PHP7.0-FPM MariaDB


PHP install:
sudo apt-get install php-fpm php-mysql

PHP module install:
apt-get install php7.0-gd php7.0-curl php7.0-mbstring php7.0-xml php7.0-mcrypt


MariaDB 완전 삭제
sudo apt-get purge mariadb-server
sudo apt-get purge mariadb-common

sudo rm -rf /var/log/mysql
sudo rm -rf /var/log/mysql.*
sudo rm -rf /var/lib/mysql
sudo rm -rf /etc/mysql

MariaDB 설치하기
sudo apt install mariadb-server mariadb-client php7.0-mysql
sudo systemctl restart php7.0-fpm.service

Security Script 실행하기
sudo mysql_secure_installation

sudo 없이 mysql 실행하기
sudo mysql -u root -p
MariaDB> use mysql;
MariaDB> update user set plugin=’‘ where User=’root’;
MariaDB> flush privileges;
MariaDB> exit

How To Install Nginx, MariaDB 10, PHP 7 (LEMP Stack) in 16.10/16.04:

How to install Mysql/MariaDB on Ubuntu

Wordpress Database 생성:

Prepare to install Nginx:

1. download
wget http://nginx.org/download/nginx-1.12.2.tar.gz

apt-get install gcc ; for gcc compile
apt-get install g++ ; for cpp compile

$ wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.41.tar.gz
$ tar -zxf pcre-8.41.tar.gz
$ cd pcre-8.41
$ ./configure
$ make
$ sudo make install

$ wget http://zlib.net/zlib-1.2.11.tar.gz
$ tar -zxf zlib-1.2.11.tar.gz
$ cd zlib-1.2.11
$ ./configure
$ make
$ sudo make install

$ wget http://www.openssl.org/source/openssl-1.0.2k.tar.gz
$ tar -zxf openssl-1.0.2k.tar.gz
$ cd openssl-1.0.2k
$ ./configure --prefix=/usr/local --openssldir=/usr/local/openssl
$ make
$ sudo make install

Nginx configuration:
./configure \
--sbin-path=/usr/local/nginx/nginx \
--conf-path=/usr/local/nginx/nginx.conf \
--pid-path=/usr/local/nginx/nginx.pid \
--with-pcre=../pcre-8.41 \
--with-zlib=../zlib-1.2.11 \
--with-http_ssl_module \
--with-stream \
--with-mail=dynamic \

Ubuntu 버전체크
cat /etc/issue
lsb_release -a

메모리 체크
free -m

CPU 코어수 확인
cat /proc/cpuinfo | grep processor | wc -l

Timezone 설정
dpkg-reconfiure tzdata

Public IP check site
curl bot.whatismyipaddress.com
curl http://ipecho.net/plain
curl icanhazip.com
curl ipv4.icanhazip.com
curl ipv4.ipogre.com



Daniel's Presentation at the 19th of February, 2018

Hello everyone!

Today I want to tell you about my dreams and plans for the future. I would like to be a beekeeper in the future, and I would like to breed lots bees. My favorite subject is English, though I don't hate Math and Computer. I don't like using the computer, I like using iPad to play games and watch YouTube.
I hope to get married someday. I hope that I will be good husband and good father. I like working with people, and I also want to be famous. I would like to visit a different country like Canada, and I want to meet many people in Canada.
I am very excited about my future because I want to do so much!

Thank you for listening!