Debian 管理ノート
| Jeans & Development | 電子ブロック工房 | 三日坊主 | フロントページ |
SAMBA [SAMBA]
2009年2月28日
インストール。
設定は、http://192.168.1.xx:901/から行う。
色々行って動くようになった。ポイントは、
1)valid usersの設定
2)ユーザーパスワードの登録
3)read only = Noの設定
4)ディレクトリのパーミッション設定
あたりかな?思い出せない。
apt-get install samba apt-get install swat
設定は、http://192.168.1.xx:901/から行う。
色々行って動くようになった。ポイントは、
1)valid usersの設定
2)ユーザーパスワードの登録
3)read only = Noの設定
4)ディレクトリのパーミッション設定
あたりかな?思い出せない。
Apache/PHP/SQLite [Apache]
2009年2月28日
Apache、PHP及びSQLiteをインストール。
ちなみに、Apacheの設定ファイルは/etc/apache2/apache2.confのようで、このファイルで次のように記述されている。
PHPの設定ファイルは、/etc/php5/apache2/php.ini にある。ざっと見た感じデフォルトの設定で気がついたのは、register_globals=off, magic_quote_gpc=on, memory_limit=16M。あとで修正する。
追記:上記の方法でmb_stringはインストールされるが、GDはされないので、別途 apt-get install php5-gd の必要アリ。
apt-get install apache2 apt-get install php5 apt-get install php5-sqlite apt-get install php5-sqlite3 /usr/sbin/apache2ctl restart
ちなみに、Apacheの設定ファイルは/etc/apache2/apache2.confのようで、このファイルで次のように記述されている。
# Include all the user configurations: Include /etc/apache2/httpd.conf細かな設定は、このhttpd.confに記述すればよさそう。(追記:/etc/apache2/sites-enabled/000-default 要設定:下記参照)
PHPの設定ファイルは、/etc/php5/apache2/php.ini にある。ざっと見た感じデフォルトの設定で気がついたのは、register_globals=off, magic_quote_gpc=on, memory_limit=16M。あとで修正する。
追記:上記の方法でmb_stringはインストールされるが、GDはされないので、別途 apt-get install php5-gd の必要アリ。
start up scripts [General]
2009年2月28日
次の内容でS19rootstartup.shを作成し、/etc/rc1.d/ /etc/rc2.d/ /etc/rc3.d/ /etc/rc4.d/ /etc/rc5.d/ に置いた。
#!/bin/sh #chmod 700 /root/startup.sh
新しくLinux serverを構築 [General]
2009年2月22日
我が家のプライベートwebサーバ構築のため、クローゼットで眠っていたマザーボード+CPU(VIA EMIA-M)に256MBのRAMを挿入し、amazonで購入した40GB(およそ$20)のHDDを接続して、サーバとした。
Debianのインストール時のみCD-ROMを接続し、今ははずしてある。その後の管理にはネットを使えばよいので、CD-ROMは必要ない。ただ、この状態でapt-getするとCD-ROMを読みにいこうとするので、/etc/apt/sources.listファイルを編集して、CD-ROMをリストから除外した。
Debianのインストール時のみCD-ROMを接続し、今ははずしてある。その後の管理にはネットを使えばよいので、CD-ROMは必要ない。ただ、この状態でapt-getするとCD-ROMを読みにいこうとするので、/etc/apt/sources.listファイルを編集して、CD-ROMをリストから除外した。
GD [Apache]
2007年5月2日
kandk:~# apt-get install php4-gd Reading package lists... Done Building dependency tree... Done The following extra packages will be installed: libgd2-xpm libt1-5 libxpm4 Suggested packages: libgd-tools The following packages will be REMOVED: libgd2-noxpm The following NEW packages will be installed: libgd2-xpm libt1-5 libxpm4 php4-gd 0 upgraded, 4 newly installed, 1 to remove and 0 not upgraded. Need to get 427kB of archives. After unpacking 684kB of additional disk space will be used. Do you want to continue [Y/n]? y Get:1 http://linux.csua.berkeley.edu etch/main libxpm4 1:3.5.5-2 [35.5kB] Get:2 http://linux.csua.berkeley.edu etch/main libgd2-xpm 2.0.33-5.2 [204kB] Get:3 http://linux.csua.berkeley.edu etch/main libt1-5 5.1.0-2 [155kB] Get:4 http://linux.csua.berkeley.edu etch/main php4-gd 6:4.4.4-8+etch1 [32.3kB] Fetched 427kB in 2s (150kB/s) dpkg: libgd2-noxpm: dependency problems, but removing anyway as you request: analog depends on libgd2-noxpm (>= 2.0.33) | libgd2-xpm (>= 2.0.33); however: Package libgd2-noxpm is to be removed. Package libgd2-xpm is not installed. (Reading database ... 32205 files and directories currently installed.) Removing libgd2-noxpm ... Selecting previously deselected package libxpm4. (Reading database ... 32197 files and directories currently installed.) Unpacking libxpm4 (from .../libxpm4_1%3a3.5.5-2_powerpc.deb) ... Selecting previously deselected package libgd2-xpm. Unpacking libgd2-xpm (from .../libgd2-xpm_2.0.33-5.2_powerpc.deb) ... Selecting previously deselected package libt1-5. Unpacking libt1-5 (from .../libt1-5_5.1.0-2_powerpc.deb) ... Selecting previously deselected package php4-gd. Unpacking php4-gd (from .../php4-gd_6%3a4.4.4-8+etch1_powerpc.deb) ... Setting up libxpm4 (3.5.5-2) ... Setting up libgd2-xpm (2.0.33-5.2) ... Setting up libt1-5 (5.1.0-2) ... Setting up php4-gd (4.4.4-8+etch1) ... kandk:~# vi /etc/php4/apache2/php.ini extension=gd.so kandk:~# /etc/init.d/apache2 restart
SQLite設定 [SQLite]
2007年5月2日
インストール:
kandk:~# apt-get install php4-sqlite Reading package lists... Done Building dependency tree... Done The following extra packages will be installed: libsqlite0 The following NEW packages will be installed: libsqlite0 php4-sqlite 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. Need to get 203kB of archives. After unpacking 573kB of additional disk space will be used. Do you want to continue [Y/n]? y Get:1 http://linux.csua.berkeley.edu etch/main libsqlite0 2.8.17-2 [181kB] Get:2 http://linux.csua.berkeley.edu etch/main php4-sqlite 1.0.2-12+b1 [22.1kB] Fetched 203kB in 1s (108kB/s) Preconfiguring packages ... Selecting previously deselected package libsqlite0. (Reading database ... 32192 files and directories currently installed.) Unpacking libsqlite0 (from .../libsqlite0_2.8.17-2_powerpc.deb) ... Selecting previously deselected package php4-sqlite. Unpacking php4-sqlite (from .../php4-sqlite_1.0.2-12+b1_powerpc.deb) ... Setting up libsqlite0 (2.8.17-2) ... Setting up php4-sqlite (1.0.2-12+b1) ... kandk:~# vi /etc/php4/apache2/php.ini extension=sqlite.so kandk:~# /etc/init.d/apache2 restart
SAMBA設定 [SAMBA]
2007年5月2日
設定の殆どは、SWATを用いる。http://root@xxx.xxx.xxx:901/に接続。
ユーザーにwrite権限を与えないと、書き込みできない。global 設定でこれを行う。
ユーザーにwrite権限を与えないと、書き込みできない。global 設定でこれを行う。
ファイル検索 [General]
2007年5月2日
ファイルの検索には、locateコマンドが便利。ただし、updatedbコマンドでデータベースのアップデートを行わないと、新規追加のファイルが検索結果に反映されない。