biossss Posted February 10, 2005 Report Posted February 10, 2005 Nu taka php esmu galiigs vargulis (sintaxi tikai zinu), tad nu man taads jautajums: vai es varu uzinstalet uz sava PC php, un tadejadi macities/treneties, respektivi, lai es redzetu ko es tur esmu izdariijis!
рпр Posted February 10, 2005 Report Posted February 10, 2005 aizej uz php.net novelc php instalaaciju aizej uz httpd.apache.org un novecl webservera instalaaciju sinstalaa, sakonfiguree un njemies, kameer nelabi paliek. aa bija kautkaadi tuulji, kas uzreiz uzinstaleejot vienu tuuli bez nekaadas instalaacijas aiziet, bet tas tikai uz windowsa. par linuxu neko taadu neesmu dzirdeejis.
Grey_Wolf Posted February 10, 2005 Report Posted February 10, 2005 Ja nav probleemu ar krievu valodu tad iesaku apskatiities sho" http://www.stasss.hut.ru/exp_main_01.htm Aprakstc - soli/pa solm :) Apache un PHP sapratiis pat beerns
Klez Posted February 11, 2005 Report Posted February 11, 2005 mazinja pamaaciiba ... kaa instaleet php mysql un apaci
Kristabs Posted February 14, 2005 Report Posted February 14, 2005 (edited) Pierakstiiju, kad pats dariiju un cerams, ka viss te kaartiibaa. Uzrakstiiju tik leimi, lai katram buutu katrs siikums skaidrs. Ceru, ka kaadam arii noderees... Nu vieniigi man luugums kaadam pro, lai pieraksta php un apache kompilaacijas parametrus smukaakus un pilnveertiigaakus! Install Linux + Apache + MySQL + PHP = LAMP ---------------------------------------------- *INFO Shiis komandas un instaleeshana buutu jaaveic tieshi taadaa seciibaa kaadaa tas ir uzrakstiits, lai piemeeram php vareetu konfigureet jau ar parametriem, kuros noraada uz mysql. ---------------------------------------------- *Pieraksts: user - tavs lietotaaja vaards (arii direktoriju struktuuraa neaizmirstu "user" aizvietot ar savu lietotaaja vaardu) # - komanda izpildaama kaa lietotaajam $ - komanda izpildaam kaa "root" (su) ---------------------------------------------- *Source: #mkdir - /home/user/apch_inst PHP latest source - http://lv.php.net/get/php-5.0.3.tar.gz/from/a/mirror Apache - http://httpd.apache.org/download.cgi MySQL - http://dev.mysql.com/get/Downloads/MySQL-4...om/pick#mirrors Save to dir - /home/user/apch_inst ---------------------------------------------- *DIR structure: Install dir - /home/user/apch_inst Destination dir: MySQL - /usr/db/mysql Apache - /usr/www/httpd PHP - /usr/www/php ---------------------------------------------- *Users: Applications -> System Settings -> Users and Groups izveido lietotaaju "mysql", kuram nav vajadziibas veidot home dir ---------------------------------------------- *MySQL install: $mkdir /usr/db/mysql $chown -R mysql:mysql /usr/db/mysql $chown -R user:user /usr/db/mysql #cd /home/user/apch_inst #tar xvzf mysql-4.1.9.tar.gz #cd /mysql-4.1.9/ #./configure --prefix=/usr/db/mysql #make #su -c "make install" #/usr/db/mysql/bin/mysql_install_db #/usr/db/mysql/bin/mysqld_safe --user=mysql #/usr/db/mysql/bin/mysqladmin -u root password new-password #/usr/db/mysql/bin/mysqladmin -u root -h localhost.localdomain password new-password #cp support-files/my-medium.cnf /etc/my.cnf #nano /etc/my.cnf Example: [client] port = 3306 socket = /tmp/mysql.sock [mysqld] port = 3306 socket = /tmp/mysql.sock skip-locking key_buffer = 16K max_allowed_packet = 1M table_cache = 4 sort_buffer_size = 64K net_buffer_length = 2K thread_stack = 64K skip-networking server-id = 1 [mysqldump] quick max_allowed_packet = 16M [mysql] no-auto-rehash [isamchk] key_buffer = 8M sort_buffer_size = 8M [myisamchk] key_buffer = 8M sort_buffer_size = 8M/usr/db/mysql/bin/mysql [mysqlhotcopy] interactive-timeout TEST: #/usr/db/mysql/bin/mysql ----------------------------------------------------------- *Apache: #mkdir /usr/www/httpd #chown -R user:user /usr/www/ #cd /home/user/apch_inst #tar xvzf httpd-2.0.52.tar.gz #cd httpd-2.0.52 #./configure --prefix=/usr/www/httpd/ --enable-ssl --disable-info --disable-cgi --enable-speling --enable-so #make #su -c "make install" Servera konfiguraacijas faila modifikaacija: #nano /usr/local/apache2/conf/httpd.conf DocumentRoot "/usr/www/sites" <Directory "/usr/www/sites"> Options Indexes Includes FollowSymLinks MultiViews AllowOverride All Order allow,deny Allow from all </Directory> Liegt pieeju .htaccess: <Files ~ "^.ht"> Order allow,deny Deny from all </Files> <VirtualHost IP:80> (jeb domain name ja ir regjistreets DNS) ServerAdmin webmaster@dummy-host.example.com DocumentRoot /usr/www/sites ServerName ljapata ErrorLog logs/lljapata_log CustomLog logs/ljapata_log common </VirtualHost> #mkdir /usr/www/sites #chown -R user:nobody /usr/www/sites #chmod -R 777 /usr/www/sites #nano /usr/www/sites/index.html tur dereetu ierakstiit apmeeram taa: <html> <title>sveiks</title> <body> YEAH, tavs Apache serveris straadaa smile.gif </body> </html> Start server: #/usr/www/httpd/bin/apachectl start Stop server: #/usr/www/httpd/bin/apachectl stop ----------------------------------------------------- *PHP: Novilkt: libxml - http://xmlsoft.org/sources/ Save to dir /home/user/apch_inst #cd /home/user/apch_inst #tar xvzf xvzf libxml2-2.6.11.tar.gz #cd /home/user/apch_inst/libxml2-2.6.11 #./configure --enable-ipv6=no --with-debug #make #su -c "make install" php5 #cd /usr/www/ #mkdir /php/ #chown -R user:user /usr/www/php #cd /home/user/apch_inst/ #tar xvzf php-5.0.3.tar.gz #cd cd php-5.0.3 #./configure --prefix=/usr/www/php --with-apxs2=/usr/www/httpd/bin/apxs --with-config-file-path=/usr/www/httpd/php --enable-force-cgi-redirects --disable-cgi --with-zlib --with-gettext --disable-ipv6 --disable-versioning --with-openssl --enable-dio --with-mysql=/usr/db/mysql/ #make #su -c "make install" #mkdir /usr/www/httpd/php/ #cp -p php.ini-recommended /usr/www/httpd/php/php.ini nano /usr/www/http/conf/httpd.conf pievienot: ------------------------------------- # Use for PHP 5.x: AddHandler php5-script php AddType text/html php DirectoryIndex index.html index.php AddType application/x-httpd-php-source phps ---------------------------------------------------------------------------------------------- Veidojis: Kristabs Edited February 14, 2005 by Kristabs
biossss Posted February 14, 2005 Author Report Posted February 14, 2005 hmmm... un kaa ir ar php+MySQL, apache uz windows??? tas vispar ir iespejams?
hu_ha Posted February 14, 2005 Report Posted February 14, 2005 hmmm... un kaa ir ar php+MySQL, apache uz windows??? tas vispar ir iespejams? 13708[/snapback] jā ir, tad diez kāpēc mysql.com, php.net un apache.org ir dabūjamas win versijas? LOL
Klez Posted February 14, 2005 Report Posted February 14, 2005 (edited) hmmm... un kaa ir ar php+MySQL, apache uz windows??? tas vispar ir iespejams? 13708[/snapback] buutu paskatiijies 3 atbildes augstaak. laikam tev acis nav !?! ŠEIT IR PAMĀCIIBA, KĀ UZ WINDOWS TIPA KASTĒM UZINSTALĒT UN IEDARBINĀT TO VISU Edited February 14, 2005 by Klez
biossss Posted February 15, 2005 Author Report Posted February 15, 2005 <?mysql_connect("localhost", "root", ""); mysql_select_db("test"); if(mysql_ping()){ echo "Datu baaze straadaa", } else { echo "Datu baaze nestraadaa", } mysql_close(); ?> Ja parādas Datu baaze straadaa tad apsveicu. Apache + PHP + MySQL Strādā!!! kur tam ir japaraadaas?
Klez Posted February 15, 2005 Report Posted February 15, 2005 <?mysql_connect("localhost", "root", ""); mysql_select_db("test"); if(mysql_ping()){ echo "Datu baaze straadaa", } else { echo "Datu baaze nestraadaa", } mysql_close(); ?> Ja parādas Datu baaze straadaa tad apsveicu. Apache + PHP + MySQL Strādā!!! kur tam ir japaraadaas? 13737[/snapback] tam jaaparaadas browseriii. ja nekas neparaadas, tad tai failaa pashaa saakumaa iemet rindinju: error_reporting(E_ALL);
biossss Posted February 16, 2005 Author Report Posted February 16, 2005 Vienalga nesanak, taatad failam index.php kursh atrodas ditrektorija htdocs ir jaizskatas shadi: <? error_reporting(E_ALL); mysql_connect("localhost", "root", ""); mysql_select_db("test"); if(mysql_ping()){ echo "Datu baaze straadaa", } else { echo "Datu baaze nestraadaa", } mysql_close(); ?> ? atverot ar IE man piedava downloadot to failu, atverot ar Operu man parada sho pashu kodu...
bubu Posted February 16, 2005 Report Posted February 16, 2005 ...atverot ar IE man piedava downloadot to failu, atverot ar Operu man parada sho pashu kodu... 13784[/snapback] Tas nozīmē, ka savā httpd.conf failā neesi pielicis sekojošas rindiņas: AddType application/x-httpd-php .php LoadModule php4_module "c:/php/php4apache.dll" AddModule mod_php4.c (šī rindiņa tikai, apache ir 1.x versijas) Protams, attiecīgi piekoriģē versijas numruu php (4/5) un apache (1/2).
biossss Posted February 16, 2005 Author Report Posted February 16, 2005 AddType application/x-httpd-php .php LoadModule php4_module "c:/php/php4apache.dll" AddModule mod_php4.c (šī rindiņa tikai, apache ir 1.x versijas) tas vienalga kur es to ielieku? vai kkur speciali man shitas kods ir janovieto? es izmegjinaju visadu, bet tapat neiet! aa ... un taja htdocs vajag but tikai vienam index.php?
Recommended Posts