<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Linux on sigtar.com</title>
		<link>https://sigtar.com/categories/linux/</link>
		<description>Recent content in Linux on sigtar.com</description>
		<generator>Hugo</generator>
		<language>en-nz</language>
		
		
		
		
			<lastBuildDate>Thu, 10 Sep 2020 00:00:00 +1200</lastBuildDate>
		
			<atom:link href="https://sigtar.com/categories/linux/index.xml" rel="self" type="application/rss+xml" />
			<item>
				<title>emergency reboot a hung Linux host</title>
				<link>https://sigtar.com/2020/09/10/emergency-reboot-a-hung-linux-host/</link>
				<pubDate>Thu, 10 Sep 2020 00:00:00 +1200</pubDate>
				<guid>https://sigtar.com/2020/09/10/emergency-reboot-a-hung-linux-host/</guid>
				<description>&lt;p&gt;&lt;img src=&#34;https://sigtar.com/wp-content/uploads/Screenshot-Terminal.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Sometimes you need something that can kick a host a bit harder than the standard &lt;strong&gt;reboot&lt;/strong&gt; command. Even if you include the &lt;strong&gt;-f&lt;/strong&gt; switch to force, a hung task can prevent your host from rebooting.&lt;/p&gt;&#xA;&lt;p&gt;Try this - first enable the sysrq setting, then trigger. Your host should reboot immediately.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;sudo echo 1 &amp;gt; /proc/sys/kernel/sysrq&lt;/strong&gt;&lt;br&gt;&#xA;&lt;strong&gt;sudo echo b &amp;gt; /proc/sysrq-trigger&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;Note : This is effectively a hard reset which does not cleanly shut services or tasks down. You may need to check your disk on some operating systems.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Ubuntu - Disable Firewall</title>
				<link>https://sigtar.com/2017/11/08/ubuntu-disable-firewall/</link>
				<pubDate>Wed, 08 Nov 2017 00:00:00 +1300</pubDate>
				<guid>https://sigtar.com/2017/11/08/ubuntu-disable-firewall/</guid>
				<description>&lt;p&gt;&lt;a href=&#34;https://sigtar.com/2017/11/08/ubuntu-disable-firewall/screenshot-terminal/&#34;&gt;&lt;img src=&#34;https://sigtar.com/wp-content/uploads/Screenshot-Terminal.png&#34; alt=&#34;&#34;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;if your working with Ubuntu in lab or test env, you may want to disable firewall&amp;hellip;. two simple commands;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;sudo ufw disable&lt;/strong&gt; &lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;sudo apt-get remove ufw&lt;/strong&gt; &lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;Reading package lists... Done&#xA;Building dependency tree&#xA;Reading state information... Done&#xA;The following packages will be REMOVED:&#xA;ufw&#xA;0 upgraded, 0 newly installed, 1 to remove and 3 not upgraded.&#xA;After this operation, 838 kB disk space will be freed.&#xA;Do you want to continue? [Y/n] Y&#xA;(Reading database ... 64052 files and directories currently installed.)&#xA;Removing ufw (0.35-0ubuntu2) ...&#xA;Skip stopping firewall: ufw (not enabled)&#xA;Processing triggers for man-db (2.7.5-1) ...&#xA;&lt;/code&gt;&lt;/pre&gt;</description>
			</item>
			<item>
				<title>pc engine - pfsense as router / firewall</title>
				<link>https://sigtar.com/2015/02/26/pc-engine-pfsense-as-router-firewall/</link>
				<pubDate>Thu, 26 Feb 2015 00:00:00 +1300</pubDate>
				<guid>https://sigtar.com/2015/02/26/pc-engine-pfsense-as-router-firewall/</guid>
				<description>&lt;p&gt;&lt;a href=&#34;https://sigtar.com/2015/02/26/pc-engine-pfsense-as-router-firewall/download-1-2/&#34;&gt;&lt;img src=&#34;https://sigtar.com/wp-content/uploads/download-1.png&#34; alt=&#34;download (1)&#34;&gt;&lt;/a&gt;Just built a pfsense router on  a pc engine to replace my aging 7390 fritzbox&amp;hellip;. Very very awesome and fast!&lt;/p&gt;&#xA;&lt;p&gt;Perfect for UFB (ultra fast broadband) here in New Zealand - FTTH has arrived :)&lt;/p&gt;&#xA;&lt;p&gt;I&amp;rsquo;m currently running these services on it (2 x 1GHZ cpu, 4GB RAM, 16GB msata SSD);&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;dhcpd - DHCP server&lt;/li&gt;&#xA;&lt;li&gt;miniupnpd - UPnP server&lt;/li&gt;&#xA;&lt;li&gt;ntpd - NTP server&lt;/li&gt;&#xA;&lt;li&gt;squid - Transparent Proxy &amp;amp; Reverse Proxy&lt;/li&gt;&#xA;&lt;li&gt;snort - IDS (Intrusion Detection System) / IPS (Intrusion Prevention System)&lt;/li&gt;&#xA;&lt;li&gt;ssd - SSH server&lt;/li&gt;&#xA;&lt;li&gt;unbound - DNS Server&lt;/li&gt;&#xA;&lt;li&gt;ipsec - IPsec VPN (site to site VPN)&lt;/li&gt;&#xA;&lt;li&gt;openvpn - Open VPN (client VPN)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Check these links for some great advise&amp;hellip;&lt;/p&gt;</description>
			</item>
			<item>
				<title>Creating a .pem with the Private Key and Entire Trust Chain</title>
				<link>https://sigtar.com/2015/02/01/creating-a-pem-with-the-private-key-and-entire-trust-chain/</link>
				<pubDate>Sun, 01 Feb 2015 00:00:00 +1300</pubDate>
				<guid>https://sigtar.com/2015/02/01/creating-a-pem-with-the-private-key-and-entire-trust-chain/</guid>
				<description>&lt;p&gt;&lt;a href=&#34;https://sigtar.com/2015/02/01/creating-a-pem-with-the-private-key-and-entire-trust-chain/download-3-2/&#34;&gt;&lt;img src=&#34;https://sigtar.com/wp-content/uploads/download-3.jpg&#34; alt=&#34;download (3)&#34;&gt;&lt;/a&gt;You may find you install a SSL cert, but certain browsers show the connection as unsafe (i.e. mobile browser has issues but desktop browsers are happy)&lt;/p&gt;&#xA;&lt;p&gt;This generally points to not having the cert chain correct. You can check your cert chain at sites like -&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://ssltools.websecurity.symantec.com/checker/views/certCheck.jsp&#34;&gt;https://ssltools.websecurity.symantec.com/checker/views/certCheck.jsp&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://www.sslshopper.com/ssl-checker.html&#34;&gt;https://www.sslshopper.com/ssl-checker.html&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt; &lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Download your Intermediate and Primary Certificates.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Open a text editor (such as notepad) and paste the entire body of each certificate into one text file in the following order:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;The Private Key - &lt;strong&gt;your_domain_name.key&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;li&gt;The Primary Certificate - &lt;strong&gt;your_domain_name.crt&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;li&gt;The Intermediate Certificate - &lt;strong&gt;gd_bundle_g2_g1.crt&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;li&gt;The Root Certificate - &lt;strong&gt;TrustedRoot.crt&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Make sure to include the beginning and end tags on each certificate. The result should look like this:&lt;/p&gt;&#xA;&lt;p&gt;-&amp;mdash;-BEGIN RSA PRIVATE KEY&amp;mdash;&amp;ndash; (Your Private Key: your_domain_name.key) &amp;mdash;&amp;ndash;END RSA PRIVATE KEY&amp;mdash;&amp;ndash; &amp;mdash;&amp;ndash;BEGIN CERTIFICATE&amp;mdash;&amp;ndash; (Your Primary SSL certificate: your_domain_name.crt) &amp;mdash;&amp;ndash;END CERTIFICATE&amp;mdash;&amp;ndash; &amp;mdash;&amp;ndash;BEGIN CERTIFICATE&amp;mdash;&amp;ndash; (Your Intermediate certificate: DigiCertCA.crt) &amp;mdash;&amp;ndash;END CERTIFICATE&amp;mdash;&amp;ndash; &amp;mdash;&amp;ndash;BEGIN CERTIFICATE&amp;mdash;&amp;ndash; (Your Root certificate: TrustedRoot.crt) &amp;mdash;&amp;ndash;END CERTIFICATE&amp;mdash;&amp;ndash;&lt;/p&gt;&#xA;&lt;p&gt;Save the combined file as &lt;strong&gt;your_domain_name.pem&lt;/strong&gt;. The .pem file is now ready to use.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;</description>
			</item>
			<item>
				<title>ERROR: No forward-proxy ports configured</title>
				<link>https://sigtar.com/2014/02/11/error-no-forward-proxy-ports-configured/</link>
				<pubDate>Tue, 11 Feb 2014 00:00:00 +1300</pubDate>
				<guid>https://sigtar.com/2014/02/11/error-no-forward-proxy-ports-configured/</guid>
				<description>&lt;p&gt;I had the above issue after a squid upgrade and after changing from http_port 3128 transparent to http_port 3128 intercept.&lt;/p&gt;&#xA;&lt;p&gt;Add &amp;ldquo;http_port 8080&amp;rdquo; line to squid.config to avoid this message, if you are not already using that port.&lt;/p&gt;&#xA;&lt;p&gt;The changes in security require that a separate port be setup for forwarding proxy requests&lt;/p&gt;</description>
			</item>
			<item>
				<title>nginx - and gzip</title>
				<link>https://sigtar.com/2014/02/10/nginx-and-gzip/</link>
				<pubDate>Mon, 10 Feb 2014 00:00:00 +1300</pubDate>
				<guid>https://sigtar.com/2014/02/10/nginx-and-gzip/</guid>
				<description>&lt;p&gt;i only have vdsl at home and host my website via it&amp;hellip; the following graphs shows when nginx started serving faster than the vdsl connection could handle (which is about 9Mbits)&lt;/p&gt;&#xA;&lt;p&gt;ngnix with cache enabled, gzip enabled and set to 6&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;http://loadimpact.com/load-test/sigtar.com-6a246200e28f354c64582cf2c0b6ce46&#34;&gt;http://loadimpact.com/load-test/sigtar.com-6a246200e28f354c64582cf2c0b6ce46&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;ngnix with cache enabled, gzip enabled and set to 9 (maximum)&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;http://loadimpact.com/load-test/sigtar.com-1422b3e7250c4e3acb7868177f2b2056&#34;&gt;http://loadimpact.com/load-test/sigtar.com-1422b3e7250c4e3acb7868177f2b2056&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;ngnix with cache disabled, gzip enabled and set to 9 (maximum)&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;http://loadimpact.com/load-test/sigtar.com-19561e7422e24f35fb557c662d20beac&#34;&gt;http://loadimpact.com/load-test/sigtar.com-19561e7422e24f35fb557c662d20beac&lt;/a&gt;&lt;/p&gt;</description>
			</item>
			<item>
				<title>nginx - setup as reverse proxy</title>
				<link>https://sigtar.com/2014/02/08/nginx-setup-as-reverse-proxy/</link>
				<pubDate>Sat, 08 Feb 2014 00:00:00 +1300</pubDate>
				<guid>https://sigtar.com/2014/02/08/nginx-setup-as-reverse-proxy/</guid>
				<description>&lt;p&gt;Previously to take down this wordpress site all you needed to do was hold down F5 for about 20 seconds then the site would take about 5 mins to recover.&lt;/p&gt;&#xA;&lt;p&gt;There were a few factors causing this and quite a few different methods to solving the problem. Wordpress itself is run on php / apache, apache has an evasive mod which can block certain IPs depending on the defined abusive behavior (typical DDOS attack). Since i like to run a few websites behind a single IP i looked at fixing the issue closer to the perimeter&amp;hellip;.&lt;/p&gt;</description>
			</item>
			<item>
				<title>use nmap to port scan / find free IPS</title>
				<link>https://sigtar.com/2013/07/12/use-nmap-to-port-scan-find-free-ips/</link>
				<pubDate>Fri, 12 Jul 2013 00:00:00 +1200</pubDate>
				<guid>https://sigtar.com/2013/07/12/use-nmap-to-port-scan-find-free-ips/</guid>
				<description>&lt;p&gt;I use angry IP scanner in windows, linux has a good util for port scanning an ip range called nmap;&lt;/p&gt;&#xA;&lt;p&gt;Grab nmap from usual repositories&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;sudo nmap -sP 192.168.9.0/24&lt;/strong&gt; (will show hosts up and resolve mac addresses to vendors)&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;sudo nmap -v -sT 192.168.9.0/24&lt;/strong&gt; (will show hosts up and the various open ports)&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;sudo nmap -v -sT 192.168.9.104&lt;/strong&gt; (will show particular host and the various open ports)&lt;/p&gt;&#xA;&lt;p&gt;Starting Nmap 6.00 ( &lt;a href=&#34;http://nmap.org&#34;&gt;http://nmap.org&lt;/a&gt; ) at 2013-07-12 11:48 NZST Initiating ARP Ping Scan at 11:48 Scanning 192.168.9.104 [1 port] Completed ARP Ping Scan at 11:48, 0.00s elapsed (1 total hosts) Initiating Parallel DNS resolution of 1 host. at 11:48 Completed Parallel DNS resolution of 1 host. at 11:48, 0.00s elapsed Initiating Connect Scan at 11:48 Scanning win2012-veeam.fritz.box (192.168.9.104) [1000 ports] Discovered open port 111/tcp on 192.168.9.104 Discovered open port 445/tcp on 192.168.9.104 Discovered open port 3389/tcp on 192.168.9.104 Discovered open port 135/tcp on 192.168.9.104 Discovered open port 139/tcp on 192.168.9.104 Discovered open port 49155/tcp on 192.168.9.104 Discovered open port 1063/tcp on 192.168.9.104 Discovered open port 2049/tcp on 192.168.9.104 Discovered open port 3260/tcp on 192.168.9.104 Completed Connect Scan at 11:48, 4.21s elapsed (1000 total ports) Nmap scan report for win2012-veeam.fritz.box (192.168.9.104) Host is up (0.00059s latency). Not shown: 991 filtered ports PORT STATE SERVICE 111/tcp open rpcbind 135/tcp open msrpc 139/tcp open netbios-ssn 445/tcp open microsoft-ds 1063/tcp open kyoceranetdev 2049/tcp open nfs 3260/tcp open iscsi 3389/tcp open ms-wbt-server 49155/tcp open unknown MAC Address: 00:50:56:9C:68:FA (VMware)&lt;/p&gt;</description>
			</item>
			<item>
				<title>tinycore - autostart rdesktop</title>
				<link>https://sigtar.com/2013/01/21/tinycore-autostart-rdesktop/</link>
				<pubDate>Mon, 21 Jan 2013 00:00:00 +1300</pubDate>
				<guid>https://sigtar.com/2013/01/21/tinycore-autostart-rdesktop/</guid>
				<description>&lt;p&gt;The directory for that purpose is hidden directly in your user folder, e.g. &lt;strong&gt;/home/tc/.X.d&lt;/strong&gt; Create a file in there called rdesktop and put in it a command like&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;while x=0 do sleep 5 /usr/local/bin/rdesktop -f 192.168.1.100 done&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;Remember to make file executable with chmod&lt;/p&gt;</description>
			</item>
			<item>
				<title>squid - reverse proxy</title>
				<link>https://sigtar.com/2013/01/14/squid-reverse-proxy/</link>
				<pubDate>Mon, 14 Jan 2013 00:00:00 +1300</pubDate>
				<guid>https://sigtar.com/2013/01/14/squid-reverse-proxy/</guid>
				<description>&lt;p&gt;Great guide here - &lt;a href=&#34;http://www.classhelper.org/articles/reverse-proxy-server-squid-debian/installing-squid-proxy-server.shtml&#34;&gt;http://www.classhelper.org/articles/reverse-proxy-server-squid-debian/installing-squid-proxy-server.shtml&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;I&amp;rsquo;ve modified slightly for Ubuntu, but almost identical.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;apt-get install squid&lt;/strong&gt; &lt;strong&gt;cp /etc/squid3/squid.conf /etc/squid3/squid.bak rm /etc/squid3/squid.conf nano /etc/squid/squid.conf&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;http_port 80 defaultsite=www.yoursite.com vhost forwarded_for on refresh_pattern ^ftp: 1440 20% 10080 refresh_pattern ^gopher: 1440 0% 1440 refresh_pattern . 0 20% 4320 cache_peer 192.168.0.13 parent 80 0 no-query no-digest originserver name=web1 acl sites_web1 dstdomain www.yoursite.com yoursite.com cache_peer_access web1 allow sites_web1 cache_peer 192.168.0.14 parent 80 0 no-query no-digest originserver name=web2 acl sites_web2 dstdomain www.anothersite.com anothersite.com cache_peer_access web2 allow sites_web2 acl all src 0.0.0.0/0.0.0.0 acl manager proto cache_object acl localhost src 127.0.0.1/255.255.255.255 acl to_localhost dst 127.0.0.0/8 acl SSL_ports port 443 acl Safe_ports port 80 # http acl Safe_ports port 443 # https acl Safe_ports port 1025-65535 # unregistered ports acl CONNECT method CONNECT http_access allow sites_web1 http_access allow sites_web2 http_access allow manager all http_access allow manager http_access deny !Safe_ports http_access deny CONNECT !SSL_ports #http_access deny all access_log /var/log/squid3/access.log cache_mgr support@yoursite.com&lt;/code&gt;&lt;/p&gt;</description>
			</item>
			<item>
				<title>cron job to re prioitize tasks</title>
				<link>https://sigtar.com/2012/10/16/cron-job-to-re-prioitize-tasks/</link>
				<pubDate>Tue, 16 Oct 2012 00:00:00 +1300</pubDate>
				<guid>https://sigtar.com/2012/10/16/cron-job-to-re-prioitize-tasks/</guid>
				<description>&lt;p&gt;I&amp;rsquo;m using the following crontab script to renice my squid process&amp;hellip;.&lt;/p&gt;&#xA;&lt;p&gt;Put following in script and  call via cron (i&amp;rsquo;m doing every 10 mins)&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;*/10 * * * * /home/user/renice.sh&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;(renice.sh)&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;renice -15 $(ps -C squid3 -o pid=)&lt;/strong&gt; &lt;strong&gt;renice -15 $(ps -C unlinkd -o pid=)&lt;/strong&gt;&lt;/p&gt;</description>
			</item>
			<item>
				<title>4k sector hard drives and zfs</title>
				<link>https://sigtar.com/2010/06/06/4k-sector-hard-drives-and-zfs/</link>
				<pubDate>Sun, 06 Jun 2010 00:00:00 +1200</pubDate>
				<guid>https://sigtar.com/2010/06/06/4k-sector-hard-drives-and-zfs/</guid>
				<description>&lt;p&gt;I hit this as a problem recently. One of my disks died in my raidz so i ran down to the store and grabbed me a replacement WD10EARS (Western Digital 1Tb Green) drive.&lt;/p&gt;&#xA;&lt;p&gt;BUT&amp;hellip;&lt;/p&gt;&#xA;&lt;p&gt;The one thing the store didn&amp;rsquo;t mention to me is the new 4K cluster sizing on the drive. I guess they assume most people run windows (though the issues are also present in XP). See these posts&amp;hellip;&lt;/p&gt;</description>
			</item>
			<item>
				<title>VirtualBox - crashing / freezing</title>
				<link>https://sigtar.com/2009/09/05/virtualbox-crashing-freezing/</link>
				<pubDate>Sat, 05 Sep 2009 00:00:00 +1200</pubDate>
				<guid>https://sigtar.com/2009/09/05/virtualbox-crashing-freezing/</guid>
				<description>&lt;p&gt;I&amp;rsquo;ve had some problems since my upgrade to virtualbox 2.2.0 on OpenSolaris. After some time all of my linux boxes seem to just die. The virtual machine just stops responding. Strangely there was no problem with my windows vms after the update.&lt;/p&gt;&#xA;&lt;p&gt;From what i can tell it looks like the upgrade turned off &amp;ldquo;&lt;strong&gt;IO APIC&lt;/strong&gt;&amp;rdquo; - this is the bit that seemed to cause the problem. Re-enabling this on all of my linux boxes seems to have fixed the problem. I&amp;rsquo;ll continue testing for another week and update this post if any problems re-occur.&lt;/p&gt;</description>
			</item>
			<item>
				<title>selinux - opening additional ports / or disabling</title>
				<link>https://sigtar.com/2009/07/28/selinux-opening-additional-ports/</link>
				<pubDate>Tue, 28 Jul 2009 00:00:00 +1200</pubDate>
				<guid>https://sigtar.com/2009/07/28/selinux-opening-additional-ports/</guid>
				<description>&lt;p&gt;If you are having problems starting apache on a non-standard port you might find that the problem is related to selinux.&lt;/p&gt;&#xA;&lt;p&gt;Type this command to check to see what http ports are currently allowed;  (remove filter to show all rules)&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;semanage port -l|grep http&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;To add another port type the following (with the port you wish to add etc);&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;semanage port -a -t http_port_t -p tcp 81&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;If you want to disable selinux completely then go into &lt;strong&gt;/etc/selinux/config&lt;/strong&gt; and set selinux=disabled. Save then reboot.&lt;/p&gt;</description>
			</item>
			<item>
				<title>fedora 11 - LAMP install</title>
				<link>https://sigtar.com/2009/07/23/fedora-11-lamp-install/</link>
				<pubDate>Thu, 23 Jul 2009 00:00:00 +1200</pubDate>
				<guid>https://sigtar.com/2009/07/23/fedora-11-lamp-install/</guid>
				<description>&lt;p&gt;Setting up LAMP on fedora 11&amp;hellip; First install the required modules.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;yum install -y httpd.i586 mysql.i586 mysql-server.i586 php.i586 php-mysql.i586 php-gd.i586&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;Next i&amp;rsquo;m copying my web source from another linux machine. I&amp;rsquo;ve run these commands from the destination machine&amp;hellip;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;cd /var/www/html&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;rsync -ave ssh 192.168.9.10:/var/www/html/ .&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;Now my mysql data&amp;hellip;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;cd /var/lib/mysql&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;rsync -ave ssh 192.168.9.10:/var/lib/mysql/ .&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;Accept the certificate and enter the source root password. Next fire up the services&amp;hellip;  I usually just go into &amp;ldquo;&lt;strong&gt;setup&lt;/strong&gt;&amp;rdquo; then &amp;ldquo;system services&amp;rdquo; and enable both &lt;em&gt;httpd&lt;/em&gt; and &lt;em&gt;mysqld&lt;/em&gt;&lt;/p&gt;</description>
			</item>
			<item>
				<title>squid - your transparent proxy friend</title>
				<link>https://sigtar.com/2009/04/10/squid-your-transparent-proxy-friend/</link>
				<pubDate>Fri, 10 Apr 2009 00:00:00 +1200</pubDate>
				<guid>https://sigtar.com/2009/04/10/squid-your-transparent-proxy-friend/</guid>
				<description>&lt;p&gt;Still my favourite light and fast web proxy is Squid. Its very easy to setup and get running on almost all flavours of linux. You can find it here http://www.squid-cache.org/ but will probably find it in your local package manager&amp;hellip;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;This is for more my own reference&amp;hellip; as i don&amp;rsquo;t think too many people have the need for a transparent proxy. You only need one NIC configured on your VM / machine as its most probably on the same subnet as your dsl etc&amp;hellip;&lt;/strong&gt;&lt;/p&gt;</description>
			</item>
			<item>
				<title>Windows / Linux - File Migration Tools</title>
				<link>https://sigtar.com/2009/02/21/file-migration-tools/</link>
				<pubDate>Sat, 21 Feb 2009 00:00:00 +1300</pubDate>
				<guid>https://sigtar.com/2009/02/21/file-migration-tools/</guid>
				<description>&lt;p&gt;In Windows i use &lt;strong&gt;robocopy&lt;/strong&gt;&amp;hellip;&lt;/p&gt;&#xA;&lt;p&gt;This is the syntax to copy from one location to another&amp;hellip;  (i like how robocopy uses UNC paths)&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;robocopy \\192.168.9.70\videos \\192.168.9.101\videos /e /r:2 /w:10 /sec robocopy \\192.168.9.70\software \\192.168.9.101\software /e /r:2 /w:10 /sec&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;Note: i always copy instead of the move. Run multiple times before switch over to shorten time for final sync. Always use the /SEC to copy over the NTFS permissions. I have had problems with the non X010 version of robocopy not copying NTFS permissions across. Check NTFS permissions before removing the source files. You can update files NTFS permissions with /SECFIX switch if required.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Linux - routing examples</title>
				<link>https://sigtar.com/2009/02/20/linux-routing-examples/</link>
				<pubDate>Fri, 20 Feb 2009 00:00:00 +1300</pubDate>
				<guid>https://sigtar.com/2009/02/20/linux-routing-examples/</guid>
				<description>&lt;p&gt;set ip_forward to 1 to enable routing between nics. type &amp;lsquo;&lt;strong&gt;route&lt;/strong&gt;&amp;rsquo; to insure both networks are routed as expected (connected route added with nic)&lt;/p&gt;&#xA;&lt;p&gt;Setup a script with the following (&lt;strong&gt;CHMOD 0755&lt;/strong&gt; the script so it executes)&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;iptables -F&lt;/strong&gt; (clears previous iptables stuff) &lt;strong&gt;iptables -P INPUT DROP&lt;/strong&gt; (will set default policy to DROP all INPUT packets - Incoming to local NICs) &lt;strong&gt;iptables -P OUTPUT DROP&lt;/strong&gt; (will set default policy to DROP all OUTPUT packets - Outgoing to local NICs) &lt;strong&gt;iptables -P FORWARD DROP&lt;/strong&gt; (will set default policy to DROP all FORWARDed packets - Routed via local NICs)&lt;/p&gt;</description>
			</item>
			<item>
				<title>Linux - Add DHCP and DNS</title>
				<link>https://sigtar.com/2009/02/11/linux-add-dhcp-and-dns/</link>
				<pubDate>Wed, 11 Feb 2009 00:00:00 +1300</pubDate>
				<guid>https://sigtar.com/2009/02/11/linux-add-dhcp-and-dns/</guid>
				<description>&lt;p&gt;How to install DHCP and DNS on Fedora / Centos / Redhat box;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;yum -y install dhcp.i386 bind.i386&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;Set services to auto start using &lt;strong&gt;ntsysv&lt;/strong&gt; &amp;ndash; services are called &amp;ldquo;dhcpd&amp;rdquo; and &amp;ldquo;named&amp;rdquo;.&lt;/p&gt;&#xA;&lt;p&gt;How to configure dhcp;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;nano /etc/dhcpd.conf&lt;/strong&gt; &amp;mdash; configure as per sample provided. The sample is usually located in the same directory. &lt;strong&gt;service dhcpd restart&lt;/strong&gt; - should start without problem if done correctly&lt;/p&gt;&#xA;&lt;p&gt;Note: dhcp range has to be on the same network as your adapter. You can run dhcpd from the command line to diagnose any issues.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Linux - Wireless networking</title>
				<link>https://sigtar.com/2009/02/10/linux-wireless-networking/</link>
				<pubDate>Tue, 10 Feb 2009 00:00:00 +1300</pubDate>
				<guid>https://sigtar.com/2009/02/10/linux-wireless-networking/</guid>
				<description>&lt;p&gt;if your card is natively supported type ;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;iwconfig&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;iwlist scanning&lt;/strong&gt; &amp;ndash; should also show you the wireless networks that are in range (will work if driver is loaded)&lt;/p&gt;&#xA;&lt;p&gt;you should see &lt;em&gt;wlan0&lt;/em&gt; if all is good; (grab your wireless details)&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;iwconfig wlan0 mode managed&lt;/strong&gt; (should already be in this mode)&lt;/p&gt;&#xA;&lt;p&gt;there are some cool options here like &amp;ldquo;secondary&amp;rdquo; mode which the node acts as a backup master/repeater. &amp;ldquo;Repeater&amp;rdquo; - the node forwards packets between other wire-less nodes&lt;/p&gt;</description>
			</item>
			<item>
				<title>Corporate Firewall - SSH and port 443 goodness</title>
				<link>https://sigtar.com/2009/02/08/corporate-firewall-ssh-and-port-443-goodness/</link>
				<pubDate>Sun, 08 Feb 2009 00:00:00 +1300</pubDate>
				<guid>https://sigtar.com/2009/02/08/corporate-firewall-ssh-and-port-443-goodness/</guid>
				<description>&lt;p&gt;Things you&amp;rsquo;ll need; (basic instructions) SSH - either Linux or Open SSH for windows (set this up first and ensure its working!). I have only used Linux, so i do not know the details of setting up a Open SSH box on windows (good luck).&lt;/p&gt;&#xA;&lt;p&gt;Router with pinhole or port forwarding abilities. &amp;ndash; forward your external 443 port to internal 22 on your SSH box&lt;/p&gt;&#xA;&lt;p&gt;Putty.exe - use this to test your SSH connection locally (you should be able to connect on port 22 locally or 443 externally)&lt;/p&gt;</description>
			</item>
			<item>
				<title>Linux - Installing VirtualBox additions</title>
				<link>https://sigtar.com/2009/02/04/linux-installing-virtualbox-additions/</link>
				<pubDate>Wed, 04 Feb 2009 00:00:00 +1300</pubDate>
				<guid>https://sigtar.com/2009/02/04/linux-installing-virtualbox-additions/</guid>
				<description>&lt;p&gt;The following works on CentOs / Fedora / redhat etc&amp;hellip; &lt;/p&gt;&#xA;&lt;p&gt;Logon to your distro. The packages you need are the &lt;strong&gt;kernel-devel.i686&lt;/strong&gt;, &lt;strong&gt;kernel.i686&lt;/strong&gt; (if not the latest), and &lt;strong&gt;gcc.i386&lt;/strong&gt; (complier)&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;yum -y install kernel.i686 gcc.i386&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;reboot as the kernel needs to load, then logon again install the kernel dev; &lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;yum -y install kernel-devel.i686&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;Now you want to present the virtualbox additions to the cdrom drive on your distro. Click &amp;ldquo;install additions&amp;rdquo; on the virtualbox guest console. &lt;/p&gt;</description>
			</item>
			<item>
				<title>VMware Server 2.0 - Infrastructure Client</title>
				<link>https://sigtar.com/2009/02/04/vmware-server-20-infrastructure-client/</link>
				<pubDate>Wed, 04 Feb 2009 00:00:00 +1300</pubDate>
				<guid>https://sigtar.com/2009/02/04/vmware-server-20-infrastructure-client/</guid>
				<description>&lt;p&gt;One thing i like about vmware server 2.0, is that you are &lt;strong&gt;not&lt;/strong&gt; forced to use the web console in all cases.&lt;/p&gt;&#xA;&lt;p&gt;If you are lucky enough to have access to VMware Infrastructure Client 2.5 you can connect via it using the following syntax at the logon screen;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;IP address / Name :&lt;/strong&gt; &lt;strong&gt;http://192.168.9.100&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;If you enter a URL in the host field, use your root and correct password you should be able to logon without issue. Welcome to a nice fast GUI admin console.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Linux - crontab</title>
				<link>https://sigtar.com/2009/02/03/linux-crontab/</link>
				<pubDate>Tue, 03 Feb 2009 00:00:00 +1300</pubDate>
				<guid>https://sigtar.com/2009/02/03/linux-crontab/</guid>
				<description>&lt;p&gt;Time to schedule some tasks!&lt;/p&gt;&#xA;&lt;p&gt;First you need to make sure your in the &lt;strong&gt;/etc/cron.d/cron.allow&lt;/strong&gt; file. If you are not &lt;strong&gt;SU&lt;/strong&gt; to root and add yourself into it.&lt;/p&gt;&#xA;&lt;p&gt;Now to create your new crontab file;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;crontab -e&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;You are in &lt;strong&gt;vi&lt;/strong&gt; in your newly created crontab file (note if you do not have access to do this it will say so)&lt;/p&gt;&#xA;&lt;p&gt;Now, i&amp;rsquo;m no expert at using &lt;strong&gt;vi&lt;/strong&gt;, but if you press &lt;strong&gt;i&lt;/strong&gt; you will go into insert mode. Do this, then type the cron job details. A typical cron job will look like this&lt;/p&gt;</description>
			</item>
			<item>
				<title>Linux - Hard Drive Performance</title>
				<link>https://sigtar.com/2009/02/03/linux-hard-drive-performance/</link>
				<pubDate>Tue, 03 Feb 2009 00:00:00 +1300</pubDate>
				<guid>https://sigtar.com/2009/02/03/linux-hard-drive-performance/</guid>
				<description>&lt;p&gt;Or lack of.&lt;/p&gt;&#xA;&lt;p&gt;You must insure that your drives are using the sata driver (if they are sata disks), quickest way to check is that they will be called sda sdb etc&amp;hellip;. and not hda hdb, as this is the default IDE driver and will slow down the performance majorly.&lt;/p&gt;&#xA;&lt;p&gt;How to check performance;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;hdparm -tT /dev/hda&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;Modern drives should be getting over 50MB/s easily. If your getting about 5MB/s you have the problem.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Linux - mapping to a windows share (SMB)</title>
				<link>https://sigtar.com/2009/02/03/linux-mapping-to-a-windows-share-smb/</link>
				<pubDate>Tue, 03 Feb 2009 00:00:00 +1300</pubDate>
				<guid>https://sigtar.com/2009/02/03/linux-mapping-to-a-windows-share-smb/</guid>
				<description>&lt;p&gt;As per below. First you will need to install samba client.&lt;/p&gt;&#xA;&lt;p&gt;In Fedora / Centos &amp;hellip;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;yum -y samba-client&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;then use the &lt;strong&gt;mount&lt;/strong&gt; command to mount the share to a directory&amp;hellip; &lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;mount -t cifs -n //192.168.9.70/software /mnt/sharename -o username=guest,password=&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;It will be similar in other distros. Remember to create the &lt;strong&gt;/mnt/sharename&lt;/strong&gt; directory before trying to mount any share to the directory. Directories are created like so;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;mkdir /mnt/sharename&lt;/strong&gt;&lt;/p&gt;</description>
			</item>
			<item>
				<title>Linux - setting the time</title>
				<link>https://sigtar.com/2009/02/03/linux-setting-the-time/</link>
				<pubDate>Tue, 03 Feb 2009 00:00:00 +1300</pubDate>
				<guid>https://sigtar.com/2009/02/03/linux-setting-the-time/</guid>
				<description>&lt;p&gt;How to set the time in Linux; (from a command line)&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;date -s &amp;ldquo;09/21/2007 09:20:00&amp;rdquo;&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;hwclock &amp;ndash;systohc&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;the second command links the time back to the hardware clock.&lt;/p&gt;&#xA;&lt;p&gt;Note: within a vm guest it is always advised to install the guest additions as the time on a guest can slowly move away from the correct time.&lt;/p&gt;</description>
			</item>
			<item>
				<title>VMWare Performance tips</title>
				<link>https://sigtar.com/2009/02/02/vmware-performance-tips/</link>
				<pubDate>Mon, 02 Feb 2009 00:00:00 +1300</pubDate>
				<guid>https://sigtar.com/2009/02/02/vmware-performance-tips/</guid>
				<description>&lt;p&gt;these are tested from experience&amp;hellip;. (the following is true on vmware server 1.0.6 on a linux host)&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Always use only 1 Virtual CPU - i have found that most times even if you have heaps of cores to spare on the host, a single virtual core is faster.&lt;/li&gt;&#xA;&lt;li&gt;Set the memory to the recommended level when possible - 256Mb sounds shit when you have 4gb, doesn&amp;rsquo;t matter - set it to 256Mb (increase only if excessive paging on the guest). Let linux and vmware manage the memory, in most cases it does a much better job than windows. Do not disable memory page trimming on any of the guests, this gives more memory back to the host to cache other more important activity (disk etc)&lt;/li&gt;&#xA;&lt;li&gt;Never use 2gb split files for the virtual disk unless you have to transfer the vm onto a file system that doesn&amp;rsquo;t support larger files.&lt;/li&gt;&#xA;&lt;li&gt;Load the latest drivers for your NIC on the host&lt;/li&gt;&#xA;&lt;li&gt;Be nice to your physical disk - do not load all your VM&amp;rsquo;s on a single drive - the HDD is the slowest part of the system, dont saturate it. I use either a raid 0 running multiple vm&amp;rsquo;s (with backups) or dedicated drives per set of vm&amp;rsquo;s. This excludes enterprise level raids which can handle much higher level of simultaneous requests.&lt;/li&gt;&#xA;&lt;li&gt;Install vmware tools on all guest machines&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;watch your pings - ping your guests&amp;hellip; they should never loose a ping. If they do you are loading the cpu to high and the host cannot process the network queries. As above use only one virtual cpu. Also ensure you have the latest network driver loaded for your NIC on the host.&lt;/p&gt;</description>
			</item>
	</channel>
</rss>
