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
home_server:web_server_setup [2022-10-20 Thu wk42 07:54] baumkphome_server:web_server_setup [2024-12-07 Sat wk49 11:13] (current) – [Basic Web Server setup on VM] baumkp
Line 2: Line 2:
 ======Web Server setup====== ======Web Server setup======
 =====Basic Web Server setup on VM===== =====Basic Web Server setup on VM=====
-I am moving away from Ubuntu to Debian. I find the instruction for here are good to setup a basic web server [[https://workaround.org/ispmail|workaround.org]] ISPmail tutorials for Debian based server.\\+I am moving away from Ubuntu to Debian. I find the instruction for here are good to setup a basic web server Digitalocean'[[https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mariadb-php-lamp-stack-on-debian-11|LAMP on Debian 11]] and Computing for Geeks [[https://computingforgeeks.com/install-lamp-stack-on-debian-linux-system/|LAMP on Debian]].\\
  
 ++++Old, tl;dr;|The main reference used is [[https://www.unixmen.com/how-to-install-lamp-stack-on-ubuntu-16-04/|Unixmen - How To Install LAMP Stack On Ubuntu 16.04]], for the basic web server setup on a virtual machine (VM), However this setup is quite basic and any similar page would probably suffice. Subsequently I found this reference that looks to be more complete for installing Apache2 on Ubuntu 18.04, [[https://www.linode.com/docs/web-servers/lamp/install-lamp-stack-on-ubuntu-18-04/|Linode - Install LAMP Stack on Ubuntu 18.04]].++++ ++++Old, tl;dr;|The main reference used is [[https://www.unixmen.com/how-to-install-lamp-stack-on-ubuntu-16-04/|Unixmen - How To Install LAMP Stack On Ubuntu 16.04]], for the basic web server setup on a virtual machine (VM), However this setup is quite basic and any similar page would probably suffice. Subsequently I found this reference that looks to be more complete for installing Apache2 on Ubuntu 18.04, [[https://www.linode.com/docs/web-servers/lamp/install-lamp-stack-on-ubuntu-18-04/|Linode - Install LAMP Stack on Ubuntu 18.04]].++++
Line 99: Line 99:
 ++++ ++++
 ''Usage: changeUID.sh [username] [oldUID] [newUID]''\\ ''Usage: changeUID.sh [username] [oldUID] [newUID]''\\
 +\\
  
 Seems there are tools to directly manually edit the **/etc/group** and **/etc/passwd** files and their shadow files. The commands are ''sudo vipw'' and ''sudo vigr''. Seems there are tools to directly manually edit the **/etc/group** and **/etc/passwd** files and their shadow files. The commands are ''sudo vipw'' and ''sudo vigr''.
 +
 ---- ----
 =====LDPA===== =====LDPA=====
Line 122: Line 124:
       *127.0.0.1 localhost       *127.0.0.1 localhost
       *127.0.0.1 New_Hostname       *127.0.0.1 New_Hostname
-    *Additional system hosts can be placed in "/etc/hoststo provide basic local host name resolution. I prefer to install a separate DNS server to provide this functionality.+    *Additional system hosts can be placed in ''/etc/hosts'' to provide basic local host name resolution. I prefer to install a separate DNS server to provide this functionality. 
 ====Apache2 Setup==== ====Apache2 Setup====
   *Copy the current html files to the proposed new location: ''sudo rsync -av /var/www/html /mnt/shared/www16/''   *Copy the current html files to the proposed new location: ''sudo rsync -av /var/www/html /mnt/shared/www16/''
Line 228: Line 231:
     *For the relocated data: ''sudo rsync -Aax /mnt/shared/temp/oc-backupdir/data /mnt/shared/www16/nextcloud/''     *For the relocated data: ''sudo rsync -Aax /mnt/shared/temp/oc-backupdir/data /mnt/shared/www16/nextcloud/''
  *Ensure the path to your nextcloud directory is included in the /etc/apache2/apache2.conf, e.g. statement.  *Ensure the path to your nextcloud directory is included in the /etc/apache2/apache2.conf, e.g. statement.
-===Nextcloud Updating===+====Nextcloud Updating====
  *Nextcloud Stable Server Administration Manual [[https://docs.nextcloud.com/server/stable/admin_manual/maintenance/index.html|Maintenance]]. (This also discusses database management, backup and restore)  *Nextcloud Stable Server Administration Manual [[https://docs.nextcloud.com/server/stable/admin_manual/maintenance/index.html|Maintenance]]. (This also discusses database management, backup and restore)
 +====mariadb binary log files====
 +The mysql binary log files are located here: ''var/log/mysql'' Some time they fill up the file system and the system then fails to operate.
 +  * ''sudo mysql -p -u root'' - Login in to mysql, need root password
 +  * ''SHOW BINARY LOGS;'' - to list current binary log files
 +  * ''%%PURGE BINARY LOGS TO 'mariadb-bin.003071';%%'' - to purge all binary log files before listed log file, in example ''%%'mariadb-bin.003071'%%''
 +  * ''%%show variables like "sql_log_bin";%%'' - to see current setting of variable ''%%"sql_log_bin"%%''
 +  * ''%%SET sql_log_bin = 0;%%'' - to set a variable
 +  * ''exit'' or ^d - to exit
  
 ---- ----