SlideShare ist ein Scribd-Unternehmen logo
1 von 12
>_ Things Lab
Virtual domains
...the standard installation for
Things Lab meetings
Check an installed package
● Should be checked if all the packages are installed
correctly, if not install the package. As example for
unzip:
(should be executed at command prompt/terminal)
dpkg --get-selections | grep unzip
sudo apt-get install unzip
Check and install all packages
● Should be installed all the following packages:
php5, php-mysql, phpmyadmin, mysql-client, mysql-
server and apache2
(check one by one or... directly install all if not yet
installed...)
sudo apt-get install php5 php5-mysql apache2
phpmyadmin mysql-client mysql-server
Play with vi, the easy way
● What is it vi? Google it or RTFM (at command
prompt, man vi).
● Open the terminal and go in your home folder
cd (enter)
● Open a new file (or existing if was already present,
to open as root use sudo before the vi command)
and try to use some basic commands of vi
● vi aaa.txt (enter)
(esc) allows to enter in the command mode
Play with vi, part 1
(in command mode) i allows to enter in the insert
mode
(in command mode) x allows to delete a character
(in command mode) dd (double d) allows to delete a
line
(in insert mode, means you are editing) press esc to
enter in command mode
Play with vi, part 2
(in command mode) :q exit from the editing of the
file, do not save changes
(in command mode) :wq exit from the editing of the
file, save all changes
any other command? RTFM :-)
http://en.wikipedia.org/wiki/RTFM
If you have any problem, go in command mode and
quit without saving the changes
Setup a local domain
● At the command prompt go in /etc/ folder
cd /etc/
● Edit the file hosts with root permissions using vi
sudo vi hosts
● In vi move using the arrows and add a new line, the
line should be as the following (instead test use your
name):
127.0.0.1 test
● Save and quit with the command :wq
Check the local domain
● At the command prompt check if the domain is
responding to pings (what is it ping? RTFM!):
ping test (in your case, your name) (enter)
● Create the folder where you will have your virtual
domain:
sudo mkdir /var/www/test/ (enter)
Setup a virtual host in apache
●
At the command prompt go in /etc/apache2/sites-
enabled folder
cd /etc/apache2/sites-enabled/
● Add a new file root permissions using vi
sudo vi test (use your name instead)
● Start the insert mode and paste the text of the next
page, change from test to your name!
Virtualhost configuration
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName test
DocumentRoot /var/www/test
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/test/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ErrorLog /var/log/apache2/test-error.log
</VirtualHost>
Add files to the virtual domain
● In /var/www/test/ create a simple html file and insert
some text:
sudo vi /var/www/test/index.html (enter)
(now you know how to do it! :-) )
● In /var/www/test/ create a simple php (test.php) file
and the following insert text (is ok in one line!):
<?php print phpinfo(); ?>
Test the from the browser

Weitere ähnliche Inhalte

Was ist angesagt?

Rubyspec y el largo camino hacia Ruby 1.9
Rubyspec y el largo camino hacia Ruby 1.9Rubyspec y el largo camino hacia Ruby 1.9
Rubyspec y el largo camino hacia Ruby 1.9
David Calavera
 
Socket programming with php
Socket programming with phpSocket programming with php
Socket programming with php
Elizabeth Smith
 
Luc Suryo - Puppet on EC2
Luc Suryo - Puppet on EC2Luc Suryo - Puppet on EC2
Luc Suryo - Puppet on EC2
Puppet
 

Was ist angesagt? (20)

Rubyspec y el largo camino hacia Ruby 1.9
Rubyspec y el largo camino hacia Ruby 1.9Rubyspec y el largo camino hacia Ruby 1.9
Rubyspec y el largo camino hacia Ruby 1.9
 
Hls за час
Hls за часHls за час
Hls за час
 
Linux fundamental - Chap 11 boot
Linux fundamental - Chap 11 bootLinux fundamental - Chap 11 boot
Linux fundamental - Chap 11 boot
 
Buffer overflow for Beginners
Buffer overflow for BeginnersBuffer overflow for Beginners
Buffer overflow for Beginners
 
Haproxy - zastosowania
Haproxy - zastosowaniaHaproxy - zastosowania
Haproxy - zastosowania
 
Linux Tor Browser kurulum
Linux Tor Browser kurulumLinux Tor Browser kurulum
Linux Tor Browser kurulum
 
Node js packages [#howto with npm]
Node js packages [#howto with npm]Node js packages [#howto with npm]
Node js packages [#howto with npm]
 
Using linux in schools
Using linux in schools Using linux in schools
Using linux in schools
 
Scaling antispam solutions with Puppet
Scaling antispam solutions with PuppetScaling antispam solutions with Puppet
Scaling antispam solutions with Puppet
 
Socket programming with php
Socket programming with phpSocket programming with php
Socket programming with php
 
agri inventory - nouka data collector / yaoya data convertor
agri inventory - nouka data collector / yaoya data convertoragri inventory - nouka data collector / yaoya data convertor
agri inventory - nouka data collector / yaoya data convertor
 
NSClient++ Workshop: 06 Scripting
NSClient++ Workshop: 06 ScriptingNSClient++ Workshop: 06 Scripting
NSClient++ Workshop: 06 Scripting
 
Apache Dispatch
Apache DispatchApache Dispatch
Apache Dispatch
 
Luc Suryo - Puppet on EC2
Luc Suryo - Puppet on EC2Luc Suryo - Puppet on EC2
Luc Suryo - Puppet on EC2
 
LSA2 - 03 Http apache nginx
LSA2 - 03 Http apache nginxLSA2 - 03 Http apache nginx
LSA2 - 03 Http apache nginx
 
Breaking the RpiDocker challenge
Breaking the RpiDocker challenge Breaking the RpiDocker challenge
Breaking the RpiDocker challenge
 
Mac OSX Terminal 101
Mac OSX Terminal 101Mac OSX Terminal 101
Mac OSX Terminal 101
 
Day 2-some fun coding
Day 2-some fun codingDay 2-some fun coding
Day 2-some fun coding
 
Linux basics and commands - from lynxbee.com
Linux basics and commands - from lynxbee.comLinux basics and commands - from lynxbee.com
Linux basics and commands - from lynxbee.com
 
Rihards Olups - Encrypting Daemon Traffic With Zabbix 3.0
Rihards Olups - Encrypting Daemon Traffic With Zabbix 3.0Rihards Olups - Encrypting Daemon Traffic With Zabbix 3.0
Rihards Olups - Encrypting Daemon Traffic With Zabbix 3.0
 

Andere mochten auch (6)

Rapid prototyping
Rapid prototypingRapid prototyping
Rapid prototyping
 
Digipak analysis re-up
Digipak analysis   re-upDigipak analysis   re-up
Digipak analysis re-up
 
Wemakeit - base workshop - openlabs
Wemakeit - base workshop - openlabsWemakeit - base workshop - openlabs
Wemakeit - base workshop - openlabs
 
Virtualbox and Mysql
Virtualbox and MysqlVirtualbox and Mysql
Virtualbox and Mysql
 
The Rgb lamp - A real product
The Rgb lamp - A real productThe Rgb lamp - A real product
The Rgb lamp - A real product
 
Business in balkans
Business in balkansBusiness in balkans
Business in balkans
 

Ähnlich wie Virtual domains

Creating a mature puppet system
Creating a mature puppet systemCreating a mature puppet system
Creating a mature puppet system
rkhatibi
 

Ähnlich wie Virtual domains (20)

Wrangling 3rd Party Installers from Puppet
Wrangling 3rd Party Installers from PuppetWrangling 3rd Party Installers from Puppet
Wrangling 3rd Party Installers from Puppet
 
#OktoCampus - Workshop : An introduction to Ansible
#OktoCampus - Workshop : An introduction to Ansible#OktoCampus - Workshop : An introduction to Ansible
#OktoCampus - Workshop : An introduction to Ansible
 
DevOps Series: Extending vagrant with Puppet for configuration management
DevOps Series: Extending vagrant with Puppet for configuration managementDevOps Series: Extending vagrant with Puppet for configuration management
DevOps Series: Extending vagrant with Puppet for configuration management
 
Creating a Mature Puppet System
Creating a Mature Puppet SystemCreating a Mature Puppet System
Creating a Mature Puppet System
 
Creating a mature puppet system
Creating a mature puppet systemCreating a mature puppet system
Creating a mature puppet system
 
Apache Kafka Setup with Zookeeper - SkillAnything.pdf
Apache Kafka Setup with Zookeeper - SkillAnything.pdfApache Kafka Setup with Zookeeper - SkillAnything.pdf
Apache Kafka Setup with Zookeeper - SkillAnything.pdf
 
Jones_Lamp_Tutorial
Jones_Lamp_TutorialJones_Lamp_Tutorial
Jones_Lamp_Tutorial
 
Setting up LAMP for Linux newbies
Setting up LAMP for Linux newbiesSetting up LAMP for Linux newbies
Setting up LAMP for Linux newbies
 
Linux container internals
Linux container internalsLinux container internals
Linux container internals
 
Linux Troubleshooting
Linux TroubleshootingLinux Troubleshooting
Linux Troubleshooting
 
Configuration Management and Salt
Configuration Management and SaltConfiguration Management and Salt
Configuration Management and Salt
 
Improving WordPress Theme Development Workflow - Naveen Kharwar.
Improving WordPress Theme Development Workflow - Naveen Kharwar.Improving WordPress Theme Development Workflow - Naveen Kharwar.
Improving WordPress Theme Development Workflow - Naveen Kharwar.
 
Drupal from scratch
Drupal from scratchDrupal from scratch
Drupal from scratch
 
Debian packaging
Debian packagingDebian packaging
Debian packaging
 
Mahout Workshop on Google Cloud Platform
Mahout Workshop on Google Cloud PlatformMahout Workshop on Google Cloud Platform
Mahout Workshop on Google Cloud Platform
 
Linux Distribution Automated Testing
 Linux Distribution Automated Testing Linux Distribution Automated Testing
Linux Distribution Automated Testing
 
How I hack on puppet modules
How I hack on puppet modulesHow I hack on puppet modules
How I hack on puppet modules
 
Linux for programmers
Linux for programmersLinux for programmers
Linux for programmers
 
Linux Presentation
Linux PresentationLinux Presentation
Linux Presentation
 
Web 3, Week 1: Amazon Web Services for Beginners
Web 3, Week 1: Amazon Web Services for BeginnersWeb 3, Week 1: Amazon Web Services for Beginners
Web 3, Week 1: Amazon Web Services for Beginners
 

Kürzlich hochgeladen

Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
soniya singh
 
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRLLucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
imonikaupta
 
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
Diya Sharma
 
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Chandigarh Call girls 9053900678 Call girls in Chandigarh
 
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptxAWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
ellan12
 
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Sheetaleventcompany
 
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
@Chandigarh #call #Girls 9053900678 @Call #Girls in @Punjab 9053900678
 

Kürzlich hochgeladen (20)

Russian Call girl in Ajman +971563133746 Ajman Call girl Service
Russian Call girl in Ajman +971563133746 Ajman Call girl ServiceRussian Call girl in Ajman +971563133746 Ajman Call girl Service
Russian Call girl in Ajman +971563133746 Ajman Call girl Service
 
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
 
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
 
Hot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night Stand
Hot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night StandHot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night Stand
Hot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night Stand
 
Call Now ☎ 8264348440 !! Call Girls in Rani Bagh Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Rani Bagh Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Rani Bagh Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Rani Bagh Escort Service Delhi N.C.R.
 
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRLLucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
 
Russian Call Girls in %(+971524965298 )# Call Girls in Dubai
Russian Call Girls in %(+971524965298  )#  Call Girls in DubaiRussian Call Girls in %(+971524965298  )#  Call Girls in Dubai
Russian Call Girls in %(+971524965298 )# Call Girls in Dubai
 
Trump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts SweatshirtTrump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts Sweatshirt
 
Busty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort Service
Busty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort ServiceBusty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort Service
Busty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort Service
 
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
 
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
 
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptxAWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
 
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark WebGDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
 
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...
 
Moving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providersMoving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providers
 
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...
 
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
 
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
 
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...
 
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
 

Virtual domains

  • 1. >_ Things Lab Virtual domains ...the standard installation for Things Lab meetings
  • 2. Check an installed package ● Should be checked if all the packages are installed correctly, if not install the package. As example for unzip: (should be executed at command prompt/terminal) dpkg --get-selections | grep unzip sudo apt-get install unzip
  • 3. Check and install all packages ● Should be installed all the following packages: php5, php-mysql, phpmyadmin, mysql-client, mysql- server and apache2 (check one by one or... directly install all if not yet installed...) sudo apt-get install php5 php5-mysql apache2 phpmyadmin mysql-client mysql-server
  • 4. Play with vi, the easy way ● What is it vi? Google it or RTFM (at command prompt, man vi). ● Open the terminal and go in your home folder cd (enter) ● Open a new file (or existing if was already present, to open as root use sudo before the vi command) and try to use some basic commands of vi ● vi aaa.txt (enter) (esc) allows to enter in the command mode
  • 5. Play with vi, part 1 (in command mode) i allows to enter in the insert mode (in command mode) x allows to delete a character (in command mode) dd (double d) allows to delete a line (in insert mode, means you are editing) press esc to enter in command mode
  • 6. Play with vi, part 2 (in command mode) :q exit from the editing of the file, do not save changes (in command mode) :wq exit from the editing of the file, save all changes any other command? RTFM :-) http://en.wikipedia.org/wiki/RTFM If you have any problem, go in command mode and quit without saving the changes
  • 7. Setup a local domain ● At the command prompt go in /etc/ folder cd /etc/ ● Edit the file hosts with root permissions using vi sudo vi hosts ● In vi move using the arrows and add a new line, the line should be as the following (instead test use your name): 127.0.0.1 test ● Save and quit with the command :wq
  • 8. Check the local domain ● At the command prompt check if the domain is responding to pings (what is it ping? RTFM!): ping test (in your case, your name) (enter) ● Create the folder where you will have your virtual domain: sudo mkdir /var/www/test/ (enter)
  • 9. Setup a virtual host in apache ● At the command prompt go in /etc/apache2/sites- enabled folder cd /etc/apache2/sites-enabled/ ● Add a new file root permissions using vi sudo vi test (use your name instead) ● Start the insert mode and paste the text of the next page, change from test to your name!
  • 10. Virtualhost configuration <VirtualHost *:80> ServerAdmin webmaster@localhost ServerName test DocumentRoot /var/www/test <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory /var/www/test/> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all </Directory> ErrorLog /var/log/apache2/test-error.log </VirtualHost>
  • 11. Add files to the virtual domain ● In /var/www/test/ create a simple html file and insert some text: sudo vi /var/www/test/index.html (enter) (now you know how to do it! :-) ) ● In /var/www/test/ create a simple php (test.php) file and the following insert text (is ok in one line!): <?php print phpinfo(); ?>
  • 12. Test the from the browser