EG Information

Main Index
EG Manual
Disclaimer
Legal Information
Hall of Fame
Hall of Shame
Member Rankings
Members List
Meet the Staff
Hacker's Home Page

Training Missions

Read Me First
Basic Skills
Realistic Scenarios
Cryptography
Software Cracking
Linux ELF Binary Cracking
Logical Thinking
Programming
Captcha Cracking
Patching
Steganography
Deface This Wall
/dev/null
/dev/urandom
/dev/extra

Knowledge Bank

Discussion Forums
Exploit Database New
PasteBin New
RSS Feeds RSS
Articles / Tutorials
Videos
Online EG MP3 Player Radio
Downloads
Tools

Code Resources

Submit Code
Ajax
ASM
Bash
C
CPP
Csharp
Delphi
Haskell
Java
Javascript
Jython
Lisp
mIRC
MySQL
Perl
PHP
Python
QBASIC
VisualBasic

Pimp Us Out!

Review enigmagroup.org on alexa.com

Has Enigma Group Helped You? Then Help Us By Advertising For Us. Place One Of The Following Images On Your Site And Create A Link Back To Enigma Group.

Enigma Group

Enigma Group

Enigma Group

Enigma Group

 

Affiliates

hackhound.org

suck-o.com

hack.org.za

flyninja.net

 

Enigma Group's Articles



Return to Category Selection

Setting Up a LAMP Server on Ubuntu or Debian - Submitted By: t3hmadhatt3r 2009-07-01 23:59:57
Hello. Today I will show you how to install a LAMP server package. LAMP meaning Linux, Apache, MySQL, and PHP. I am assuming you already have some sort of linux (Preferably Ubuntu or Debian but, it is your choice ;) ) and will start with apache, which is pretty simple. Open a shell and type:

sudo apt-get install apache

You will need to enter your password to continue. Now for php, which is also equaly simple. Enter these commands into the shell:

sudo apt-get install php

Again, enter your password to continue. Now for MySQL.

sudo apt-get install mysql

Enter your username and pass (I just used root and root because I'm only using the DB on my localhost) and continue the installation.

Now you should be set to build apps and test on your localhost. To check browse to http://localhost/. If you see "It Works" than apache is working. Now to check php. Open a shell and type:

gksudo nautilus (For Ubuntu)

or

gksudo konqueror (For Debian)

This command opens a root shell. Go to the root of your filesystem (Where you see the etc, var, mnt and other folders) and enter the /var/ directory. Now right click www (This is where your web files are stored) and click the "Permission" tab and change the owner of the directory to your username. Then click make changes. Now you are free to add files to the web root without using the sudo command ;). Browse to the /var/www/ folder and add a file called info.php. Inside add the code:

<?php
phpinfo();
?>

Open your broswer and go to http://localhost/info.php. If you see your php info php is ready to be used! Now for mysql -- Create a new php file in your web root named mysql.php and inside add this code:

<?php
$mysql_con = mysql_connect('localhost','root','root');
if (!$mysql_con)
     {
     die('Database connection failed: ' . mysql_error());
     }
else
   {
   echo 'Connection successful!';
   }
?>

This code does the following:

Uses mysql_connect() to attempt to connect to the DB at the localhost using root as username and root as password. If an error occurs it echo's Database connection failed: along with the mysql error. If the connection is successful than the script echo's 'Connection successful!'. Now test it out of course!

If all the previous test worked than your ready to start testing and creating web apps on your localhost!

I hope you learned a bit of linux, managing a server, and maybe even some coding from this tutorial.

I will be making more tutorials on managing your web server, coding web apps, making hacking challenges, and code audits :).

Thanks for reading.

Return to Category Selection
Comment By: ishkur88 2009-07-02 11:57:52
http://fosswire.com/post/2007/05/installing-and-configuring-lamp-on-ubuntu-part-1/

http://fosswire.com/post/2007/06/installing-and-configuring-lamp-on-ubuntu-part-2/

Comment By: t3hmadhatt3r 2009-07-02 22:55:16
That tut is better (The one above) but, I didn't copy it or any others if thats what you think :P.

