Wednesday, July 1, 2015

Apache-Mysql-php-python Ampp install -- damp - Windows

Apache php mysql python mod_wsgi install - manually on Windows

2015-07-05 , rev 2015-07-10 Ver 45

1. this document shows several attempts....

This document shows several attempts at finding a combination of packages that works together. See #40. That is where I actually started getting somewhere.

10. see also

stack,web,amp,xampp.gsht - manualinstall tab. sheet1 tab compares software versions. 2015-06-28Sun12.12-PM
https://docs.google.com/spreadsheets/d/1AFIbGWJuyt01jwmQ9WVD76I1DomrxoDrtdw1MAupcqg/edit?usp=sharing

15. Graham posts what to use for mod_wsgi.

https://github.com/GrahamDumpleton/mod_wsgi/blob/develop/win32/README.rst

28. I didn't use this section.... php 5.4.42 vc9 download

"VC9 x86 Thread Safe (2015-Jun-11 01:49:48) Zip [16.47MB] sha1: 7f106152261a04dc3547f0f31b4563cefbe402f4"
http://windows.php.net/download/

29. I didn't use this section.... Struggling to find packages that should work together...

2015-06-28Sun12.56-PM
vc10 w64: py 3.4 ap24 modwsgi php is vc 9 11 or 14
http://www.easyphp.org/easyphp-devserver.php
for Windows 7 and 8 Windows 2012 - EasyPHP DevServer 14.1 VC11 - This version supports : PHP 5.6.x / 5.5.x / 5.4.x / 5.3.x - VC9, VC10 and VC11 VC11 builds don't run on XP and 2003 but load VC9 and VC10 builds. - All PHP versions can be used (VC9, VC10 and VC11). ref. http://www.easyphp.org/easyphp-devserver.php
PHP 5.5 (5.5.26) - VC11 x64 Non Thread Safe (2015-Jun-11 02:03:05) Note: x64 builds are currently experimental
conclusion:
  • x64 php is experimental
  • may be able to use php vc11 with apache vc10. - 2015-06-28

40. Use w32 vc10 - for apache python and mod_wsgi

vc10 w32:
- py 3.4, ap24, mod_wsgi vc11: - php 5.6 w32 (w64 is experimental) [Cannot find vc10 binary for php 5.6] mysql: - w64

45. Download..

follow: https://github.com/GrahamDumpleton/mod_wsgi/blob/develop/win32/README.rst
Apache 2.4 win32 VC10 binary http://www.apachelounge.com/download/win32/ http://www.apachelounge.com/download/win32/binaries/httpd-2.4.12-win32.zip
http://www.microsoft.com/en-us/download/details.aspx?id=30679 download: vcredist 2012 update 4 - w32

php 5.6 http://windows.php.net/download/ http://windows.php.net/downloads/releases/php-5.5.26-Win32-VC11-x86.zip thread safe
Somehow i didn't use this one, not sure why. http://windows.php.net/downloads/releases/php-5.6.10-Win32-VC11-x86.zip PHP 5.6 (5.6.10) VC11 x86 Thread Safe (2015-Jun-11 02:33:47)

Python 3.4.3 - 2015-02-25 https://www.python.org/downloads/windows/ https://www.python.org/ftp/python/3.4.3/python-3.4.3.msi w32 vc10

modwsgi https://github.com/GrahamDumpleton/modwsgi/blob/develop/win32/README.rst https://github.com/GrahamDumpleton/mod_wsgi/releases https://github.com/GrahamDumpleton/modwsgi/releases/download/4.4.12/modwsgi-windows-4.4.12.tar.gz

https://dev.mysql.com/downloads/windows/installer/ 5.6.25

phpmyadmin http://sourceforge.net/projects/phpmyadmin/files/phpMyAdmin/4.4.10/ http://sourceforge.net/projects/phpmyadmin/files/phpMyAdmin/4.4.10/phpMyAdmin-4.4.10-english.zip/download

50. unpack and install

  • create .gitignore and create git repo to track edits I make to the settings.
I am following this: http://superuser.com/questions/748117/how-to-manually-install-apache-php-and-mysql-on-windows
  • I unpack apache into c:\p2\damp\apache
  • run httpd.exe from command prompt
  • need msvcr100.dll -- install 2012 vcredist x86
  • set paths in httpd.conf
  • win10: no error but httpd just sits there. localhost will not work.
  • win10: didn't get firewall request to add httpd to the allowed list.
  • win7: asked to add to firewall. it works.
  • copy php.ini-'dev' to php.ini
  • enable php in httpd.conf
  • test it. it works.
  • apache and php are working.
  • This will print a text file of the last 1 changes. >>> git format-patch -1 head --stdout > patch5630a.txt
Install apache as a service.
C:\p2\damp\apache\bin\httpd.exe -k install
C:\Windows\system32>C:\p2\damp\apache\bin\httpd.exe -k install Installing the 'Apache2.4' service The 'Apache2.4' service is successfully installed. Testing httpd.conf....

