Debianでホスト名の設定を行うには、
# hostname (ホスト名)
もしくは、
# vi /etc/hostname
で、/etc/hostnameを編集してホスト名を書き込みます。
MySQL の自動起動スクリプト
MySQL の自動起動スクリプトを使うことで、サーバーマシンが起動するときに自動的に MySQL を起動させることができます。
MySQL の自動起動スクリプトは MySQL のインストールディレクトリ(share/mysql)に含まれています。
これを /etc/init.d/mysql ファイルとしてコピーします。# install -o root -g root -m 755 /usr/local/mysql/share/mysql/mysql.server /etc/init.d/mysqlコピーした自動起動スクリプトの自動起動設定を行います。
# update-rc.d mysql defaults 64 36サービスを起動する場合は以下のように実行します。
# /etc/init.d/mysql start
ZFSを含めて、OpenSolarisのコードはCDDLというライセンス形態で配布されている。GNUプロジェクトの解説によれば、「(CDDLと)GNU GPLとは矛盾します。そこで、GPLで保護されたモジュールとCDDLで保護されたモジュールは合法的に一緒にリンクすることができません」とされている。このため、互いにオープンソースでありながら、LinuxでZFSが利用できないということになっている(それ故にLinux上にZFSを移植したものは、カーネルに組み込む形ではなく、ユーザー空間で動かすファイルシステム「FUSE」(Filesystem in Userspace)を利用する形になっている)。
zfs 使うなら solaris 系ですね
This tutorial is about howto installing PostgreSQL on Debian Server.
apt-get update
apt-get install pgsql
Example plpgsql
su postgres
createlang plpgsql template1
exit
We need to edit file pg_hba.conf to change authentification method for accessing PostgreSQL database.
cp /etc/postgresql/pg_hba.conf /etc/postgresql/pg_hba.confbak
vi /etc/postgresql/pg_hba.conf
Find this section
# TYPE DATABASE USER IP-ADDRESS IP-MASK METHOD
# Database administrative login by UNIX sockets
local all postgres ident sameuser
#
# All other connections by UNIX sockets
local all all ident sameuser
#
# All IPv4 connections from localhost
host all all 127.0.0.1 255.255.255.255 ident sameuser
#
# All IPv6 localhost connections
host all all ::1 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff ident sameuser
host all all ::ffff:127.0.0.1/128 ident sameuser
#
# reject all other connection attempts
host all all 0.0.0.0 0.0.0.0 reject
Edit that section to
# TYPE DATABASE USER IP-ADDRESS IP-MASK METHOD
# Database administrative login by UNIX sockets
local all postgres ident sameuser
#
# All other connections by UNIX sockets
local all all password
#
# All IPv4 connections from localhost
host all all 127.0.0.1 255.255.255.255 password
#
# All IPv6 localhost connections
host all all ::1 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff password
host all all ::ffff:127.0.0.1/128 password
#
# reject all other connection attempts
host all all 0.0.0.0 0.0.0.0 reject
/etc/init.d/postgresql restart
Example wordpress
su postgres
createdb -T template1 wordpress
exit
Example: User supriyadisw with password cak3p
su postgres
createuser supriyadisw -P
Enter password for new user: cak3p [enter]
Enter it again: cak3p [enter]
Shall the new user be allowed to create databases? (y/n) y [enter]
Shall the new user be allowed to create more new users? (y/n) n [enter]
CREATE USER
exit
pgsql -U supriyadisw wordpress [enter]
Password: cak3p [enter]
Good Luck ![]()
HP ProLiant Management Software for Debian GNU/Linux 5.0 ("lenny") x86 and AMD64/EM64T (multi-part download)
php5-mysql install.
ssk@debonvm01 src $ sudo aptitude install php5-mysql
ssk@debonvm01 src $ sudo /usr/sbin/apache2ctl configtest
Syntax OK
ssk@debonvm01 src $ sudo /usr/sbin/apache2ctl graceful
run
http://devonvm01/postfixadmin/setup.php
and create superadmin account.
and move setup.php
ssk@debonvm01 src $ sudo mv /usr/share/postfixadmin/setup.php ~/.setup.php
ssk@debonvm01 src $ cat /etc/apache2/sites-available/default
ServerAdmin webmaster@localhost
DocumentRoot /var/www/
Options FollowSymLinks
AllowOverride None
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
ErrorLog /var/log/apache2/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/access.log combined
Alias /doc/ "/usr/share/doc/"
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
Alias /postfixadmin/ "/usr/share/postfixadmin/"
ssk@debonvm01 src $ sudo /usr/sbin/apache2ctl configtest
Syntax OK
ssk@debonvm01 src $ sudo /usr/sbin/apache2ctl graceful
ssk@debonvm01 src $ mysql -uroot -h localhost
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 44
Server version: 5.0.51a-24-log (Debian)
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> create database postfixadmin;
Query OK, 1 row affected (0.16 sec)
mysql> grant all on postfixadmin.* to postfixadmin@'localhost'
identified by 'foobar';
Query OK, 0 rows affected (1.51 sec)
mysql>
ssk@debonvm01 src $ diff -u /etc/postfixadmin/config.inc.php.org
/etc/postfixadmin/config.inc.php
--- /etc/postfixadmin/config.inc.php.org 2009-04-19
05:24:51.000000000 +0900
+++ /etc/postfixadmin/config.inc.php 2009-04-21 15:48:33.000000000 +0900
@@ -29,7 +29,7 @@
* Doing this implies you have changed this file as required.
* i.e. configuring database etc; specifying setup.php password etc.
*/
-$CONF['configured'] = false;
+$CONF['configured'] = true;
// In order to setup Postfixadmin, you MUST specify a hashed password here.
// To create the hash, visit setup.php in a browser and type a password
into the field,
@@ -39,14 +39,14 @@
// Postfix Admin Path
// Set the location of your Postfix Admin installation here.
// YOU MUST ENTER THE COMPLETE URL e.g. http://domain.tld/postfixadmin
-$CONF['postfix_admin_url'] = '';
+$CONF['postfix_admin_url'] = 'http://devonvm01/postfixadmin';
// shouldn't need changing.
$CONF['postfix_admin_path'] = '/usr/share/postfixadmin';
// Language config
// Language files are located in './languages', change as required..
-$CONF['default_language'] = 'en';
+$CONF['default_language'] = 'ja';
// Database Config
// mysql = MySQL 3.23 and 4.0, 4.1 or 5
@@ -54,9 +54,9 @@
// pgsql = PostgreSQL
$CONF['database_type'] = 'mysql';
$CONF['database_host'] = 'localhost';
-$CONF['database_user'] = 'postfix';
-$CONF['database_password'] = 'postfixadmin';
-$CONF['database_name'] = 'postfix';
+$CONF['database_user'] = 'postfixadmin';
+$CONF['database_password'] = 'foobar';
+$CONF['database_name'] = 'postfixadmin';
$CONF['database_prefix'] = '';
// Here, if you need, you can customize table names.
@@ -79,7 +79,7 @@
// Site Admin
// Define the Site Admins email address below.
// This will be used to send emails from to create mailboxes.
-$CONF['admin_email'] = 'postmaster@change-this-to-your.domain.tld';
+$CONF['admin_email'] = 'admin@devonvm01';
// Mail Server
// Hostname (FQDN) of your mail server.
@@ -129,10 +129,10 @@
// Default Aliases
// The default aliases that need to be created for all domains.
$CONF['default_aliases'] = array (
- 'abuse' => 'abuse@change-this-to-your.domain.tld',
- 'hostmaster' => 'hostmaster@change-this-to-your.domain.tld',
- 'postmaster' => 'postmaster@change-this-to-your.domain.tld',
- 'webmaster' => 'webmaster@change-this-to-your.domain.tld'
+ 'abuse' => 'abuse@devonvm01',
+ 'hostmaster' => 'hostmaster@devonvm01',
+ 'postmaster' => 'postmaster@devonvm01',
+ 'webmaster' => 'webmaster@devonvm01'
);
// Mailboxes
@@ -182,7 +182,7 @@
// This is the autoreply domain that you will need to set in your Postfix
// transport maps to handle virtual vacations. It does not need to be a
// real domain (i.e. you don't need to setup DNS for it).
-$CONF['vacation_domain'] = 'autoreply.change-this-to-your.domain.tld';
+$CONF['vacation_domain'] = 'autoreply.devonvm01';
// Vacation Control
// If you want users to take control of vacation set this to 'YES'.
@@ -247,14 +247,14 @@
$CONF['header_text'] = ':: Postfix Admin ::';
// link to display under 'Main' menu when logged in as a user.
-$CONF['user_footer_link'] = "http://change-this-to-your.domain.tld/main";
+$CONF['user_footer_link'] = "http://devonvm01/postfixadmin/main";
// Footer
// Below information will be on all pages.
// If you don't want the footer information to appear set this to 'NO'.
$CONF['show_footer_text'] = 'YES';
-$CONF['footer_text'] = 'Return to change-this-to-your.domain.tld';
-$CONF['footer_link'] = 'http://change-this-to-your.domain.tld';
+$CONF['footer_text'] = 'Return to devonvm01';
+$CONF['footer_link'] = 'http://devonvm01/postfixadmin';
// Welcome Message
// This message is send to every newly created mailbox.
from history.
525 wget
http://jaist.dl.sourceforge.net/sourceforge/postfixadmin/postfixadmin_2.3rc4_all.deb
526 sudo dpkg -i postfixadmin_2.3rc4_all.deb
527 sudo aptitude install libapache2-mod-php5