|
|
RedHat 7.3!!web://cp INSTALL ============================================================================== This document covers briefly the installation of web://cp on a RedHat 7.3 GNU/Linux system. web://cp is compatible with almost every linux distributions but the file config.php will be more edited. There are also other installation and help files and forums at Recommended .rpm packages: mysql-devel mysql mysql-server postgresql postgresql-devel postgresql-server bind bind-utils sendmail-cf sendmail proftpd proftpd-standalone apache apache-devel mod_ssl mod_bandwidth apt (freshrpms.net) Needed software: php 4.3+ -- from source or SRPM Recommended software with sendmail + pop3: poprelay ============================================================================== APT INSTALLATION Go to It is run like this: apt-get update then to upgrade: apt-get dist-upgrade or install new software: apt-get install prog-name1 prog-name2 etc... It will come in handy when you need to install needed RPM dependencies or simply make sure you have all the latest & secure software. ============================================================================== PHP INSTALLATION
If you are using a newer linux installation, you probably have php with CLI already installed. However you still need the pcntl module, you will need to recompile it. You will need to download the latest php source rpm (SRPM).
rpm -ivh *.src.rpm
cd /usr/src/redhat/SPECS you then need to edit the php.spec file where it looks like:
pushd build-cgi build --enable-force-cgi-redirect \ ...? Add the following line right under '... build-cgi' or '... build-cli': --enable-pcntl \ You can then rebuild the rpm files with: rpm -ba php.spec or rpm-build -ba php.spec If you are not using rpm packages, follow the instructions below to install from source.
PHP must be installed twice, once as a standalone binary and once as a module Step 1. ** CGI binary installation **
Step 2. ** Apache module installation **
Of course, this PHP installation might require some packages or programs you
don't have setup already. Pay a visit to ============================================================================== MOD_WATCH INSTALLATION Please read the info included in the package, it is easy enough to setup:
============================================================================== web://cp INSTALLATION
You can download web://cp from our website:
or get the latest version from CVS (please note, the CVS version may not always be optimal, the version from our website is safer): File privileges, for security
MySQL database creation
web://cp configuration
Now go through all settings and remove all lines that can be left to their default settings. Pay special attention to the settings: basedir, adminmail, sysname, sslang, key <= MAKE IT SECRET & UNIQUE, dbpass, devhd Remember to take the time to configure web://cp properly! You can now start the webcp.php daemon to see if all works correctly: interactively to actch any errors: /home/webcp/server/webcp.php then as a daemon: /home/webcp/server/webcp.php -d You can add it to your rc.local file for auto-start or make an init script for it... If you use sendmail and want the e-mail autoresponder feature to work, you need to make a symbolic link from your smrsh directory.
============================================================================== Apache, Sendmail, Bind and ProFTPd / vsFTPd CONFIGURATION (optional) ||||||||||[ Sendmail CONFIGURATION
If you use sendmail, I recommend the sendmail add-on:
||||||||||[ Bind CONFIGURATION Add the following line to your /etc/named.conf configuration file: Include /home/webcp/named/include.named ||||||||||[ ProFTPd CONFIGURATION If you use proftpd , I recommend that you remove anonymous login and add or modify your config ( /etc/proftpd.conf ) to have the following:
Umask 002 <Global>
</Global> DefaultRoot? UseReverseDNS off MaxLoginAttempts? 3 RequireValidShell? off LsDefaultOptions? "-a" TimeoutNoTransfer? 900 TimeoutIdle? 600 TimeoutLogin? 300 IdentLookups? off AllowRetrieveRestart? on AllowStoreRestart? on
If you use vsftpd, I recommend that you remove anonymous login and add or modify your config ( /etc/vsftpd/vsftpd.conf ) to have the following:
anonymous_enable=NO #
local_umask=002
chroot_local_user=YES
userlist_enable=NO
You will probably want a custom apache configuration, especially if you add several new modules. You will need at least the PHP module installed must add the following line to your /etc/httpd/httpd.conf file. Include /home/webcp/httpd/include.httpd
LogFormat "%v %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
CustomLog? /var/log/httpd/access combined
ErrorDocument? 401 /errors/401.html ErrorDocument? 403 /errors/403.html ErrorDocument? 404 /errors/404.html ErrorDocument? 500 /errors/500.html
When using web://cp, you have 2 choices to serve the secure web://cp web interface. 1- You can trust the security & stability of Apache and run another instance,
2- You can try the bundled webcp-httpd.php server that is still experimental. ** WE RECOMMEND THAT YOU USE THE APACHE CONFIGURATION **
In order to setup this software, you simply need to take a look at all settings in /home/webcp/web/config.inc.php and make sure that all server & httpd settings are set right. If you wish to use SSL, go to: /home/webcp/httpd/conf and create a server certificate with: openssl req -new -x509 -nodes -out ssl-cert.pem -keyout ssl-cert.pem -days 365 Also make sure that you set 'ssl'? to true in the config.php page. You will need stunnel setup for it to works (it comes with OpenSSL). You then need to start webcp-httpd.php: in interactive ode first to catch any errors: /home/webcp/server/webcp-httpd.php then in daemon mode: /home/webcp/server/webcp-httpd.php -d
To setup your new apache instance, The best way to act is to copy httpd.conf: cp /etc/httpd/conf/httpd.conf /home/webcp/httpd/conf/httpd.conf then edit the file to trim all the unneeded modules & config. If you wish to use SSL, you will need to create a new certificate.
openssl genrsa -rand /var/log/messages -out server.key 1024 openssl req -new -key server.key -out server.csr openssl x509 -req -days 730 -in server.csr -signkey server.key -out server.crt then copy those files in /home/webcp/httpd/conf/ In order to configure httpd.conf for web://cp, here is a list of settings you should double check: LockFile? /var/run/httpd-cp.lock PidFile? /var/run/httpd-cp.pid ScoreBoardFile? /home/webcp/httpd/logs/apache_runtime_status MinSpareServers? 1 MaxSpareServers? 5 StartServers 2 LoadModule? php4_module modules/libphp4.so AddModule? mod_php4.c Port 81 Listen 81 User webcp Group webcp
DocumentRoot "/home/webcp/web"
DirectoryIndex? index.html index.htm index.php ErrorLog? /home/webcp/httpd/logs/error_log LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined CustomLog? /home/webcp/httpd/logs/access_log combined AddType application/x-httpd-php .php .php4 .php3 .phtml
<VirtualHost? default:81>
DocumentRoot "/home/webcp/web" ServerName? servername.domain.com ServerAdmin admin php_admin_flag engine On
SSLEngine on
SSLCertificateFile /home/webcp/httpd/conf/server.crt
SSLCertificateKeyFile /home/webcp/httpd/conf/server.key <Files "\.(cgi|shtml|phtml|php3?)$">
</Files> <Directory "/var/www/cgi-bin">
</Directory>
CustomLog? logs/ssl_request_log \
</VirtualHost?> The last step is to start it to see if it works: httpd -f /home/webcp/httpd/conf/httpd.conf you may need to add a few arguments and make it look like: httpd -f /home/webcp/httpd/conf/httpd.conf -DHAVE_SSL -DHAVE_PHP4 -DHAVE_GZIP If it works fine, you can auto start it or make an init script for it. ============================================================================== Final step... Once the web://cp server daemon and the httpd web://cp server is up (apache or webcp-httpd), go to your http(s)://servername.domain.com:81/ and follow the forms to complete your setup & create the first account on your system. ** If you are in need of assistance or have a question, please go to the FORUMS or DOCUMENTATION sections **
============================================================================== This document covers briefly the installation of web://cp on a RedHat 7.3 GNU/Linux system. web://cp is compatible with almost every linux distributions but the file config.php will be more edited. There are also other installation and help files provided on Recommended .rpm packages: mysql-devel mysql mysql-server postgresql postgresql-devel postgresql-server bind bind-utils sendmail-cf sendmail proftpd proftpd-standalone apache apache-devel mod_ssl mod_bandwidth apt (freshrpms.net) Needed software: php 4.3+ -- from source or SRPM Recommended software with sendmail + pop3: poprelay ============================================================================== APT INSTALLATION Go to It is run like this: apt-get update then to upgrade: apt-get dist-upgrade or install new software: apt-get install prog-name1 prog-name2 etc... It will come in handy when you need to install needed RPM dependencies or simply make sure you have all the latest & secure software. ============================================================================== PHP INSTALLATION
If you are using a newer linux installation, you probably have php with CLI already installed. However you still need the pcntl module, you will need to recompile it. You will need to download the latest php source rpm (SRPM).
rpm -ivh *.src.rpm
cd /usr/src/redhat/SPECS you then need to edit the php.spec file where it looks like:
pushd build-cgi build --enable-force-cgi-redirect \ ...? Add the following line right under '... build-cgi' or '... build-cli': --enable-pcntl \ You can then rebuild the rpm files with: rpm -ba php.spec or rpm-build -ba php.spec If you are not using rpm packages, follow the instructions below to install from source.
PHP must be installed twice, once as a standalone binary and once as a module Step 1. ** CGI binary installation **
Step 2. ** Apache module installation **
Of course, this PHP installation might require some packages or programs you
don't have setup already. Pay a visit to ============================================================================== MOD_WATCH INSTALLATION Please read the info included in the package, it is easy enough to setup:
============================================================================== web://cp INSTALLATION
You can download web://cp from our website:
or get the latest version from CVS (please note, the CVS version may not always be optimal, the version from our website is safer): File privileges, for security
MySQL database creation
web://cp configuration
Now go through all settings and remove all lines that can be left to their default settings. Pay special attention to the settings: basedir, adminmail, sysname, sslang, key <= MAKE IT SECRET & UNIQUE, dbpass, devhd Remember to take the time to configure web://cp properly! You can now start the webcp.php daemon to see if all works correctly: interactively to actch any errors: /home/webcp/server/webcp.php then as a daemon: /home/webcp/server/webcp.php -d You can add it to your rc.local file for auto-start or make an init script for it... If you use sendmail and want the e-mail autoresponder feature to work, you need to make a symbolic link from your smrsh directory.
============================================================================== Apache, Sendmail, Bind and ProFTPd / vsFTPd CONFIGURATION (optional) ||||||||||[ Sendmail CONFIGURATION
If you use sendmail, I recommend the sendmail add-on:
||||||||||[ Bind CONFIGURATION Add the following line to your /etc/named.conf configuration file: Include /home/webcp/named/include.named ||||||||||[ ProFTPd CONFIGURATION If you use proftpd , I recommend that you remove anonymous login and add or modify your config ( /etc/proftpd.conf ) to have the following:
Umask 002 <Global>
</Global> DefaultRoot? UseReverseDNS off MaxLoginAttempts? 3 RequireValidShell? off LsDefaultOptions? "-a" TimeoutNoTransfer? 900 TimeoutIdle? 600 TimeoutLogin? 300 IdentLookups? off AllowRetrieveRestart? on AllowStoreRestart? on
If you use vsftpd, I recommend that you remove anonymous login and add or modify your config ( /etc/vsftpd/vsftpd.conf ) to have the following:
anonymous_enable=NO #
local_umask=002
chroot_local_user=YES
userlist_enable=NO
You will probably want a custom apache configuration, especially if you add several new modules. You will need at least the PHP module installed must add the following line to your /etc/httpd/httpd.conf file. Include /home/webcp/httpd/include.httpd
LogFormat "%v %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
CustomLog? /var/log/httpd/access combined
ErrorDocument? 401 /errors/401.html ErrorDocument? 403 /errors/403.html ErrorDocument? 404 /errors/404.html ErrorDocument? 500 /errors/500.html
When using web://cp, you have 2 choices to serve the secure web://cp web interface. 1- You can trust the security & stability of Apache and run another instance,
2- You can try the bundled webcp-httpd.php server that is still experimental. ** WE RECOMMEND THAT YOU USE THE APACHE CONFIGURATION **
In order to setup this software, you simply need to take a look at all settings in /home/webcp/web/config.inc.php and make sure that all server & httpd settings are set right. If you wish to use SSL, go to: /home/webcp/httpd/conf and create a server certificate with: openssl req -new -x509 -nodes -out ssl-cert.pem -keyout ssl-cert.pem -days 365 Also make sure that you set 'ssl'? to true in the config.php page. You will need stunnel setup for it to works (it comes with OpenSSL). You then need to start webcp-httpd.php: in interactive ode first to catch any errors: /home/webcp/server/webcp-httpd.php then in daemon mode: /home/webcp/server/webcp-httpd.php -d
To setup your new apache instance, The best way to act is to copy httpd.conf: cp /etc/httpd/conf/httpd.conf /home/webcp/httpd/conf/httpd.conf then edit the file to trim all the unneeded modules & config. If you wish to use SSL, you will need to create a new certificate.
openssl genrsa -rand /var/log/messages -out server.key 1024 openssl req -new -key server.key -out server.csr openssl x509 -req -days 730 -in server.csr -signkey server.key -out server.crt then copy those files in /home/webcp/httpd/conf/ In order to configure httpd.conf for web://cp, here is a list of settings you should double check: LockFile? /var/run/httpd-cp.lock PidFile? /var/run/httpd-cp.pid ScoreBoardFile? /home/webcp/httpd/logs/apache_runtime_status MinSpareServers? 1 MaxSpareServers? 5 StartServers 2 LoadModule? php4_module modules/libphp4.so AddModule? mod_php4.c Port 81 Listen 81 User webcp Group webcp
DocumentRoot "/home/webcp/web"
DirectoryIndex? index.html index.htm index.php ErrorLog? /home/webcp/httpd/logs/error_log LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined CustomLog? /home/webcp/httpd/logs/access_log combined AddType application/x-httpd-php .php .php4 .php3 .phtml
<VirtualHost? default:81>
DocumentRoot "/home/webcp/web" ServerName? servername.domain.com ServerAdmin admin php_admin_flag engine On
SSLEngine on
SSLCertificateFile /home/webcp/httpd/conf/server.crt
SSLCertificateKeyFile /home/webcp/httpd/conf/server.key <Files "\.(cgi|shtml|phtml|php3?)$">
</Files> <Directory "/var/www/cgi-bin">
</Directory>
CustomLog? logs/ssl_request_log \
</VirtualHost?> The last step is to start it to see if it works: httpd -f /home/webcp/httpd/conf/httpd.conf you may need to add a few arguments and make it look like: httpd -f /home/webcp/httpd/conf/httpd.conf -DHAVE_SSL -DHAVE_PHP4 -DHAVE_GZIP If it works fine, you can auto start it or make an init script for it. ============================================================================== Final step... Once the web://cp server daemon and the httpd web://cp server is up (apache or webcp-httpd), go to your http(s)://servername.domain.com:81/ and follow the forms to complete your setup & create the first account on your system. ** If you are in need of assistance or have a question, please go to: |