2017. 7. 21. 13:44

# 계정 생성

>net user Test Test /ADD

The command completed successfully.


# 생성계정 그룹 등록

>net localgroup Administrators Test /add

The command completed successfully.

Posted by CoolDragon
2017. 7. 21. 13:34


### 관리자 모드로 실행해야 함 ###

> Dism /online /Get-Features


### FTP 활성화 ###

> DISM /Online /Enable-Feature /FeatureName:IIS-WebServer /FeatureName:IIS-WebServerRole /FeatureName:IIS-FTPServer /FeatureName:IIS-FTPSvc /FeatureName:IIS-FTPExtensibility

> echo %errorlevel%


참조

https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/enable-or-disable-windows-features-using-dism

Posted by CoolDragon
2016. 11. 2. 17:57

When you create a project on Gitlab, you have to set ssh key on it.

Let's see how to set on the page.


1. Create public SSH Key

 - by git bash

 - by PuttyGen

   1) Download PuttyGen

   2) Click Generate button and rolling mouse on the application

   3) Copy the SSH Key on the red box (public key)

2. Register SSH Key on GitLab

  Move to "Profile Settings" page

"Click SSH Keys" Link

Paste the SSH Key that you copied on the textbox that it has been created


※ PrivateKey has to be kept for push and pull command. In SourceTree, PrivateKey can be set as below.




Posted by CoolDragon
2016. 11. 2. 15:09

A few years ago, I tried to set up Jenkins on Windows server for projects written in c#. However, I've almost forgotten to use them. So I am going to build a deployment system that uses Git and Jenkins.


Step)

- [Jenkins] Installation on Window

- [Jenkins] Configuration

- [Jenkins] Build source code

- [Jenkins] Deployment


Here's the first step.


1) Download

https://jenkins.io/

When you unzip the downloaded file, there is an install file named "jenkins.msi".


2) Install

2.1) Wizard

You'd better change install directory that does not include space.


2.2) Jenkins

After installation, a web browser shows up and, keep setting basic configurations of Jenkins.

Customize Jenkins

- Install suggested plugins: automatically install plugins

- Select plugins to install: manually install plugins


Completed install of Jenkins

If you want to change the basic port(8080), it can be changed to "C:\Jenkins\jenkins.xml" file, and Jenkins service must restart.


※ If you want to use git, install git on the same server.

Posted by CoolDragon
2016. 5. 12. 18:03

$ sudo wget "URL"

Posted by CoolDragon
2015. 9. 2. 23:05

잡설

아무리 정형화되어있는 사이트를 쉽게 뽑아 내기 위해서 워드프레스가 사용된다지만 내가 작업한 사이트보다 더 깔끔한 UI를 제공하는것 같다. 

하기사 돈주고 파는 테마(Theme)도 있으니 어느정도의 퀄리티는 보장하지 않을까 싶다. 조금의 자괴감이 들지만.. 저런 테마를 만들기 위해서 노력한 공과 시간이 있었겠지 라고 스스로를 위로 한다. ㅜㅜ


Search Themes

테마는 기본 테마가 설치 당시 워드프레스 설치 당시 존재하며 그 외에 다른 테마는 Themes에서 찾아보고 맘에 드는 것을 다운로드 받는다. (무료와 유료가 있습니다.)

Add New Theme을 통하여 쉽게 추가를 할 수 있는 것으로 알고 있으나, 본인은 VirtualBox를 사용해서인지 FTP를 통한 적용을 실패하여 수동으로 테마 파일을 다운로드 받고 해당 경로로 복사해주는 작업을 하였다. (본인 서버의 테마의 경로는 /opt/lampp/htdocs/wordpress/wp-content/themes/ 이며, 서버를 어떻게 설치하고 설정하냐에 따라 경로는 달라질 수 있다.)

