Upload
atsuhiro-takiguchi
View
1.637
Download
6
Embed Size (px)
DESCRIPTION
2012/04/15に行われました「はじめてのWebサーバ構築 -さくらVPS-」の前半で行ったLinuxコマンド関係の説明資料です。
Citation preview
はじめのWEBサーバー構 築
-さくら VPS編 -
ssh
暗号や認証の技術を利用して、安全にリモートコンピュータと通信するためのプロトコル
Windows
teraterm
http://sourceforge.jp/projects/ttssh2/releases/
Putty
http://ice.hotmint.com/putty/index.html
http://ja.poderosa.org/?download
Mac
→ →ターミナル 新規リモート接続 セキュアシェル
→ターミナル ssh root@サーバiTerm→ssh root@サーバ
今どこにいるか教えてくれる
pwd
ファイル一覧の取得
ls (-al) /var/log
ファイルのコピー
cp 元 file 先file
ファイルの移動、リネーム
mv 元 file 移動 (リネーム )先
ファイルの削除
rm
現在地の移動
cd 移動先cd /ls
パス
絶対パス相対パスls /var/logcd /var/log
ファイルの所有者ls -l
-rw------- 1 root root 1301 4 月 14 22:16 anaconda-ks.cfg
-rw-r--r-- 1 root root 20002 4 月 14 22:16 install.log
-rw-r--r-- 1 root root 4142 4 月 14 22:16 install.log.syslog
パーミッション1
uユーザー
gグループ
o他人
rwx r-x r-x
パーミッション2
read(読み取り )
write(書き込み )
execute(実行 )
rr w x
4 2 0
所有者 (Owner)の変更
chown (-R)
パーミッションの変更
chmod (-R)
スーパーユーザー
root
yum
プログラムのインストールやアップデート、削除をコマンドだけでしてくれる
yum search xxxx
xxxxに (部分 )マッチするプログラムを探してくれるyum search mysql
yum install xxxx
xxxxをインストールしてくれる
yum update
yumでインストールしたプログラムをアップデートしてくれる
yum erase xxxx
yum remove xxxxも同じxxxxをアンインストールしてくれる
yum list installed
rpm -qaも同じインストールしたプログラムを表示してくれます
yum info xxxx
xxxxに関する詳細な情報を教えてくれます
設定ファイルが置かれる
/etc
#bt_vps
よく書き換えられるファイルが置かれる
/var
ログ
/var/log
Apache
/etc/httpd/conf/httpd.conf
サービスの起動
/etc/init.d/httpd start/etc/init.d/mysqld start
サービスのデフォルト起動
chkconfigchkconfig --list