Comment By: BinaryShinigami 2009-07-08 20:41:15
Should include how to setup a new mysql user, using root to run websites and clients is bad j00 j00 :)

Comment By: t3hmadhatt3r 2009-08-12 00:51:15
Hey your right :). I was thinking people would use this to pentest on their localhost but, its always good to think about security.

If you wish to submit a comment, you must be a registered member and logged in.

Login or Register.



Return to Category Selection

 

Who Visited EnigmaGroup Today?

1397 Guests, 222 Users (217 Spiders)
famous0123, tgm001, Edika, junaid_junaid59, JohnJohnJohn, ssmaslov, Galagatron, psychomarine, Dregoon, cat1vo, plex, Patrickk, mjneat, Aska, Beat_Slayer, M0rdak, Ausome1, dark_void, Imre, TheCheeseDemon, rockcraft, Vreality2007, mmndglxuwn, m0rt, unholyblood, iterrumzz, VurbTrurb, CJ_Omaha, Mayonoula, MAMWOURBROR, mutabor, gobinda, cossyDrybrich, Razin, zaCruBumas8, hunja, johny34, pantoufle, bagy, arctica, hackarchives, UsedDeteKef, Peculator, Fadhilat606, TheTrueMonarch, Pascall01, hackaday, Tjm, arndevil, flairvelocity, lol, alphbond, kdivanov, elizbethallis6, Rik, bn11, BorgBot, SHASHANK101hello, 4poc4lyptic, ksajxai, nbmorri1, electro-technic, saraf, شمالي عرعر, lamb, AutobotPrime, Underleaf, The End, tomtombomb, killobyte, snowgirlx, so_saucey, zerolife, Althor, Cramps, Hekser, Hyperborn, cyber-guard, jhgrunn, cobra, Partisan, MAZI_, cyborg, GenbreedX, moel77, cliptoX, pwnpwnlolz, letshavepie, Mrwormz, yshiau, mirmo, roozyoppomo, soft_devil, cls777, scoobywan, Reiversed, joshua, st3alth, Afrika, PaiffDryday, venter, Anthony12796, sh3llcod3, 8FIGURE, Rannim, Evil1, maloaboy, BACanON, SlayingDragons, Repuhlsive, IvanDimitriev, lolzsec, 1RiB, mzungudo, Micro_Geek, iMaxx, aciboummamymn, k0unterkulcher, somebody777, m14m16, GoododotAlcob, negasora, Rastii, UninueMem, Swifsolja, ad.conquest, ngolatkar, Infinity8, Jigoku, thesupervisor, p0is0n5ting, kernel_mod, AKL, GothicLogic, themastersinner, dnatrixene135, ChewBigRed, kalak55, sejem, cve916, pollolololo, triecturn, Violatedsmurf, Ops, jmp, xsiemich, generalisimo, strudels, ga3ttpom, KingOfBritains, epoch_qwert, suten, FriskyKat, Ryuske, Adonis Achilles, ubqbcdzzhf, 3vil, Nightraven, US£RNAM£, Weindittewcon, Batesheelocot, GSmyrlis, MaxMeier, Elite.America, rabbidmind, Psiber_Syn, phoenix22, imittyerrotte, peewster, cyberturtle, ctb, dexgeda, sdw, Pizza, White_widdow, devarian, finesse, Nature112091777, Danc7171, Alphadragon, Estadagause, 53QR10U5, Xargos, Alkomage, hardlock, Barry Gonzoles, MineDweller, Gkjt, N4g4c3N, [I]nfectedbug, wimsteege, aqr5zdcw, xin214, Bugshuppy, SnoopSky, Hessesian, voodooKobra, sKcarr, IROverRated, W1F1G3NJU75U, Baddy, ziadmosaan, gamble86, realzs, CruelDemon, Shinju, aVoid, aquiredanonymity, kukumumu, web_request, callmeneon, KissMyDAFFODIL, Feld Grau, Abhinav2107, prabhataditya, mbuyiselo, shumer, phenom216, princennamdi, huskyboiza, ninety-nine, lucca65
 
Enigma Group