그 후 Appearance > Themes메뉴를 보면 아래와 같이 기존 테마(Twenty thirteen, Twenty foruteen, Twenty fifteen)와 함께 새로 다운로드 받은 테마(OpenStrap) 같이 나타나는 것을 볼 수 있다. 마우스를 테마위에 hover를 하게되면 해당테마로 적용할 것인지 여부를 묻고 클릭하게되면 선택한 테마로 적용이 된다.


후기

테마 변경은 사실 별로 대단할게 없다. '다운로드 > 테마 디렉토리로 복사 > 선택' 이것이 전부이다. 실제 테마를 선택후 Customizing의 작업이 진짜 작업이지 않을까 싶다.

Posted by CoolDragon
2015. 9. 2. 22:21

잡설

항상 마이크로소프트의 제품군들만 사용해오다 보니 리눅스를 다루는 것은 가슴속 한켠엔 '어려운 것'으로 자리잡고 있었다. 지금이라도 이렇게 시간이 될 때 한가지 한가지 해보고 정리를 해다가 보면 '어려운 것' 에서 '해볼만 한 것'으로 바뀌지 않을까 싶다.


Install FTP

# sudo apt-get install vsftpd


Create User for FTP

$ sudo -i # root 변경

# 예) useradd -d {home directly} -u {user id}

useradd -d /opt/lampp/htdocs/wordpress/wp-content/themes/ -u themes #  FTP접속 시 '/home/cooldragon'가 홈디렉토리

$ passwd themes # 비밀번호 설정

Enter new UNIX password: 

Retype new UNIX password: 

$chmod 777 themes/ # 계정에 대한 쓰기 읽기 권한이 없다면 권한을 부여


FTP Configuration

$ vi /etc/vsftpd.conf

# Allow anonymous FTP? (Disabled by default)

anonymous_enable=NO


# Uncomment this to allow local users to log in.

local_enable=YES


# Uncomment this to enable any form of FTP write command.

write_enable=YES


# Default umask for local users is 077. You may wish to change this to 022,

# if your users expect that (022 is used by most other ftpd's)

local_umask=0

$ service vsftpd restart


Access Test

Now you can drag file and drop it into the directory.


후기

사실 FTP를 설치한 이유가 wordpress에서 Themes을 다운로드 FTP를 통하여 자동 업데이트 되도록 하기 위함이었는데.. virtualbox로 생성한 거라 내부IP와 상관이 있는것인지.. 모르겠지만 계속 실패가 났다. 결국 ftp client로 접속하여 다운로드 받은 파일을 드래그&드랍으로 파일을 붙여 넣었다.

깊이 없는 리눅스 겉핥기와 같은 나의 수준이 문제겠지.... 방법이 뭔가요?

Posted by CoolDragon
2015. 9. 2. 01:51

잡설

얼마전에 채용 인터뷰를 보는데 대충 이런 질문이 하나 있었다.

면접관 : "CMS에 대한 경험 있어?"

나 : "CMS가 뭔가?"

면접관 : "Content Management System라고 WordPress같은거.."

나 : "아! 그거 안해봤다. 근데 그거 개발은 아니고 Admin 사이트에서 필요한 거 설정하면 자동으로 사이트를 만들어 주는 것으로 알고 있다."

그리고 여럿 채용공고를 보던 중 CMS와 관련된 제품(?)들이 생각보다 많은 것을 보고 놀랍기 까지 했다. (TYPO3, Magento, Drupal, Joomla)

암튼 이것이 동기부여가 되어  Wordpress는 어떻게 생성 사용하는지 알아보고자 한다.


Insall XAMPP

refer to install XAMPP


Download

Download .tar.gz — 6.2 MB

wget http://wordpress.org/latest.tar.gz

$ sudo tar xvzf latest.tar.gz -C /opt/lampp/htdocs   # unzip and copy into /opt/lampp/htdocs


Configuration

Open browser >> Put following the URL: http://192.168.xxx.xxx/wordprocess (refer to Create database and user for MySQL)

Put information of database that you've created > Submit

