'MAC'에 해당되는 글 7건

  1. 2021.09.07 [ZSH] oh-my-zsh 설정 on Macbook.
  2. 2020.08.27 [Docker] 맥북에 우분투 올리기
  3. 2016.11.23 [Nginx] osx 에 nginx 설치 하기 - brew install
  4. 2016.02.01 [개발환경] .bash_profile 기본 설정
  5. 2015.07.27 [MacPorts] Mac Ports 재설치.
  6. 2013.04.05 맥북 키보드 remapping.
  7. 2013.04.05 맥 + virtualbox + window7 설치.

[ZSH] oh-my-zsh 설정 on Macbook.

ITWeb/개발일반 2021. 9. 7. 10:47

또 뭔가 찾기 귀찮아서 기록해 봅니다.

 

[oh-my-zsh 설치]
$ sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

 

[iTerm2 Color Schemes]
https://github.com/mbadolato/iTerm2-Color-Schemes/tree/master/schemes

 

[d2font 설치] (서체관리자 추가 및 iTerm 추가)
https://github.com/naver/d2codingfont

 

[highlighting]
$ brew install zsh-syntax-highlighting

$ vi .zshrc 하단에 추가
source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh

 

[Insecure Directory Skip]

$ vi .zshrc 제일 윗줄에 추가

 ZSH_DISABLE_COMPFIX=true

 

[Theme 수정]

$ vi .zshrc 수정 및 추가

ZSH_THEME="agnoster"
...중략...
prompt_context() {
  if [[ "$USER" != "$DEFAULT_USER" || -n "$SSH_CLIENT" ]];
  then
  	prompt_segment black default "%(!.%{%F{yellow}%}.)$USER"
  fi
}

 

[newline 추가]

$ vi ~/.oh-my-zsh/themes/agnoster.zsh-theme

build_prompt() {
  RETVAL=$?
  prompt_status
  prompt_virtualenv
  prompt_aws
  prompt_context
  prompt_dir
  prompt_git
  prompt_bzr
  prompt_hg
  prompt_newline # <-- 추가
  prompt_end
}

 

[newline & multiline 적용]

PROMPT='%{%f%b%k%}$(build_prompt) '

# 아래 6, 7번 라인은 아래와 같이 작성을 하셔야 정상적으로 나옵니다.
prompt_newline() {
  if [[ -n $CURRENT_BG ]]; then
    echo -n "%{%k%F{$CURRENT_BG}%}$SEGMENT_SEPARATOR
%{%k%F{blue}%}$SEGMENT_SEPARATOR"
  else
    echo -n "%{%k%}"
  fi

  echo -n "%{%f%}"
  CURRENT_BG=''
}

 

[plugin 적용]

- zsh-syntax-highlighting

$ git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting

 

- zsh-autosuggestions

$ git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

 

$ vi .zshrc

plugins=(
  git
  zsh-syntax-highlighting
  zsh-autosuggestions
  web-search
  jsontools
  macports
  node
  osx
  sudo
  docker
  iterm2
)
:

[Docker] 맥북에 우분투 올리기

Cloud&Container/IaC 2020. 8. 27. 18:32

가끔 필요 할 때가 있습니다.

 

docker-compose.yml)

version: '3.7'
services:
  ubuntu-mac:
    image: ubuntu:18.04
    container_name: ubuntu-mac
    stdin_open: true
    tty: true
    command: [/bin/bash]

 

:

[Nginx] osx 에 nginx 설치 하기 - brew install

ITWeb/개발일반 2016. 11. 23. 10:02

mac osx 에 설치 할 일이 있어서 작성해 봅니다.


$ sudo chown -R '사용자계정' /usr/local/lib/pkgconfig

$ brew install pcre

$ brew link --overwrite pcre

$ brew update

$ sudo chown -R '사용자계정' /usr/local

$ brew install nginx

$ sudo chown root:wheel /usr/local


'사용자계정' 에는 user account 넣어 주시면 됩니다.

예를 들어 henry 라는 계정을 사용하시면)

$ sudo chown -R henry /usr/local/lib/pkgconfig


저는 설치 하다 몇 가지 에러가 발생을 해서 위 순서대로 구성을 하였습니다.

아래는 발생한 에러 입니다.


Error case 1)

Error: The `brew link` step did not complete successfully

The formula built, but is not symlinked into /usr/local

Could not symlink lib/pkgconfig/libpcre.pc

/usr/local/lib/pkgconfig is not writable.


Error case 2)

mkdir: /usr/local/var/run: Permission denied

make[1]: *** [install] Error 1

make: *** [install] Error 2


READ THIS: https://git.io/brew-troubleshooting


/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/open-uri.rb:353:in `open_http': 422 Unprocessable Entity (GitHub::Error)

Validation Failed


Error case 3)

Error: The /usr/local directory is not writable.

Even if this directory was writable when you installed Homebrew, other

software may change permissions on this directory. For example, upgrading

to OS X El Capitan has been known to do this. Some versions of the

"InstantOn" component of Airfoil or running Cocktail cleanup/optimizations

are known to do this as well.


You should probably change the ownership and permissions of /usr/local

back to your user account.

  sudo chown -R $(whoami):admin /usr/local


:

[개발환경] .bash_profile 기본 설정

ITWeb/개발일반 2016. 2. 1. 21:34

intellij 나 eclipse 등을 사용하기 전에 일단 ide에서 사용할 기본적인 jdk 나 maven 을 설치 후 계정에 환경 변수 설정 하는 작업입니다.

이런것도 맨날 기억을 못해서 기록해 봅니다.


[.bash_profile]

# .bash_profile


if [ -f ~/.bashrc ]; then

  source ~/.bashrc

fi


JAVA_HOME=`/usr/libexec/java_home`

MAVEN_HOME=/Users/henry/Dev/apps/maven

PATH=$JAVA_HOME/bin:$MAVEN_HOME/bin:$PATH


export PATH

export MAVEN_HOME

export JAVA_HOME


:

[MacPorts] Mac Ports 재설치.

ITWeb/개발일반 2015. 7. 27. 11:53

참고문서)

https://guide.macports.org/chunked/installing.macports.html


맥북에서 mac port 문제가 있어서 위 문서 보고 재 설치 했습니다.

제 맥북은 MacPorts 2.3.3. 이였습니다.

The OS X package installer automatically installs MacPorts, sets the shell environment, and runs a selfupdate operation to update the ports tree and MacPorts base with the latest release.

  1. Download the latest MacPorts-2.3.3-....pkg installer from the MacPorts download directory. Here are direct links for the latest versions of OS X:

  2. Double-click the downloaded package installer to perform the default easy install.

  3. After this step you are done already, MacPorts is now installed and your shell environment was set up automatically by the installer. To confirm the installation is working as expected, now try using port in a new terminal window.

    $ port version
    Version: 2.3.3

    In case of problems such as command not found, make sure that you opened a new terminal window or consult Section 2.5, “MacPorts and the Shell”. Otherwise, please skip the remainder of this chapter and continue with Chapter 3, Using MacPorts in this guide.

재 설치 하고 나니 잘 됩니다.

:

맥북 키보드 remapping.

ITWeb/서버관리 2013. 4. 5. 17:21

http://pqrs.org/macosx/keyremap4macbook/

:

맥 + virtualbox + window7 설치.

ITWeb/서버관리 2013. 4. 5. 15:30

http://imonis.net/92

내겐 윈도7이 없다..ㅡ.ㅡ;;

VM까지만 설치 하고 다음을 기약하며...

: