# - bof - # :1 # - - # # - Fix error accessing uServer - # ssh cvandemberg@192.168.1.100; @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY! Someone could be eavesdropping on you right now (man-in-the-middle attack)! It is also possible that a host key has just been changed. The fingerprint for the ECDSA key sent by the remote host is SHA256:ONbIILJkgkVep54NtGFSaxiRbbfKvdnuTWQrVlJSkrc. Please contact your system administrator. Add correct host key in /Users/cvandemberg/.ssh/known_hosts to get rid of this message. Offending ECDSA key in /Users/cvandemberg/.ssh/known_hosts:27 ECDSA host key for 192.168.1.200 has changed and you have requested strict checking. Host key verification failed. ╭── # cvandemberg@Djalmars-iMac ~ : ╰─▷ $ ssh-keygen -R 192.168.1.100; :2 # - - # # - Static IP address for uServer - # # File location: /etc/netplan/ # Name: /etc/netplan/01-netcfg.yaml sudo nano /etc/netplan/01-netcfg.yaml; # This file describes the network interfaces available on your system # For more information, see netplan(5). network: ethernets: eno1: dhcp4: no addresses: [192.168.1.100/24] gateway4: 192.168.1.1 nameservers: addresses: [8.8.8.8, 8.8.4.4] version: 2 :2.1 # - - # # - Modify .bashrc file - # :3 # - - # # - Update - # sudo apt update && sudo apt upgrade -y && sudo apt autoremove -y; :4 # - - # # - Some extra programs to be installed in uServer - # sudo apt install atop htop inxi mhddfs screenfetch unzip zip -y; sudo apt install snapd -y; sudo snap install bpytop; :5 # - - # # - Show system info - # inxi -SCMm -t c -P -x; sudo inxi -SCMm -t c -P -x; ╭── # cvandemberg@uServer / : ╰─▷ $ inxi -SCMm -t c -P -x System: Host: uServerHome Kernel: 4.15.0-58-generic x86_64 bits: 64 gcc: 7.4.0 Console: tty 0 Distro: Ubuntu 18.04.3 LTS Machine: Device: desktop Mobo: Acer model: Aspire TC-605 serial: DBSRPCN00144802712EE02 UEFI: American Megatrends v: P11-B1 date: 08/07/2014 CPU: Quad core Intel Core i5-4460 (-MCP-) arch: Haswell rev.3 cache: 6144 KB flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 25540 clock speeds: max: 3200 MHz 1: 1072 MHz 2: 916 MHz 3: 995 MHz 4: 1568 MHz Memory: Used/Total: 842.9/7410.2MB Array-1 capacity: 16 GB devices: 2 EC: None Device-1: DIMM1 size: 8 GB speed: 1600 MT/s type: DDR3 part: HMT41GU6BFR8A-PB Device-2: DIMM2 size: No Module Installed type: N/A Device-3: N/A size: N/A type: N/A Partition: ID-1: / size: 49G used: 14G (30%) fs: ext4 dev: /dev/sda2 Processes: CPU: % used - Memory: MB / % used - Used/Total: 842.1/7410.2MB - top 5 active 1: cpu: 0.3% command: Plex pid: 3684 mem: 51.72MB (0.6%) 2: cpu: 0.2% command: Plex pid: 1465 mem: 74.92MB (1.0%) 3: cpu: 0.1% command: node pid: 4338 mem: 75.61MB (1.0%) 4: cpu: 0.1% command: containerd pid: 1275 mem: 38.01MB (0.5%) 5: cpu: 0.0% daemon: ~kworker/u8:3~ pid: 8358 mem: 0.00MB (0.0%) :6 # - - # # - Show IP addres, network cards - # sudo lshw -C network; # network cards & more ip addr show; inxi -n; inxi -Fxs; route; route -n; routel; ip route; ip route show; netstat -rn; # - - # # - Show wireless configuration - # iwconfig uname -a lspci lspci -nnk lsusb :7 # - - # # - Install & configure svftpd - # sudo apt install vsftpd -y; # - Modify vsftpd.conf file - # sudo nano /etc/vsftpd.conf; # - Look for this line and UNCOMMENT to be able to write - # write_enable=YES local_enable=YES # - Look for "pam_service_name=vsftpd" - # #pam_service_name=vsftpd pam_service_name=ftp # - Allowed ftp users - # sudo nano /etc/ftpusers; Add cvandemberg to the file # - - # # - Restart vsftpd service - # sudo service vsftpd restart; :8 # - - # # - Enable ssh root access on Ubuntu - # # - Create password for root - # sudo passwd root; :9 # - Edit sshd_config file - # sudo nano /etc/ssh/sshd_config; #PermitRootLogin without-password PermitRootLogin yes # - Look for this line and remove comment - # PasswordAuthentication yes # - Restart ssh - # sudo service ssh restart; :10 # - - # # - Mount Data partition - # :10.1 # - - # # - Create Data folder - # sudo mkdir /Data; :10.2 # - - # # - Show HDD partitions UUIDs - # ╭── # cvandemberg@uServer ~ : ╰─▷ $ sudo lsblk -f; sudo e2label /dev/sda1 uServer sudo lsblk -f; NAME FSTYPE LABEL UUID MOUNTPOINT sda ├─sda1 vfat EFI BOOT 9D06-A805 ├─sda2 ext4 uServer 11819579-7774-4688-a1e0-10c92dbb6790 / └─sda4 ext4 Data 196dd81b-ea59-41f7-8fe1-025dcf082eb6 sr0 :10.3 # - - # # - Modify fstab - # sudo nano /etc/fstab; # /etc/fstab: static file system information. # # Use 'blkid' to print the universally unique identifier for a # device; this may be used with UUID= as a more robust way to name devices # that works even if disks are added and removed. See fstab(5). # # UUID=4fc57b15-7429-4482-a2ef-ff668d14a3e3 / ext4 errors=remount-ro 0 1 UUID=464feee9-9a90-4117-a0a8-0560c7bfbf3e /Data ext4 defaults 0 2 /swapfile none swap sw 0 0 :10.4 # - - # # - Mount fstab - # sudo mount -a; lsblk -f; :10.5 # - - # # - Mount fstab - # :10.6 # - - # # - Change Data ownershipt & write properties - # sudo chown cvandemberg:cvandemberg /Data; chmod 775 /Data; :10.7 # - - # # - Navigate to Data partition - # cd /Data; ls -lah; :10.8 # - - # # - Create Data folders - # mkdir -p /Data/Documents/Downloads; mkdir -p /Data/Documents/Pictures; mkdir -p /Data/Documents/Music; mkdir -p /Data/Documents/Videos; mkdir -p /Data/Images/Linux.Img; mkdir -p /Data/Images/Microsoft.Img; mkdir -p /Data/WebServer; mkdir -p /Data/WebServer/Test1; mkdir -p /Data/WebServer/Test2; :10.9 # - - # # - Advise to shutdown & backup uServer - # sudo shutdown now; :11 # - - # # - Install apache on uServer - # sudo apt update && sudo apt install apache2 -y; :11.1 # - - # # - PHP software - # sudo apt install php8.1 php8.1-common php8.1-mysql php8.1-gmp php8.1-curl php8.1-intl \ php8.1-mbstring php8.1-gd php8.1-xml php8.1-cli php8.1-pgsql php8.1-zip \ libapache2-mod-php8.1 -y; :12 # - - # # - Modify apache2 configuration file - # sudo nano /etc/apache2/sites-available/000-default.conf; modify line: DocumentRoot /var/www/html DocumentRoot /Data/WebServer :13 # - - # # - Restart apache service - # sudo service apache2 restart; :14 # - - # # - Redirect WebServer - # sudo nano /etc/apache2/apache2.conf; # - Look for - # /Directory # - Look for this format - # Options Indexes FollowSymLinks AllowOverride None Require all granted # - Replace it with - # :15 # - - # # - Restart apache service - # sudo service apache2 restart; :16 # - - # # - Access WebServer & configure access on local user - # :16.1 # - - # # - Access WebServer - # Firefox 192.168.0.100 :16.2 # - - # # - Configure access on local user - # ln -s /Data/WebServer/ /home/cvandemberg/WebServer; :17 # - - # # - Prepare Webmin installation - # issueF_=/etc/issue; sudo sed -i '1!d' $issueF_; sudo sed -i 's/Ubuntu Jammy Jellyfish (development branch) \\n \\l/#Ubuntu Jammy Jellyfish (development branch) \\n \\l/' $issueF_; sudo sed -i '$ a Ubuntu 22.04 \\n \\l' $issueF_; # - - # # - Mostrar contenido de /etc/issue - # cat /etc/issue; Ubuntu 22.04 \n \l :17.1 # - - # # - Update & install Webmin libraries - # sudo apt update; sudo apt install apt-show-versions apt-transport-https ca-certificates curl \ libauthen-pam-perl libio-pty-perl libnet-ssleay-perl libpam-runtime \ lsb-release openssl perl python3 software-properties-common -y; :17.2 # - - # # - Goto Downloads - # cd /Data/Documents/Downloads; :17.3 # - - # # - Download Webmin - # wget http://prdownloads.sourceforge.net/webadmin/webmin_1.990_all.deb; :17.4 # - - # # - Install Webmin - # sudo dpkg --install webmin_1.990_all.deb :17.5 # - - # # - Restart - # :17.6 # - - # # - Access Webmin - # https://192.168.0.100:10000 :18 # - - # # - Install phpmyadmin - # sudo apt install phpmyadmin -y; # - - # # - Install MySQL after the error - # sudo apt --purge remove mysql-server mysql-common mysql-client -y; sudo apt update && sudo apt upgrade -y && sudo apt autoremove -y; sudo apt install mysql-server mysql-client -y; sudo phpenmod mbstring; sudo systemctl restart apache2 :19 # - - # # - Configure MySQL server - # :19.1 # - - # # - In uServer - # # - Access MySQL as root - # sudo mysql; :19.2 # - - # # - Open mysql database & show users - # use mysql; SELECT host, user, plugin FROM user ORDER BY user; :19.3 # - - # # - Add & configure administration users - # :19.3.1 # - - # # - Add & configure root user - # CREATE USER 'root'@'%' IDENTIFIED BY 'Admin22'; GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION; ALTER USER 'root'@'%' IDENTIFIED WITH caching_sha2_password BY 'Admin22'; ALTER USER 'root'@'localhost' IDENTIFIED WITH caching_sha2_password BY 'Admin22'; :19.3.2 # - - # # - Add & configure personal user - # CREATE USER 'cvandemberg'@'localhost' IDENTIFIED BY 'Admin22'; GRANT ALL PRIVILEGES ON *.* TO 'cvandemberg'@'localhost' WITH GRANT OPTION; CREATE USER 'cvandemberg'@'%' IDENTIFIED BY 'Admin22'; GRANT ALL PRIVILEGES ON *.* TO 'cvandemberg'@'%' WITH GRANT OPTION; :19.3.3 # - - # # - Add & configure personal user - # mysql -u cvandemberg -pAdmin22; CREATE USER 'is_derayo'@'localhost' IDENTIFIED BY 'Admin22'; GRANT ALL PRIVILEGES ON *.* TO 'is_derayo'@'localhost' WITH GRANT OPTION; CREATE USER 'is_derayo'@'%' IDENTIFIED BY 'Admin22'; GRANT ALL PRIVILEGES ON *.* TO 'is_derayo'@'%' WITH GRANT OPTION; :19.4 # - - # # - Show users - # SELECT host, user, plugin FROM user ORDER BY user; # - Should look like this - # +-----------+------------------+-----------------------+ | host | user | plugin | +-----------+------------------+-----------------------+ | localhost | debian-sys-maint | mysql_native_password | | localhost | cvandemberg | mysql_native_password | | % | cvandemberg | mysql_native_password | | localhost | mysql.session | mysql_native_password | | localhost | mysql.sys | mysql_native_password | | localhost | phpmyadmin | mysql_native_password | | localhost | root | mysql_native_password | | % | root | mysql_native_password | +-----------+------------------+-----------------------+ :20 # - - # # - Flush privileges & exit MySQL - # FLUSH PRIVILEGES; exit :21 # - - # # - Static IP-Address on MySQL server - # :21.1 # - - # # - Open mysqld.cnf - # sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf; :21.2 # - - # # - Look & modify bind-address - # bind-address = 192.168.0.100 :21.3 # - - # # - Restart MySQL server - # sudo service mysql restart; :22 # - - # # - Create & configure shared directories - # :22.1 # - - # # - cd Documents folder - # cd /Data/Documents; ls -lah; :22.2 # - - # # - Create directories to share - # mkdir -p /Data/Documents/ToShare-FullAccess; mkdir -p /Data/Documents/ToShare-JustRead; :22.3 # - - # # - Change ownership to common user - # sudo chown -R cvandemberg:cvandemberg /Data/Documents/ToShare-FullAccess; sudo chown -R cvandemberg:cvandemberg /Data/Documents/ToShare-JustRead; ls -lah; :22.3 # - - # # - Change folders permissions - # # - 777="Full access to directory" - # chmod 777 /Data/Documents/ToShare-FullAccess; chmod 777 /Data/Documents/ToShare-JustRead; ls -lah; :23 # - - # # - Install samba following the website instructions - # :24 # - - # # - Move MySQL Database to Data disk - # :25 # - - # # - A1.0-Install_PostgreSQL_12 - # # - A2 - Move PostgreSQL Database to New Location- # # - A4 - Install phpPgAdmin on Ubuntu 16.04 - # :26 # - - # # - Install & configure NextCloud - # :27 # - - # # - Install & configure PlexMediaServer - # :28 # - - # # - Install docker - UbuntuServer - # # - 1 - How to Manage Docker Containers using Portainer on UbuntuServer.pdf - # :29 # - - # # - Move Data - # sudo umount /home/Data; sudo mkdir Data; nano /etc/fstab; Editar directorio de /home/Data a solo /Data grabar umount -a; sudo rm -r /home/Data; :30 # - - # # - Edit Webserver - # sudo nano /etc/apache2/sites-available/000-default.conf; dejar solo /Data/WebServer grabar sudo nano /etc/apache2/apache2.conf; ir al apartado Directory, # - eof - #