If you see the page below, you create 'wp-config.php' manually because your linux account doesn't have any permission.

$ sudo -i   # change root

cd /opt/lampp/htdocs/wordpress/

$ touch wp-config.php

$ sudo vi wp-config.php # and then paste the script

chown nobody:nogroup wp-config.php

chmod -R 777 wp-content # 이 명령어를 실행하지 않으면 theme 및 plugin 다운로드시 권한 문제로 오류가 난다. (더 좋은 대안은 무엇을까?)

$ exit

Put "Information needed"

Test

Login >> http://{IP Address}/wordpress/wp-admin/

After Login >> You can see Dashboard.

Open http://{IP Address}/wordpress/



후기

Wordpress 생성 과정중 'wp-config.php' 파일을 수동으로 생성을 하는 작업이 있는데 리눅스가 익숙치 않은 나는 수동작업 없이 자동으로 처리되게 하려면 무슨 권한 작업을 미리 설정해야 놓아야 하는지 잘 모르겠다. (알고 계신분들은 댓글로 좀 알려주시면 향후에 업데이트 하도록 하겠습니다.)

인스톨까지는 생각보다 쉬운데 이후 사이트 다운 구성을 하려면 사실 더 많은 시간과 노력이 필요하지 않을까 싶다.

Posted by CoolDragon
2015. 8. 31. 20:24

GitLab은  Private한 환경에서 git을 이용하여 개발 소스를 관리할 수 있게 도와준다. (쉽게 말하자면 Private GitHub이랄까...)


2014년 4월인가  GitLab을 수동으로 설치해 봤었는데 엄청 복잡하고 어렵게 어렵게 설치를 했는데

이렇게 간단하게 패키지로 설치 할 수 있는 방법이 있는 줄 몰랐다.

Install a GitLab CE Omnibus package on

 Check if your server meets the hardware requirements. GitLab packages are built for 64bit systems. For 32bit OS, consider alternative installation methods.

1. Install and configure the necessary dependencies

If you install Postfix to send email please select 'Internet Site' during setup. Instead of using Postfix you can also use Sendmail or configure a custom SMTP server. If you wish to use Exim, please configure it as an SMTP server.

On Centos 6 and 7, the commands below will also open HTTP and SSH access in the system firewall.

sudo apt-get install curl openssh-server ca-certificates postfix

2. Add the GitLab package server and install the package

curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash
sudo apt-get install gitlab-ce
If you are not comfortable installing the repository through a piped script, you can find the entire script here.

Alternatively you can select and download the package manually and install using
dpkg -i gitlab-ce-XXX.deb

3. Configure and start GitLab

sudo gitlab-ctl reconfigure

4. Browse to the hostname and login

Username: root 
Password: 5iveL!fe


설치 후 환경설정 

# host와 port 설정

$ sudo vi /opt/gitlab/embedded/service/gitlab-rails/config/gitlab.yml

  gitlab:

    host: IP 또는 domain name

    port: 80


# external_url 설정

$ sudo vi /etc/gitlab/gitlab.rb

  external_url 'http://IP 또는 domain name'


# 적용

$ sudo gitlab-ctl reconfigure

$ sudo gitlab-ctl restart


결과

로그인 페이지

로그인 후

Email


GitLab에 SSH Key 생성 및 등록

$ cd ~/.ssh

$ ssh-keygen

cat ~/.ssh/id_rsa.pub  #내용 복사

복사한 내용을 Gitlab 사이트의 SSH Key 페이지를 통하여 등록


Git Project 생성 및 커밋

신규 프로젝트 생성


생성한 프로젝트명으로 git경로를 얻을 수 있으며, 그 이후 git golbal setup 및 create a new repository 작업을 통하여 리모트와 gitlab의 실제 repository를 연결할 수 있다.




Posted by CoolDragon
2015. 8. 27. 18:02


$ sudo dpkg -i "YourDebPackage.deb"


Posted by CoolDragon