- 追加された行はこの色です。
- 削除された行はこの色です。
CONTENTS
#contents
----
Lastmodified &lastmod;
----
*FreeBSD 10.0 [#v85ee2b0]
FreeBSD 10.0 DVD1
インストール終了後
freebsd-update fetch
freebsd-update install
reboot
lodate データベースを作る
/etc/periodic/weekly/310.locate
7 6:46 locate portupgrade
8 6:46 cd /usr/ports/ports-mgmt/portupgrade-devel
9 6:46 make install clean
10 6:58 portinstall portaudit
11 6:58 portaudit -Fda
12 6:58 portinstall portaudit
13 6:58 locate portaudit
14 6:59 portinstall ports-mgmt/portaudit
15 7:00 cd
16 7:00 portinstall ports-mgmt/portaudit
17 7:00 pkg audit
18 7:01 pkg audit
19 7:01 pkg audit -F
20 7:15 history
**portaudit を入れようとすると・・・ [#yb54f340]
root@blackcube2:/usr/ports/ports-mgmt/portupgrade-devel # portinstall ports-mgmt/portaudit
[Reading data from pkg(8) ... - 17 packages found - done]
[Gathering depends for ports-mgmt/portaudit done]
** Port marked as IGNORE: ports-mgmt/portaudit:
use 'pkg audit' instead
** Listing the failed packages (-:ignored / *:skipped / !:failed)
- ports-mgmt/portaudit
root@blackcube2:~ # pkg audit
pkg: unable to open vulnxml file, try running 'pkg audit -F' first
root@blackcube2:~ # pkg audit -F
vuln.xml.bz2 100% 430KB 430.1KB/s 420.1KB/s 00:01
0 problem(s) in the installed packages found.
**Postfix [#y7143e59]
[[Postfix on FreeBSD]]
root@blackcube2:~ # portinstall mail/postfix
/etc/rc.conf
postfix_enable="YES"
sendmail_enable="NO"
sendmail_submit_enable="NO"
sendmail_outbound_enable="NO"
sendmail_msp_queue_enable="NO"
/etc/periodic.conf
# touch /etc/periodic.conf
daily_clean_hoststat_enable="NO"
daily_status_mail_rejects_enable="NO"
daily_status_include_submit_mailq="NO"
daily_submit_queuerun="NO"
/etc/make.conf
NO_SENDMAIL= true
/etc/newsyslog.conf
#/var/log/sendmail.st 640 10 * 168 BN
**Apache [#tc6a3d65]
# portinstall www/apache22
/etc/rc.conf
apache22_enable="YES"
***/usr/local/etc/rc.d/apache22: WARNING: failed to start apache22 [#a2afaa09]
[Mon Feb 17 16:11:45 2014] [alert] (EAI 8)hostname nor servname provided, or not known: mod_unique_id:
unable to find IPv4 address of "blackcube2"
Configuration Failed
http://d.hatena.ne.jp/takeR/20120715/1342354382
/etc/hosts へ、以下を追加
219.117.246.200 blackcube2
*** sysinstall から bsdinstall へ変更された模様 [#nbac6320]
http://www.freebsd.org/doc/ja/books/handbook/bsdinstall.html
**mysql [#c6c1bbf1]
portinstall databases/mysql55-client
/etc/rc.conf
mysql_enable="YES"
mysqlの設定ファイルの雛形をコピーしておきます。(より大規模なシステムなら large や huge に)
# cp /usr/local/share/mysql/my-medium.cnf /usr/local/etc/my.cnf
# chmod 644 /usr/local/etc/my.cnf
以下の起動スクリプトで制御できます。
# /usr/local/etc/rc.d/mysql-server start ←デーモンを起動します
# /usr/local/etc/rc.d/mysql-server restart ←デーモンを再起動します
# /usr/local/etc/rc.d/mysql-server stop ←デーモンを停止します
起動できたら、rootユーザのパスワードを設定します。初期状態ではパスワードなしになっています。ここでは root@localhost の設定を変更しておきます。
# mysqladmin -u root -h localhost password 'XXXXXX' ←XXXXXXに半角でパスワードを書きます。
** portinstall lang/php5 [#m0a66a44]
Apacheのモジュールにチェック
/usr/local/etc/apache22/http.conf
***************************************************************
Make sure index.php is part of your DirectoryIndex.
You should add the following to your Apache configuration file:
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
***************************************************************
これしとかないと、index.php へアクセスすると、ダウンロードになる (^^ゞ
** php5-extensions [#ue2ba600]
** portinstall databases/phpmyadmin [#vf78ced1]
chown -R www:www phpMyAdmin/
+script/create_tables.sql で必要なテーブルを作成します。
k222# cd /usr/local/www/phpMyAdmin/examples
k222# mysql -u root -p < create_tables.sql
Enter password: ← パスワード(mysql管理者)の入力作ったテーブルにアクセスできる pma ユーザを作成します。
+設定ファイル (config.inc.php) で高度な機能を有効にします。config.sample.inc.php にある設定例をコピーするといいでしょう。
** munin [#lf7d7483]
********************************************************************
Unless this file already existed, a sample configuration file
has been placed in /usr/local/etc/munin/munin.conf.
Please edit it according to your needs.
The Munin server will be run from cron under the user 'munin'.
********************************************************************
***設定 [#d2ec4536]
/usr/local/etc/munin/munin.conf
# htmldir /usr/local/www/munin
htmldir /usr/local/www/apache22/data/munin ←コレを追加
# mkdir /usr/local/www/apache22/data/munin
# chown -R munin:munin /usr/local/www/apache22/data/munin
# cd /usr/local/www
# cp cgi-bin/munin-cgi-graph apache22/cgi-bin
# cp -rp munin apache22/data
# echo munin_node_enable="YES" >> /etc/rc.conf
***使えるプラグインを確認 [#t34f7bf5]
http://techno-st.net/2009/12/10/munin-munin-node-configure.html
# munin-node-configure -suggest
*** --shell を使ってプラグイン追加 [#k36f21c5]
# munin-node-configure --shell
[[Munin on NEC-Express5800/GT110b FreeBSD 8.1]]
----
Total access &counter(total);:本日 &counter(today);:昨日 &counter(yesterday);
#counter([total|today|yesterday]);