Install and configure applications with Linux IES “Jaume II el just”  Tavernes de la Valldigna Vicent Selfa Curs 2010/20 1 1
Install and configure applications with Linux <ul><li>Ubuntu   </li></ul><ul><li>Apache </li></ul><ul><li>PHP </li></ul><u...
<ul><ul><li>Ubuntu: Basic installation </li></ul></ul><ul><ul><li>System configuration </li></ul></ul><ul><ul><li>Installi...
<ul><ul><li>Basic installation (1) ‏ </li></ul></ul><ul><ul><li>Network configuration. An exemple: </li></ul></ul><ul><li>...
<ul><ul><li>Basic installation (2) </li></ul></ul><ul><ul><li>Edit partitions manually.- Exemple: </li></ul></ul><ul><li>*...
<ul><ul><li>System configuration   </li></ul></ul><ul><li>Multi-booting .-  Grub 2:  </li></ul><ul><li>GRand Unified Bootl...
<ul><ul><li>System configuration   </li></ul></ul><ul><li>Multi-booting .-  Grub 2 configuration: Steps  </li></ul><ul><li...
<ul><ul><li>System configuration   </li></ul></ul><ul><li>Multi-booting .-  Reinstall grub2 AFTER installing Windows  </li...
<ul><li>Package repository .- File   /etc/apt/sources.list   </li></ul><ul><li>Internal department repository.- Add: </li>...
<ul><ul><li>Installing applications: Apache2  </li></ul></ul><ul><ul><li>Packages to install </li></ul></ul><ul><ul><li>ap...
<ul><ul><li>Installing applications: Apache2 </li></ul></ul><ul><ul><li>/etc/apache2/apache2.conf: </li></ul></ul><ul><ul>...
<ul><ul><li>Installing applications: Apache2 </li></ul></ul><ul><ul><li>/etc/apache2/httpd.conf: </li></ul></ul><ul><ul><u...
<ul><ul><li>Installing applications: Apache2 </li></ul></ul>localhost DocumentRoot /var/www Localhost/~user /home UserDir ...
<ul><ul><li>Installing applications: Apache2 </li></ul></ul><ul><li>/etc/apache2/ sites-available/default </li></ul><ul><l...
<ul><ul><li>Installing applications: Apache2 </li></ul></ul>ServerName /var/www NameVirtualHost ServerName DocumentRoot IN...
<ul><ul><li>Installing applications: Apache2 </li></ul></ul><ul><li>Other directives.-  [Module  rewrite ] </li></ul><ul><...
<ul><ul><li>Installing applications: Apache2  </li></ul></ul><ul><li>To let acces to some users and specific groups: [Modu...
<ul><ul><li>Installing applications: Apache2 SSL protocol  </li></ul></ul><ul><li>1.- From   mods-enable  to make a symbol...
<ul><ul><li>Installing applications: Apache2  </li></ul></ul><ul><li>Installing a SSL protocol .- Apache configuration </l...
<ul><ul><li>Installing applications: Apache2 </li></ul></ul><ul><li>Installing a SSL protocol.-   Browsing the site </li><...
<ul><ul><li>Installing applications: PHP5  </li></ul></ul><ul><li>First of all to install the php5  language </li></ul><ul...
<ul><ul><li>Installing applications: PHP5  </li></ul></ul><ul><li>One text editor for  php5 :  Geany </li></ul><ul><li>One...
<ul><ul><li>Installing applications: mySQL </li></ul></ul><ul><li>-  Install  a RDBMS: mySQL </li></ul><ul><ul><li>Libraie...
<ul><ul><li>Installing applications: mySQL </li></ul></ul><ul><li>phpmyadmin configuration </li></ul><ul><ul><li>Symbolic ...
<ul><ul><li>Installing applications: mySQL </li></ul></ul><ul><li>Root password recovery </li></ul><ul><li>Access to the s...
The relation Apache – PHP - mySQL Webserver  Apache <?php phpinfo(); ?> Binaris:  /etc/init.d/mysql /usr/sbin/mysql Databa...
Download the 1.7.1 version (PHP 5.2.9) from: http://sourceforge.net/projects/xampp/files/XAMPP%20Linux/ Install and config...
Install and configure applications with Linux Zend Guard: Compiles and converts the plain-text PHP scripts into a platform...
Install and configure applications with Linux <ul><li>Zend Optimizer: How to install it? </li></ul><ul><li>Download the pa...
Install and configure applications with Linux <?php  phpinfo(); ?> The plane text file test.php The encoded text file test...
Install and configure applications with Linux After Zend Optimizer installation in Apache
<ul><ul><li>PostgreSQL </li></ul></ul><ul><li>-  Installing the RDBMS PostgreSQL 9.0 </li></ul><ul><ul><li>Download the pa...
<ul><li>Installing applications: phppgadmin </li></ul><ul><li>Install the phppgadmin client </li></ul><ul><ul><li>From the...
The relation Apache – PHP – PostgreSQL <?php phpinfo(); ?> Bin files: /opt/PostgreSQL/9.0cd/data/bin Databases: /opt/Postg...
<ul><li>Installing applications : FTP </li></ul><ul><ul><li>Very Secure FTP Daemon   server: </li></ul></ul><ul><ul><ul><l...
<ul><li>Installing applications : FTP client FileZilla </li></ul><ul><ul><li>Download the package  Filezilla_version.tar.b...
Local site Remote site Information about connexion Files uploaded / downloaded Install and configure applications with Linux
<ul><li>Installing applications : FTP client Filezilla </li></ul>Install and configure applications with Linux
<ul><li>Installing applications : FTP client Filezilla </li></ul>Saving configurations:   File->Export <ul><li><?xml versi...
<ul><ul><li>Installing applications: SSH server  </li></ul></ul><ul><ul><ul><li>SSH server: </li></ul></ul></ul><ul><ul><u...
<ul><ul><li>Installing applications.- SSH graphic. NX </li></ul></ul><ul><ul><ul><li>Download package from :  http://www.n...
<ul><ul><li>Installing applications: Postfix email server </li></ul></ul><ul><ul><ul><li>Install from Synaptic: Package po...
<ul><ul><li>Servers -> Intranet -> Internet communication </li></ul></ul>Port forwarding option : Openning the different p...
<ul><ul><li>Servers -> Intranet -> Internet communication </li></ul></ul>DDNS option : Dynamic DNS  is a method / protocol...
<ul><ul><li>Servers -> Intranet -> Internet communication </li></ul></ul>Internet Install and configure applications with ...
<ul><li>Configure and manage networks.- wicd </li></ul><ul><ul><ul><li>Install from Synaptic: Package wicd </li></ul></ul>...
<ul><ul><li>Configuring the network.- Advanced aspects:  </li></ul></ul><ul><ul><li>Firewall+dansguardian+squid </li></ul>...
<ul><ul><li>Other interesting packages: </li></ul></ul><ul><li>Unified Modelling Language diagram editors  </li></ul><ul><...
<ul><ul><li>Poseidon.- Graphically: </li></ul></ul>Install and configure applications with Linux
<ul><ul><li>Dia </li></ul></ul>Install and configure applications with Linux http://projects.gnome.org/dia/
<ul><ul><li>Process management: Start / stop.-  </li></ul></ul><ul><ul><ul><li>System  -> Administration -> System monitor...
<ul><li>Managing services geting started up at boot-time  rcconf . -  </li></ul><ul><ul><ul><li>Install using Synaptic </l...
<ul><ul><li>Compartir carpetes: Paquet Samba. -  </li></ul></ul><ul><ul><ul><li>Arranc: /etc/init.d/./samba [start | stop ...
<ul><ul><li>Wake On Line. -  </li></ul></ul><ul><ul><li>Conversió de videos:  FLV <=> MPEG, AVI </li></ul></ul><ul><li>sud...
<ul><ul><li>VPN . –  Xarxa privada virtual </li></ul></ul>Install and configure applications with Linux
<ul><ul><li>Les pr à ctiques </li></ul></ul>1.- Localhost:  Instal.lacio de les aplicacions en un ordinador personal que f...
<ul><ul><li>Les pr à ctiques </li></ul></ul>2.- Acces als servidors des de Internet mitjan ç ant una IP Internet mySQL Apa...
<ul><ul><li>Les pr à ctiques </li></ul></ul>3.- Acces als servidors des de Internet mitjanant un domini Internet mySQL Apa...
<ul><ul><li>Les pr à ctiques </li></ul></ul>4.- Registrar un domini en Internet i contra c tar un servidor. Internet mySQL...
Upcoming SlideShare
Loading in...5
×

Install and configure linux

5,540

Published on

A little manual to install and confiure Linux and some of the most used servers: Web server, FTP server and others.

Published in: Education, Technology
1 Comment
3 Likes
Statistics
Notes
No Downloads
Views
Total Views
5,540
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
245
Comments
1
Likes
3
Embeds 0
No embeds

No notes for slide

Install and configure linux

  1. 1. Install and configure applications with Linux IES “Jaume II el just” Tavernes de la Valldigna Vicent Selfa Curs 2010/20 1 1
  2. 2. Install and configure applications with Linux <ul><li>Ubuntu </li></ul><ul><li>Apache </li></ul><ul><li>PHP </li></ul><ul><li>MySQL </li></ul><ul><li>Postgres </li></ul><ul><li>Others </li></ul>
  3. 3. <ul><ul><li>Ubuntu: Basic installation </li></ul></ul><ul><ul><li>System configuration </li></ul></ul><ul><ul><li>Installing packages </li></ul></ul><ul><ul><li>Configuring applications </li></ul></ul><ul><ul><ul><li>Apache </li></ul></ul></ul><ul><ul><ul><li>PHP </li></ul></ul></ul><ul><ul><ul><li>MySQL </li></ul></ul></ul><ul><ul><li>The relationship between Apache - PHP - MySQL </li></ul></ul>Install and configure: Ubuntu 10.04 Install and configure applications with Linux
  4. 4. <ul><ul><li>Basic installation (1) ‏ </li></ul></ul><ul><ul><li>Network configuration. An exemple: </li></ul></ul><ul><li>* IP’s machine: 192.168.43.1 </li></ul><ul><li>* Network mask: 255.255.255.0 </li></ul><ul><li>* Gateway: 192.168.43.100 </li></ul><ul><li>Graphically: </li></ul>INTERNET : depinfo.ieseljust.net/moodle www.ieseljust.net www.ieseljust.org HUB IP: 192.168.43.3 IP: 192.168.43.1 IP: 192.168.43.2 Eth0: Departament 192.168.0.43 Gateway: 192.168.0.254 Classroom 43 192.168.0.254 213.162.200.237 195.235.113.3 192.168.1.254 Lliurex server / Proxy / Firewall 192.168.16.N Acces point: Conceptronic Outdoor aerial: Airpoint DNS Eth1: Classroom 192.168.43.100 Gateway : 192.168.0.43 Firewall.sh Gateway: 192.168.43.100 Install and configure applications with Linux ROUTER 192.168.1.1 Depinfo.ieseljust.net 88.2.154.110 192.168.0.21 192.168.1.21 Web server
  5. 5. <ul><ul><li>Basic installation (2) </li></ul></ul><ul><ul><li>Edit partitions manually.- Exemple: </li></ul></ul><ul><li>* hdd1.- Type: ext4. </li></ul><ul><li>/: The root directory. The starting point of your directory </li></ul><ul><li>structure. This is where the Linux system begins. It is essential </li></ul><ul><li>* hdd5.- Type: ext4. </li></ul><ul><li>/home: W here users keep their personal files </li></ul><ul><li>* hdd6.- Type: ext4. </li></ul><ul><li>/var: C ontains data that is changed when the system is running normally </li></ul><ul><li>* hdd7.- Type: swap </li></ul><ul><li>An independent section of the hard disk used solely for swapping </li></ul><ul><ul><li>User name and password </li></ul></ul><ul><ul><li>* Username: alumne43d | alumne43n </li></ul></ul><ul><ul><li>* Password: 12345d | 12345n </li></ul></ul>Install and configure applications with Linux
  6. 6. <ul><ul><li>System configuration </li></ul></ul><ul><li>Multi-booting .- Grub 2: </li></ul><ul><li>GRand Unified Bootloader: A multi-booting loader that provides the possibility of </li></ul><ul><li>booting one of multiple operating systems. </li></ul><ul><li>Folders: </li></ul><ul><li> /etc/grub.d/ </li></ul><ul><li>/boot/grub/grub.cfg </li></ul><ul><li>Files: </li></ul><ul><li> /boot/grub/grub.cfg.- Similar to /boot/grub/menu.lst file but it can NOT be edited </li></ul><ul><li>/etc/grub.d/ </li></ul><ul><li>00_header.- Sets initial appearance </li></ul><ul><li>05_debian_theme.- Sets splash image, text colors, ... </li></ul><ul><li>10_hurd.- No currently used </li></ul><ul><li>20_memtest86+.- Includes a test memory option in the boot menu </li></ul><ul><li>30_os-prober.- </li></ul><ul><li>40_custom.- A template for customacing the grub.cfg file upon </li></ul><ul><li>the execution of the update-grub2 command. </li></ul><ul><li>More information: https://help.ubuntu.com/community/Grub2 </li></ul>Install and configure applications with Linux
  7. 7. <ul><ul><li>System configuration </li></ul></ul><ul><li>Multi-booting .- Grub 2 configuration: Steps </li></ul><ul><li>Execute sudo update-grub2 to generate the file grub.cfg </li></ul><ul><li>Copy its content to /etc/grub.d/40_custom file </li></ul><ul><li>Edit and modify its content </li></ul><ul><li>Modify attributes of the different files in /etc/grub.d in order to permit/deny their execution </li></ul><ul><li>sudo chmod [+x | -x] /etc/grub.d/filename </li></ul><ul><li>At the end execute sudo update-grub2 to make the new grub.cfg file </li></ul><ul><li>Exercise: </li></ul><ul><li>Configure your boot system with the next options: </li></ul><ul><ul><ul><li>Only two entries (windows / linux) </li></ul></ul></ul><ul><ul><ul><li>Starting from the second option by default </li></ul></ul></ul><ul><ul><ul><li>Waiting for 15 second before automatic start </li></ul></ul></ul><ul><ul><ul><li>Stablish a background image </li></ul></ul></ul><ul><li>More information: https://wiki.ubuntu.com/Grub2 </li></ul>Install and configure applications with Linux
  8. 8. <ul><ul><li>System configuration </li></ul></ul><ul><li>Multi-booting .- Reinstall grub2 AFTER installing Windows </li></ul><ul><li>Start the computer using a LiveCD version: </li></ul><ul><ul><li>Use the option: Test Ubuntu </li></ul></ul><ul><li>From a terminal execute the next commands </li></ul><ul><ul><li>Partition list: X -> System Linux </li></ul></ul><ul><ul><ul><li>sudo fdisk – l ; </li></ul></ul></ul><ul><ul><li>Mount the sdaX partition </li></ul></ul><ul><ul><ul><li>sudo mount /dev/sdaX /mnt ; </li></ul></ul></ul><ul><ul><li>Mount the other devices (Already visible directories mounted elsewhere) </li></ul></ul><ul><ul><ul><li>sudo –bind /dev /mnt/dev </li></ul></ul></ul><ul><ul><ul><li>sudo –bind /proc /mnt/proc </li></ul></ul></ul><ul><ul><li>We acces as root to our file system </li></ul></ul><ul><ul><ul><li>sudo chroot /mnt </li></ul></ul></ul><ul><ul><li>Load the grub into the MBR </li></ul></ul><ul><ul><ul><li>grub-install -- recheck /dev/sda ; sda WITHOUT number! </li></ul></ul></ul><ul><ul><li>Actualize grub 2 </li></ul></ul><ul><ul><ul><li>sudo update-grub2 </li></ul></ul></ul><ul><ul><li>And restart the system as usual </li></ul></ul>Install and configure applications with Linux
  9. 9. <ul><li>Package repository .- File /etc/apt/sources.list </li></ul><ul><li>Internal department repository.- Add: </li></ul><ul><li>deb http://192.168.0.21/mirror jaunty main restricted </li></ul><ul><li>Environment variables. - File: /etc/profile </li></ul><ul><li>Installing applications. </li></ul><ul><ul><li>Using a package management system: Synaptic, apt-get, Adept, … </li></ul></ul><ul><ul><li>Activate all the repositories (Ubuntu and others). Reload </li></ul></ul><ul><ul><li>Look for and mark for installation the applications we need. </li></ul></ul><ul><ul><li>Apply changes. </li></ul></ul>Install and configure applications with Linux
  10. 10. <ul><ul><li>Installing applications: Apache2 </li></ul></ul><ul><ul><li>Packages to install </li></ul></ul><ul><ul><li>apache2 // The web server </li></ul></ul><ul><ul><li>libapache2-mod-php5 // The module to work with PHP5 </li></ul></ul><ul><ul><li>Test from the web browser: http://localhost => It works! </li></ul></ul><ul><ul><li>Apache version: /usr/sbin/apache2ctl -v </li></ul></ul><ul><ul><li>Start / stop the web server: </li></ul></ul><ul><li>sudo /etc/init.d/apache2 [start | stop | restart | ...] </li></ul><ul><li>sudo /usr/sbin/apache2ctl –k [start | stop | restart] </li></ul><ul><ul><li>Configuration files </li></ul></ul><ul><ul><li>/etc/apache2/apache2.conf => Main Apache server configuration file </li></ul></ul><ul><ul><ul><ul><ul><li>/etc/apache2/httpd.conf => Administrator configuration </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><li>/etc/apache2/sites-availabe/000-default => Virtual host configuration </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Log files: /var/log/apache2 </li></ul></ul></ul></ul><ul><ul><li>Other folders </li></ul></ul><ul><ul><ul><ul><li>Mods-available / mods-enable : Available / installed modules </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Sites-available / enable : C onfiguration details of the sites you aim to host </li></ul></ul></ul></ul><ul><ul><li>More information: http://httpd.apache.org/ </li></ul></ul>Install and configure applications with Linux
  11. 11. <ul><ul><li>Installing applications: Apache2 </li></ul></ul><ul><ul><li>/etc/apache2/apache2.conf: </li></ul></ul><ul><ul><ul><ul><ul><li>ServerRoot: Base directory for the server installation </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>ServerName: Hostname and port that the server uses to identify itself </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>Timeout: Number of seconds before timing out </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>KeepAlive [On | Off]: Whether or not to allow persistent connections </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>AccessFileName: The name of the file to look for in each directory for additional configuration directives </li></ul></ul></ul></ul></ul><ul><ul><li>/etc/apache2/sites-enabled/default: </li></ul></ul><ul><ul><ul><ul><ul><li>DocumentRoot: Base d irectory that forms the main document tree visible from the web </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>DocumentRoot /var/www </li></ul></ul></ul></ul></ul>localhost /var/www Install and configure applications with Linux
  12. 12. <ul><ul><li>Installing applications: Apache2 </li></ul></ul><ul><ul><li>/etc/apache2/httpd.conf: </li></ul></ul><ul><ul><ul><ul><ul><li>UserDir: To permit that different users have different web sites in their own home directory. Steps: </li></ul></ul></ul></ul></ul><ul><ul><ul><li>1.- From mods-enable make a symbolic link to user-dir modules </li></ul></ul></ul><ul><ul><ul><li>sudo ln -s /etc/apache2/mods-available/userdir.conf </li></ul></ul></ul><ul><ul><ul><li>sudo ln -s /etc/apache2/mods-available/userdir.load </li></ul></ul></ul><ul><ul><ul><li>2.- In the file /etc/apache2/httpd.conf </li></ul></ul></ul><ul><ul><ul><li> UserDIr www </li></ul></ul></ul><ul><ul><ul><li><Directory /home/*/www> ... </li></ul></ul></ul><ul><ul><ul><li> Options Indexes FollowSymLinks MultiViews </li></ul></ul></ul><ul><ul><ul><li> # Other directives </li></ul></ul></ul><ul><ul><ul><li> </Directory> </li></ul></ul></ul><ul><ul><ul><li>3.- Restart the web server: </li></ul></ul></ul><ul><ul><ul><li> sudo /etc/init.d/apache2 [start | stop | restart ] </li></ul></ul></ul><ul><ul><ul><li>4.- How to access to the web page? </li></ul></ul></ul><ul><ul><ul><li>localhost/~usuari </li></ul></ul></ul>Install and configure applications with Linux
  13. 13. <ul><ul><li>Installing applications: Apache2 </li></ul></ul>localhost DocumentRoot /var/www Localhost/~user /home UserDir /home/*/www Install and configure applications with Linux /var/www /vicent /profe /www /www
  14. 14. <ul><ul><li>Installing applications: Apache2 </li></ul></ul><ul><li>/etc/apache2/ sites-available/default </li></ul><ul><li>NameVirtualHost: To allow to host different webs in the same server. </li></ul><ul><li>Exemple: Modify the file /etc/apache2/sites-available/default </li></ul><ul><li>NameVirtualHost *:80 # also NameVirtualHost numIP:80 </li></ul><ul><li># One directive per web </li></ul><ul><li><VirtualHost *:80 > </li></ul><ul><li>ServerName vselfa.dnsalias.net </li></ul><ul><li>DocumentRoot /var/www/vselfa </li></ul><ul><li><Directory /var/www/vselfa> </li></ul><ul><li>Options Indexes FollowSymLinks MultiViews </li></ul><ul><li>AllowOverride All </li></ul><ul><li>Order allow,deny </li></ul><ul><li>allow from all </li></ul><ul><li></Directory> </li></ul><ul><li></VirtualHost> </li></ul><ul><li><VirtualHost *:80 > </li></ul><ul><li>ServerName ieseljust.dnsalias.net </li></ul><ul><li>DocumentRoot /var/www/joomla </li></ul><ul><li><Directory /var/www/balmes> </li></ul><ul><li># Other directives </li></ul><ul><li></Directory> </li></ul><ul><li></VirtualHost> </li></ul>Install and configure applications with Linux
  15. 15. <ul><ul><li>Installing applications: Apache2 </li></ul></ul>ServerName /var/www NameVirtualHost ServerName DocumentRoot INTERNET : DynDNS NoIP Install and configure applications with Linux Warning : NameVirtualHost *:80 has no VirtualHost.- Sentence <VirtualHost *:80> repetead in more than one configuration file. For exemple: In sites-available ( default file) and sites-enabled ( 000-default file) /vselfa /balmes ServerName IP
  16. 16. <ul><ul><li>Installing applications: Apache2 </li></ul></ul><ul><li>Other directives.- [Module rewrite ] </li></ul><ul><ul><ul><ul><ul><li> RewriteEngine </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li> RewriteRule </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>To allow redirect web traffic </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>Exemple: </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>File .htaccess: To redirect all traffic to test.php web page </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>1.- From mods-enable make a symbolic link to rewrite module </li></ul></ul></ul></ul></ul><ul><ul><ul><li>sudo ln -s /etc/apache2/mods-available/rewrite.load </li></ul></ul></ul><ul><ul><ul><ul><ul><li>2.- Modify the default configuration file: </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li><VirtualHost *:80 > </li></ul></ul></ul></ul></ul><ul><li><Directory /var/www/vselfa> </li></ul><ul><li># Other opcions </li></ul><ul><li>AllowOverride All </li></ul><ul><li></Directory> </li></ul><ul><li></VirtualHost> </li></ul><ul><li>3.- Create a .htaccess file and copy to /var/www/vselfa </li></ul><ul><ul><ul><ul><ul><li>RewriteEngine on </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>RewriteRule ^(.*)$ test.php ?command=$1 [L,QSA] </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>4.- To cancel the redirection </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>RewriteEngine off </li></ul></ul></ul></ul></ul>Install and configure applications with Linux
  17. 17. <ul><ul><li>Installing applications: Apache2 </li></ul></ul><ul><li>To let acces to some users and specific groups: [Module auth_digest] </li></ul><ul><li>1.- From mods-enable symbolic link to required modules </li></ul><ul><li>ln -s /etc/apache2/mods-available/auth_digest.load </li></ul><ul><li>2.- File .htaccess inside the folder we want to restrict </li></ul><ul><li>AuthName &quot; ZonaPrivada &quot; </li></ul><ul><li>AuthType Digest # Encripted method (Digest; NO basic)‏ </li></ul><ul><li>AuthDigestFile /var/.htpasswd </li></ul><ul><li>Require valid-user </li></ul><ul><li>3.- We make a file with the passwords </li></ul><ul><li> htdigest -c /var/.htpasswd ZonaPrivada vicent </li></ul><ul><li> # It ask us the password for the administrator user </li></ul>Install and configure applications with Linux
  18. 18. <ul><ul><li>Installing applications: Apache2 SSL protocol </li></ul></ul><ul><li>1.- From mods-enable to make a symbolic link to required modules </li></ul><ul><ul><ul><li>ln -s /etc/apache2/mods-available/ssl.load </li></ul></ul></ul><ul><ul><ul><li>ln -s /etc/apache2/mods-available/ssl.conf </li></ul></ul></ul><ul><li>2.- Change to the ssl directory to make the keys </li></ul><ul><li> $ cd /etc/ssl </li></ul><ul><li>3.- We genere the key with the RSA algorithm: server.key </li></ul><ul><li> sudo openssl genrsa -out server.key 1024 </li></ul><ul><li>4.- We generate the certificate: server.pem </li></ul><ul><li> sudo openssl rsa -in server.key -out server.pem </li></ul><ul><li>5.- Now we generate the CSR file : server.csr </li></ul><ul><li> sudo openssl req -new -key server.key -out server.csr ; Use default values </li></ul><ul><li>(We would need to send this certificate to a Certification Authority to be validated and to get the file server.crt)‏ </li></ul><ul><li>6.- At this moment we generate our certificate server.crt </li></ul><ul><li> sudo openssl x509 -req -days 730 -in server.csr -signkey server.key -out server.crt </li></ul><ul><li>7.- We need to change file server.* permissions to 400 </li></ul><ul><li> sudo chmod 400 /etc/ssl/server.* </li></ul><ul><li>8.- At the end we make the folders to the web site </li></ul><ul><li> sudo mkdir /var/www/ssl </li></ul><ul><li> sudo mkdir /var/www/ssl/logs </li></ul><ul><li> sudo mkdir /var/www/ssl/cgi-bin </li></ul>(*) More information: http://www.linuxparatodos.net/portal/staticpages/index.php?page=como-apache-ssl Install and configure applications with Linux
  19. 19. <ul><ul><li>Installing applications: Apache2 </li></ul></ul><ul><li>Installing a SSL protocol .- Apache configuration </li></ul><ul><li>We need to edit the file default.conf adding the next lines </li></ul><ul><li>NameVirtualHost *:443 </li></ul><ul><li><VirtualHost *:443> </li></ul><ul><li>ServerName balmes.dnsalias.net </li></ul><ul><li>ServerAdmin vicentselfa@gmial.com </li></ul><ul><li>DocumentRoot /var/www/ssl/ </li></ul><ul><li><Directory /> </li></ul><ul><li>Options FollowSymLinks </li></ul><ul><li>AllowOverride All </li></ul><ul><li>Allow from all </li></ul><ul><li></Directory> </li></ul><ul><li><Directory /var/www/ssl/> </li></ul><ul><li>Options Indexes FollowSymLinks MultiViews </li></ul><ul><li>AllowOverride None </li></ul><ul><li>Order allow,deny </li></ul><ul><li>allow from all </li></ul><ul><li></Directory> </li></ul><ul><li>ScriptAlias /cgi-bin/ /var/www/ssl/cgi-bin/ </li></ul><ul><li><Directory &quot;/cgi-bin/ /var/www/ssl/cgi-bin&quot;> </li></ul><ul><li>AllowOverride None </li></ul><ul><li>Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch </li></ul><ul><li>Order allow,deny </li></ul><ul><li>Allow from all </li></ul><ul><li></Directory> </li></ul><ul><li># Directives SSL </li></ul><ul><li>SSLEngine on </li></ul><ul><li>SSLCertificateFile /etc/ssl/server.crt </li></ul><ul><li>SSLCertificateKeyFile /etc/ssl/server.pem </li></ul><ul><li>SetEnvIf User-Agent &quot;.*MSIE.*&quot; nokeepalive ssl-unclean-shutdown </li></ul><ul><li>CustomLog /var/www/ssl/logs/ssl_request_log &quot;%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x &quot;%r&quot; %b&quot; </li></ul><ul><li>CustomLog /var/www/ssl/logs/ssl_access_log combined </li></ul><ul><li>Errorlog /var/www/ssl/logs/ssl_error_log </li></ul><ul><li></VirtualHost> </li></ul>Install and configure applications with Linux
  20. 20. <ul><ul><li>Installing applications: Apache2 </li></ul></ul><ul><li>Installing a SSL protocol.- Browsing the site </li></ul><ul><li>We need to open the port number 443 for the PC </li></ul><ul><li>We restart the Apache server: /etc/apache2/apache2ctl restart </li></ul><ul><li>And our secure web site is OK </li></ul><ul><li>Our address: https://balmes.dnsalias.net </li></ul>Install and configure applications with Linux Tcpdump packet analyze : sudo tcpdump –nnXvs 1514 –i wlan0 port [80 | 443] Check differences between information analysed using port 80 and port 443.
  21. 21. <ul><ul><li>Installing applications: PHP5 </li></ul></ul><ul><li>First of all to install the php5 language </li></ul><ul><ul><li>Libraries </li></ul></ul><ul><li>php5 // The language </li></ul><ul><li>php5-gd // The graphic librarie </li></ul><ul><li>php5-curl // To connect and communicate to different servers and protocols </li></ul><ul><ul><li>Configuration file: </li></ul></ul><ul><li>/etc/php5/apache2/php.ini </li></ul><ul><li>session.use_trans_sid = 1 </li></ul><ul><li> session.save_path = ‘/tmp/php’ </li></ul><ul><li>display_errors = On </li></ul><ul><li>memory_limit = 128M </li></ul><ul><ul><li>Test file: /var/www/test.php </li></ul></ul><ul><li><?php phpinfo() ?> </li></ul><ul><li>Show the content of the file: localhost/test.php </li></ul>Install and configure applications with Linux
  22. 22. <ul><ul><li>Installing applications: PHP5 </li></ul></ul><ul><li>One text editor for php5 : Geany </li></ul><ul><li>One integrated development environment (IDE) : netbeans </li></ul><ul><li>sudo apt-get install sun-java6-bin sun-java6-jdk sun-java6-jre </li></ul><ul><li>sudo apt-get install netbeans </li></ul><ul><li>To execute: Aplications->Programming->netbeans IDE n.m </li></ul><ul><li>One light integrated development environment (IDE) : BlueJ </li></ul><ul><li>After installing jdk: </li></ul><ul><li>Download bluej-304.deb application from http://www.bluej.org/download/download.html </li></ul><ul><li>Run application from : Applications -> Programming -> BlueJ </li></ul>Install and configure applications with Linux
  23. 23. <ul><ul><li>Installing applications: mySQL </li></ul></ul><ul><li>- Install a RDBMS: mySQL </li></ul><ul><ul><li>Libraies </li></ul></ul><ul><li>mysql-server-5 // The RDBMS </li></ul><ul><li>phpmyadmin // The client myAdmin </li></ul><ul><li>php5 - mysql // The mySQL module for PHP5 </li></ul><ul><ul><li>Configuration files: </li></ul></ul><ul><li>/etc/mysql/my.cnf </li></ul><ul><li>/etc/phpmyadmin/config.inc.php </li></ul><ul><ul><li>Start the server mySQL </li></ul></ul><ul><li>sudo /etc/init.d/mysql [start | stop | ...] </li></ul>Install and configure applications with Linux
  24. 24. <ul><ul><li>Installing applications: mySQL </li></ul></ul><ul><li>phpmyadmin configuration </li></ul><ul><ul><li>Symbolic link between phpmyadmin and the document root </li></ul></ul><ul><li>ln -s /usr/share/phpmyadmin /var/www/ </li></ul><ul><ul><ul><ul><li>To start phpmyadmin from the web browser </li></ul></ul></ul></ul><ul><li>/localhost/phpmyadmin/ </li></ul><ul><li>Some parameters from the configuration file </li></ul><ul><ul><li>$cfg['Servers'][$i]['auth_type'] = 'config'; </li></ul></ul><ul><ul><li>$cfg['Servers'][$i]['user'] = 'root'; </li></ul></ul><ul><ul><li>$cfg['Servers'][$i]['password'] = 'root'; </li></ul></ul><ul><ul><li>$cfg['Servers'][$i]['AllowNoPasswordRoot'] = true; </li></ul></ul><ul><ul><li>InnoDB engine: A transaction-safe (ACID compliant) storage engine for MySQL that has commit, rollback, and crash-recovery capabilities to protect user data </li></ul></ul>Install and configure applications with Linux
  25. 25. <ul><ul><li>Installing applications: mySQL </li></ul></ul><ul><li>Root password recovery </li></ul><ul><li>Access to the system as root user : user@localhost:~$ su - </li></ul><ul><li>Stop the server: /etc/init.d/mysql stop </li></ul><ul><li>Restart the server mySQL in a safe mode </li></ul><ul><li>From [email_address] </li></ul><ul><li># mysqld_safe --skip-grant-tables –skip- networking --user=mysql & </li></ul><ul><li>Entry to the mysql BD as a root user </li></ul><ul><li>[email_address] :/home/vicent# mysql -u root mysql </li></ul><ul><li>Update the password </li></ul><ul><li>mysql> UPDATE user SET Password = </li></ul><ul><li>PASSWORD('newpassword') WHERE User='root'; </li></ul><ul><li>Then also update the privileges </li></ul><ul><li>mysql> FLUSH PRIVILEGES; </li></ul><ul><li>Exit mysql </li></ul><ul><li>mysql> exit </li></ul><ul><li>Restart the server mySQL </li></ul><ul><li>/etc/init.d/mysql restart </li></ul>Install and configure applications with Linux
  26. 26. The relation Apache – PHP - mySQL Webserver Apache <?php phpinfo(); ?> Binaris: /etc/init.d/mysql /usr/sbin/mysql Databases: /var/lib/mysql Configuration: /etc/php5/apache2/php.ini DocumentRoot: /var/www Configuration: /etc/apache2/apache2.conf test.php User: mysql Permissions: 744 User: root Permissions: 744 User: alumne Permissions: 777 User: root Permissions: 744 User: root Permissions: 744 Install and configure applications with Linux RDBMS server mySQL PHP Client WEB
  27. 27. Download the 1.7.1 version (PHP 5.2.9) from: http://sourceforge.net/projects/xampp/files/XAMPP%20Linux/ Install and configure applications with Linux Copy to folder /opt and then unzip with the instruction: sudo tar -zxvf xampp-linux-1.6.tar.gz Start the server from /opt/lampp: sudo ./lampp start <ul><li>Configuration files: </li></ul><ul><ul><li>/opt/lampp/etc/ </li></ul></ul><ul><ul><ul><li>php.ini </li></ul></ul></ul><ul><ul><ul><li>my.cnf </li></ul></ul></ul><ul><li>File permission: </li></ul><ul><li>757 /opt/lampp/var/nysql </li></ul>
  28. 28. Install and configure applications with Linux Zend Guard: Compiles and converts the plain-text PHP scripts into a platform-independent binary format known as a 'Zend Intermediate Code' file. These encoded binary files then distributed instead of the plain text PHP protecting your hard programming efforts. Zend Optimizer: A free download, is the run-time environment that enables end-users to transparently execute these files as if they were regular PHP scripts.
  29. 29. Install and configure applications with Linux <ul><li>Zend Optimizer: How to install it? </li></ul><ul><li>Download the package from: </li></ul><ul><ul><ul><li>http://www.zend.com/products/guard/downloads </li></ul></ul></ul><ul><li>Untar the package with the command: </li></ul><ul><ul><ul><li>gunzip -c <package name> | tar xf – </li></ul></ul></ul><ul><li>Take the .so file corresponding to your php version (5_2_x) from </li></ul><ul><ul><ul><li>package name/data/5_2_x_comp </li></ul></ul></ul><ul><li>Copy it to the file ZendOptimizer.so to the folder: </li></ul><ul><ul><ul><li>/ opt/lampp/zend </li></ul></ul></ul><ul><li>Open the / opt/lampp/etc/php.ini file and write the sentence: </li></ul><ul><ul><ul><li>Zend_extension=/opt/lampp/zend/ZendOptimizer.so </li></ul></ul></ul><ul><li>Restart your Apache server </li></ul><ul><ul><ul><li>sudo /etc/init.d/apache2 restart </li></ul></ul></ul>
  30. 30. Install and configure applications with Linux <?php phpinfo(); ?> The plane text file test.php The encoded text file test.php
  31. 31. Install and configure applications with Linux After Zend Optimizer installation in Apache
  32. 32. <ul><ul><li>PostgreSQL </li></ul></ul><ul><li>- Installing the RDBMS PostgreSQL 9.0 </li></ul><ul><ul><li>Download the package postgresql-9.0.0-1-linux.bin </li></ul></ul><ul><ul><li>Graphical installation </li></ul></ul><ul><ul><li>Enable execution permission </li></ul></ul><ul><ul><ul><li>sudo chmod +x postgresql-9.0.0-1-linux.bin </li></ul></ul></ul><ul><ul><li>Install </li></ul></ul><ul><ul><ul><li>sudo ./postgresql-9.0.0-1-linux.bin </li></ul></ul></ul><ul><ul><li>Use the default folders </li></ul></ul><ul><ul><li>/opt/PostgreSQL/9.0 </li></ul></ul><ul><ul><li>/opt/PostgreSQL/9.0/data </li></ul></ul><ul><ul><li>Reload the server: </li></ul></ul><ul><ul><ul><li>From Applications->PostgreSQL </li></ul></ul></ul><ul><li>Installing PostgreSQL module for php5 </li></ul><ul><ul><li>From Synaptic install the module php5-pgsql </li></ul></ul><ul><li>- Edit configuration files: </li></ul><ul><li>/opt/PostgreSQL/9.0/data/ postgresql.conf </li></ul><ul><ul><li>ls -l </li></ul></ul><ul><li>/usr/lib/PostgreSQL/9.0/data/ pg_hba.conf </li></ul><ul><li> host all all 0.0.0.0 0.0.0.0 md5 </li></ul>Install and configure applications with Linux
  33. 33. <ul><li>Installing applications: phppgadmin </li></ul><ul><li>Install the phppgadmin client </li></ul><ul><ul><li>From the repositoris, install the package phppgadmin </li></ul></ul><ul><ul><ul><li>File configuration: </li></ul></ul></ul><ul><ul><ul><li>/etc/phppgadmin/config.inc.php </li></ul></ul></ul><ul><ul><ul><li>Some parameters: </li></ul></ul></ul><ul><li>$conf['extra_login_security'] = true; </li></ul><ul><li>$conf['owned_only'] = false; </li></ul><ul><li>$conf['show_system'] = false; </li></ul><ul><li>- Start phppgadmin </li></ul><ul><ul><ul><ul><li>Start phppgadmin from the web browser </li></ul></ul></ul></ul><ul><li>/localhost/phppgadmin/ </li></ul><ul><li>/domini/phppgadmin </li></ul><ul><ul><ul><ul><li>Configuration file in Apache: </li></ul></ul></ul></ul><ul><li> /etc/apache2/conf.d/phppgadmin.conf </li></ul><ul><li>Allow from all ; To allow Internet connexions </li></ul>Install and configure applications with Linux
  34. 34. The relation Apache – PHP – PostgreSQL <?php phpinfo(); ?> Bin files: /opt/PostgreSQL/9.0cd/data/bin Databases: /opt/PostgreSQL/9.0cd/data/base Configuration: /etc/php5/apache2/php.ini DocumentRoot: /var/www Configuration: /etc/apache2/apache2.conf test.php User: postgres Permission: 700 User: postgres Permissions: 700 User: root Permissions: 700 User: root Permissions: 700 User: alumne Permissions: 777 Configuration: /opt/PostgreSQL/9.0cd/data/ postgresql.conf /opt/PostgreSQL/9.0cd/data/ pg_hba.conf User: postgres Permissions: 700 Install and configure applications with Linux Servidor WEB Apache Servidor BDs PostgreSQL PHP Client WEB
  35. 35. <ul><li>Installing applications : FTP </li></ul><ul><ul><li>Very Secure FTP Daemon server: </li></ul></ul><ul><ul><ul><li>From Synaptic: vsftpd </li></ul></ul></ul><ul><ul><ul><li>Configuration: /etc/vsftpd.conf. </li></ul></ul></ul><ul><ul><ul><li>To consider: </li></ul></ul></ul><ul><li>Allow anonymous? anonymous_enable=NO </li></ul><ul><li>Allow local connexions? local_enable=YES </li></ul><ul><li>Restrict local users to its own directory? chroot_local_user=YES </li></ul><ul><li>Enable writing: write_enable =YES </li></ul><ul><ul><ul><li>Start server: </li></ul></ul></ul><ul><ul><ul><ul><li>/etc/init.d/vsftpd [start | stop | restart | reload] </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Service vsftpd [start | stop | restart | reload] </li></ul></ul></ul></ul><ul><ul><li>sudo start vsftpd </li></ul></ul><ul><ul><li>FTP clients: </li></ul></ul><ul><ul><ul><li>gFTP </li></ul></ul></ul><ul><ul><ul><li>Run: From Applications->Internet->gFTP </li></ul></ul></ul><ul><ul><ul><li>FileZilla </li></ul></ul></ul><ul><li> Run: From Applications->Internet->FileZilla </li></ul>Install and configure applications with Linux
  36. 36. <ul><li>Installing applications : FTP client FileZilla </li></ul><ul><ul><li>Download the package Filezilla_version.tar.bz2 from: </li></ul></ul><ul><ul><li>http://filezilla-project.org </li></ul></ul><ul><li>Extract files and folders: </li></ul><ul><li>tar –xvf filezilla_version.tar.bz2 </li></ul><ul><li>Execute the file filezilla </li></ul><ul><li>./filezilla </li></ul><ul><li>Start filezilla client form </li></ul><ul><li>Applications->Internet->Filezilla </li></ul>Install and configure applications with Linux
  37. 37. Local site Remote site Information about connexion Files uploaded / downloaded Install and configure applications with Linux
  38. 38. <ul><li>Installing applications : FTP client Filezilla </li></ul>Install and configure applications with Linux
  39. 39. <ul><li>Installing applications : FTP client Filezilla </li></ul>Saving configurations: File->Export <ul><li><?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;yes&quot; ?> </li></ul><ul><li>- <FileZilla3> </li></ul><ul><li>- <Servers> </li></ul><ul><ul><li>- <Server> </li></ul></ul><ul><ul><li>  <Host> ftp.7towns4europe.eu </Host> </li></ul></ul><ul><ul><li>  <Port> 21 </Port> </li></ul></ul><ul><ul><li>  <Protocol> 0 </Protocol> </li></ul></ul><ul><ul><li><Other tags> </li></ul></ul><ul><ul><li>  <Type> 0 </Type> </li></ul></ul><ul><ul><li></Server> </li></ul></ul><ul><ul><li>- <Server> </li></ul></ul><ul><ul><li>  <Host> ceipgloriafuertes.net </Host> </li></ul></ul><ul><ul><li>  <Port> 21 </Port> </li></ul></ul><ul><ul><li>  <Protocol> 0 </Protocol> </li></ul></ul><ul><ul><li>  <Type> 0 </Type> </li></ul></ul><ul><ul><li><Other tags> </li></ul></ul><ul><ul><li></Server> </li></ul></ul><ul><ul><li>- </Servers> </li></ul></ul><ul><ul><li>- <Settings> </li></ul></ul><ul><ul><li>  <Setting name=&quot; Use Pasv mode &quot;> 1 </Setting> </li></ul></ul><ul><ul><li>  <Setting name=&quot; Limit local ports &quot;> 0 </Setting> </li></ul></ul><ul><ul><li>  <Other settings> </li></ul></ul><ul><ul><li>  </Settings> </li></ul></ul><ul><ul><li>  </FileZilla3> </li></ul></ul>Filezilla.xml file Install and configure applications with Linux
  40. 40. <ul><ul><li>Installing applications: SSH server </li></ul></ul><ul><ul><ul><li>SSH server: </li></ul></ul></ul><ul><ul><ul><ul><li>Install from Synaptic: openssh-server </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Start: sudo /usr/sbin/sshd </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Start / Stop / restart server </li></ul></ul></ul></ul><ul><ul><ul><ul><li> /etc/init.d/ssh [start | restart | stop ] </li></ul></ul></ul></ul><ul><ul><ul><ul><li> ps -ef | grep ssh -> pid process /usr/sbin/sshd </li></ul></ul></ul></ul><ul><ul><ul><ul><li>kill -9 pid </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Configuration file: /etc/ssh/sshd_config </li></ul></ul></ul></ul><ul><ul><ul><ul><li> X11Forwarding yes ; graphic mode </li></ul></ul></ul></ul><ul><ul><ul><ul><li> AllowUsers user1 user2 user3 </li></ul></ul></ul></ul><ul><ul><ul><ul><li> Port N ; If we decide to change the port number (*)‏ </li></ul></ul></ul></ul><ul><ul><ul><li>SSH client: Installed by default </li></ul></ul></ul><ul><ul><ul><ul><li>Run: </li></ul></ul></ul></ul><ul><ul><ul><ul><li>ssh [email_address] [-p Port] ; text mode </li></ul></ul></ul></ul><ul><ul><ul><ul><li>ssh -X usuari@domini [-p Port] ; graphic mode </li></ul></ul></ul></ul><ul><li>(*) For example, if we want to have 2 SSH servers in the same intranet. </li></ul><ul><li>We need to modify the file /etc/services to access a specific port by default. </li></ul>Install and configure applications with Linux
  41. 41. <ul><ul><li>Installing applications.- SSH graphic. NX </li></ul></ul><ul><ul><ul><li>Download package from : http://www.nomachine.com/download.php </li></ul></ul></ul><ul><ul><ul><li>Install from package installer </li></ul></ul></ul><ul><ul><ul><li>Execute: From Applications -> Internet -> NX Client </li></ul></ul></ul>Install and configure applications with Linux
  42. 42. <ul><ul><li>Installing applications: Postfix email server </li></ul></ul><ul><ul><ul><li>Install from Synaptic: Package postfix </li></ul></ul></ul><ul><ul><ul><li>Start: /etc/init.d/postfix start </li></ul></ul></ul><ul><ul><ul><li>Ports verification: netstat –tulpn | grep :25 ; smtp = port 25 </li></ul></ul></ul><ul><li>Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name </li></ul><ul><li>tcp 0 0 *:smtp *:* LISTEN 324/ master </li></ul><ul><ul><ul><li>File configuration: </li></ul></ul></ul><ul><ul><ul><li>/etc/postfix/main.cf : Main configuration file </li></ul></ul></ul><ul><ul><ul><li>/etc/postfix/master.cf : Another important file configuration </li></ul></ul></ul><ul><ul><ul><li>/etc/postfix/aliases: File to create alias to redirect email. </li></ul></ul></ul><ul><ul><ul><li>/etc/postfix/sasl/smtp.conf: File to configure use autentication </li></ul></ul></ul><ul><ul><ul><li>/var/spool/postix/: Postfix working files </li></ul></ul></ul>Install and configure applications with Linux
  43. 43. <ul><ul><li>Servers -> Intranet -> Internet communication </li></ul></ul>Port forwarding option : Openning the different ports to enroute the different packages coming FROM Internet TO the adequated IP Install and configure applications with Linux 192.168.1.1 Internet
  44. 44. <ul><ul><li>Servers -> Intranet -> Internet communication </li></ul></ul>DDNS option : Dynamic DNS is a method / protocol / network service that provides the capability for a networked device, to notify a Domain Name System (DNS) to change, in real time, the active DNS configuration of its configured hostnames, addresses or other information. Install and configure applications with Linux c Internet
  45. 45. <ul><ul><li>Servers -> Intranet -> Internet communication </li></ul></ul>Internet Install and configure applications with Linux
  46. 46. <ul><li>Configure and manage networks.- wicd </li></ul><ul><ul><ul><li>Install from Synaptic: Package wicd </li></ul></ul></ul><ul><ul><ul><li>Execute from: Applications -> Internet -> wicd </li></ul></ul></ul><ul><ul><ul><li>Configure values: IP, DNS, ... </li></ul></ul></ul>Install and configure applications with Linux
  47. 47. <ul><ul><li>Configuring the network.- Advanced aspects: </li></ul></ul><ul><ul><li>Firewall+dansguardian+squid </li></ul></ul><ul><ul><li>File /etc/init.d/firewall.sh </li></ul></ul><ul><ul><li>#!/bin/sh </li></ul></ul><ul><ul><li>## SCRIPT de IPTABLES − www.pello.info − [email_address] </li></ul></ul><ul><ul><li>echo -n Aplicando Reglas de Firewall... </li></ul></ul><ul><ul><li>## FLUSH de reglas </li></ul></ul><ul><ul><li>iptables –F </li></ul></ul><ul><ul><li>iptables –X </li></ul></ul><ul><ul><li>iptables –Z </li></ul></ul><ul><ul><li>iptables -t nat –F </li></ul></ul><ul><ul><li>## Establecemos politica por defecto </li></ul></ul><ul><ul><li>iptables -P INPUT ACCEPT </li></ul></ul><ul><ul><li>iptables -P OUTPUT ACCEPT </li></ul></ul><ul><ul><li>iptables -P FORWARD ACCEPT </li></ul></ul><ul><ul><li>iptables -t nat -P PREROUTING ACCEPT </li></ul></ul><ul><ul><li>iptables -t nat -P POSTROUTING ACCEPT </li></ul></ul><ul><ul><li>## Empezamos a filtrar </li></ul></ul><ul><ul><li>## Nota: eth0 es el interfaz conectado al router y eth1 a la LAN </li></ul></ul><ul><ul><li># El localhost se deja (por ejemplo conexiones locales a mysql) </li></ul></ul><ul><ul><li>/sbin/iptables -A INPUT -i lo -j ACCEPT </li></ul></ul><ul><ul><li># Al firewall tenemos acceso desde la red local </li></ul></ul><ul><ul><li>iptables -A INPUT -s 192.168.43.0/24 -i eth1 -j ACCEPT </li></ul></ul><ul><ul><li># Ahora hacemos enmascaramiento de la red local </li></ul></ul><ul><ul><li># y activamos el BIT DE FORWARDING (imprescindible!!!!!) </li></ul></ul><ul><ul><li>iptables -t nat -A POSTROUTING -s 192.168.43.0/255.255.255.0 -o eth0 -j MASQUERADE </li></ul></ul><ul><ul><li># Con esto permitimos hacer forward de paquetes en el firewall, o sea </li></ul></ul><ul><ul><li># que otras máquinas puedan salir a traves del firewall. </li></ul></ul><ul><ul><li>echo 1 > /proc/sys/net/ipv4/ip_forward </li></ul></ul>Install and configure applications with Linux
  48. 48. <ul><ul><li>Other interesting packages: </li></ul></ul><ul><li>Unified Modelling Language diagram editors </li></ul><ul><li>Umbrello: </li></ul><ul><li>From Synaptic: package umbrello </li></ul><ul><li> Start: : Aplicacions->Programs->Umbrello </li></ul><ul><li>Poseidon </li></ul><ul><ul><ul><li>Download the file: PoseidonCE_6_0_2_Installer.bin </li></ul></ul></ul><ul><ul><ul><li>Give execution rights to the file and install: </li></ul></ul></ul><ul><li>./PoseidonCE_6_0_2_Installer.bin </li></ul><ul><li>Edit the aplication menu and make an shortcut to: </li></ul><ul><ul><ul><li> /home/vicent/bin/Poseidon_For_UML </li></ul></ul></ul><ul><ul><ul><li>inside the submenu Programs </li></ul></ul></ul><ul><li>Run the program from the shorcutDia </li></ul><ul><li>Dia </li></ul><ul><li>sudo apt-get install dia </li></ul>Install and configure applications with Linux
  49. 49. <ul><ul><li>Poseidon.- Graphically: </li></ul></ul>Install and configure applications with Linux
  50. 50. <ul><ul><li>Dia </li></ul></ul>Install and configure applications with Linux http://projects.gnome.org/dia/
  51. 51. <ul><ul><li>Process management: Start / stop.- </li></ul></ul><ul><ul><ul><li>System -> Administration -> System monitor </li></ul></ul></ul>Install and configure applications with Linux
  52. 52. <ul><li>Managing services geting started up at boot-time rcconf . - </li></ul><ul><ul><ul><li>Install using Synaptic </li></ul></ul></ul><ul><ul><ul><li>Executing from a terminal: sudo rcconf </li></ul></ul></ul>Actives services at boot-time [*] Inactive services at boot-time [ ] Another way: $ chkconfig -l | grep <proces> Managing start / stop of services using scripts from the folder: /etc/rc[0-6].d Install and configure applications with Linux
  53. 53. <ul><ul><li>Compartir carpetes: Paquet Samba. - </li></ul></ul><ul><ul><ul><li>Arranc: /etc/init.d/./samba [start | stop | ...] </li></ul></ul></ul><ul><ul><ul><li>Arxiu de configuració: /etc/samba/smb.conf </li></ul></ul></ul><ul><ul><ul><li>Paràmetres: </li></ul></ul></ul><ul><li>workgroup = CASA </li></ul>Install and configure applications with Linux <ul><ul><li>Rar / unrar: </li></ul></ul><ul><li> sudo apt-get install rar unrar </li></ul><ul><ul><li>Meld: </li></ul></ul><ul><li>Meld is a tool which allows the user to see the changes in, and merge between, either two files, two directories, or two files with a common ancestor. </li></ul><ul><li>sudo apt-get install meld </li></ul><ul><ul><li>Adobe Acrobar Reader: </li></ul></ul><ul><ul><li>Adobe Reader 9 is available from the Canonical Partner repository </li></ul></ul>
  54. 54. <ul><ul><li>Wake On Line. - </li></ul></ul><ul><ul><li>Conversió de videos: FLV <=> MPEG, AVI </li></ul></ul><ul><li>sudo apt-get install ffmpeg </li></ul><ul><li>ffmpeg -i tu_archivo.flv tu_nuevo_archivo.mpeg </li></ul><ul><li>ffmpeg -i tu_archivo.flv tu_nuevo_archivo.avi ; No acaba de funcionar </li></ul>Install and configure applications with Linux <ul><ul><li>Resize / Rotate images </li></ul></ul><ul><ul><ul><li>sudo apt-get install nautilus-image-converter </li></ul></ul></ul>
  55. 55. <ul><ul><li>VPN . – Xarxa privada virtual </li></ul></ul>Install and configure applications with Linux
  56. 56. <ul><ul><li>Les pr à ctiques </li></ul></ul>1.- Localhost: Instal.lacio de les aplicacions en un ordinador personal que fa de client i de servidor mySQL Apache 2 En el servidor En el c lient php5 phpMyAdmin Navegador Editor de text Aplicacions Install and configure applications with Linux 192.168. 43 .1 192.168. 43 . 2 192.168. 43 . 3
  57. 57. <ul><ul><li>Les pr à ctiques </li></ul></ul>2.- Acces als servidors des de Internet mitjan ç ant una IP Internet mySQL Apache 2 php5 Aplicacions IP: 192.168.43.3 IP: 192.168.43.1 IP: 192.168.43.2 En el servidor En el client IP + modul userdir phpMyAdmin Navegador Editor de text Altres Install and configure applications with Linux 192.168. 43 . N
  58. 58. <ul><ul><li>Les pr à ctiques </li></ul></ul>3.- Acces als servidors des de Internet mitjanant un domini Internet mySQL Apache 2 php5 Aplicacions nomDomini nomDomini nomDomini En el servidor En el client Domini + userdir + ssl + VirtualHost NO_IP DNSALias Altres phpMyAdmin Navegador Editor de text Altres Opció router: DDNS Install and configure applications with Linux 192.168. 43 . N
  59. 59. <ul><ul><li>Les pr à ctiques </li></ul></ul>4.- Registrar un domini en Internet i contra c tar un servidor. Internet mySQL Apache 2 php5 Aplicacions phpMyAdmin Navegador Editor de text En el servidor En el client + Joomla + FTP + SMTP nomDomini Altres Install and configure applications with Linux Servidors gratuïts: http :// www.byethost.com / 192.168. 43 . N nomDomini
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×