fedora_install_for_my_own_purposes
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| fedora_install_for_my_own_purposes [2018/12/08 12:49] – created 0.0.0.0 | fedora_install_for_my_own_purposes [2020/03/06 21:54] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Fedora_install_for_my_own_purposes ====== | ||
| - | |||
| At time of writing, Fedora 28 is current stable version | At time of writing, Fedora 28 is current stable version | ||
| - | =====Download and install Fedora===== | + | ==== Download and install Fedora ==== |
| - | * [[https:// | + | * [[https:// |
| - | =====Configure Fedora===== | + | ==== Configure Fedora ==== |
| - | ====Enable SSH==== | + | === Enable SSH === |
| To allow remote access | To allow remote access | ||
| - | < | + | < |
| - | ====Disable SELinux==== | + | sudo systemctl enable sshd |
| + | sudo systemctl start sshd | ||
| + | </ | ||
| + | === Disable SELinux === | ||
| Use the / | Use the / | ||
| - | < | + | < |
| + | $ / | ||
| + | Enforcing | ||
| + | </ | ||
| or | or | ||
| - | < | + | < |
| + | $ / | ||
| + | SELinux status: | ||
| + | SELinuxfs mount: | ||
| + | Current mode: | ||
| + | Mode from config file: enforcing | ||
| + | Policy version: | ||
| + | Policy from config file: targeted | ||
| + | </ | ||
| Change SELINUX from < | Change SELINUX from < | ||
| - | < | + | < |
| - | < | + | sudo vi / |
| + | - This file controls the state of SELinux on the system. | ||
| + | - SELINUX= can take one of these three values: | ||
| + | - enforcing - SELinux security policy is enforced. | ||
| + | - permissive - SELinux prints warnings instead of enforcing. | ||
| + | - disabled - No SELinux policy is loaded. | ||
| + | SELINUX=enforcing | ||
| + | - SELINUXTYPE= can take one of these two values: | ||
| + | - targeted - Targeted processes are protected, | ||
| + | - mls - Multi Level Security protection. | ||
| + | SELINUXTYPE=targeted | ||
| + | </ | ||
| + | < | ||
| + | sudo reboot | ||
| + | </ | ||
| - | ====Assign hostname==== | + | === Assign hostname === |
| - | < | + | < |
| - | ====Assign static IP address==== | + | hostnamectl set-hostname fedora |
| + | hostnamectl | ||
| + | </ | ||
| + | === Assign static IP address === | ||
| Choose the network link to change | Choose the network link to change | ||
| - | < | + | < |
| - | < | + | ifconfig -a |
| + | </ | ||
| + | < | ||
| + | enp0s25: flags=4163< | ||
| + | inet 192.168.1.206 | ||
| + | inet6 2a02: | ||
| + | inet6 fe80:: | ||
| + | ether 00: | ||
| + | RX packets 65231 bytes 96666417 (92.1 MiB) | ||
| + | RX errors 0 dropped 0 overruns 0 frame 0 | ||
| + | TX packets 27570 bytes 2020047 (1.9 MiB) | ||
| + | TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 | ||
| + | device interrupt 20 memory 0xf2500000-f2520000 | ||
| + | |||
| + | lo: flags=73< | ||
| + | inet 127.0.0.1 | ||
| + | inet6 ::1 prefixlen 128 scopeid 0x10< | ||
| + | loop txqueuelen 1000 (Local Loopback) | ||
| + | RX packets 4 bytes 315 (315.0 B) | ||
| + | RX errors 0 dropped 0 overruns 0 frame 0 | ||
| + | TX packets 4 bytes 315 (315.0 B) | ||
| + | TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 | ||
| + | |||
| + | wlp3s0: flags=4099< | ||
| + | ether 92: | ||
| + | RX packets 0 bytes 0 (0.0 B) | ||
| + | RX errors 0 dropped 0 overruns 0 frame 0 | ||
| + | TX packets 0 bytes 0 (0.0 B) | ||
| + | TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 | ||
| + | </ | ||
| Easiest method is to use the command line! | Easiest method is to use the command line! | ||
| - | < | + | < |
| + | sudo vi / | ||
| + | </ | ||
| Before... | Before... | ||
| - | < | + | < |
| + | TYPE=Ethernet | ||
| + | PROXY_METHOD=none | ||
| + | BROWSER_ONLY=no | ||
| + | BOOTPROTO=dhcp | ||
| + | DEFROUTE=yes | ||
| + | IPV4_FAILURE_FATAL=no | ||
| + | IPV6INIT=yes | ||
| + | IPV6_AUTOCONF=yes | ||
| + | IPV6_DEFROUTE=yes | ||
| + | IPV6_FAILURE_FATAL=no | ||
| + | IPV6_ADDR_GEN_MODE=stable-privacy | ||
| + | NAME=enp0s25 | ||
| + | UUID=9097eb96-1ce2-38a2-8dd8-29a8bf56aba4 | ||
| + | ONBOOT=yes | ||
| + | AUTOCONNECT_PRIORITY=-999 | ||
| + | DEVICE=enp0s25 | ||
| + | </ | ||
| After... | After... | ||
| - | < | + | < |
| + | TYPE=Ethernet | ||
| + | PROXY_METHOD=none | ||
| + | BROWSER_ONLY=no | ||
| + | - BOOTPROTO=dhcp | ||
| + | BOOTPROTO=none | ||
| + | IPADDR=192.168.1.15 | ||
| + | NETMASK=255.255.255.0 | ||
| + | GATEWAY=192.168.1.1 | ||
| + | DNS1=192.168.1.13 | ||
| + | DNS2=8.8.8.8 | ||
| + | DEFROUTE=yes | ||
| + | IPV4_FAILURE_FATAL=no | ||
| + | IPV6INIT=yes | ||
| + | IPV6_AUTOCONF=yes | ||
| + | IPV6_DEFROUTE=yes | ||
| + | IPV6_FAILURE_FATAL=no | ||
| + | IPV6_ADDR_GEN_MODE=stable-privacy | ||
| + | NAME=enp0s25 | ||
| + | UUID=a8a3bec5-64b0-34de-9e27-9c732082c94b | ||
| + | ONBOOT=yes | ||
| + | AUTOCONNECT_PRIORITY=-999 | ||
| + | DEVICE=enp0s25 | ||
| + | ZONE=FedoraWorkstation | ||
| + | </ | ||
| - | =====Install Applications===== | + | ==== Install Applications ==== |
| - | <code> | + | See further down to install Apache instead of lighttpd. |
| - | ====Configure directory permissions==== | + | < |
| - | < | + | sudo dnf clean all |
| + | sudo dnf -y update | ||
| - | ====Configure | + | sudo dnf install -y ksh terminator thunderbird ddclient lighttpd rrdtool |
| - | * Modify document_root | + | </ |
| - | <code> | + | === Configure |
| - | * Enable mod_cgi: uncomment the mod_cgi include | + | < |
| - | < | + | sudo su - |
| - | * Setup Basic Authentication to restrict web server access | + | cd /var/www |
| - | * Enable server to serve perl files from cgi-bin | + | mkdir html cgi-bin |
| - | < | + | cd cgi-bin |
| - | * Bind the local address to port 80 | + | git clone https:// |
| - | * Disable IPV6 | + | chmod 770 * |
| - | < | + | cd /var/www |
| + | chown -R lighttpd: | ||
| + | cd / | ||
| + | chmod 770 spoolfiles | ||
| + | chgrp lighttpd spoolfiles | ||
| + | </ | ||
| - | ====Configure firewall==== | + | === Configure |
| - | Connection refused on port 80 from hosts on you lan? :-)<br /> | + | * Modify document_root |
| + | < | ||
| + | vi / | ||
| + | |||
| + | server.document-root = server_root + "/ | ||
| + | </ | ||
| + | * Enable mod_cgi: uncomment the mod_cgi include | ||
| + | < | ||
| + | - | ||
| + | - plain old CGI (mod_cgi) | ||
| + | - | ||
| + | include " | ||
| + | </ | ||
| + | * Setup Basic Authentication to restrict web server access | ||
| + | * Enable server to serve perl files from cgi-bin directory | ||
| + | < | ||
| + | auth.backend = " | ||
| + | auth.backend.htpasswd.userfile = "/ | ||
| + | |||
| + | $HTTP[[" | ||
| + | auth.require = ( | ||
| + | "" | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | ) | ||
| + | ) | ||
| + | cgi.assign = ( | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | ) | ||
| + | } | ||
| + | |||
| + | alias.url += ( "/ | ||
| + | </ | ||
| + | * Bind the local address to port 80 | ||
| + | * Disable IPV6 | ||
| + | < | ||
| + | server.bind = " | ||
| + | server.use-ipv6 = " | ||
| + | </ | ||
| + | |||
| + | === Install Apache === | ||
| + | Installing Apache is as simple as running just one command | ||
| + | < | ||
| + | sudo dnf -y install httpd | ||
| + | </ | ||
| + | |||
| + | === Allow Apache Through the Firewall === | ||
| + | Allow the default HTTP and HTTPS port, ports 80 and 443, through firewalld | ||
| + | |||
| + | < | ||
| + | sudo firewall-cmd --permanent --add-port=80/tcp | ||
| + | sudo firewall-cmd --permanent --add-port=443/ | ||
| + | sudo firewall-cmd --reload | ||
| + | </ | ||
| + | |||
| + | === Configure Apache to Start on Boot === | ||
| + | < | ||
| + | sudo systemctl enable httpd | ||
| + | </ | ||
| + | and start it now... | ||
| + | < | ||
| + | sudo systemctl start httpd | ||
| + | </ | ||
| + | |||
| + | === Check the status of Apache === | ||
| + | < | ||
| + | sudo systemctl status httpd | ||
| + | </ | ||
| + | |||
| + | === To stop Apache === | ||
| + | < | ||
| + | sudo systemctl stop httpd | ||
| + | </ | ||
| + | |||
| + | === Configure firewall (if not configured as part of Apache install) | ||
| + | Connection refused on port 80 from hosts on you lan? :-)\\ | ||
| Firewalld is installed and running by default - and it blocks port 80! | Firewalld is installed and running by default - and it blocks port 80! | ||
| - | < | + | < |
| + | firewall-cmd --permanent --add-service=http | ||
| + | systemctl stop firewalld | ||
| + | systemctl start firewalld | ||
| + | </ | ||
| - | ====Install and configure add-on FiltaQuilla==== | + | === Install and configure add-on FiltaQuilla === |
| - | < | + | < |
| - | FiltaQuilla is an add-on that adds significant functionality to the filtering of emails in Thunderbird.<br /> | + | FiltaQuilla is an add-on that adds significant functionality to the filtering of emails in Thunderbird.\\ |
| Setup the rule | Setup the rule | ||
| - | * Where subject contains " | + | * Where subject contains " |
| - | * Save attachment to " | + | * Save attachment to " |
| - | * Mark as read | + | * Mark as read |
| - | * Delete mail | + | * Delete mail |
| - | ====Configure Thunderbird==== | + | === Configure Thunderbird === |
| Copy the profile folder from the old machine if still available. While on the new machine, issue this command to copy directory structure between 2 hosts. | Copy the profile folder from the old machine if still available. While on the new machine, issue this command to copy directory structure between 2 hosts. | ||
| - | < | + | < |
| + | ssh dbahawk@fedora "cd $HOME/ | ||
| + | </ | ||
| - | ====Configure ddclient==== | + | === Configure ddclient === |
| - | To get the ddns for the domain name working, make sure ddclient is running in daemon mode.<br /> | + | To get the dynamic dns (ddns) for the domain name working, make sure ddclient is running in daemon mode.\\ |
| Make sure use=web is uncommented in < | Make sure use=web is uncommented in < | ||
| - | < | + | < |
| + | use=web, web=checkip.dyndns.org/, | ||
| + | </ | ||
| and put these details in the zoneedit section | and put these details in the zoneedit section | ||
| - | < | + | < |
| + | server=dynamic.zoneedit.com, | ||
| + | protocol=zoneedit1, | ||
| + | login=< | ||
| + | password=< | ||
| + | stuartbarkley.com</ | ||
| - | ====Create user dbahawk==== | + | === Create user dbahawk === |
| - | < | + | < |
| - | Copy the contents of the old spoolfiles directory if possible as it contains the .rrd files.<br /> | + | sudo su - |
| - | <br /> | + | useradd -G wheel dbahawk |
| + | su - dbahawk | ||
| + | passwd | ||
| + | mkdir -p Downloads/ | ||
| + | exit | ||
| + | </ | ||
| + | Copy the contents of the old spoolfiles directory if possible as it contains the .rrd files.\\ | ||
| - | ====Install CPAN==== | + | |
| + | === Install CPAN === | ||
| Some of the dbahawk perl scripts need modules not installed by default (eg. Switch.pm) | Some of the dbahawk perl scripts need modules not installed by default (eg. Switch.pm) | ||
| - | < | + | < |
| + | sudo dnf install -y perl-CPAN | ||
| + | </ | ||
| or if Fedora already has it installed, try | or if Fedora already has it installed, try | ||
| - | < | + | < |
| + | sudo dnf install -y ' | ||
| + | sudo dnf install -y ' | ||
| + | sudo dnf install -y ' | ||
| + | sudo dnf install -y ' | ||
| + | </ | ||
| + | |||
| + | ==== Install Dokuwiki ==== | ||
| + | Pretty simple install but default install does not configure the apache config file correctly :-) | ||
| + | < | ||
| + | dnf install -y dokuwiki | ||
| + | </code | ||
| + | The edit the Apache config file for dokuwiki | ||
| + | < | ||
| + | vi / | ||
| + | </ | ||
| + | Change | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | # Apache 2.4 | ||
| + | Require local | ||
| + | </ | ||
| + | < | ||
| + | # Apache 2.2 | ||
| + | Options +FollowSymLinks | ||
| + | Order Allow, | ||
| + | Allow from 127.0.0.1 ::1 | ||
| + | </ | ||
| + | </ | ||
| + | </ | ||
| + | to | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | # Apache 2.4 | ||
| + | AllowOverride None | ||
| + | Require all granted | ||
| + | </ | ||
| + | < | ||
| + | # Apache 2.2 | ||
| + | Options +FollowSymLinks | ||
| + | Order Allow, | ||
| + | Allow from 127.0.0.1 ::1 | ||
| + | </ | ||
| + | </ | ||
| + | </ | ||
| + | === Add entries to crontab === | ||
| + | < | ||
| + | crontab -e | ||
| + | </ | ||
| + | < | ||
| + | * /5 * * * * / | ||
| + | 5 | ||
| + | 35 * * * * / | ||
| + | 36 * * * * / | ||
| + | 37 * * * * / | ||
| + | 38 * * * * / | ||
| + | </ | ||
| - | ====Add entries to crontab==== | + | ==== Other goodies |
| - | < | + | |
| - | < | + | |
| - | =====Other goodies===== | ||
| - | * [[https:// | ||
fedora_install_for_my_own_purposes.1544273360.txt.gz · Last modified: 2018/12/08 12:49 by 0.0.0.0
