0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

[memo] CentOS7.4 install on VMWare

Last updated at Posted at 2018-02-27

VMWare Install

VMWare Workstation Player for Windows 64-bit
https://eng-entrance.com/linux-vmware-install

CentOS Install

CentOS Download

CentOS 7.4
http://ftp.jaist.ac.jp/pub/Linux/CentOS/7.4.1708/isos/x86_64/
CentOS-7-x86_64-DVD-1708.iso (4.2GB)

CentOS Install

VMWare Instance Setup
centos01.png

CentOS Install

カテゴリ 項目 設定
地域設定 日付と時刻 アジア/東京
キーボード 日本語
言語サポート 日本語
ソフトウェア インストールソース ローカルメディア
ソフトウェアの選択 サーバー(GUI使用)
システム インストール先 自動パーティション
KDUMP 無効
ネットワークとホスト名 ○○(ホストPCのネットワーク接続)で接続
SECURITY POLICY プロファイル選択無し(デフォルト)

WS0013.JPG

WS0014.JPG

CentOS Setup

user add to root

# visudo
visudo
##      user    MACHINE=COMMANDS
##
## The COMMANDS section may have other options added to it.
##
## Allow root to run any commands anywhere
root    ALL=(ALL)       ALL
newuser ALL=(ALL)       ALL   # added user.

ntp install

$ sudo yum -y install ntp
$ sudo ntpdate ntp.nict.jp
$ sudo vi /etc/ntp.conf
/etc/ntp.conf
server 0.centos.pool.ntp.org iburst
server 1.centos.pool.ntp.org iburst
server 2.centos.pool.ntp.org iburst
↓
server ntp.nict.jp iburst
server ntp1.jst.mfeed.ad.jp iburst
server ntp2.jst.mfeed.ad.jp iburst
$ sudo systemctl start ntpd
$ sudo systemctl enable ntpd

SELinux stop

$ sudo vi /etc/selinux/config
/etc/selinux/config
SELINUX=enforcing
↓
SELINUX=disabled

SSH Setup

# sudo yum -y install openssh-server

Setup others

g++ install

$ sudo yum -y install gcc-c++

git install

$ sudo yum -y install git

history customize

~/.bashrc
# history
HISTTIMEFORMAT='%y/%m/%d %H:%M:%S '
HISTSIZE=1000000
# HISTIGNORE=history:ls:ll:df

alias

~/.bashrc
# alias
alias ll='ls -al'
alias his='history'
alias hisg='his | grep'
function hisr (){ history | awk '{print $4}' | sort | uniq -c | sort -nr | head -n 20; }

alias psa='ps aux'
alias psg='psa | grep'

# alias:git
alias g='git'
alias gpu='g pull origin'
alias gfe='g fetch origin --prune'
alias gpsh='g push origin HEAD'
alias ga='g add'
alias gan='ga -n'
alias gc='g commit -m '
alias gd='g diff'
alias gst='g status'
alias gl='g log'
alias gsub='g submodule'
alias gb='g branch'
alias gba='gb -a'
alias gbr='gb -r'
alias gco='g checkout'
function gdel (){ gb -D $1; g push --delete origin $1; }
function gcp (){ gb $1; gco $1; gba; }
alias gconf='git diff --name-only --diff-filter=U'
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?