Mysql

From: C:\p2\damp\,this,\mysql-installer-community-5.6.25.0.msi
  • install mysql. it would only go in program files. No other choice was offered.
  • I installed win64, 64bit.
  • (next time do this later) made user dg417 passwd
  • root
  • done. ok.

55. Phpmyadmin:

https://wiki.phpmyadmin.net/pma/Quick_Install
cd phpMyAdmin mkdir config # create directory for saving http://localhost/phpMyAdmin/setup/ ## run setup
had to edit php.ini for mbstring ext. lots of edits. see git commit

Testing my 'prodrpt' app

"C:\Program Files\MySQL\MySQL Server 5.6\bin\mysql.exe" --user=root -p -e "create database prodrptdb";
"C:\Program Files\MySQL\MySQL Server 5.6\bin\mysql.exe" --user=root -p prodrptdb < C:\p2\damp\htdocs\2test\prodrpt\documents\bkups\prodrptexp.sql
Set default collation in mysql.
This didn't do it: SET NAMES 'utf8';
The following worked. It's in my.ini
David Gleba set default collation...
collationserver=utf8unicode_ci
charactersetserver=utf8
Try this next time:
CREATE USER 'dg417'@'localhost' IDENTIFIED BY '**';
CREATE USER 'dg417'@'%';
GRANT USAGE ON . TO 'dg417'@'localhost' ;
GRANT ALL PRIVILEGES ON prodrptdb.
TO 'dg417'@'%';

60. Install python mod_wsgi module

C:\p2\Python34\
install wsgi module, w32 vc10 ap24 py34.
edit httpd.conf
install python 3.4 w32
cd C:\p2\Python34\Scripts
pip install Django
django get-pip.py
pip install Django
Successfully installed django-1.8.2
pip install django-admin-bootstrapped
Successfully installed django-admin-bootstrapped-2.5.2
I got error on trakberry app but the other two apps work.
Request Method: GET
Request URL: http://localhost:8986/trakberry/admin/
Django Version: 1.8.2
Exception Type: ImportError
Exception Value:
No module named 'views'

90. Summary

Working - per my basic testing by starting them up in a web page: Apache, mysql, php, python, django, xataface, codeigniter, yii, 2015-07-01Wed18.49-PM
I think the damp folder is portable. Install mysql and python using the installers. Everything except for mysql and python are in the c:\p2\damp folder.
files used:
httpd-2.4.12-win32-vc10(apache).zip
modwsgi-4.4.12-ap24-py34-VC10-w32.so
Graham Dumpleton's mod
wsgi-windows-4.4.12.tar.gz
mysql-installer-community-5.6.25.0,win32-and-win64.msi
php-5.5.26-Win32-VC11-x86.zip
phpMyAdmin-4.4.10-english.zip
python-3.4.3.msi (w32, all python windows is vc10 )
vcredist_x86-2012update4.exe

100. Question

I manually installed apache, python, modwsgi, mysql and php. I matched the compiler version -VC10, for python, apache, and modwsgi. I couldn't find a VC10 binary for PHP 5.5 so I used vc11. Mysql is the 64bit community binary.
Everything seems to be working OK.
Will the combination of vc10/11 compiler and 32/64 bit versions I used work ok, or will it lead to problems? Is there a way to test it other than just using it?
Windowsversionbitsvc
Apache2.4.12w32vc10
Python3.4.3w32vc10
MySQL5.6.24w64?
PHP5.5.26w32vc11
More detailed notes of my installation are at: http://davidgleba.blogspot.ca/2015/07/apache-install-2015-06-28-2md.html

Note: made the installation on st-dgleba machine. 2015-07-01.

105.

I added filezilla server. 2015-07-07 May be best to install over top using installer when installing this on another machine. It will install the service.

110. Compatibility

"although some docuentation suggests that VC10 and VC11 are compatible with each other, I make no guarantee of this." http://forum.wampserver.com/read.php?2,128113,128268

115. Mysql users.

Removed 'any' user see screenshots in dropbox. ver7 2015-07-10Fri12.22-PM C:\n\Dropbox\csd\computer\damp-2015-07-01\mysqlinstallnotes

120. enable mod_rewrite

uncomment this line in httpd.conf:
LoadModule rewrite_module modules/mod_rewrite.so
This won't display correctly. don't copy and paste this...
AllowOverride none Require all denied
DocumentRoot "c:/p2/damp/htdocs" <Directory "c:/p2/damp/htdocs"> Options Indexes FollowSymLinks Includes ExecCGI AllowOverride All Require all granted
Find any additional occurrences of the line “AllowOverride None” and change it to “AllowOverride All”.
Used some info of this link below and other info copied from xampp httd.conf. http://www.webdevdoor.com/php/mod_rewrite-windows-apache-url-rewriting/
ver 8 of damp, 2015-07-10Fri19.13-PM no zip/7z file made.

.end.

-

-

-

No comments:

Post a Comment