Commit 8065e06c authored by tbrehm's avatar tbrehm
Browse files

- Added the interface part of the ispconfig pacage manager

- updated the debian installation instructions
parent 6f76a9f5
......@@ -40,7 +40,7 @@ apt-get install amavisd-new spamassassin clamav clamav-daemon zoo unzip bzip2 ar
3) Install apache, PHP5 and phpmyadmin (1 line!):
apt-get install apache2 apache2.2-common apache2-doc apache2-mpm-prefork apache2-utils libexpat1 ssl-cert libapache2-mod-php5 php5 php5-common php5-gd php5-mysql php5-imap phpmyadmin php5-cli
apt-get install apache2 apache2.2-common apache2-doc apache2-mpm-prefork apache2-utils libexpat1 ssl-cert libapache2-mod-php5 php5 php5-common php5-gd php5-mysql php5-imap phpmyadmin php5-cli libapache2-mod-fcgid
Then run the following to enable the Apache modules:
......
Installation
-----------
It is recommended to use a clean (fresh) Debian etch install where you just selected "Standard System" as the package selection during setup. Then follow the steps below to setup your server with ISPConfig 3:
1) Install Postfix, Courier, Saslauthd, MySQL, phpMyAdmin with the following command line (on one line!):
apt-get install postfix postfix-mysql postfix-doc mysql-client mysql-server courier-authdaemon courier-authlib-mysql courier-pop courier-pop-ssl courier-imap courier-imap-ssl libsasl2 libsasl2-modules libsasl2-modules-sql sasl2-bin libpam-mysql openssl courier-maildrop getmail4
Answer the questions from the package manager as follows.
Create directories for web-based administration ? <-- No
General type of configuration? <-- Internet site
Mail name? <-- server1.mydomain.tld
SSL certificate required <-- Ok
...use your own domain name of course ;)
Edit the file /etc/mysql/my.cnf
vi /etc/mysql/my.cnf
and comment out the line
bind-address = 127.0.0.1
then restart mysql
/etc/init.d/mysql restart
Set the mysql database password:
mysqladmin -u root password yourrootsqlpassword
mysqladmin -h ispconfig.local -u root password yourrootsqlpassword
2) Install Amavisd-new, Spamassassin and Clamav (1 line!):
apt-get install amavisd-new spamassassin clamav clamav-daemon zoo unzip bzip2 arj nomarch lzop cabextract apt-listchanges libnet-ldap-perl libauthen-sasl-perl clamav-docs daemon libio-string-perl libio-socket-ssl-perl libnet-ident-perl zip libnet-dns-perl
3) Install apache, PHP5 and phpmyadmin (1 line!):
apt-get install apache2 apache2.2-common apache2-doc apache2-mpm-prefork apache2-utils libexpat1 ssl-cert libapache2-mod-php5 php5 php5-common php5-gd php5-mysql php5-imap phpmyadmin php5-cli libapache2-mod-fcgid apache2-suexec
Then run the following to enable the Apache modules:
a2enmod suexec
a2enmod rewrite
a2enmod ssl
4) Install pure-ftpd and quota
apt-get install pure-ftpd-common pure-ftpd-mysql quota quotatool
Edit the file /etc/default/pure-ftpd-common
vi /etc/default/pure-ftpd-common
and change the start mode from inetd to standalone.
Edit the file /etc/inetd.conf
vi /etc/inetd.conf
and comment out the line for the FTP service, so it looks like this:
# ftp stream tcp nowait root /usr/sbin/tcpd /usr/sbin/pure-ftpd-wrapper
Then execute:
/etc/init.d/openbsd-inetd restart
5) Install mydns
apt-get install mydns-mysql
What is the hostname of the machine on which the database will run? -> localhost
What is the database name for the MyDNS database? -> mydns
Would you like to set up the database and tables automatically? -> yes
What is the username of the MySQL administrator? -> root
Enter the MySQL administrator password -> yourrootsqlpassword
Confirm this password -> yourrootsqlpassword
What is the MyDNS username? -> mydns
What is the MyDNS user password? -> mydnspassword
The mydns installer is a bit tricky, you will have to select to create a new database for mydns and use a existing mysql user, e.g. the mysql root user. This database is only to fullfill the requirements for the debian pacakge during installation and will not be used by ISPConfig later. ISPConfig will automatically change the mydns configuration files to use the ISPConfig database.
6) Install vlogger and webalizer
apt-get install vlogger webalizer
7) Install ISPConfig 3
There are two possile scenarios, but not both:
7.1) Install the latest released version
7.2) Install directly from SVN
apt-get install php5-cli
7.1) Installation of beta 3 from tar.gz
cd /tmp
wget http://www.ispconfig.org/downloads/ISPConfig-3.0.0.6-beta.tar.gz
tar xvfz ISPConfig-3.0.0.6-beta.tar.gz
cd ispconfig3_install/install/
7.2) Installation from SVN
apt-get install subversion
cd /tmp
svn export svn://svn.ispconfig.org/ispconfig3/trunk/
cd trunk/install
7.1+7.2) Now proceed with the ISPConfig installation.
Now start the installation process by executing:
php -q install.php
The installer will configure all services like postfix, sasl, courier, etc. for you. A manual setup as required for ISPConfig 2 (perfect setup guides) is not nescessary. To login to the ISPConfig controlpanel, open the following URL in your browser (replace the IP to match your settings!):
http://192.168.0.100:8080/
the default login is:
user: admin
password: admin
In case you get a permission denied error from apache, please restart the apache webserver process.
Optional:
Install a webbased Email Client
apt-get install squirrelmail
ln -s /usr/share/squirrelmail/ /var/www/webmail
Access squirrelmail:
http://192.168.0.100/webmail
To configure squirrelmail, run:
/usr/sbin/squirrelmail-configure
----------------------------------------------------------------------------------------------------------
Hints:
debian 4.0 under openvz:
VPSID=101
for CAP in CHOWN DAC_READ_SEARCH SETGID SETUID NET_BIND_SERVICE NET_ADMIN SYS_CHROOT SYS_NICE CHOWN DAC_READ_SEARCH SETGID SETUID NET_BIND_SERVICE NET_ADMIN SYS_CHROOT SYS_NICE
do
vzctl set $VPSID --capability ${CAP}:on --save
done
----------------------------------------------------------------------------------------------------------
Installing Jailkit:
apt-get install build-essential autoconf automake1.9 libtool flex bison
cd /tmp
wget http://olivier.sessink.nl/jailkit/jailkit-2.5.tar.gz
tar xvfz jailkit-2.5.tar.gz
cd jailkit-2.5
./configure
make
make install
rm -rf jailkit-2.5*
......@@ -606,6 +606,27 @@ CREATE TABLE `shell_user` (
--
-- --------------------------------------------------------
--
-- Tabellenstruktur fr Tabelle `software_package`
--
CREATE TABLE `software_package` (
`package_id` int(11) NOT NULL auto_increment,
`software_repo_id` int(11) NOT NULL,
`package_name` varchar(100) NOT NULL,
`package_title` varchar(255) NOT NULL,
`package_description` text,
`package_version` varchar(255) default NULL,
PRIMARY KEY (`package_id`),
UNIQUE KEY `package_name` (`package_name`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Daten fr Tabelle `software_package`
--
-- --------------------------------------------------------
--
......@@ -625,7 +646,13 @@ CREATE TABLE `software_repo` (
`repo_password` varchar(30) default NULL,
`active` varchar(255) NOT NULL default 'y',
PRIMARY KEY (`software_repo_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Daten fr Tabelle `software_repo`
--
INSERT INTO `software_repo` (`software_repo_id`, `sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `repo_name`, `repo_url`, `repo_username`, `repo_password`, `active`) VALUES (1, 1, 1, 'riud', 'riud', '', 'ISPConfig Addons', 'http://repo.ispconfig.org/addons/', '', '', 'n');
-- --------------------------------------------------------
......@@ -636,18 +663,43 @@ CREATE TABLE `software_repo` (
CREATE TABLE `software_update` (
`software_update_id` int(11) NOT NULL auto_increment,
`software_repo_id` int(11) NOT NULL,
`package_name` varchar(255) NOT NULL,
`update_url` varchar(255) NOT NULL,
`update_md5` varchar(255) NOT NULL,
`install` char(1) NOT NULL,
`depenencies` varchar(255) NOT NULL,
`update_dependencies` varchar(255) NOT NULL,
`update_title` varchar(255) NOT NULL,
`v1` tinyint(4) NOT NULL default '0',
`v2` tinyint(4) NOT NULL default '0',
`v3` tinyint(4) NOT NULL default '0',
`v4` tinyint(4) NOT NULL default '0',
`type` enum('full','update') NOT NULL default 'full',
PRIMARY KEY (`software_update_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Daten fr Tabelle `software_update`
--
-- --------------------------------------------------------
--
-- Tabellenstruktur fr Tabelle `software_update_inst`
--
CREATE TABLE `software_update_inst` (
`software_update_inst_id` int(10) unsigned NOT NULL auto_increment,
`software_update_id` int(11) NOT NULL default '0',
`package_name` varchar(255) NOT NULL,
`server_id` int(11) NOT NULL,
`status` enum('none','installing','installed','deleting') NOT NULL default 'none',
PRIMARY KEY (`software_update_inst_id`),
UNIQUE KEY `software_update_id` (`software_update_id`,`package_name`,`server_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Daten fr Tabelle `software_update_inst`
--
-- --------------------------------------------------------
......
......@@ -250,10 +250,10 @@ class db
}
} elseif(is_array($record_new)) {
foreach($record_new as $key => $val) {
if(isset($record_new[$key]) && $record_old[$key] != $val) {
if(isset($record_new[$key]) && @$record_old[$key] != $val) {
// Record has changed
$diffrec_full['new'][$key] = $val;
$diffrec_full['old'][$key] = $record_old[$key];
$diffrec_full['old'][$key] = @$record_old[$key];
$diff_num++;
} else {
$diffrec_full['new'][$key] = $val;
......
<?php
$wb['list_head_txt'] = 'Software packages';
$wb['installed_txt'] = 'Status';
$wb['package_title_txt'] = 'Package';
$wb['package_description_txt'] = 'Description';
$wb['action_txt'] = 'Action';
?>
<?php
$wb['list_head_txt'] = 'Software updates';
$wb['installed_txt'] = 'Action';
$wb['update_title_txt'] = 'Update';
$wb['version_txt'] = 'Version';
$wb['action_txt'] = 'Action';
?>
......@@ -90,7 +90,13 @@ $items[] = array( 'title' => 'Repositories',
'target' => 'content',
'link' => 'admin/software_repo_list.php');
$items[] = array( 'title' => 'Packages',
'target' => 'content',
'link' => 'admin/software_package_list.php');
$items[] = array( 'title' => 'Updates',
'target' => 'content',
'link' => 'admin/software_update_list.php');
$module['nav'][] = array( 'title' => 'Software',
'open' => 1,
......
<?php
/*
Copyright (c) 2008, Till Brehm, projektfarm Gmbh
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of ISPConfig nor the names of its contributors
may be used to endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
require_once('../../lib/config.inc.php');
require_once('../../lib/app.inc.php');
//* Check permissions for module
$app->auth->check_module_permissions('admin');
//* This is only allowed for administrators
if(!$app->auth->is_admin()) die('only allowed for administrators.');
//* Get the latest packages from the repositorys and insert them in the local database
$packages_added = 0;
$repos = $app->db->queryAllRecords("SELECT software_repo_id, repo_url, repo_username, repo_password FROM software_repo WHERE active = 'y'");
if(is_array($repos)) {
foreach($repos as $repo) {
$client = new SoapClient(null, array('location' => $repo['repo_url'],
'uri' => $repo['repo_url']));
$packages = $client->get_packages($repo['repo_username'], $repo['repo_password']);
if(is_array($packages)) {
foreach($packages as $p) {
$package_name = $app->db->quote($p['name']);
$tmp = $app->db->queryOneRecord("SELECT package_id FROM software_package WHERE package_name = '$package_name'");
if(empty($tmp['package_id'])) {
$package_title = $app->db->quote($p['title']);
$package_description = $app->db->quote($p['description']);
$software_repo_id = intval($repo['software_repo_id']);
$sql = "INSERT INTO software_package (software_repo_id, package_name, package_title, package_description) VALUES ($software_repo_id, '$package_name', '$package_title', '$package_description')";
$app->db->query($sql);
$packages_added++;
}
}
}
}
}
//* Install packages, if GET Request
if(isset($_GET['action']) && $_GET['action'] == 'install' && $_GET['package'] != '' && $_GET['server_id'] > 0) {
$package_name = $app->db->quote($_GET['package']);
$server_id = intval($_GET['server_id']);
$sql = "SELECT software_update_id, package_name, update_title FROM software_update WHERE type = 'full' AND package_name = '$package_name' ORDER BY v1 DESC, v2 DESC, v3 DESC, v4 DESC LIMIT 0,1";
$tmp = $app->db->queryOneRecord($sql);
$software_update_id = $tmp['software_update_id'];
$insert_data = "(package_name, server_id, software_update_id, status) VALUES ('$package_name', '$server_id', '$software_update_id','installing')";
$app->db->datalogInsert('software_update_inst', $insert_data, 'software_update_inst_id');
}
// Show the list in the interface
// Loading the template
$app->uses('tpl');
$app->tpl->newTemplate("form.tpl.htm");
$app->tpl->setInclude('content_tpl','templates/software_package_list.htm');
$servers = $app->db->queryAllRecords('SELECT server_id, server_name FROM server ORDER BY server_name');
$packages = $app->db->queryAllRecords('SELECT * FROM software_package');
if(is_array($packages)) {
foreach($packages as $key => $p) {
$installed_txt = '';
foreach($servers as $s) {
$inst = $app->db->queryOneRecord("SELECT * FROM software_update, software_update_inst WHERE software_update_inst.software_update_id = software_update.software_update_id AND software_update_inst.package_name = '".addslashes($p["package_name"])."' AND server_id = '".$s["server_id"]."'");
$version = $inst['v1'].'.'.$inst['v2'].'.'.$inst['v3'].'.'.$inst['v4'];
if($inst['status'] == 'installed') {
$installed_txt .= $s['server_name'].": Installed version $version<br />";
} elseif ($inst['status'] == 'installing') {
$installed_txt .= $s['server_name'].": Installation in progress<br />";
} elseif ($inst['status'] == 'deleting') {
$installed_txt .= $s['server_name'].": Deletion in progress<br />";
} else {
$installed_txt .= $s['server_name'].": <a href=\"#\" onClick=\"loadContent('admin/software_package_list.php?action=install&package=".$p["package_name"]."&server_id=".$s["server_id"]."');\">Install now</a><br />";
}
}
$packages[$key]['installed'] = $installed_txt;
}
}
$app->tpl->setLoop('records',$packages);
include_once('lib/lang/en_software_package_list.lng');
$app->tpl->setVar($wb);
$app->tpl_defaults();
$app->tpl->pparse();
?>
\ No newline at end of file
<?php
/*
Copyright (c) 2008, Till Brehm, projektfarm Gmbh
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of ISPConfig nor the names of its contributors
may be used to endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/******************************************
* Begin Form configuration
******************************************/
$list_def_file = "list/software_repo.list.php";
$tform_def_file = "form/software_repo.tform.php";
/******************************************
* End Form configuration
******************************************/
require_once('../../lib/config.inc.php');
require_once('../../lib/app.inc.php');
//* Check permissions for module
$app->auth->check_module_permissions('admin');
$app->uses("tform_actions");
$app->tform_actions->onDelete();
?>
\ No newline at end of file
<?php
/*
Copyright (c) 2008, Till Brehm, projektfarm Gmbh
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of ISPConfig nor the names of its contributors
may be used to endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/******************************************
* Begin Form configuration
******************************************/
$tform_def_file = "form/software_repo.tform.php";
/******************************************
* End Form configuration
******************************************/
require_once('../../lib/config.inc.php');
require_once('../../lib/app.inc.php');
//* Check permissions for module
$app->auth->check_module_permissions('admin');
// Loading classes
$app->uses('tpl,tform,tform_actions');
$app->load('tform_actions');
class page_action extends tform_actions {
}
$page = new page_action;
$page->onLoad();
?>
\ No newline at end of file
<?php
/*
Copyright (c) 2008, Till Brehm, projektfarm Gmbh
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of ISPConfig nor the names of its contributors
may be used to endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
require_once('../../lib/config.inc.php');
require_once('../../lib/app.inc.php');
/******************************************
* Begin Form configuration
******************************************/
$list_def_file = "list/software_repo.list.php";
/******************************************
* End Form configuration
******************************************/
//* Check permissions for module
$app->auth->check_module_permissions('admin');
$app->uses('listform_actions');
$app->listform_actions->onLoad();
?>
\ No newline at end of file