【 yum 】 パッケージを取得してインストール/アップデートをする
表2 yumの主なコマンド
install パッケージをインストールする
update パッケージをアップデートする
check-update アップデート可能なパッケージを一覧する
remove パッケージをアンインストールする
list インストール可能なパッケージを一覧する。オプションについては表3を参照
search キーワード 指定したキーワードでパッケージを検索する
info パッケージの情報を表示する。オプションについては表3を参照
clean パッケージと古いヘッダーを削除する。オプションについては表4を参照
まずは、Apacheのアンインストール(httpd-manualも同時にインストールしていたが、それは残しておく)
yum remove httpd
XAMPP Linux版へようこそ
ステップ1: ダウンロード
これは、windowsマシンでダウンロードするだけ
WinSCPにて、サーバー側に転送(自分のユーザー名のhomeへ)
ステップ2: インストール
ダウンロードした後は、単純に以下のコマンドを入力します:
Linux shellにて、rootユーザでログインしてください。
su
chmod 755 xampp-linux-1.8.2-installer.run
./xampp-linux-1.8.2-installer.run
警告1: XAMPP for Linuxを展開する場合は、このコマンドを使ってください。Windowsのツールを使って展開すると、動作しない場合があります。
警告2: 既にXAMPP for Linuxがインストールされている場合は、このコマンドにより上書きされます。
これで完了です。/opt/lamppフォルダにXAMPPがインストールされました。
このままだと、windows側で操作できない(なんせ、机にはwindows環境しかない)
ので、以下の設定をおこなう
すたら日記 XAMPP for Linux 1.8.2 導入記
#XAMPPが入ってる場所の所有者を自分に変更します。
$ sudo chown -R (ユーザ名) /opt/lampp
#一旦、全ファイルのパーミッションを変更します。
$ chmod -R 777 /opt/lampp
#特定のファイルのみ、パーミッションを変更します。
$ chmod 600 /opt/lampp/etc/my.cnf
$ chmod 644 /opt/lampp/phpmyadmin/config.inc.php
とりあえず、自分の外部アドレスを確認しておく
xampp導入に必要なもの
あなたの情報(確認くん) で表示される、IPアドレスを控える。
/opt/lampp/etc/httpd.conf
189行目ぐらい
一番下のIPアドレスを上記で確認したアドレスに設定
本当はメールアドレスも設定すべきだろうが、今はペンディング
#
# ServerAdmin: Your address, where problems with the server should be
# e-mailed. This address appears on some server-generated pages, such
# as error documents. e.g. admin@your-domain.com
#
ServerAdmin you@example.com
#
# ServerName gives the name and port that the server uses to identify itself.
# This can often be determined automatically, but we recommend you specify
# it explicitly to prevent problems during startup.
#
# If your host doesn't have a registered DNS name, enter its IP address here.
#
#ServerName www.example.com:@@Port@@
# XAMPP
ServerName xxx.xxx.xxx.xxx:80
207行目
#あなたのサーバのファイルシステム全体へのアクセスを拒否します。
これより下の<Directory>ブロックにて、明示的に他のWebコンテンツのディレクトリへのアクセスを許可作業を行う必要があります。
<Directory />
AllowOverride none (上書き許可は、未定義)
Require all denied (/(root)へのアクセスはすべて拒否 という意味か??)
</Directory>
#注意
これ以降で、あなたが明確に特定の機能を有効にすることを許可する必要があります
ご想像のとおり、何かが機能していないなら、あなたが具体的にそれを有効にしていることを確認してください。
#
# Deny access to the entirety of your server's filesystem. You must
# explicitly permit access to web content directories in other
# <Directory> blocks below.
#
<Directory />
AllowOverride none
Require all denied
</Directory>
#
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
#
※コメント投稿者のブログIDはブログ作成者のみに通知されます