<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>loopy-lim.log</title>
        <link>https://velog.io/</link>
        <description>User First 개발자  임채승입니다.</description>
        <lastBuildDate>Wed, 26 Apr 2023 02:56:33 GMT</lastBuildDate>
        <docs>https://validator.w3.org/feed/docs/rss2.html</docs>
        <generator>https://github.com/jpmonette/feed</generator>
        <image>
            <title>loopy-lim.log</title>
            <url>https://velog.velcdn.com/images/loopy-lim/profile/abbfc614-5d8c-4ca5-badc-3b0caa84904c/social_profile.png</url>
            <link>https://velog.io/</link>
        </image>
        <copyright>Copyright (C) 2019. loopy-lim.log. All rights reserved.</copyright>
        <atom:link href="https://v2.velog.io/rss/loopy-lim" rel="self" type="application/rss+xml"/>
        <item>
            <title><![CDATA[Ubuntu Server 을 처음 설치하고 세팅하는 것들]]></title>
            <link>https://velog.io/@loopy-lim/Ubuntu-Server-%EC%9D%84-%EC%B2%98%EC%9D%8C-%EC%84%A4%EC%B9%98%ED%95%98%EA%B3%A0-%EC%84%B8%ED%8C%85%ED%95%98%EB%8A%94-%EA%B2%83%EB%93%A4</link>
            <guid>https://velog.io/@loopy-lim/Ubuntu-Server-%EC%9D%84-%EC%B2%98%EC%9D%8C-%EC%84%A4%EC%B9%98%ED%95%98%EA%B3%A0-%EC%84%B8%ED%8C%85%ED%95%98%EB%8A%94-%EA%B2%83%EB%93%A4</guid>
            <pubDate>Wed, 26 Apr 2023 02:56:33 GMT</pubDate>
            <description><![CDATA[<p><img src="https://programadoresbrasil.com.br/wp-content/uploads/2020/04/ubuntu-logo-1200x900.png" alt="ubnutu image"></p>
<h2 id="최근-서버가-죽었어요">최근 서버가 죽었어요...</h2>
<p><img src="https://velog.velcdn.com/images/loopy-lim/post/92d30eab-e3e0-41b1-b075-dad089d999be/image.png" alt="loopy_cry"></p>
<p>최근에 proxmox ve를 돌리는데 알 수 없는 이유(아마 gpu일 가능성이...)로 인해서 컴이 죽었다. 어떻게든 살리고 싶었는데 잘 되지 않아서 결국 자주 쓰고 있던 Ubuntu Server로 다시 넘어가게 되었다.</p>
<p>매번 새로운 Ubuntu를 갈때마다 세팅하는 것이 매우 귀찮아져서 한번 정리해보기로 하였다.</p>
<h2 id="설치-할-것들">설치 할 것들</h2>
<p>일단 본인은 먼저 사용하는 기술 스택으로서 python, nodejs, rust를 사용한다. python은 설치 되어 있으므로 넘긴다.</p>
<h3 id="zsh">zsh</h3>
<p>bash도 있지만 맥북을 사용하는 입장으로서 zsh가 손에 너무 잘 익혀 버렸다. 그리고 oh-my-zsh의 강력한 커스터마이징을 사용할 수 있기 때문에 먼저 shell을 변경하기로 한다.</p>
<p><strong>zs-shell 설치하기</strong></p>
<pre><code class="language-shell">$ sudo apt install zsh -y</code></pre>
<p><strong>oh-my-zsh 설치하기</strong></p>
<pre><code class="language-shell">$ sh -c &quot;$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)&quot;</code></pre>
<p>여기서 zsh를 기본 sh로 바꾼다. 만약 못했다면 <code>chsh</code>를 이용하여 변경한다.</p>
<p>** powerlevel10k 설치하기 **</p>
<pre><code class="language-shell">$ git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k</code></pre>
<p>폰트를 써야하는데 여기서는 MesloLGS NF 폰트를 추천한다. 하지만 우리는 추후 neovim의 astrovim을 설치할 것이므로 더 많은 아이콘이 지원되는<a href="https://github.com/ryanoasis/nerd-fonts/tree/master/patched-fonts/Meslo/M/Regular/complete">nerd font</a>를 설치하는 것을 추천한다.</p>
<h3 id="neovim">neovim</h3>
<p>가끔 vim을 사용할 때가 있다. git을 써야할때라던지... 아이패드로 개발을 할때라던지... 가끔 멋있어 보이고 싶을때라던지...</p>
<p><strong>neovim</strong></p>
<p>기본적으로 neovim을 지원 안하므로 snap을 통하여 설치해보도록 한다.</p>
<pre><code class="language-shell">$ sudo snap install nvim --classic</code></pre>
<p><strong>astrovim</strong></p>
<p>vim은 불편하므로 대부분의 세팅이 되어 있는 <a href="https://astronvim.com/">astrovim</a>을 설치한다.
최근에 추천 받았는데 정말 편하고 keybinding도 정말 잘 되어 있다. vscode에서 넘어갈 고민을 가끔 해보고 있다.</p>
<pre><code class="language-shell">$ git clone --depth 1 https://github.com/AstroNvim/AstroNvim ~/.config/nvim
nvim</code></pre>
<h3 id="nodejs">nodejs</h3>
<p>node의 버전을 관리하는 것은 가끔 힘든 일이다. 그리고 node를 설치하는 것도 마찬가지이다. 이를 쉽게 하기 위해서 nvm을 이용한다.</p>
<p><strong>nvm</strong></p>
<pre><code class="language-shell">$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash</code></pre>
<p><strong>node</strong></p>
<p>이후 node를 설치하고 싶다면 nvm을 통해서 최신의 node를 설치할 수 있다.</p>
<pre><code class="language-shell">$ nvm install node</code></pre>
<p><strong>pnpm</strong></p>
<p>npm의 시대는 넘어갔다!! 이제는 pnpm의 시대이다!!
npm의 느리고 비효율적인 디스크 사용은 이제 버리자. <a href="https://pnpm.io/">pnpm</a>의 효과적인 디스크 사용을 봐보자.(정말 빠르고 편리하다)</p>
<pre><code class="language-shell">$ curl -fsSL https://get.pnpm.io/install.sh | sh -</code></pre>
<h3 id="rust">rust</h3>
<p>가끔 정말 가끔 한번씩 돌려보고 싶을때 한다.</p>
<pre><code class="language-shell">$ curl --proto &#39;=https&#39; --tlsv1.2 -sSf https://sh.rustup.rs | sh</code></pre>
<h3 id="etc">ETC</h3>
<p><strong>netstat</strong></p>
<pre><code class="language-shell">$ sudo apt install net-tools</code></pre>
<p><strong>zshrc</strong></p>
<pre><code class="language-shell">if [[ -r &quot;${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh&quot; ]]; then
  source &quot;${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh&quot;
fi

export ZSH=&quot;$HOME/.oh-my-zsh&quot;
ZSH_THEME=&quot;powerlevel10k/powerlevel10k&quot;
plugins=(git)
source $ZSH/oh-my-zsh.sh

export NVM_DIR=&quot;$HOME/.nvm&quot;
[ -s &quot;$NVM_DIR/nvm.sh&quot; ] &amp;&amp; \. &quot;$NVM_DIR/nvm.sh&quot;  # This loads nvm
[ -s &quot;$NVM_DIR/bash_completion&quot; ] &amp;&amp; \. &quot;$NVM_DIR/bash_completion&quot;  # This loads nvm bash_completion

export PNPM_HOME=&quot;/home/loopy/.local/share/pnpm&quot;
case &quot;:$PATH:&quot; in
  *&quot;:$PNPM_HOME:&quot;*) ;;
  *) export PATH=&quot;$PNPM_HOME:$PATH&quot; ;;
esac

alias vi=nvim
alias vim=nvim

[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh</code></pre>
]]></description>
        </item>
    </channel>
</rss>