Showing posts with label mysql. Show all posts
Showing posts with label mysql. Show all posts

Wednesday, July 26, 2017

20분만에 웹서버 올리기 Make your own web server online in 20-minute

구글에서 구글 클라우드 컴퓨팅을 런칭하였고, 현재 1년간 쓸수 있는 $300 크레딧 행사 중 입니다.
Google now offer Google Cloud Computing with $300 credit that can be used for 12-month as of July 2017.

구글 클라우드의 컴퓨트 엔진을 이용해 아주 간단하게 가상 서버를 만들어 인터넷에 올릴 수 있습니다.
Using Compute Engine from GCC, we can easily up and running web server very quickly.

먼저 GCC에 가입을 합니다.
First join GCC

TRY IT FREE를 누릅니다.
Click TRY IT FREE of course.

구글 아이디로 로그인 합니다. 
Login with Google Account

약관을 읽어보시고 기본 조건에 동의합니다. 약관 읽는 시간은 20분에서 제외합시다.
Check out Terms of Service. Let's not take reading Terms of Service from 20-minute countdown.

$300 크레딧을 받기 위해 신용카드 정보를 넣습니다. 구글은 $300 크레딧을 다 쓴 다음에 신용카드에서 차감 하기 전 고객의 동의를 얻겠다고 하였습니다. 네이버와는 다른 자세입니다. 귀찮은 정보 입력을 피하기 위해 Individual로 진행합니다.
Put credit card information, Google assured that they wouldn't charge you any money unless they get your confirmation again once $300 credit spent. Let's join as an individual to avoid extra setting
신용카드 정보를 입력하면 이제 준비가 다 되었습니다.
After input credit card information, now we are good to go.



좌상단의 Select a project를 누릅니다.
Click "Select a project" on upper left
 

OPEN을 누릅니다.
Press OPEN, if it's not open promptly, try press "getting started


만약 프로젝트가 열리지 않으면 구글앱스 계정으로 접속하였을 수 있다. 이때는 구글 앱스 관리자 화면에서 아래의 내용을 허용해 준다.
If the project is not opening and you get notification of error, you may logged in as Google Apps account. Go to Google Apps admin page as an Google Apps administrator and allow Google Development Console to the account (or for everyone)

프로젝트가 제대로 로드되지 않았다면 프로젝트를 새로 만든다.
You can also try create a new project

축하합니다. 이제 본론으로 들어갈 수 있습니다. Compute Engine dashboard를 클릭합니다.
Congratulation! now we can talk real stuff. Click Compute Engine dashboard

Create를 눌러서 바로 시작해 보자
Click create and let's get to it right now

이름과 위치, CPU 성능, OS를 정한다. 무엇이든지 필요에 따라 나중에 바꿀수 있으니 가볍게 시작해 보자. 지역에 따라서 가격이 조금 틀리다.
Set name of the server, CPU performance with memory, OS boot disk and region. All can be changed later. So let's begin lightly. Pricing would be little differ region to region.

파이어월에서 http와 https를 허용하게 하고 추가 설정 버튼을 누른다.
Let firewall allow http and https get in. Click Management, disks, networking SSH keys
네트워크 탭에서 펜 그림을 누른다.
Click Pen icon on Network tab
고정 아이피를 하나 만든다. 지역당 하나밖에 못 받을 것 이다.
Get a static IP. You would get only one at a region.


거의 끝났다. Create를 누르자. 원이 다 돌면 준비가 된 것이다.
Almost done. Click Create. When the circle stop turning, it's ready



이제 접속해 보자. SSH를 누르면 쉘로 접속할 수 있다.
Let's  login. Press SSH, you can login as shell










sudo도 되니 이제 Apache, Maria DB, PHP 를 설치하자.
we can sudo already, let's install Apache, Maria DB(or MySQL), PHP.

sudo apt-get update
sudo apt install -y mariadb-client mariadb-server
sudo apt install -y php7.0 php7.0-mysql
sudo apt install -y phpmyadmin

PHPMyAdmin 셋팅 화면이 나온다. apache2를 선택하고 dbconfig를 묻는 화면에서 yes를 누른다.
Here comes PHPMyAdmin setup screen Choose apache2, Choose yes to dbconfig

phpmyadmin에 쓰일 암호를 입력하고 재 확인 한다.
Set password for phpmyadmin and confirm

이제 phpmyadmin에 DB권한을 준다.
Now, give DB privileges to phpmyadmin

sudo mysql

grant all privileges on *.* to 'phpmyadmin'@'localhost';
flush privileges;
exit

이제 거의 다 되었다. phpmyadmin 설정을 복사하고 아파치를 재 시작하고 확인해 보자.
Almost done. Copy phpmyadmin configuration file to Apache configuration directory and restart apache

sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf-enabled/phpmyadmin.conf
sudo service apache2 restart







이것으로 20분만에 LAMP 웹 서버를 인터넷에 올릴 수 있었습니다. 행운을 빕니다!
So now we have fully working LAMP server on internet in 20-minute. Von voyage!

Friday, April 15, 2011

D:\tmp\mysql-connector-odbc-noinstall-5.1.8-win32 modified Install.bat for Windows 7 / Vista 32-bit ODBC driver install


@ECHO OFF
REM #########################################################
REM
REM \brief Install myodbc.
REM
REM This exists for those working with the Windows source
REM distribution.
REM
REM Use this to copy the driver and supporting files
REM to the system directory and register the driver.
REM
REM \sa README.win
REM
REM #########################################################

SET installdir=none
IF EXIST %windir%\system\nul SET installdir=%windir%\system
IF EXIST %windir%\system32\nul SET installdir=%windir%\system32
IF EXIST %windir%\SysWOW64\nul SET installdir=%windir%\SysWOW64
IF %installdir%==none GOTO :doError5

IF EXIST %installdir%\myodbc-installer.exe GOTO :doError4

REM ****
REM * Find out the bin/lib directory, or use default
REM ****
SET libdir=lib
SET bindir=bin
IF EXIST lib\release\myodbc5.lib SET libdir=lib\release
IF EXIST lib\relwithdebinfo\myodbc5.lib SET libdir=lib\relwithdebinfo
IF EXIST bin\release\myodbc-installer.exe SET bindir=bin\release
IF EXIST bin\relwithdebinfo\myodbc-installer.exe SET bindir=bin\relwithdebinfo

REM ****
REM * Copying myodbc libraries and executables to install dir...
REM ****
ECHO Copying installation files
IF NOT EXIST %libdir%\myodbc5.lib GOTO :doError2
IF NOT EXIST %libdir%\myodbc5S.lib GOTO :doError2
IF NOT EXIST %bindir%\myodbc-installer.exe GOTO :doError2
copy %libdir%\myodbc5S.dll %installdir%
copy %libdir%\myodbc5S.lib %installdir%
copy %libdir%\myodbc5.dll %installdir%
copy %libdir%\myodbc5.lib %installdir%
copy %bindir%\myodbc-installer.exe %installdir%

REM ****
REM * Registering driver...
REM *
REM * We can do this with myodbc-installer.exe or the MS Windows ODBCConf.exe. It
REM * may be safer to use the ODBCConf.exe when we think about such things
REM * as 64bit windows.
REM ****
ECHO Registering driver
REM myodbc-installer -d -a -n "MySQL ODBC 5.1 Driver" -t "DRIVER=myodbc5.dll;SETUP=myodbc5S.dll"
%installdir%\odbcconf INSTALLDRIVER "MySQL ODBC 5.1 Driver|DRIVER=myodbc5.dll|SETUP=myodbc5S.dll"



ECHO "+-----------------------------------------------------+"
ECHO "| DONE |"
ECHO "+-----------------------------------------------------+"
ECHO "| |"
ECHO "| Hopefully things went well; the Connector/ODBC |"
ECHO "| files have been copied to the system directory |"
ECHO "| and the driver has been registered. |"
ECHO "| |"
ECHO "| Connector/ODBC is ready to use. |"
ECHO "| |"
ECHO "| The most common thing to do next is to go to the |"
ECHO "| Control Panel and find the ODBC Administrator - |"
ECHO "| then use it to create a Data Source Name (DSN) |"
ECHO "| so you (and your application) can connect to a |"
ECHO "| MySQL server. |"
ECHO "| |"
ECHO "+-----------------------------------------------------+"
EXIT /B 0

:doError2
ECHO "+-----------------------------------------------------+"
ECHO "| ERROR |"
ECHO "+-----------------------------------------------------+"
ECHO "| |"
ECHO "| Connector/ODBC not built. |"
ECHO "| |"
ECHO "+-----------------------------------------------------+"
PAUSE
EXIT /B 1

:doError4
ECHO "+-----------------------------------------------------+"
ECHO "| ERROR |"
ECHO "+-----------------------------------------------------+"
ECHO "| |"
ECHO "| Existing Connector/ODBC installed. Request ignored. |"
ECHO "| |"
ECHO "+-----------------------------------------------------+"
PAUSE
EXIT /B 1

:doError5
ECHO "+-----------------------------------------------------+"
ECHO "| ERROR |"
ECHO "+-----------------------------------------------------+"
ECHO "| |"
ECHO "| Can't find the Windows system directory |"
ECHO "| |"
ECHO "+-----------------------------------------------------+"
PAUSE
EXIT /B 1