$Id: INSTALL 3 2005-11-13 01:05:39Z ggw $ This version is functional and small ISP tested. It can be trusted for very organized mass virtual website hosting. Now with VH home page templates (UserDir) and automated application support. --- Intended Audience Linux system -via bash, csh etc. shell- admins. Or people learning and with time to use bash as root and live or recover from their mistakes. Must know how -or learn- to setup Apache httpd daemon and configure httpd.conf. Must understand the basics of Apache functionality and setup. (www.apache.org.) Must study virtual website hosting basics. (www.apache.org.) --- Errata and Misc -Some reseller/customer level searching and other related issues have not been tested. -We recommend running mysqlApache via mysqlISP jobs created by unixservice.com ism|4 or 5 interfaces. --- Prerequisites mySQL server and client libs installed and running on same server as the application. You must know the mysql server root password. Must have a running Apache server on the same server with cgi capabilities. Should be SSL enabled if possible (see below for intranet or other just "testing" non-SSL setup). Typical setup involves user openisp httpd daemon on some random port number like 9023 for non SSL and 8045 for SSL connections. ~openisp should have everything mysqlISP related in it (More on this below.) This is the webconsole apache or httpd server, do not confuse with the 2 other httpd instances that will be running: The main non-ssl webfarm instance, and the "shared" ssl cert optional facility httpd instance. See mysqlISP tutorial for info on setting up apache 1.3.29 mod_ssl in ~openisp or cool http://www.modssl.org example. But use wget and tar xzf instead of their somewhat outdated commands. --- Example BASH Install Instructions shell>tar xzf mysqlApacheM.m.tar.gz Where M is the major release number and m the minor release number of the latest release at openisp.net shell>cd mysqlApache shell>export CGIDIR=/apache/cgi-bin/ or whatever your Apache cgi-bin dir is note the required trailing / shell>make shell>make install shell>export ISMROOT=/home/joe or whatever dir the mysql application project dir is in shell>chown mysql $ISMROOT/mysqlApache/data make sure initialize data is readable by mysql shell>chmod o+x $ISMROOT (etc...maybe needed to also insure initialize data is readable by mysql) shell>/cgi-bin/mysqlApache.cgi Initialize This will setup application and allow you to login as user "Root" password "wsxedc" If something fails you will probably have to login to mysql command line client as root and: shell>mysql -u root -pmyrootpwd mysql>drop database mysqlbind; mysql>\q shell>/cgi-bin/mysqlApache.cgi ApacheInstall This will setup apache application dirs for the mass website hosting system. Read docs/tutorial.html --- Upgrading from 1.3 to later Run webconsole mysqlApache.cgi, click on tSiteUsers. Done. Run webconsole mysqlApache.cgi, click on tUsage. Done. --- tUsage data collector shell>vi local.h (needs to be changed if used on different servers.) shell>vi traffic.c (needs to be adjusted probably for your use.) shell>make traffic A beta traffic.c lightweight per site hits/bytes and hd usage collector has been added as 1.42. Depends heavily on correct crontab scheduling and webalizer version (if site uses this.) Use also depends on server capabilites and load. We are working on using mod_log_sql or our own pipe log file to a similar kind of program. To directly write log file info to tUsage on the fly. But this approach also has it's limitations and complexity. But is probably the best for large ISPs with backend mySQL servers and fail/load balanced Apache servers. Please see traffic.c header for more details. --- tTemplate setup Depending on your version of Apache and your own criteria you should modify the provided example templates as you see fit. This can be easy or as complex as you like, open source == you decide. Many example templates provided for Apache 1.3 and 2.0. Copy example template to production templates and test with command line mysqlApache.cgi make httpd.conf then httpd -t -f ... then finally mysqlApache.cgi bootstart[ssl] or mysqlApache.cgi restart[ssl]. Please contact us about any questions problems you may have. Docs are lacking. See docs/tutorial.html for basic mysqlX webpanel functions. --- SSL Setup (Recommended for extranets, internet access, etc.) If you have an SSL apache server handy edit local.h remove commented out: //#define SSLONLY like so... #define SSLONLY Then shell>rm *.o shell>make shell>make install --- Addendum 1 mod_so Mandrake and redhat maybe... For sure Apache 2.+ You need this: ln -s /usr/lib/apache /apache/modules ln -s /usr/lib/apache_ssl /apache/modules If you have this done first: ln -s /usr/local/apache /apache ln -s /usr/local/apache_ssl /apache_ssl --- Addendum htdocs dir You also need: mkdir /apache/htdocs mkdir /apache_ssl/htdocs Also you may want to do something like: vi /apache/htdocs/index.html vi /apache_ssl/htdocs/index.html --- Read More cp docs/tutorial.html to a browser accesible place or sym link to it if possible. Read it! It explains more (or will) on how to install mysqlApache and operate it and have a running webfarm in minutes, also how to setup required crontabs for local and remote job queue processing. --- Standard OpenISP setup backup operations. Also webconsole setup related (Loose instructions adjust to fit for your particular setup) shell>useradd -d openisp -s /bin/nologin (this may have already been done in mysqlISP setup) shell>mkdir -p ~openisp/mysqlApache/data shell>chown mysql ~openisp/mysqlApache/data shell>crontab -e Adding the following: Where mysqlpasswd is replaced by YOUR real mysql root passwd. # #mysqlApache # ##backup 20 3 * * * ISMROOT=~openisp;export ISMROOT;/cgi-bin/mysqlApache.cgi Backup mysqlpasswd > /dev/null --- Other backup ideas You should probably cross server backup all your OpenISP module data like so. Note that this involves using GRANT ALL mysql statements and a very secure internal ISP LAN. See mysql manual. Think about ISP organization with edge servers with 2 NICs and an ISP admin firewall zone with the mysql database server or replication cluster servers. All servers should have internal mirror backup drives or other cheap fast and reliable backup system (NFS and cpio in ISP admin firewall zone?) shell>crontab -e Add something like the following after setting up mysql for remote access from ONLY the IP in question in a VERY secure LAN (non routable IP's...switched hubs...behind firewall...etc) #Extra backup of mysqlApache data only even days, using mysqldump from 192.168.100.23 20 4 * * */2 /usr/local/mysql/bin/mysqldump -e -h 192.168.0.43 -u mysqlbind -pwsxedc --all mysqlbind > ~openisp/mysqlApache/data/dumpall.txt --- Lose your data and your fired Don't be lazy backup and rebackup and database warehouse your mission critical data ALWAYS! Need help contact us! Cheap and easy fall back HD: Use dd via weekly cron to copy system DH onto unmounted clone HD via raw device. If system HD fails, just swap cables and reboot. --- Legalese This doc is GPL. Don't forget to give us credit when you quote this stuff. Copyleft 2003-2004 OpenISP and Gary Wallis --- Many thanks to mySQL, mod_ssl and the Apache team! Please support them and if appropiate license your mySQL server. // vim:tw=78