User Tools

Site Tools


internet_server

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
internet_server [2025/01/19 02:10] 1211112228internet_server [2025/01/19 03:49] (current) – [Installation of FTP Server] 1211112228
Line 1: Line 1:
-====== Install and Configure Internet Server ======+====== Part 3: Install and Configure Internet Server ======
 This page will show how to install and configure your very own Internet Server using the LAMP server package. This page will show how to install and configure your very own Internet Server using the LAMP server package.
  
Line 8: Line 8:
  
 Login As Root Login As Root
-  * Use ''su --login'' then update and upgrade Debian using command ''apt update && apt upgrade''{{ :screenshot_2025-01-16_123544.png?400 |{{:screenshot_2025-01-16_123544.png?400|}}+  * Use ''su --login'' then update and upgrade Debian using command ''apt update && apt upgrade'' 
 + 
 +  su --login 
 +  apt update && apt upgrade 
 +{{ :screenshot_2025-01-16_123544.png?400 |{{:screenshot_2025-01-16_123544.png?400|}}
  
 Next, we are going to install a database. Here we going to install maria database. Next, we are going to install a database. Here we going to install maria database.
-  * Use ''sudo apt install mariadb-server mariadb-client''{{ :jep2.png?400 |}}+  sudo apt install mariadb-server mariadb-client 
 +{{ :jep2.png?400 |}}
  
 Next, we have to install apache2 web server Next, we have to install apache2 web server
-  * Use ''sudo apt install apache2 apache2-doc''{{ :jep3.png?400 |}}+  sudo apt install apache2 apache2-doc 
 +{{ :jep3.png?400 |}}
  
 After doing the installation, we need to enable its module After doing the installation, we need to enable its module
-  * Use ''sudo a2enmod userdir''{{ :jep4.png?400 |}}+  sudo a2enmod userdir 
 +{{ :jep4.png?400 |}}
  
 Then configure apache module in ''/etc/apache2/mods-enabled/userdir.conf'' to the following configuration: Then configure apache module in ''/etc/apache2/mods-enabled/userdir.conf'' to the following configuration:
-  * Use ''sudo nano /etc/apache2/mods-enabled/userdir.conf''{{ :jep5.png?400 |}}+  sudo nano /etc/apache2/mods-enabled/userdir.conf 
 +{{ :jep5.png?400 |}}
  
 Go to ''/etc/apache2/mods-availabe'' and looking for ''php8.2.conf'' (seek for your own php version, maybe different) Go to ''/etc/apache2/mods-availabe'' and looking for ''php8.2.conf'' (seek for your own php version, maybe different)
   * Use ''cd /etc/apache2/mods-available'' then, in the ''/etc/apache2/mods-availabe'' directory, type ''ls'' to view all files available.{{ :jep6.png?400 |}}   * Use ''cd /etc/apache2/mods-available'' then, in the ''/etc/apache2/mods-availabe'' directory, type ''ls'' to view all files available.{{ :jep6.png?400 |}}
-  * Type this command to check the content in php8.2.conf: ''sudo nano php8.2.conf''{{ :jep7.png?400 |}}+  * Type this command to check the content in php8.2.conf:  
 + 
 +  sudo nano php8.2.conf 
 +{{ :jep7.png?400 |}}
  
 Next, Install the php-mysql Next, Install the php-mysql
-  * Use ''sudo apt install php php-mysql''{{ :jep8.png?400 |}}+  sudo apt install php php-mysql 
 +{{ :jep8.png?400 |}}
  
-Next create directory public_html. Use ''mkdir /home/(user)/public_html''. Then change group and restart the web server. Use ''sudo chgrp www-data /home/(username)/public_html''. Restart apache2 using ''Sudo systemctl restart apache2.service''+Next create directory public_html. Use ''mkdir /home/(user)/public_html''. Then change group and restart the web server. Use ''sudo chgrp www-data /home/(username)/public_html''. Restart apache2 using ''sudo systemctl restart apache2.service''
  
 **Test the LAMP Server Installation** **Test the LAMP Server Installation**
  
-Install chromium browser.  +Install Chromium browser.  
-  * Use ''sudo apt install chromium''{{ :jep9.png?400 |}}+  sudo apt install chromium 
 +{{ :jep9.png?400 |}}
  
 Change network settings to Host-Only Adapter{{ :jep10.png?400 |}} Change network settings to Host-Only Adapter{{ :jep10.png?400 |}}
  
-**Test apache installation**+**Test Apache Installation**
  
 In the browser, type your ipaddress (''10.0.2.15'') to test the apache installation.{{ :jep11.png?400 |}} In the browser, type your ipaddress (''10.0.2.15'') to test the apache installation.{{ :jep11.png?400 |}}
  
-**Test php installation**+**Test PHP Installation**
  
 Go to /var/www/html directory Go to /var/www/html directory
Line 50: Line 63:
   * ''10.0.2.15/test.php''{{ :jep14.png?400 |}}   * ''10.0.2.15/test.php''{{ :jep14.png?400 |}}
  
-**Test apache and php configuration**+**Test Apache and PHP Configuration**
  
 Change directory to /var/www/html using ''cd /var/www/html'' and create ''hello.html'' file using ''sudo nano hello.html''{{ :jep15.png?400 |}}{{ :jep16.png?400 |}} Change directory to /var/www/html using ''cd /var/www/html'' and create ''hello.html'' file using ''sudo nano hello.html''{{ :jep15.png?400 |}}{{ :jep16.png?400 |}}
Line 56: Line 69:
 Open chromium and search for ipaddress/hello.html.  Open chromium and search for ipaddress/hello.html. 
   * ''10.0.2.15/hello.html''{{ :jep17.png?400 |}}   * ''10.0.2.15/hello.html''{{ :jep17.png?400 |}}
 +
 ---- ----
  
 ===== Installation of SSH Server ===== ===== Installation of SSH Server =====
-Install SSH server using ''sudo apt-get install openssh-server''{{ :jep18.png?400 |}}+Install SSH server using  
 +  sudo apt-get install openssh-server 
 +{{ :jep18.png?400 |}}
  
-Deleting old ssh keys using ''sudo /bin/rm -v /etc/ssh/ssh_host_*''{{ :jep19.png?400 |}}+Deleting old ssh keys using  
 +  sudo /bin/rm -v /etc/ssh/ssh_host_* 
 +{{ :jep19.png?400 |}}
  
-Regenerate openssh host key using ''sudo dpkg-reconfigure openssh-server''{{ :jep20.png?400 |}}+Regenerate openssh host key using  
 +  sudo dpkg-reconfigure openssh-server 
 +{{ :jep20.png?400 |}}
  
-Restart the ssh server using ''sudo sysmctl restart ssh''{{ :jep21.png?400 |}}+Restart the ssh server using  
 +  sudo sysmctl restart ssh 
 +{{ :jep21.png?400 |}}
  
-Remove the host fingerprint using ''ssh-keygen -R localhost''{{ :jep22.png?400 |}}+Remove the host fingerprint using  
 +  ssh-keygen -R localhost 
 +{{ :jep22.png?400 |}}
  
-Then, Log in to SSH using ''ssh vboxuser@localhost''{{ :jep23.png?400 |}}+Then, Log in to SSH using  
 +  ssh vboxuser@localhost 
 +{{ :jep23.png?400 |}}
  
 **Test the SSH Server** **Test the SSH Server**
Line 75: Line 101:
 Change to host only adapter and check for host ip address using ''hostname -I''{{ :jep10.png?400 |}}{{ :jep24.png?400 |}} Change to host only adapter and check for host ip address using ''hostname -I''{{ :jep10.png?400 |}}{{ :jep24.png?400 |}}
  
-Next, try to generate key using rsa using ''ssh-keygen -t rsa''{{ :jep25.png?400 |}}+Next, try to generate key using rsa using  
 +  ssh-keygen -t rsa 
 +{{ :jep25.png?400 |}}
  
-Then copy the key using ''ssh-copy-id vboxuser@192.168.56.102''{{ :jep26.png?400 |}}+Then copy the key using  
 +  ssh-copy-id vboxuser@192.168.56.102 
 +{{ :jep26.png?400 |}}
  
 Now we are able to log in to ssh server without any password requirement. Now we are able to log in to ssh server without any password requirement.
  
   * Try using ''ssh vboxuser@192.168.56.102'' and ''ssh vboxuser@localhost''{{ :jep27.png?400 |}}   * Try using ''ssh vboxuser@192.168.56.102'' and ''ssh vboxuser@localhost''{{ :jep27.png?400 |}}
 +
 +----
  
 ===== Installation of FTP Server ===== ===== Installation of FTP Server =====
  
 Install the FTP Server Install the FTP Server
- +  sudo apt-get install proftpd-basic 
-  * Use ''sudo apt-get install proftpd-basic''{{ :jep28.png?400 |}}+{{ :jep28.png?400 |}}
  
 Install ''ftp'' to be able to use ftp command Install ''ftp'' to be able to use ftp command
- +  sudo apt-get install ftp 
-  * Use ''sudo apt-get install ftp''{{ :jep29.png?400 |}}+{{ :jep29.png?400 |}}
  
 Test the installation by typing ftp ipaddress Test the installation by typing ftp ipaddress
- +  ftp 192.168.56.102   
-  * ''ftp 192.168.56.102''{{ :jepaddon.png?400 |}}+{{ :jepaddon.png?400 |}}
  
 Next, Install GUI FTP Next, Install GUI FTP
Line 108: Line 140:
  
 Enabling Chroot Jail Enabling Chroot Jail
- +  sudo nano /etc/proftpd/proftpd.conf 
-  * Use ''sudo nano /etc/proftpd/proftpd.conf''.Uncomment ''#DefaultRoot~''{{ :jep34.png?400 |}}+Uncomment ''#DefaultRoot~''{{ :jep34.png?400 |}}
  
 **Test the FTP Server** **Test the FTP Server**
internet_server.1737252647.txt.gz · Last modified: 2025/01/19 02:10 by 1211112228

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki