ISPConfig3サーバーでSquirrelMailからRoundCubeに変更する
このチュートリアルは、The Perfect Server-CentOS 5.4 x86_64 [ISPConfig 3]をインストールしていて、WebメールクライアントとしてSquirrelMailが好きではない人のために作成されました。これは、SquirrelMailをRoundCubeに置き換えるためのガイドです。これは、視覚的に魅力的で、クライアントにとって管理しやすいものです。
重要!私は試していませんが...SquirrelMailのインストール方法は最近のCentOS5.xPerfectServerHowtosで変更されていません。このチュートリアルは、以前のバージョンのCentOSや、他のLinuxディストリビューションでも有効だと思いますが、システム内で実質的に何も変更されていません。
RoundCubeをダウンロードし、解凍して不要なファイルを削除し、インストールフォルダを準備します。 roundcubemail-0.3.1を最後に利用可能なものに置き換えます。
cd / usr / share
wget http://downloads.sourceforge.net/project/roundcubemail/roundcubemail/0.3.1/roundcubemail-0.3.1.tar.gz?use_mirror=ignum
tar -vxf roundcubemail-0.3.1.tar.gz
rm -fr roundcubemail-0.3.1.tar.gz
cd roundcubemail-0.3.1
rm-frインストーラー
chmod755 tempログ
cdconfig
cp db.inc.php.dist db.inc.php
cp main.inc.php.dist main.inc.php
それでは、RoundCube用のデータベースを作成しましょう。 ISPConfigデータベースリストに表示したいので、ISPConfigを使用して作成しました。これは私のデータベースサンプルです:
データベース名:roundcubedb
データベースユーザー:roundcubeuser
データベースパス:12345
セキュリティを強化するためにこれらを変更してください
RoundCubeインストーラーを使用すると、phpバージョンエラーが報告され、インストールを続行できないため、RoundCubeを手動でインストールする必要があります。ファイルdb.inc.phpを編集します。次の行を探し、データ(ISPConfigで作成したデータベース)で編集します。
vi db.inc.php
行を変更します:
[...] $rcmail_config['db_dsnw'] = 'mysql://roundcube:[email protected]/roundcubemail'; [...]
宛先:
[...] $rcmail_config['db_dsnw'] = 'mysql://roundcubeuser:[email protected]/roundcubedb'; [...]
また、ファイルmain.inc.phpでこれらの設定を変更します:
vi main.inc.php
行を変更します:
[...] $rcmail_config['message_cache_lifetime'] = '10d'; [...]
$rcmail_config['default_host'] = ''; [...]
$rcmail_config['smtp_server'] = ''; [...]
$rcmail_config['session_lifetime'] = 10; [...]
$rcmail_config['create_default_folders'] = FALSE; [...]
宛先:
[...] $rcmail_config['message_cache_lifetime'] = '30m';
[...] $rcmail_config['default_host'] = 'localhost';
[...] $rcmail_config['smtp_server'] = '%h';
[...] $rcmail_config['session_lifetime'] = 30;
[...] $rcmail_config['create_default_folders'] = TRUE; [...]
次に、RoundCubeデータベースにテーブルを手動で作成する必要があります。 roundcubemail-0.3.1 / SQL /フォルダー内のmysql.initial.sqlファイルを検索し、その内容をコピーします。
-- RoundCube Webmail initial database structure /*!40014 SET FOREIGN_KEY_CHECKS=0 */; -- Table structure for table `session` CREATE TABLE `session` ( `sess_id` varchar(40) NOT NULL, `created` datetime NOT NULL DEFAULT '1000-01-01 00:00:00', `changed` datetime NOT NULL DEFAULT '1000-01-01 00:00:00', `ip` varchar(40) NOT NULL, `vars` mediumtext NOT NULL, PRIMARY KEY(`sess_id`), INDEX `changed_index` (`changed`) ) /*!40000 ENGINE=INNODB */ /*!40101 CHARACTER SET utf8 COLLATE utf8_general_ci */; -- Table structure for table `users` CREATE TABLE `users` ( `user_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, `username` varchar(128) NOT NULL, `mail_host` varchar(128) NOT NULL, `alias` varchar(128) NOT NULL, `created` datetime NOT NULL DEFAULT '1000-01-01 00:00:00', `last_login` datetime NOT NULL DEFAULT '1000-01-01 00:00:00', `language` varchar(5), `preferences` text, PRIMARY KEY(`user_id`), INDEX `username_index` (`username`), INDEX `alias_index` (`alias`) ) /*!40000 ENGINE=INNODB */ /*!40101 CHARACTER SET utf8 COLLATE utf8_general_ci */; -- Table structure for table `messages` CREATE TABLE `messages` ( `message_id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, `user_id` int(10) UNSIGNED NOT NULL DEFAULT '0', `del` tinyint(1) NOT NULL DEFAULT '0', `cache_key` varchar(128) /*!40101 CHARACTER SET ascii COLLATE ascii_general_ci */ NOT NULL, `created` datetime NOT NULL DEFAULT '1000-01-01 00:00:00', `idx` int(11) UNSIGNED NOT NULL DEFAULT '0', `uid` int(11) UNSIGNED NOT NULL DEFAULT '0', `subject` varchar(255) NOT NULL, `from` varchar(255) NOT NULL, `to` varchar(255) NOT NULL, `cc` varchar(255) NOT NULL, `date` datetime NOT NULL DEFAULT '1000-01-01 00:00:00', `size` int(11) UNSIGNED NOT NULL DEFAULT '0', `headers` text NOT NULL, `structure` text, PRIMARY KEY(`message_id`), INDEX `created_index` (`created`), INDEX `index_index` (`user_id`, `cache_key`, `idx`), UNIQUE `uniqueness` (`user_id`, `cache_key`, `uid`), CONSTRAINT `user_id_fk_messages` FOREIGN KEY (`user_id`) REFERENCES `users`(`user_id`) /*!40008 ON DELETE CASCADE ON UPDATE CASCADE */ ) /*!40000 ENGINE=INNODB */ /*!40101 CHARACTER SET utf8 COLLATE utf8_general_ci */; -- Table structure for table `cache` CREATE TABLE `cache` ( `cache_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, `cache_key` varchar(128) /*!40101 CHARACTER SET ascii COLLATE ascii_general_ci */ NOT NULL , `created` datetime NOT NULL DEFAULT '1000-01-01 00:00:00', `data` longtext NOT NULL, `user_id` int(10) UNSIGNED NOT NULL DEFAULT '0', PRIMARY KEY(`cache_id`), INDEX `created_index` (`created`), INDEX `user_cache_index` (`user_id`,`cache_key`), CONSTRAINT `user_id_fk_cache` FOREIGN KEY (`user_id`) REFERENCES `users`(`user_id`) /*!40008 ON DELETE CASCADE ON UPDATE CASCADE */ ) /*!40000 ENGINE=INNODB */ /*!40101 CHARACTER SET utf8 COLLATE utf8_general_ci */; -- Table structure for table `contacts` CREATE TABLE `contacts` ( `contact_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, `changed` datetime NOT NULL DEFAULT '1000-01-01 00:00:00', `del` tinyint(1) NOT NULL DEFAULT '0', `name` varchar(128) NOT NULL, `email` varchar(128) NOT NULL, `firstname` varchar(128) NOT NULL, `surname` varchar(128) NOT NULL, `vcard` text NULL, `user_id` int(10) UNSIGNED NOT NULL DEFAULT '0', PRIMARY KEY(`contact_id`), INDEX `user_contacts_index` (`user_id`,`email`), CONSTRAINT `user_id_fk_contacts` FOREIGN KEY (`user_id`) REFERENCES `users`(`user_id`) /*!40008 ON DELETE CASCADE ON UPDATE CASCADE */ ) /*!40000 ENGINE=INNODB */ /*!40101 CHARACTER SET utf8 COLLATE utf8_general_ci */; -- Table structure for table `identities` CREATE TABLE `identities` ( `identity_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, `del` tinyint(1) NOT NULL DEFAULT '0', `standard` tinyint(1) NOT NULL DEFAULT '0', `name` varchar(128) NOT NULL, `organization` varchar(128) NOT NULL DEFAULT '', `email` varchar(128) NOT NULL, `reply-to` varchar(128) NOT NULL DEFAULT '', `bcc` varchar(128) NOT NULL DEFAULT '', `signature` text, `html_signature` tinyint(1) NOT NULL DEFAULT '0', `user_id` int(10) UNSIGNED NOT NULL DEFAULT '0', PRIMARY KEY(`identity_id`), CONSTRAINT `user_id_fk_identities` FOREIGN KEY (`user_id`) REFERENCES `users`(`user_id`) /*!40008 ON DELETE CASCADE ON UPDATE CASCADE */ ) /*!40000 ENGINE=INNODB */ /*!40101 CHARACTER SET utf8 COLLATE utf8_general_ci */; /*!40014 SET FOREIGN_KEY_CHECKS=1 */;
次に、http://www.yourdomain.tld:8080 / phpmyadminにアクセスし、MySQLのユーザー名とパスワードを入力します。 RoundCubeデータベース「roundcubedb」を選択して[SQL]タブに移動し、テキストボックスに、コピーしたテキストmysql.initial.sqlを貼り付けて、クエリを実行します。 RoundCubeWebメールが正常にインストールされました。
デフォルトのWebメールとしてRoundCubeが必要です。 SquirrelMailは使用されません。また、クライアントに変更を加えてほしくないのです。私たちは次のように進めます:このステップは、それぞれが自分のニーズに適応することができます。 SquirrelMailを保持して、RoundCubeの新しいエイリアスを作成できます。
cd / usr / share
mv squirrelmail squirrelmail.bak
mv roundcubemail-0.3.1 squirrelmail
最後に、http://www.yourdomain.tld:8080 / webmailにアクセスし、サインインしてこのかわいいWebメールをお楽しみください。
-RoundCubeの詳細:http://www.roundcube.net
-FalkoのHowtoThePerfect Server-CentOS 5.4 x86_64 [ISPConfig 3]
特別な感謝:
-ファルコ。あなたのPerfectServerHowtosは、Linuxサーバーを使い始めるのに大いに役立ちました。
-私のガールフレンドのNaty。彼女はテキストの翻訳を行いました。
-あなたの素晴らしい仕事のためのHowtoForgeチーム。