LoginSignup
6
0

More than 5 years have passed since last update.

初めてのLinux環境構築(proxy環境下)

Last updated at Posted at 2018-09-06

はじめに

本記事の対象者

  • Linux環境でこれからC,C++でのプログラミングを始める人
  • 社内、学内プロキシサーバの設定が必要な人

投稿者の環境

ubuntu 18.04 LTS

aptのプロキシ設定

aptの設定ファイル作成

$ cd /etc/apt
$ sudo touch apt.conf
  • cdはディレクトリの移動。
  • touchはファイルのタイムスタンプ更新。指定したファイルが無い場合は新たに作成。

プロキシ設定書き込み

$ echo 'Acquire::http::proxy "http://your.proxy.address:8080/";' | sudo tee -a apt.conf
$ echo 'Acquire::https::proxy "http://your.proxy.address:8080/";' | sudo tee -a apt.conf
  • echoの入力値をパイプでteeに渡すことでapt.confにプロキシ設定を書き込む。
  • ダブルクォートの中身は実際のプロキシに読み替えること。

viで編集したい人は以下のコマンドでapt.confを開く

$ sudo vi apt.conf
  • sudoが無いと書き込みできない。

C,C++環境インストール

$ sudo apt update
$ sudo apt install build-essential

パッケージのインストール前に、aptのリポジトリを更新する必要がある。

エディタ、ターミナル、シェルはお好みのものでどうぞ

$ sudo apt install emacs terminator zsh

その他あると便利なツール

$ sudo apt install tmux

追記

2018/9/6 プロキシ設定書き込み修正。sudo echoではroot権限でのファイル書き込みはできませんでした。
参考: https://qiita.com/nobu666/items/891705a4d34c91232ec1

6
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
0