************************************************************************
Note by Thitipong samranvanit
Ubuntu Server , Install with LAMP
Sun VM VirtualBox , ver 3.2.8
Date 9 / 10 / 2010
Document tools : Ubuntu Server + vi ( 6 )
************************************************************************
I download LiveCD-Server6 from Ubuntu
and Install In HD ( Oracle VirtualBox )
set ipconfig by
# ifconfig eth0 192.168.1.102 netmask 255.255.255.0 up
set default gateway by
# route add default via 192.168.1.1
In my machin use Oracle VirtualBox
1 NetworkCard is Bridge Mode , Adapter1 as Bridge Adapter , Cable Connected
2 , Adapther 2 as NAT , Cable not connected
I start ping gateway by ping 192.168.1.1
and after success , then ping www.google.co.th
end ping process by Ctrl + C ( must LEFT Ctrl in VirtualBox )
******************************
Apache2
******************************
Apache2 is in /etc/Apache2
config not in /etc/apache2/httpd.conf
But config in /etc/apache2/apache2.conf
root directory is in
/var/www
You must copy file from /var/www/default-www/*.html.en to /var/www by "cp"
and copy *.gif ,*.png from /var/www/default-ww/*.* to /var/www
then rename *.html.en to *.html by command "mv"
then open browser on host PC ( ex. Windows XP + Chrome )
and enter url http://192.168.1.102
then you will find Apache page
start/stop apache2 by
# /etc/init.d/apache2 start
# /etc/init.d/apache2 stop
or you can use "sudo" if you not root
$sudo /etc/init.d/apache2 start
( must enter password of root again )
*********************************
To Test PHP
*********************************
Create 1 file named phpinfo.php
add this below code
end then save in /var/www
open browser in Host File to browse file
http://192.168.1.102/phpinfo.php
***********************************
Test Mysql
***********************************
mysql is in /etc/mysql
with config file my.cfg
Can check mysql by run at prompt
#mysql {enter} to run mysql client
if mysql server running (by default )
it will connect to mysql server database
mysql>
run command to show database by
mysql>show databases;
will list database
(now mysql is part of Oracle )
***********************************
SYSTEM
***********************************
hostname can view by command
#cat /etc/hostname
installing new software
apt-get install [pacakge]
this command may tell you unknown .
use aptitude for more information
#aptitude install [pacakge]
or user
#aptitude
to display GUI (text mode) on Linux
quit gui by "q"
user F1 on keyboard for help
for Searching package use "/"
searching Apache2 may use
"apache" or "httpd" , in this machin
found "apache"
you will find description of many program
on aptitude
( most linux program name very unclear for WinXP user)
***********************************
Download File
***********************************
you can download file with
wget ( see in aptitude )
***********************************
NOTE: in this Ubuntu Server (TextMode Only )
,there is no other files in /var/www
***********************************
No comments:
Post a Comment