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. 31. 01:42

1. install

$ sudo apt-get update

$ sudo apt-get upgrade -y

$ sudo apt-get install golang -y

$ sudo apt-get install git -y


# create project directory

$ mkdir $HOME/go

$ mkdir $HOME/go/bin


2. Setting path

$ echo "export GOROOT=/usr/lib/go" >> /home/vagrant/.bashrc

$ echo "export GOBIN=/usr/bin/go" >> /home/vagrant/.bashrc

$ echo "export GOPATH=$HOME/go" >> /home/vagrant/.bashrc

$ echo "export PATH=$PATH:$GOPATH/bin:$GOROOT/bin" >> /home/vagrant/.bashrc


3. Download library

go get {URL}

$ go get github.com/gorilla/mux

$ go get github.com/gorilla/sessions


4. Sample

keyvalue.go

- http://localhost:8080/mapstore/set/{key}/{value}

- http://localhost:8080/mapstore/get/{key}

Posted by CoolDragon