<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.8" -->
<?xml-stylesheet href="https://wiki.k2patel.in/lib/exe/css.php?s=feed" type="text/css"?>
<rdf:RDF
    xmlns="http://purl.org/rss/1.0/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
    xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel rdf:about="https://wiki.k2patel.in/feed.php">
        <title>DokuWiki</title>
        <description></description>
        <link>https://wiki.k2patel.in/</link>
        <image rdf:resource="https://wiki.k2patel.in/lib/exe/fetch.php?media=wiki:dokuwiki.svg" />
       <dc:date>2026-04-12T05:53:34+00:00</dc:date>
        <items>
            <rdf:Seq>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=add_ssh_key_to_multiple_host&amp;rev=1597026936&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=apache_1.3.x_mod_gzip_sample_config&amp;rev=1597026936&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=apache_2.2_httpready_filter_issue&amp;rev=1597026936&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=apache&amp;rev=1597026936&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=apache2_php_.la_is_not_a_dso_file&amp;rev=1597026936&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=arch&amp;rev=1597026936&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=at&amp;rev=1597026936&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=augeas&amp;rev=1597026936&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=autoconf-2.62_-_build_error&amp;rev=1597026936&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=aws_how_to&amp;rev=1597026936&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=aws_scripts&amp;rev=1597026936&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=awstats&amp;rev=1597026937&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=bad_bot_list&amp;rev=1597026937&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=bash_functions&amp;rev=1597026937&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=bash&amp;rev=1597026937&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=bc_calculator&amp;rev=1597026937&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=bind&amp;rev=1597026937&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=bitchx&amp;rev=1597026937&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=bruteforce_prevention&amp;rev=1597026937&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=building_mariadb_on_freebsd&amp;rev=1597026937&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=cablevision&amp;rev=1597026937&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=can_not_mount_boot_larger_hdd_to_freebsd&amp;rev=1597026937&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=centos_nginx_backuppc4.x&amp;rev=1597026937&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=change_default_mta&amp;rev=1597026937&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=check_service_and_restart_if_failed&amp;rev=1597026939&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=chrome&amp;rev=1597026937&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=college&amp;rev=1597026937&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=command_line&amp;rev=1629839464&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=course_length&amp;rev=1597026938&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=cpan2rpm&amp;rev=1597026938&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=cron&amp;rev=1597026938&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=daily_admin_issues&amp;rev=1632240799&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=daily_issues&amp;rev=1597026938&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=daily_regular_expression&amp;rev=1597026938&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=default_kernel&amp;rev=1629930922&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=dell&amp;rev=1606251976&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=deploy_script_using_case&amp;rev=1597026938&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=dev_cache_all&amp;rev=1597026938&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=dig&amp;rev=1597026938&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=dns_add_script&amp;rev=1597026938&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=docker&amp;rev=1597026938&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=elasticsearch&amp;rev=1611618060&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=enable_ipv6_tunnel&amp;rev=1597026938&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=error_codes&amp;rev=1597026938&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=error_on_m4_update_install&amp;rev=1597026938&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=errors&amp;rev=1597026938&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=esmf-_ubuntu_18.04&amp;rev=1597026939&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=execution_time_and_notify&amp;rev=1597026939&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=fail2ban&amp;rev=1597026939&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=fedora_redhat_centos&amp;rev=1605801345&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=finch&amp;rev=1597026939&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=find_files_which_is_taking_most_space_on_server&amp;rev=1597026939&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=find&amp;rev=1597026939&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=firewalld&amp;rev=1597026932&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=floating_point_calculation&amp;rev=1597026932&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=force_make_to_use_gcc44&amp;rev=1597026932&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=freebsd_nginx_backuppc&amp;rev=1597026932&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=freebsd_zfs_daily&amp;rev=1597026932&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=freenas&amp;rev=1604077877&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=ftp_file_fetch_using_perl&amp;rev=1597026932&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=furnished_bckup_mysql&amp;rev=1597026932&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=gem&amp;rev=1597026932&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=general_help&amp;rev=1597026932&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=general_postfix&amp;rev=1597026932&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=generate_good_password&amp;rev=1597026932&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=gentoo&amp;rev=1597026933&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=geo_ip&amp;rev=1597026933&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=git&amp;rev=1597026933&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=globus&amp;rev=1597026933&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=guake&amp;rev=1597026933&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=gui&amp;rev=1597026933&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=help&amp;rev=1597026933&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=how_to_mount_ntfs_with_read_write&amp;rev=1597026933&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=how_to_remove_script_from_all_pages&amp;rev=1597026933&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=how_to&amp;rev=1597026933&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=indian&amp;rev=1597026933&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=info&amp;rev=1597026933&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=inittab&amp;rev=1597026933&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=innobackupx_scripted_to_backup_daily&amp;rev=1597026933&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=inotify_monitor&amp;rev=1597026933&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=install_lighttpd_-_with_mod_h264_streaming&amp;rev=1597026934&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=installing_memcached&amp;rev=1597026934&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=ip_alias_script_for_debian&amp;rev=1597026934&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=ipfw&amp;rev=1597026934&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=iptables&amp;rev=1597026934&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=ipxe&amp;rev=1597026939&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=irssi&amp;rev=1597026934&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=iscsiadm&amp;rev=1597026934&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=james&amp;rev=1597026934&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=kernel_not_found&amp;rev=1597026934&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=kernel_tuning&amp;rev=1597026934&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=keytool&amp;rev=1597026934&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=kubernetes&amp;rev=1597026934&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=letsencrypt&amp;rev=1597026934&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=lightttpd&amp;rev=1597026934&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=limiting_closed_port_rst_response&amp;rev=1597026934&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=ls&amp;rev=1597026934&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=lvm&amp;rev=1597026935&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=make_to_ignore_file_hash&amp;rev=1597026935&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=mariadb_replication&amp;rev=1597026935&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=mina_ftp&amp;rev=1597026935&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=mod_evasive&amp;rev=1597026935&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=mod_proxy_ajp&amp;rev=1597026935&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=monitor_dns_changes_for_hostname&amp;rev=1597026935&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=monitor_real_time_website_with_test_case&amp;rev=1597026935&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=monitor_snmpd_for_cacti&amp;rev=1597026935&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=monitor_your_ip_and_send_email_if_change&amp;rev=1597026935&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=monitoring_gateway_ping&amp;rev=1597026935&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=mplayer_x264_from_latest_snapshot&amp;rev=1597026935&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=mpstat&amp;rev=1597026935&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=mysql_backup_daily&amp;rev=1597026935&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=mysql_backup_locally&amp;rev=1597026935&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=mysql_cluster_5_min&amp;rev=1597026936&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=mysql_connection_test_script&amp;rev=1597026936&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=mysql_copy_between_servers&amp;rev=1597026936&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=mysql_monitoring&amp;rev=1597026936&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=mysql_replication_status&amp;rev=1597026936&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=nagios&amp;rev=1597026928&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=nconf_deployer&amp;rev=1597026928&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=network_security_assesment&amp;rev=1597026928&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=nfs&amp;rev=1597026928&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=openssl&amp;rev=1692279516&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=opensuse&amp;rev=1597026928&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=oracle_coherence&amp;rev=1597026928&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=packages&amp;rev=1597026928&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=pdu&amp;rev=1597026928&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=perl_db_script&amp;rev=1597026928&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=perl_execute_regex_and_insert_to_mysql_database&amp;rev=1597026928&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=pgsql_tuneup_guide&amp;rev=1597026928&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=php&amp;rev=1597026928&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=phpshell_scanner&amp;rev=1597026928&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=pianobar&amp;rev=1597026929&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=ping_test_script_for_cron&amp;rev=1597026929&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=ping&amp;rev=1597026929&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=plex_media_server&amp;rev=1597026929&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=port_management_and_help&amp;rev=1597026929&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=postfix&amp;rev=1597026929&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=postgresql_replication_monitor&amp;rev=1597026929&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=prevent_freebsd_to_install_new_perl_during_make&amp;rev=1597026929&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=print_environment_using_perl_cgi&amp;rev=1597026929&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=process_check_script_for_cron&amp;rev=1597026929&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=puppet_upgrade_4.x_to_5.x&amp;rev=1597026929&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=puppet&amp;rev=1597026929&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=python_packages_to_rpm&amp;rev=1597026929&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=python&amp;rev=1597026929&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=qmail_and_procmail_how_to&amp;rev=1597026929&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=qmail&amp;rev=1597026929&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=quick_command_list&amp;rev=1652731509&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=quick_tips_to_securing_windows_desktop&amp;rev=1597026930&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=ramfs_based_table_space&amp;rev=1597026930&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=re-build_repository_index&amp;rev=1597026930&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=receipe&amp;rev=1597026930&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=referance_subroutines&amp;rev=1597026930&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=regular_expression&amp;rev=1597026930&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=remote_password_change&amp;rev=1597026930&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=reset_keychain_password&amp;rev=1597026930&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=resources&amp;rev=1597026930&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=restart_process_and_send_mail_if_fail&amp;rev=1597026930&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=rpm&amp;rev=1597026930&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=rsycn_based_on_list.txt&amp;rev=1597026930&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=rsync&amp;rev=1597026930&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=rtorrent&amp;rev=1597026930&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=ruby&amp;rev=1597026930&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=sar_reporting&amp;rev=1597026931&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=screen&amp;rev=1597026931&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=script_to_parse_space_separated_file&amp;rev=1597026931&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=scripts&amp;rev=1597026931&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=security&amp;rev=1597026931&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=sed_based_file_manipulation&amp;rev=1597026931&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=send_result_to_nagios_nsca_acceptor&amp;rev=1597026931&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=sendmail&amp;rev=1597026931&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=smtp_auth_test&amp;rev=1597026931&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=snapshot_backup&amp;rev=1597026931&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=solaris&amp;rev=1597026931&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=spices&amp;rev=1597026931&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=squid&amp;rev=1597026931&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=ssh_key_management&amp;rev=1597026931&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=ssh&amp;rev=1623182865&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=ssl&amp;rev=1597026931&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=start&amp;rev=1694810028&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=streaming_replication&amp;rev=1597026932&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=subversion&amp;rev=1597026932&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=syfy&amp;rev=1597026926&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=synergy&amp;rev=1608680227&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=systemd&amp;rev=1597026926&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=tlog&amp;rev=1703009835&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=tmux&amp;rev=1597026926&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=tomcat&amp;rev=1597026926&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=top&amp;rev=1597026926&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=tuneup_guide&amp;rev=1597026926&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=tw_cli&amp;rev=1597026926&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=two_mysql_instances&amp;rev=1597026926&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=update_4.11_ports&amp;rev=1597026926&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=update_bind_configurations&amp;rev=1597026926&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=update_next_line_based_on_list_of_variable&amp;rev=1597026926&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=upgrade_using_ius&amp;rev=1597026926&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=usage_on_fly&amp;rev=1597026926&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=vim&amp;rev=1597026927&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=vlc_streaming&amp;rev=1597026927&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=vmstat&amp;rev=1597026927&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=vmware&amp;rev=1597026927&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=vsftpd&amp;rev=1597026927&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=w3m&amp;rev=1597026927&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=webalizer&amp;rev=1597026927&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=webmin&amp;rev=1597026927&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=where&amp;rev=1597026927&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=why_drive_space_is_not_as_marked&amp;rev=1597026927&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=windows_quick_command&amp;rev=1597026927&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=wordpress_password_reset&amp;rev=1597026927&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=xen_vm_creation&amp;rev=1597026927&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=xfs&amp;rev=1597026927&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=xtrabackup_script&amp;rev=1597026927&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=youtube-dl&amp;rev=1597026928&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=zfs&amp;rev=1597026928&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.k2patel.in/doku.php?id=zoneli_-_zonelimit_state&amp;rev=1597026928&amp;do=diff"/>
            </rdf:Seq>
        </items>
    </channel>
    <image rdf:about="https://wiki.k2patel.in/lib/exe/fetch.php?media=wiki:dokuwiki.svg">
        <title>DokuWiki</title>
        <link>https://wiki.k2patel.in/</link>
        <url>https://wiki.k2patel.in/lib/exe/fetch.php?media=wiki:dokuwiki.svg</url>
    </image>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=add_ssh_key_to_multiple_host&amp;rev=1597026936&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:36+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>add_ssh_key_to_multiple_host</title>
        <link>https://wiki.k2patel.in/doku.php?id=add_ssh_key_to_multiple_host&amp;rev=1597026936&amp;do=diff</link>
        <description>SSH Key adding

- Assuming you already have key setup for your machine.



#!/bin/bash

hostlist=( &#039;alpha.lan&#039; &#039;beta.lan&#039; &#039;gamma.lan&#039; &#039;delta.lan&#039; &#039;epsilon.lan&#039; )
# get number of elements in the array
chost=${#hostlist[@]}


for (( i=0;i&lt;$chost;i++)); do
    echo ${hostlist[${i}]}
	file=`cat /dev/urandom|od -N4 -An -i`
	scp ${hostlist[${i}]}:.ssh/authorized_keys /tmp/$file
	if cat /tmp/$file | grep &quot;`cat mike.pub`&quot;
		then
		echo &quot;Key already exists&quot;
		rm -rf /tmp/$file
	else
		cat mike.pub &gt;&gt; /tm…</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=apache_1.3.x_mod_gzip_sample_config&amp;rev=1597026936&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:36+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>apache_1.3.x_mod_gzip_sample_config</title>
        <link>https://wiki.k2patel.in/doku.php?id=apache_1.3.x_mod_gzip_sample_config&amp;rev=1597026936&amp;do=diff</link>
        <description>Apache 1.3.x + mod_gzip + sample config

Installation

 It is easy to install but make sure your apache version is up2date just to avoid any errors.


First Need to build mod_gzip.


cd /usr/ports/www/mod_gzip
perl -pi -e Makefile &#039;s/APXS=${APXS}/APXS=\/www\/apache\/bin\/apxs/g&#039;
make
make install clean</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=apache_2.2_httpready_filter_issue&amp;rev=1597026936&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:36+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>apache_2.2_httpready_filter_issue</title>
        <link>https://wiki.k2patel.in/doku.php?id=apache_2.2_httpready_filter_issue&amp;rev=1597026936&amp;do=diff</link>
        <description>Apache 2.x &#039;httpready&#039;

No such file or directory:Failed to enable the ‘httpready’ Accept Filter

Above error appear when accf_http_load set to “NO”

To fix the error you can run following.


kldload accf_http


And setup to load during next boot use edit file loader.conf.</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=apache&amp;rev=1597026936&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:36+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>apache</title>
        <link>https://wiki.k2patel.in/doku.php?id=apache&amp;rev=1597026936&amp;do=diff</link>
        <description>Apache Related Quick Help

	*   DDOS Prevention module
	*   HTTP Error Codes 
	*   Jboss Load Balancing 

Compile apache from source

Good known required configuration


./configure --prefix=/srv/www --enable-access --enable-autoindex --enable-env --enable-info --enable-mime --enable-proxy --enable-status --enable-usertrack --enable-actions --enable-imap --enable-log_agent --enable-rewrite --enable-alias --enable-auth --enable-cgi --enable-dir --enable-include --enable-log_config --enable-mime_m…</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=apache2_php_.la_is_not_a_dso_file&amp;rev=1597026936&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:36+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>apache2_php_.la_is_not_a_dso_file</title>
        <link>https://wiki.k2patel.in/doku.php?id=apache2_php_.la_is_not_a_dso_file&amp;rev=1597026936&amp;do=diff</link>
        <description>DSO Issue

This is a issuse with apache when you try to install any module to it it gives error.

e.g. If you are running the php install as module


./configure ----- OK
make ------ OK
But,
make install ---- Failed with message .la is not a dso file

./libtool --mode=install cp libphp5.la /usr/lib/apache/modules/
./libtool --finish

Now, you might need the non apache version of application.

in that case you need to get rid of APXS2 variable from configure.</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=arch&amp;rev=1597026936&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:36+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>arch</title>
        <link>https://wiki.k2patel.in/doku.php?id=arch&amp;rev=1597026936&amp;do=diff</link>
        <description>Arch Linux

Recently started using arch linux, seems like really cool distro.

Package Manager

it uses “pacman” as package manager.

Following is some use full commands.

pacman queries the local package database with the -Q flag.


$ pacman -Q --help</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=at&amp;rev=1597026936&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:36+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>at</title>
        <link>https://wiki.k2patel.in/doku.php?id=at&amp;rev=1597026936&amp;do=diff</link>
        <description>at (linux)

In Unix-like computer operating systems, the at command is used to schedule commands to be executed once, 

at a particular time in the future.

More precisely, it reads a series of commands from standard input and collects them into one</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=augeas&amp;rev=1597026936&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:36+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>augeas</title>
        <link>https://wiki.k2patel.in/doku.php?id=augeas&amp;rev=1597026936&amp;do=diff</link>
        <description>Augeas

this is nice tool to modify / edit file using script or puppet.

Here are the few command line reference || example.

Using with Puppet

Inbuilt lenses.


augeas { &quot;sudoers&quot;:
  lens    =&gt; &quot;Sudoers.lns&quot;,
  incl    =&gt; &quot;/foo/sudoers&quot;,
  changes =&gt; &quot;...&quot;,
}</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=autoconf-2.62_-_build_error&amp;rev=1597026936&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:36+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>autoconf-2.62_-_build_error</title>
        <link>https://wiki.k2patel.in/doku.php?id=autoconf-2.62_-_build_error&amp;rev=1597026936&amp;do=diff</link>
        <description>autoconf-2.62 build error

Following error i got during the build of autoconf-2.62


restore=: &amp;&amp; backupdir=&quot;.am$$&quot; &amp;&amp; \
am__cwd=`pwd` &amp;&amp; cd . &amp;&amp; \
rm -rf $backupdir &amp;&amp; mkdir $backupdir &amp;&amp; \
if (/bin/sh /usr/ports/devel/autoconf262/work/autoconf-2.62/build-aux/missing --run makeinfo --version) &gt;/dev/null 2&gt;&amp;1; then \
for f in autoconf-2.62.info autoconf-2.62.info-[0-9] autoconf-2.62.info-[0-9][0-9] autoconf-2.62.i[0-9] autoconf-2.62.i[0-9][0-9]; do \
if test -f $f; then mv $f $backupdir; restore…</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=aws_how_to&amp;rev=1597026936&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:36+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>aws_how_to</title>
        <link>https://wiki.k2patel.in/doku.php?id=aws_how_to&amp;rev=1597026936&amp;do=diff</link>
        <description>Amazon Cloud How to

These are the commands i have used during my course of action.

Sending Regular SSL / Key / Bundle to ELB

Forget what they say and print on form.


Format require - 


	*  Key - RSA
	*  CRT - x509
	*  CA Bundle - What ever supplied.</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=aws_scripts&amp;rev=1597026936&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:36+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>aws_scripts</title>
        <link>https://wiki.k2patel.in/doku.php?id=aws_scripts&amp;rev=1597026936&amp;do=diff</link>
        <description>Scripts I Use to Manage EC2 / AWS

	*  Snapshot Backup</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=awstats&amp;rev=1597026937&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:37+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>awstats</title>
        <link>https://wiki.k2patel.in/doku.php?id=awstats&amp;rev=1597026937&amp;do=diff</link>
        <description>Awstats

Installing Linux


Modify apache httpd.conf
------------------------
export i=/www/apache/conf/httpd.conf

#######################
Check following exists
#######################

&lt;Directory &quot;/var/www/awstats/&quot;&gt;
 AuthGroupFile /dev/null
 AuthUserFile /usr/www/virtual/.htpasswd
 AuthType Basic
 AuthName &quot;Site Statistics&quot;
 &lt;Limit GET POST&gt;
  require valid-user
 &lt;/Limit&gt;
&lt;/Directory&gt;


    Alias /icons/ &quot;/www/apache/icons/&quot;
    Alias /cpeditor /www/apache/editor
    Alias /awstatsclasses &quot;/…</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=bad_bot_list&amp;rev=1597026937&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:37+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>bad_bot_list</title>
        <link>https://wiki.k2patel.in/doku.php?id=bad_bot_list&amp;rev=1597026937&amp;do=diff</link>
        <description>Bad bot

This is something keep busy system administrator for few days questioning.

I have found no 100% list of bad bot online as it require to keep updated.

Here is my version, will try to update but can not guarantee. 

Place below in the root of your server.</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=bash_functions&amp;rev=1597026937&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:37+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>bash_functions</title>
        <link>https://wiki.k2patel.in/doku.php?id=bash_functions&amp;rev=1597026937&amp;do=diff</link>
        <description>Bash Functions

index # Print the position of $2 in $1


index() #@ Print the position of $2 in $1
{ #@ USAGE: index STRING SUBSTRING
local idx
case $1 in
*$2*) idx=${1%%$2*}
echo $(( ${#idx} + 1 )) ;;
*) echo 0 ;;
esac
}


 From Article

die # Exit with error code and optional message</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=bash&amp;rev=1597026937&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:37+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>bash</title>
        <link>https://wiki.k2patel.in/doku.php?id=bash&amp;rev=1597026937&amp;do=diff</link>
        <description>Bash

	*  Floating Point Calculation

Bash Short-Cut

CTRL Key Bound


Ctrl + a - Jump to the start of the line
Ctrl + b - Move back a char
Ctrl + c - Terminate the command
Ctrl + d - Delete from under the cursor
Ctrl + e - Jump to the end of the line
Ctrl + f - Move forward a char
Ctrl + k - Delete to EOL
Ctrl + l - Clear the screen
Ctrl + r - Search the history backwards
Ctrl + R - Search the history backwards with multi occurrence
Ctrl + u - Delete from the cursor to the beginning of the line…</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=bc_calculator&amp;rev=1597026937&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:37+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>bc_calculator</title>
        <link>https://wiki.k2patel.in/doku.php?id=bc_calculator&amp;rev=1597026937&amp;do=diff</link>
        <description>bc

Few Samples to understand usage

How it looks..


desk:~/# bc 
2048 * 3
6144
256 * 6
1536
quit


Simple calculation


echo &quot;56.8 + 77.7&quot; | bc


Calculation with floating point


echo 2/5 | bc -l



bc -l works, but it sets scale=20 which gives:
1/3
.33333333333333333333
most of the time I just want two decimal places.

there may be an easier way, but what works for me is the following:
in .bashrc in your home directory add BC_ENV_ARGS=~/.bc
export BC_ENV_ARGS
then create .bc also in your hom…</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=bind&amp;rev=1597026937&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:37+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>bind</title>
        <link>https://wiki.k2patel.in/doku.php?id=bind&amp;rev=1597026937&amp;do=diff</link>
        <description>bind

bind is used for DNS. This instruction on how to install it on CentOS chrooted.


yum install bind bind-chroot bind-libs bind-utils caching-nameserver</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=bitchx&amp;rev=1597026937&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:37+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>bitchx</title>
        <link>https://wiki.k2patel.in/doku.php?id=bitchx&amp;rev=1597026937&amp;do=diff</link>
        <description>BitchX (IRC Client)

	*   BitchX referance
	*   BitchX Command List

Search the conversation for some word


/last &lt;word&gt;


Windows on BitchX

It is possible using BitchX to create another “invisible window” and switch between the two simultaneously. to do this type


[#bash] /win new hide</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=bruteforce_prevention&amp;rev=1597026937&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:37+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>bruteforce_prevention</title>
        <link>https://wiki.k2patel.in/doku.php?id=bruteforce_prevention&amp;rev=1597026937&amp;do=diff</link>
        <description>How to prevent Bruteforce

Install Bruteblock


 cd /usr/ports/security/bruteblock; make &amp;&amp; make install


Configure Bruteblock


 vi /usr/local/etc/bruteblock/ssh.conf


Add line similar to following example according to your log in auth.log 

also you can use line below for commercial SSH</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=building_mariadb_on_freebsd&amp;rev=1597026937&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:37+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>building_mariadb_on_freebsd</title>
        <link>https://wiki.k2patel.in/doku.php?id=building_mariadb_on_freebsd&amp;rev=1597026937&amp;do=diff</link>
        <description>Build / Compile MariaDB on FreeBSD

Getting Source

get source from MariaDB

extract to /usr/local/src/mariadb

Configure

Modular configure (usually you need to load plugins with my.cnf) i am using this one.


./configure --with-extra-charsets=all --localstatedir=/var/db/mysql</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=cablevision&amp;rev=1597026937&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:37+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>cablevision</title>
        <link>https://wiki.k2patel.in/doku.php?id=cablevision&amp;rev=1597026937&amp;do=diff</link>
        <description>Cablevision Do not call

Here are the numbers to dial to stop Cablevision from calling and mailing you for their products.


Do Not Call - 1-888-425-2088  ( Do not call for sales related Information )
Do Not Mail - 1-888-425-2090  ( Do not Mail for sales related Information )
Do Not Disclose - 1-888-425-2089  ( Do not Provide My Information to 3rd Party )</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=can_not_mount_boot_larger_hdd_to_freebsd&amp;rev=1597026937&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:37+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>can_not_mount_boot_larger_hdd_to_freebsd</title>
        <link>https://wiki.k2patel.in/doku.php?id=can_not_mount_boot_larger_hdd_to_freebsd&amp;rev=1597026937&amp;do=diff</link>
        <description>Can not mount off the Large disk

This might be resolved by disabling the udma.

if you say that BIOSes provide switching between PIO0 to PIO4.

but there is no way to control UDMA in a BIOS.

Because every Operating System (without DOS) is taking control after the  bootstrap over the hardware and even FreeBSD.</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=centos_nginx_backuppc4.x&amp;rev=1597026937&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:37+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>centos_nginx_backuppc4.x</title>
        <link>https://wiki.k2patel.in/doku.php?id=centos_nginx_backuppc4.x&amp;rev=1597026937&amp;do=diff</link>
        <description>CentOS / RHEL7 / Fedora + Nginx + Backuppc

This combination gave me no documentation online, Recently Backuppc is available as SCGI Script version.

I did not had luck setting that up, as nginx lack documentation for scgi.

So let&#039;s get started, If you are here you might already know there is no packaged version of Backuppc 4.x available. I&#039;ve decided to take shortcut and repackaged latest version available from fedora 27.</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=change_default_mta&amp;rev=1597026937&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:37+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>change_default_mta</title>
        <link>https://wiki.k2patel.in/doku.php?id=change_default_mta&amp;rev=1597026937&amp;do=diff</link>
        <description>Changing MTA

During Changing MTA on centos / redhat i had issue getting terminal UI.

which is specified and documented here  Changing Default MTA.


But there is alternate way to do so.


alternatives --config mta


Usually when you move from sendmail to postfix you should be using</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=check_service_and_restart_if_failed&amp;rev=1597026939&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:39+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>check_service_and_restart_if_failed</title>
        <link>https://wiki.k2patel.in/doku.php?id=check_service_and_restart_if_failed&amp;rev=1597026939&amp;do=diff</link>
        <description>Check service and restart if failed

Check the service if nginx is running and if not start


#!/usr/bin/env bash

# Enable System level logging
# Redirect log to logger
exec 1&gt; &gt;(logger -t $(basename $0)) 2&gt;&amp;1

STATUS=&quot;$(systemctl is-active nginx.service)&quot;

if [ &quot;${STATUS}&quot; != &quot;active&quot; ]; then
   echo &quot;Not running starting Service : Nginx&quot;
   systemctl start nginx.service
fi</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=chrome&amp;rev=1597026937&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:37+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>chrome</title>
        <link>https://wiki.k2patel.in/doku.php?id=chrome&amp;rev=1597026937&amp;do=diff</link>
        <description>Chrome

Project Google chromium

Special @ Pages

	*  about:memory
	*  about:stats
	*  about:network
	*  about:internets
	*  about:histograms
	*  about:dns
	*  about:cache
	*  about:crash
	*  about:plugins
	*  about:version</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=college&amp;rev=1597026937&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:37+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>college</title>
        <link>https://wiki.k2patel.in/doku.php?id=college&amp;rev=1597026937&amp;do=diff</link>
        <description>College

AdventureWorks2016CTP3 (suspect)

During my course after importing database every time my laptop goes to sleep.
So following set of command restore the working database.


EXEC sp_resetstatus AdventureWorks2016CTP3;
ALTER DATABASE AdventureWorks2016CTP3 SET EMERGENCY;
DBCC checkdb(AdventureWorks2016CTP3);
ALTER DATABASE AdventureWorks2016CTP3 SET SINGLE_USER WITH ROLLBACK IMMEDIATE;
DBCC CheckDB (AdventureWorks2016CTP3, REPAIR_ALLOW_DATA_LOSS);
ALTER DATABASE AdventureWorks2016CTP3 SET …</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=command_line&amp;rev=1629839464&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-08-24T21:11:04+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>command_line</title>
        <link>https://wiki.k2patel.in/doku.php?id=command_line&amp;rev=1629839464&amp;do=diff</link>
        <description>KVM Command Line

“virsh” shell for KVM.

List All Domain on KVM


virsh list --all


Define or use .xml


virsh define &lt;xyz.xml&gt;


Start KVM


virsh start &lt;xyz&gt;


Edit Guest .xml


virsh edit xyz


List VNC Information


virsh vncdisplay xyz


Domain Format in KVM</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=course_length&amp;rev=1597026938&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:38+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>course_length</title>
        <link>https://wiki.k2patel.in/doku.php?id=course_length&amp;rev=1597026938&amp;do=diff</link>
        <description>#!/usr/bin/env python3

from dateutil import rrule
import sys, getopt
import datetime

#start_date = datetime.datetime.strptime(&#039;5/20/2019&#039;, &#039;%m/%d/%Y&#039;)
#end_date = datetime.datetime.strptime(&#039;7/14/2019&#039;, &#039;%m/%d/%Y&#039;)

def main(argv):
   start_date = &#039;&#039;
   end_date = &#039;&#039;
   try:
      opts, args = getopt.getopt(argv,&quot;hs:e:&quot;,[&quot;sdate=&quot;,&quot;edate=&quot;])
   except getopt.GetoptError:
      print (&#039;datecalc -s &lt;start_date&gt; -e &lt;end_date&gt;&#039;)
      sys.exit(2)
   for opt, arg in opts:
      if opt == &#039;-h&#039;:
     …</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=cpan2rpm&amp;rev=1597026938&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:38+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>cpan2rpm</title>
        <link>https://wiki.k2patel.in/doku.php?id=cpan2rpm&amp;rev=1597026938&amp;do=diff</link>
        <description>CPAN2RPM

Most usefull tool to create rpm from the cpan module.

Source is locate at “&lt;http://search.cpan.org/CPAN/authors/id/E/EC/ECALDER/cpan2rpm-2.028.tar.gz&gt;”

&lt;note warning&gt;Due to bug you have to modify the command to use PlainText instead of Text.&lt;/note&gt;


perl -pi -e &#039;s/Pod::Text/Pod::PlainText/&#039; /usr/bin/cpan2rpm</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=cron&amp;rev=1597026938&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:38+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>cron</title>
        <link>https://wiki.k2patel.in/doku.php?id=cron&amp;rev=1597026938&amp;do=diff</link>
        <description>CRON

It is most important piece of command / daemon available on Linux / Unix system.

It has some nice capability which is not used but need to be aware of.

Special Usage

Following Special words replaces common conventional usage


@reboot        #Run once, at startup.
@yearly        #Run once a year, &quot;0 0 1 1 *&quot;.
@annually      #(same as @yearly)
@monthly       #Run once a month, &quot;0 0 1 * *&quot;.
@weekly        #Run once a week, &quot;0 0 * * 0&quot;.
@daily         #Run once a day, &quot;0 0 * * *&quot;.
@midnigh…</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=daily_admin_issues&amp;rev=1632240799&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-21T16:13:19+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>daily_admin_issues</title>
        <link>https://wiki.k2patel.in/doku.php?id=daily_admin_issues&amp;rev=1632240799&amp;do=diff</link>
        <description>Daily Admin Issue

	*  sar reporting
	*  Kernel Tuning
	*  inotify monitor
	*  Security

Centos 6 to 7 Upgrade

I&#039;ve followed &lt;https://wiki.centos.org/TipsAndTricks/CentOSUpgradeTool&gt; without issue.

But after reboot i&#039;ve started seeing following error “libpcre.so.0” not found.

After looking further it appeared to the issue with “grep” package.
After Successful reboot simply downgrade the grep package and error will disappear.</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=daily_issues&amp;rev=1597026938&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:38+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>daily_issues</title>
        <link>https://wiki.k2patel.in/doku.php?id=daily_issues&amp;rev=1597026938&amp;do=diff</link>
        <description>Mysql Upgrade Issue

Easy Command List

How to check Type of Table

You can use any of the following command to determine table type.


SHOW TABLE STATUS WHERE Name = &#039;table_name&#039;;
OR
SHOW CREATE TABLE &#039;table_name&#039;;
OR
SHOW TABLE STATUS;


Mysql Generate hash for password</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=daily_regular_expression&amp;rev=1597026938&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:38+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>daily_regular_expression</title>
        <link>https://wiki.k2patel.in/doku.php?id=daily_regular_expression&amp;rev=1597026938&amp;do=diff</link>
        <description>Daily Regular Expresssion

Grab IP


egrep &#039;([[:digit:]]{1,3}\.){3}[[:digit:]]{1,3}&#039;



grep &#039;^[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}$&#039;



cat textfile | grep -o &#039;[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}&#039;



/sbin/ifconfig | grep &quot;inet addr&quot; | awk -F : &#039;{print $2}&#039; | awk &#039;{print $1}&#039; | grep -v -e &#039;^192.\|^127.\|^10.&#039;</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=default_kernel&amp;rev=1629930922&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-08-25T22:35:22+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>default_kernel</title>
        <link>https://wiki.k2patel.in/doku.php?id=default_kernel&amp;rev=1629930922&amp;do=diff</link>
        <description>Default Kernel

List all available kernel


sudo awk -F\&#039; &#039;/menuentry / {print $2}&#039; /boot/grub2/grub.cfg


:!: Check if all the kernels listed in order and properly set the version (latest on top) if not generate config again.

Re-Generate config


grub2-mkconfig -o /boot/grub2/grub.cfg</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=dell&amp;rev=1606251976&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-11-24T21:06:16+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>dell</title>
        <link>https://wiki.k2patel.in/doku.php?id=dell&amp;rev=1606251976&amp;do=diff</link>
        <description>Dell

OMSA Installation


wget -q -O - http://linux.dell.com/repo/hardware/latest/bootstrap.cgi | bash
yum install srvadmin-all
/opt/dell/srvadmin/sbin/srvadmin-services.sh {start|stop} # When to start / stop


OSMA ssl certificate regenerate


/opt/dell/srvadmin/sbin/srvadmin-services.sh stop
cd /opt/dell/srvadmin/lib64/openmanage/jre/bin
./keytool -genkey --dname &quot;CN=server.k2patel.in, ou=Dell, O=Dell, c=US&quot; -alias dellcert --storepass Dell123 -validity 900 -keyalg RSA -keysize 4096 -sigalg SH…</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=deploy_script_using_case&amp;rev=1597026938&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:38+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>deploy_script_using_case</title>
        <link>https://wiki.k2patel.in/doku.php?id=deploy_script_using_case&amp;rev=1597026938&amp;do=diff</link>
        <description>Deploy Script Using Case

This script is meant to be used for varnish, but can be adapted for anything.


#!/bin/bash

## deploy-varnish.sh
## deploy default.vcl and/or reload varnish daemon on all hosts

if [ $# -lt 1 ]
then
  echo &quot;Usage : $0 {deploy|deployall|reload|reloadall}&quot;
  exit 1
fi

case &quot;$1&quot; in
  deploy)
    while read -r host
      do
        cat conf/default.vcl | ssh $host &#039;sudo /bin/sh -c &quot;cat &gt; /etc/varnish/default.vcl&quot;&#039;
      done &lt; &lt;(head -n1 hosts)
      echo &quot;deployed config…</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=dev_cache_all&amp;rev=1597026938&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:38+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>dev_cache_all</title>
        <link>https://wiki.k2patel.in/doku.php?id=dev_cache_all&amp;rev=1597026938&amp;do=diff</link>
        <description>Catch ALL for testing

During development you need scenario when all email should goes to only one email.

which is most important requirement for developer as they want to test email as well they need confirmation.


Here is what i have applied on postfix.</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=dig&amp;rev=1597026938&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:38+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>dig</title>
        <link>https://wiki.k2patel.in/doku.php?id=dig&amp;rev=1597026938&amp;do=diff</link>
        <description>dig

How to use dig to find Glue record

in order to find glue record you need two command one find the authority of TLD.


$ dig NS in.

......&lt;RESULT&gt;.....
; &lt;&lt;&gt;&gt; DiG 9.9.2-P2 &lt;&lt;&gt;&gt; NS in.
;; global options: +cmd
;; Got answer:
;; -&gt;&gt;HEADER&lt;&lt;- opcode: QUERY, status: NOERROR, id: 17728
;; flags: qr rd ra ad; QUERY: 1, ANSWER: 8, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;in.				IN	NS

;; ANSWER SECTION:
in.			21599	IN	NS	a0.in.af…</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=dns_add_script&amp;rev=1597026938&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:38+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>dns_add_script</title>
        <link>https://wiki.k2patel.in/doku.php?id=dns_add_script&amp;rev=1597026938&amp;do=diff</link>
        <description>#!/usr/bin/perl -w
##Jason Thomas
##Last Modified 20090819

use strict;
use lib &#039;/home/jthomas/lib/perl5/site_perl/5.8.8/&#039;;
use File::Copy;
use IO::File;
use Text::Template;
use File::Grep qw( fgrep );


##my $repository = &quot;/home/jthomas/projects/qsp_dns_migration/qsp.us.zone/&quot;;
my $repository = &quot;/home/jthomas/projects/dns/master/&quot;;
my $dnsData = &quot;data&quot;;

##currently designed to read from file. however if fqdn is not before fqhn, it will not be able write
##the entry until db.fqdn is created


o…</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=docker&amp;rev=1597026938&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:38+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>docker</title>
        <link>https://wiki.k2patel.in/doku.php?id=docker&amp;rev=1597026938&amp;do=diff</link>
        <description>Docker

Attach / Dettach


docker attach &lt;id|name&gt;


Prevent termination while &lt;Ctrl&gt; + C in term

by changing sig proxy it can be prevented.


docker attach --sig-proxy=false &lt;id|name&gt;


Host Firewall

Setting up firewall port forwarding and exposing service to world or specific IP.</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=elasticsearch&amp;rev=1611618060&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-01-25T23:41:00+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>elasticsearch</title>
        <link>https://wiki.k2patel.in/doku.php?id=elasticsearch&amp;rev=1611618060&amp;do=diff</link>
        <description>Elasticsearch

Quick Commands

Check Cluster Health


curl -XGET &#039;http://localhost:9200/_cluster/health?pretty=true&#039;


List all Indexes


curl http://localhost:9200/_cat/indices?v


List all shards


curl -XGET &#039;http://localhost:9200/_cat/shards&#039;


Unassigned shard | timeout</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=enable_ipv6_tunnel&amp;rev=1597026938&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:38+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>enable_ipv6_tunnel</title>
        <link>https://wiki.k2patel.in/doku.php?id=enable_ipv6_tunnel&amp;rev=1597026938&amp;do=diff</link>
        <description>ifconfig gif0 create
ifconfig gif0 tunnel &lt;local_ip&gt; &lt;IPv4_gateway&gt;
ifconfig gif0 inet6 &lt;IPv6_IP&gt; &lt;IPv6_gateway&gt; prefixlen 128
route -n add -inet6 default &lt;IPc6_gateway_ip&gt;
ifconfig gif0 up</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=error_codes&amp;rev=1597026938&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:38+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>error_codes</title>
        <link>https://wiki.k2patel.in/doku.php?id=error_codes&amp;rev=1597026938&amp;do=diff</link>
        <description>HTTP Error / Response Codes

 Copy Pasted from here

1xx Info / Informational

HTTP_INFO - Request received, continuing process. Indicates a provisional response, consisting only of the Status-Line and optional headers, 

and is terminated by an empty line.


100 Continue - HTTP_CONTINUE
101 Switching Protocols - HTTP_SWITCHING_PROTOCOLS
102 Processing - HTTP_PROCESSING</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=error_on_m4_update_install&amp;rev=1597026938&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:38+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>error_on_m4_update_install</title>
        <link>https://wiki.k2patel.in/doku.php?id=error_on_m4_update_install&amp;rev=1597026938&amp;do=diff</link>
        <description>m4 update / install error

Following Error when i tried to install m4.


Making all in doc
Updating ./version.texi
restore=: &amp;&amp; backupdir=&quot;.am$$&quot; &amp;&amp;  am__cwd=`pwd` &amp;&amp; CDPATH=&quot;${ZSH_VERSION+.}:&quot; &amp;&amp; cd . &amp;&amp;  rm -rf $backupdir &amp;&amp; mkdir $backupdir &amp;&amp; if (makeinfo --no-split --version) &gt;/dev/null 2&gt;&amp;1; then  for f in ./m4.info ./m4.info-[0-9] ./m4.info-[0-9][0-9] ./m4.i[0-9] ./m4.i[0-9][0-9]; do  if test -f $f; then mv $f $backupdir; restore=mv; else :; fi;  done;  else :; fi &amp;&amp;  cd &quot;$am__cwd&quot;;  if m…</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=errors&amp;rev=1597026938&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:38+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>errors</title>
        <link>https://wiki.k2patel.in/doku.php?id=errors&amp;rev=1597026938&amp;do=diff</link>
        <description>Postfix

Limit on File size

Limit on message file size create following error.


Feb 19 05:30:27 mail1 postfix/postdrop[14814]: warning: uid=539: Illegal seek
Feb 19 05:30:27 mail1 postfix/sendmail[14813]: fatal: ketan(539): queue file write error</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=esmf-_ubuntu_18.04&amp;rev=1597026939&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:39+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>esmf-_ubuntu_18.04</title>
        <link>https://wiki.k2patel.in/doku.php?id=esmf-_ubuntu_18.04&amp;rev=1597026939&amp;do=diff</link>
        <description>ESMF Ubuntu 18.04


# installing ESMF on Ubuntu Linux
# pre-req : gfortran, netcdf, openmpi, python3
# first mkdir /opt/esmf/7.1.0r and chown to yourself
# you also need a copy of esmf v7.1.0r
# https://sourceforge.net/code-snapshots/git/e/es/esmf/esmf.git/esmf-esmf-e3ac95b2e25a36d6cbfa68ed93eb1645fea29fcd.zip
# unzip esmf-esmf-e3ac95b2e25a36d6cbfa68ed93eb1645fea29fcd.zip
# mv esmf-esmf-e3ac95b2e25a36d6cbfa68ed93eb1645fea29fcd /opt/esmf-7.1.0r
# Raphael Dussin, July 2016
# Some part modified k2p…</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=execution_time_and_notify&amp;rev=1597026939&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:39+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>execution_time_and_notify</title>
        <link>https://wiki.k2patel.in/doku.php?id=execution_time_and_notify&amp;rev=1597026939&amp;do=diff</link>
        <description>Check execution time and notify if exceed

One Liner


s=`date +%s`; /usr/local/bin/php index.php ; e=`date +%s`; if [ $(( $e - $s )) -gt 10 ];
then /usr/bin/mail -s &quot;[Notice] `hostname` Time is More then 10 second&quot; status@k2.com ; fi


Script


#!/bin/bash
# Monitor execution of process

export receipients=&quot;status@k2.com&quot;

output=&quot;.BxJ04o1k2lcTURK&quot;

notify(){
   for n in $receipients; do
      echo $1 | /usr/bin/mail -s &quot;[Notice] `hostname` Time is More then 10 second&quot; $n
   done
}

cd /usr/www…</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=fail2ban&amp;rev=1597026939&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:39+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>fail2ban</title>
        <link>https://wiki.k2patel.in/doku.php?id=fail2ban&amp;rev=1597026939&amp;do=diff</link>
        <description>Fail2Ban

Nice - Lightweight - Protection to linux box

You can do more than expected with this utility.

Here i am using SSH and FTP setting to protect my bandwidth from script kidies.

Installation

Fail2ban is written in Python, thus no compilation is required. You can even run Fail2ban without installing it.</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=fedora_redhat_centos&amp;rev=1605801345&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-11-19T15:55:45+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>fedora_redhat_centos</title>
        <link>https://wiki.k2patel.in/doku.php?id=fedora_redhat_centos&amp;rev=1605801345&amp;do=diff</link>
        <description>Fedora, Redhat &amp; CentOS

	*  CentOS + Nginx + Backuppc4.x
	*  Default kernel

My Repo

 I did not yet implemented GPG Key.


  [K2 - Perl]
  name=K2 - Perl
  baseurl=http://rpm.k2patel.in:1111/centos/$releasever/perl/$basearch/
  enabled=1
  gpgcheck=0
  
  [K2 - Update]
  name=K2 - Update
  baseurl=http://rpm.k2patel.in:1111/centos/$releasever/updates/$basearch/
  enabled=1
  gpgcheck=0</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=finch&amp;rev=1597026939&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:39+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>finch</title>
        <link>https://wiki.k2patel.in/doku.php?id=finch&amp;rev=1597026939&amp;do=diff</link>
        <description>Finch (Best command line communicator)

Frequently Used Shortcuts

	*  Alt + q - quit
	*  Alt + c - close window
	*  Alt + n - next window
	*  Alt + p - previous window
	*  Alt + a - View available actions
	*  Alt + w - list of windows
	*  Alt + m - move window</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=find_files_which_is_taking_most_space_on_server&amp;rev=1597026939&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:39+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>find_files_which_is_taking_most_space_on_server</title>
        <link>https://wiki.k2patel.in/doku.php?id=find_files_which_is_taking_most_space_on_server&amp;rev=1597026939&amp;do=diff</link>
        <description>Which file taking Space on Windows

There is many utility available to check this.

	*   SequoiaView 
	*   WinDirStat</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=find&amp;rev=1597026939&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:39+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>find</title>
        <link>https://wiki.k2patel.in/doku.php?id=find&amp;rev=1597026939&amp;do=diff</link>
        <description>Find

To find all files that was modified since a specific time ago

(i.e an hour ago, a day ago, 24 hours ago, a weeks ago and so on) in Unix environment,

the find command will come in handy. The command syntax is:

To find all files modified in the last 24 hours (last full day) in current directory and its sub-directories:</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=firewalld&amp;rev=1597026932&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>firewalld</title>
        <link>https://wiki.k2patel.in/doku.php?id=firewalld&amp;rev=1597026932&amp;do=diff</link>
        <description>Firewalld

Another package to manage another package... welcome to new world ... :D

Anyway but server need to keep rolling !!

Replace firewalld with iptables

This is tested with the RHEL7


yum install -y iptables-services
iptables-save &gt; /etc/sysconfig/iptables  # preserve existing rule
systemctl stop firewalld
systemctl mask firewalld
systemctl enable iptables
systemctl enable ip6tables
systemctl start iptables
systemctl start ip6tables</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=floating_point_calculation&amp;rev=1597026932&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>floating_point_calculation</title>
        <link>https://wiki.k2patel.in/doku.php?id=floating_point_calculation&amp;rev=1597026932&amp;do=diff</link>
        <description>Floating Point Calculation

This is an example represent how to compute Floating point in bash.

Using in Script for Comparision

To use bc in our bash scripts we&#039;ll package it up into a couple of functions: 


    float_eval EXPRESSION
and
    float_cond CONDITIONAL-EXPRESSION</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=force_make_to_use_gcc44&amp;rev=1597026932&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>force_make_to_use_gcc44</title>
        <link>https://wiki.k2patel.in/doku.php?id=force_make_to_use_gcc44&amp;rev=1597026932&amp;do=diff</link>
        <description>FreeBSD make.conf

How to force to use latest gcc4x

It is usually require to done while building ffmpeg on freebsd.

Some script require it will be build using gcc44 so it does not complaint.

add following lines to start using gcc44.

replace number 44 with desired version. should do it.</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=freebsd_nginx_backuppc&amp;rev=1597026932&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>freebsd_nginx_backuppc</title>
        <link>https://wiki.k2patel.in/doku.php?id=freebsd_nginx_backuppc&amp;rev=1597026932&amp;do=diff</link>
        <description>freebsd + nginx + backuppc

My current installation is inside JAIL, inside freenas.

Not going to discuss on setting up jail etc., this topic mainly focused on quick installation once your JAIL is setup.

Note: For Linux RHEL Based installation look (</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=freebsd_zfs_daily&amp;rev=1597026932&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>freebsd_zfs_daily</title>
        <link>https://wiki.k2patel.in/doku.php?id=freebsd_zfs_daily&amp;rev=1597026932&amp;do=diff</link>
        <description>Freebsd and Zfs commands

New drive using lable

Recently i had to add new drive but it doesn&#039;t had any glable.

Since drives are same size best bet is to use same partition size for new drive.

Using gpart backup / restore one add new partition on new disk and good to go for zfs.</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=freenas&amp;rev=1604077877&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-10-30T17:11:17+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>freenas</title>
        <link>https://wiki.k2patel.in/doku.php?id=freenas&amp;rev=1604077877&amp;do=diff</link>
        <description>FreeNAS

Memory leak

1G in system processes for python3.6 

:!: This is fixed in latest stable.


pkill -9 -f middlewared
(WAIT about 10 seconds)
service middlewared start


You can do this live while in production. This will only restart the middleware process that effects the WebUI.</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=ftp_file_fetch_using_perl&amp;rev=1597026932&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>ftp_file_fetch_using_perl</title>
        <link>https://wiki.k2patel.in/doku.php?id=ftp_file_fetch_using_perl&amp;rev=1597026932&amp;do=diff</link>
        <description>FTP file fetch using perl


#!/usr/bin/perl                                      
# this script is written by ketan patel

use Net::FTP;

$file = &quot;name of file&quot;;

@paths = (&#039;comma_separated path file&#039;);

$remotehost = &quot;&lt;remote_hostname&gt;&quot;;
$user = &quot;&lt;ftp_username&gt;&quot;;
$pass = &quot;&lt;ftp_password&gt;&quot;;

chdir &quot;/srv/www/htdocs/passwd&quot;;

$k2=1;
print &quot;Connecting...\n&quot;;
$ftp = Net::FTP-&gt;new(&quot;$remotehost&quot;, Debug =&gt; 0) or
      die &quot;cannot connect:&quot;;

print &quot;Logging in...\n&quot;;
$ftp-&gt;login(&quot;$user&quot;,&quot;$pass&quot;)
      or…</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=furnished_bckup_mysql&amp;rev=1597026932&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>furnished_bckup_mysql</title>
        <link>https://wiki.k2patel.in/doku.php?id=furnished_bckup_mysql&amp;rev=1597026932&amp;do=diff</link>
        <description>Furnished Bckup


#!/bin/bash
#########################################################################
# Backup Database
# You can call this script from cron.
# if you have any issue write back to me
# k2patel@live.com !!! ;) it is microsoft ? yeah dont junk me junk them
#########################################################################
 
mysqldump=$(which mysqldump)
mysql=$(which mysql)
gzip=$(which gzip)
chown=$(which chown)
DATE=$(date +%Y%m%d)

# Which user suppose to own this file
#…</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=gem&amp;rev=1597026932&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>gem</title>
        <link>https://wiki.k2patel.in/doku.php?id=gem&amp;rev=1597026932&amp;do=diff</link>
        <description>GEM

gem of ruby. 

tips and tricks i have used.

Gem Local Installation

In many case i usually dont want to install GEM globally.

I simply update my .gemrc file with following value.


&lt;note important&gt;If it does not work try with hardcoded path instead $HOME&lt;/note&gt;</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=general_help&amp;rev=1597026932&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>general_help</title>
        <link>https://wiki.k2patel.in/doku.php?id=general_help&amp;rev=1597026932&amp;do=diff</link>
        <description>General Help

How to mount procfs

To mount procfs you need to do following.


mount -t procfs proc /proc


It is necessary to run command like truss on dump(core) file.

Network Status Graph

To check network status


nload -u m &lt;interface&gt;


Statistics of the System</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=general_postfix&amp;rev=1597026932&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>general_postfix</title>
        <link>https://wiki.k2patel.in/doku.php?id=general_postfix&amp;rev=1597026932&amp;do=diff</link>
        <description>General Postfix

Removing all mail from queue


postsuper -d ALL


Read mail in queue


postcat -vq &lt;queue_id&gt;</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=generate_good_password&amp;rev=1597026932&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>generate_good_password</title>
        <link>https://wiki.k2patel.in/doku.php?id=generate_good_password&amp;rev=1597026932&amp;do=diff</link>
        <description>Generate good password

how simple it is 


echo `&lt; /dev/urandom tr -dc A-Za-z0-9 | head -c 10`


Read further for complicated edition.

Usage : apg.sh 10  (generate 10 character password)


#!/bin/bash
if [ $# -lt 1 ]; then
echo &quot;Usage : apg &lt;lenght of password&gt;&quot;
else
for ((n=0;n&lt;10;n++)); do dd if=/dev/urandom count=1 2&gt; /dev/null | /usr/bin/gmime-uuencode -m -| sed -ne 2p | cut -c-$1; done
fi</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=gentoo&amp;rev=1597026933&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:33+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>gentoo</title>
        <link>https://wiki.k2patel.in/doku.php?id=gentoo&amp;rev=1597026933&amp;do=diff</link>
        <description>Gentoo

For me Best source to learn how everything works.

General Issues

 Packages</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=geo_ip&amp;rev=1597026933&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:33+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>geo_ip</title>
        <link>https://wiki.k2patel.in/doku.php?id=geo_ip&amp;rev=1597026933&amp;do=diff</link>
        <description>Geo IP Help Page

mod_geoip Installation

Get c library from maxmind.com

compile it and install it.

 downlaod c library from

 download geoip database

save geoip database at - /srv/www/htdocs/.geoip/GeoIP.dat

Get mod_GeoIP from maxmid.com

install it using following command


/srv/www/bin/apxs -i -a -L /usr/local/lib -I /usr/local/include -lGeoIP -c mod_geoip.c</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=git&amp;rev=1597026933&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:33+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>git</title>
        <link>https://wiki.k2patel.in/doku.php?id=git&amp;rev=1597026933&amp;do=diff</link>
        <description>GIT Repository

Setting up GIT

Create Server

Define User


git config --global user.name &quot;k2patel&quot;
git config --global user.email &quot;k2patel@live.com&quot;


Create location for Repository

&lt;note tip&gt;replace location with your desired location&lt;/note&gt;


mkdir -p /data/git/bumper.git
cd /data/git/bumper.git</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=globus&amp;rev=1597026933&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:33+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>globus</title>
        <link>https://wiki.k2patel.in/doku.php?id=globus&amp;rev=1597026933&amp;do=diff</link>
        <description>Globus

Most unstable but highly useful gridftp service.
Configuration and documents are scattered all around so it is really easy to troubleshoot your self.

Fixing broken proxy

Not sure but suddenly proxy is not setting up paths correctly.

one thing i found is to do following steps manually.</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=guake&amp;rev=1597026933&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:33+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>guake</title>
        <link>https://wiki.k2patel.in/doku.php?id=guake&amp;rev=1597026933&amp;do=diff</link>
        <description>Guake terminal

NOTE : Read further if you have GNOME or GTK+

Guake is a top-down terminal for Gnome (in the style of Yakuake for KDE, Tilda or the terminal used in Quake).

It is dam fast and more nice than tilda.

 Guake Home

Enjoy!!</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=gui&amp;rev=1597026933&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:33+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>gui</title>
        <link>https://wiki.k2patel.in/doku.php?id=gui&amp;rev=1597026933&amp;do=diff</link>
        <description>teset</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=help&amp;rev=1597026933&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:33+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>help</title>
        <link>https://wiki.k2patel.in/doku.php?id=help&amp;rev=1597026933&amp;do=diff</link>
        <description>Some easy notes

Supported codes in docuwiki

The following language strings are currently recognized:


abap, actionscript-french, actionscript, actionscript3, ada, apache, applescript, asm, asp, autoit, bash, basic4gl, 
blitzbasic, bnf, boo, c, c_mac, caddcl, cadlisp, cfdg, cfm, cil, cobol, cpp, cpp-qt, csharp, css, delphi, diff, div, 
dos, dot, d, eiffel, fortran, freebasic, genero, glsl, gml, gnuplot, groovy, gettext, haskell, html, idl, ini, inno, 
io, java5, java, javascript, kixtart, klon…</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=how_to_mount_ntfs_with_read_write&amp;rev=1597026933&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:33+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>how_to_mount_ntfs_with_read_write</title>
        <link>https://wiki.k2patel.in/doku.php?id=how_to_mount_ntfs_with_read_write&amp;rev=1597026933&amp;do=diff</link>
        <description>NTFS Mount on BSD

Requirement

Following package need to be installed.


 - /usr/ports/sysutils/fusefs-ntfs
 - ntfs-3g - which is installed as part of fusefs-ntfs.


Enable fuse

Edit /etc/rc.conf and add following line.


fusefs_enable=&quot;YES&quot;


Now start fuse before mounting NTFS</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=how_to_remove_script_from_all_pages&amp;rev=1597026933&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:33+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>how_to_remove_script_from_all_pages</title>
        <link>https://wiki.k2patel.in/doku.php?id=how_to_remove_script_from_all_pages&amp;rev=1597026933&amp;do=diff</link>
        <description>How to remove script from all pages

Xargs can be wack sometimes, you can use -exec in find to do the same thing as xargs:

find . -name &#039;*.php&#039; -o -name &#039;*.htm*&#039; -exec grep iframe {} \+ | cut -d &#039;:&#039; -f1


#this should be run in the root directory that needs to be cleaned
#!/bin/sh


TODAY=$(/bin/date +%m%d%y)


for i in $(find .  \( -name &#039;*.php&#039; -o -name &#039;*.htm*&#039; \) -exec grep -i &#039;&lt;script&gt;&#039;  {} \+ | cut -d &#039;:&#039; -f1 ); do
  if [ -e $i ]; then

    if [ -e $TODAY.backup.tar ]; then
      TFLAG=&quot;r…</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=how_to&amp;rev=1597026933&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:33+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>how_to</title>
        <link>https://wiki.k2patel.in/doku.php?id=how_to&amp;rev=1597026933&amp;do=diff</link>
        <description>How to .....

.gvfs

How to get rid of .gvfs and what it is.

What it is
GVFS is a replacement for GnomeVFS, the GNOME Virtual File System

{User_home}/.gvfs is used as a mount point for the Gnome gvfs for user.
It stays mounted even when user is logged off.You need to umount  it prior to delete it.
Use following command to unmount</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=indian&amp;rev=1597026933&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:33+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>indian</title>
        <link>https://wiki.k2patel.in/doku.php?id=indian&amp;rev=1597026933&amp;do=diff</link>
        <description>Dhansak

INGREDIENTS:

	*  Tovar washed 100gm
	*  cup Red Gram (split)
	*  Masoor dal washed 75 gm
	*  Ghee 30 gm
	*  Chopped onion 150 gm
	*  Ginger garlic paste 2tbsp
	*  Red pumpkin peeled &amp; diced 100gm
	*  Brinjal peeled &amp; diced 100 gm
	*  Potatoes diced 100 gm</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=info&amp;rev=1597026933&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:33+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>info</title>
        <link>https://wiki.k2patel.in/doku.php?id=info&amp;rev=1597026933&amp;do=diff</link>
        <description>File System Performance

File System Scheduler

State Of Process


d : uninterruptible sleep (usually io)
r : running or runnable (on run queue)
s : interruptible sleep (waiting for an event to complete)
t : stopped, either by a job control signal or because it is being traced.
w : paging (not valid since the 2.6.xx kernel)
x : dead (should never be seen)
z : defunct (&quot;zombie&quot;) process, terminated but not reaped by its parent.</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=inittab&amp;rev=1597026933&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:33+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>inittab</title>
        <link>https://wiki.k2patel.in/doku.php?id=inittab&amp;rev=1597026933&amp;do=diff</link>
        <description>INITTab

Actions Available in inittab


respawn	Restart the process whenever it terminates. Usually used for getty processes, which monitor for logins.
wait	Start the process once when the specified runlevel is entered and wait for its termination before init proceeds.
once	Start the process once when the specified runlevel is entered.
initdefault	Specifies the runlevel to enter after system boot.
ctrlaltdel	Execute the associated process when init receives the SIGINT signal, for example, when s…</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=innobackupx_scripted_to_backup_daily&amp;rev=1597026933&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:33+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>innobackupx_scripted_to_backup_daily</title>
        <link>https://wiki.k2patel.in/doku.php?id=innobackupx_scripted_to_backup_daily&amp;rev=1597026933&amp;do=diff</link>
        <description>InnoBackupX

 * This is great tool for hot online backup.

 * Following script is used to backup mysql to remote server with key less entry only.

 * Following script need you to change some variables.


Master server


#!/bin/bash

if /usr/bin/innobackupex-1.5.1 --no-timestamp --no-lock --user=root --password=testpassword --stream=tar ./ | ssh root@remote.backup.com &quot;cat - &gt; /root/bkuptest/Backup/test.tar&quot;
then
        if ssh root@remote.backup.com &quot;/usr/bin/mybackup.sh&quot;
                then
  …</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=inotify_monitor&amp;rev=1597026933&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:33+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>inotify_monitor</title>
        <link>https://wiki.k2patel.in/doku.php?id=inotify_monitor&amp;rev=1597026933&amp;do=diff</link>
        <description>Inotify


Failed to watch /var/ftp; upper limit on inotify watches reached!
Please increase the amount of inotify watches allowed per user via `/proc/sys/fs/inotify/max_user_watches&#039;.

limit from 8k to 16000 temporarily and tried again. # /usr/local/kit/inotify/inotify.log (it doesn&#039;t exist) so no email is generated.</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=install_lighttpd_-_with_mod_h264_streaming&amp;rev=1597026934&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:34+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>install_lighttpd_-_with_mod_h264_streaming</title>
        <link>https://wiki.k2patel.in/doku.php?id=install_lighttpd_-_with_mod_h264_streaming&amp;rev=1597026934&amp;do=diff</link>
        <description>freebsd + lighttpd + mod_h264_streaming

Following has been tested on freebsd 7.x

This is step by step.

First thing need to be done is get the copy of - mod_h264_streaming.

NOTE : Cosidering you are in folder - “/usr/local/src”


svn export http://h264.code-shop.com/svn/h264/tags/mod_h264_streaming-2.0/lighttpd-1.4.18 mod_h264
svn export --force http://h264.code-shop.com/svn/h264/tags/mod_h264_streaming-2.0/mp4split mod_h264/src</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=installing_memcached&amp;rev=1597026934&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:34+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>installing_memcached</title>
        <link>https://wiki.k2patel.in/doku.php?id=installing_memcached&amp;rev=1597026934&amp;do=diff</link>
        <description>Installing Memcached

To install memcached on freebsd simply follow steps below.


cd /usr/ports/databases/memcached
make install clean


After installation we need to activate it in rc.conf.


memcached_enable=&quot;YES&quot;
memcached_flags=&quot;-m 256 -l 127.0.0.1 -p 11211&quot;
memcached_user=&quot;xyz&quot;</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=ip_alias_script_for_debian&amp;rev=1597026934&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:34+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>ip_alias_script_for_debian</title>
        <link>https://wiki.k2patel.in/doku.php?id=ip_alias_script_for_debian&amp;rev=1597026934&amp;do=diff</link>
        <description>Script to Add multiple IP to Debian

This script add all IP in single file as an alias


192.168.1.4
192.168.1.5
192.168.1.7
192.168.1.8
192.168.1.11
10.10.1.34
10.10.1.23



#!/bin/bash
i=0;
while read ip
do
/sbin/ifconfig eth0:${i} $ip netmask 255.255.255.240 up
let i=$i+1
done &lt; /etc/network/ip_range</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=ipfw&amp;rev=1597026934&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:34+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>ipfw</title>
        <link>https://wiki.k2patel.in/doku.php?id=ipfw&amp;rev=1597026934&amp;do=diff</link>
        <description>IpFw

Simple but nice firewall.
 Good Reading

How to create forward for port

Rule below forward request to 5111 to port 232


ipfw add fwd localhost,5111 tcp from any to any 232 via en0


Diverting port using snort

Rule below will divert the traffic from one port to another.\</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=iptables&amp;rev=1597026934&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:34+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>iptables</title>
        <link>https://wiki.k2patel.in/doku.php?id=iptables&amp;rev=1597026934&amp;do=diff</link>
        <description>IPTABLES

Statefull and Powerfull Firewall.


Enable for SSH Bruteforce Prevention

This is not a 100% proof setup as it does not block based on the result of authentication.

It just work based on connection.


Simple Rules


iptables -N BRTBLK
iptables -A INPUT -p tcp --dport 22 -m state --state NEW -j BRTBLK
iptables -A BRTBLK -m recent --set --name SSH
iptables -A BRTBLK -m recent --update --seconds 45 --hitcount 5 --name SSH -j DROP</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=ipxe&amp;rev=1597026939&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:39+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>ipxe</title>
        <link>https://wiki.k2patel.in/doku.php?id=ipxe&amp;rev=1597026939&amp;do=diff</link>
        <description>iPXE

Get Source

Get ipxe source


git clone git://git.ipxe.org/ipxe.git


Next step create custom script

Custom ipxe

:!: Simple http server works just fine serving the ipxe.txt and kickstarts, but no HTTPS.


#!ipxe
echo Welcome to iPXE!

:retry_dhcp
  dhcp || goto retry_dhcp

:bootup
echo #
echo ip ...................... : ${ip}
echo #
echo Booting from http://plainhttp.k2patel,in/ipxe/ipxe.txt
read test
chain http://plainhttp.k2patel.in/ipxe/ipxe.txt

prompt

shell</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=irssi&amp;rev=1597026934&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:34+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>irssi</title>
        <link>https://wiki.k2patel.in/doku.php?id=irssi&amp;rev=1597026934&amp;do=diff</link>
        <description>IrSSi

Best Command line irc client.

Few simple things before you start using.

Common IRC commands

To register your nick on IRC


/msg nickserv register PASSWORD EMAIL


To verify your password


/msg nickserv identify PASSWORD


List Channel


/list</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=iscsiadm&amp;rev=1597026934&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:34+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>iscsiadm</title>
        <link>https://wiki.k2patel.in/doku.php?id=iscsiadm&amp;rev=1597026934&amp;do=diff</link>
        <description>iscsiadm

Logout iscsi target


iscsiadm --m node -T iqn.2012-04.com.euallogic:0-9a5602-234as245dg.cluster1 --portal 192.168.82.2:3260 -u


Delete iscsi target


iscsiadm --m node -o delete -T iqn.2012-04.com.euallogic:0-9a5602-234as245dg.cluster1 --portal 192.168.82.2:3260</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=james&amp;rev=1597026934&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:34+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>james</title>
        <link>https://wiki.k2patel.in/doku.php?id=james&amp;rev=1597026934&amp;do=diff</link>
        <description>James

It&#039;s really nice standalone mail server.

Written in JAVA, can be scaled to high numbers of nodes.

 I have used mysql based setup 


database.driverClassName=com.mysql.jdbc.Driver
database.url=jdbc:mysql://localhost/james
database.username=james
database.password=james
vendorAdapter.database=MYSQL
openjpa.streaming=false</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=kernel_not_found&amp;rev=1597026934&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:34+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>kernel_not_found</title>
        <link>https://wiki.k2patel.in/doku.php?id=kernel_not_found&amp;rev=1597026934&amp;do=diff</link>
        <description>Booting into loader mode:


unload
set kernel=&quot;kernel.old&quot;
boot-conf


&lt;http://www.unix.com/bsd/87838-freebsd-kernel-queries-issues.html&gt;</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=kernel_tuning&amp;rev=1597026934&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:34+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>kernel_tuning</title>
        <link>https://wiki.k2patel.in/doku.php?id=kernel_tuning&amp;rev=1597026934&amp;do=diff</link>
        <description>Kernel Tuning

This tuning i have used for dedicated DB server.

You can use it, as it is on any modern server, but please make sure to read note once.


###### Optimization Dec. 22 2011 ######

## Reduce Swapping


vm.swappiness = 30
vm.dirty_ratio = 50
vm.dirty_background_ratio = 5</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=keytool&amp;rev=1597026934&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:34+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>keytool</title>
        <link>https://wiki.k2patel.in/doku.php?id=keytool&amp;rev=1597026934&amp;do=diff</link>
        <description>Java Keytool

Java Keytool Commands for Creating and Importing

These commands allow you to generate a new Java Keytool keystore file, create a CSR, and import certificates. Any root or intermediate certificates will need to be imported before importing the primary certificate for your domain.</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=kubernetes&amp;rev=1597026934&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:34+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>kubernetes</title>
        <link>https://wiki.k2patel.in/doku.php?id=kubernetes&amp;rev=1597026934&amp;do=diff</link>
        <description>Kubernetes

Creating user accounts and workspace binding

commands


kubectl create namespace gitlab-test-k2
kubectl config set-context $(kubectl config current-context) --namespace=gitlab-test-k2
kubectl apply -f gitlab-service-accnt.yaml
kubectl describe sa gitlab-k2 -n gitlab-test-k2
kubectl get secret gitlab-k2-token-2nrjl -n gitlab-test-k2 -o &quot;jsonpath={.data.token}&quot; | base64 -D
kubectl get secret gitlab-k2-token-2nrjl -n gitlab-test-k2 -o &quot;jsonpath={.data[&#039;ca\.crt&#039;]}&quot;</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=letsencrypt&amp;rev=1597026934&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:34+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>letsencrypt</title>
        <link>https://wiki.k2patel.in/doku.php?id=letsencrypt&amp;rev=1597026934&amp;do=diff</link>
        <description>Letsencrypt | Certbot

Now they renamed it from Letsencrypt to Certbot.

Working on script to reflect the change but i have to make sure it does not change | Break all required dependencies.

Great thing happen securing internet servers, And it&#039;s Free.</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=lightttpd&amp;rev=1597026934&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:34+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>lightttpd</title>
        <link>https://wiki.k2patel.in/doku.php?id=lightttpd&amp;rev=1597026934&amp;do=diff</link>
        <description>lighttpd

In order to make it work simply change following options.

Enable all needed modules, in this case i am configuring it for streaming.


&quot;mod_flv_streaming&quot;,
&quot;mod_h264_streaming&quot;,


Specify file extension


flv-streaming.extensions = ( &quot;.flv&quot; )
h264-streaming.extensions = ( &quot;.mp4&quot; )</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=limiting_closed_port_rst_response&amp;rev=1597026934&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:34+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>limiting_closed_port_rst_response</title>
        <link>https://wiki.k2patel.in/doku.php?id=limiting_closed_port_rst_response&amp;rev=1597026934&amp;do=diff</link>
        <description>Limiting closed port RST response

FreeBSD’s kernel is that it will limit closed port RST responses, 

It means someone repeatedly hitting a port that is closed, the kernel stop responding to all of the requests.

You generally get something like this in the system log:</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=ls&amp;rev=1597026934&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:34+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>ls</title>
        <link>https://wiki.k2patel.in/doku.php?id=ls&amp;rev=1597026934&amp;do=diff</link>
        <description>ls

Surprised seeing LS here, well i am surprised when i have been asked define all classification of file indicated while using -F.

here i am after reffering to man page.


*	= regular files that are executable
/	= file type indicators for directories
@	= for symbolic links
|	= for FIFOs
=	= for sockets
&gt;	= for doors
nothing	= for regular files.</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=lvm&amp;rev=1597026935&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>lvm</title>
        <link>https://wiki.k2patel.in/doku.php?id=lvm&amp;rev=1597026935&amp;do=diff</link>
        <description>LVM

LVM you can increase / decrease size without any issue.

But it is important you do it in proper steps.

Steps to create LVM from drive


pvcreate /dev/xvdf1
pvdisplay /dev/xvdf1
vgcreate -s 16M vg0 /dev/xvdf1
vgdisplay /dev/xvdf
vgdisplay vg0
lvcreate -n lv-vol001 vg0
lvcreate --help
lvcreate -A n -L 24.5G -n lv-vol001 vg0
mkfs.ext3 /dev/vg0/lv-vol001</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=make_to_ignore_file_hash&amp;rev=1597026935&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>make_to_ignore_file_hash</title>
        <link>https://wiki.k2patel.in/doku.php?id=make_to_ignore_file_hash&amp;rev=1597026935&amp;do=diff</link>
        <description>Ignore Hash

NOT and good idea but you want to do it.
use make as follow


make _CKSUMFILES=&quot;&quot;</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=mariadb_replication&amp;rev=1597026935&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>mariadb_replication</title>
        <link>https://wiki.k2patel.in/doku.php?id=mariadb_replication&amp;rev=1597026935&amp;do=diff</link>
        <description>MariaDB Replication

Coming soon</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=mina_ftp&amp;rev=1597026935&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>mina_ftp</title>
        <link>https://wiki.k2patel.in/doku.php?id=mina_ftp&amp;rev=1597026935&amp;do=diff</link>
        <description>Mina FTP

Standalone FTP server written is JAVA.

which use MINA Framework, could be use to deploy service in min.


Source :  Mina FTP 

Copy following files


tar -xvf springsource-tool-suite-2.6.0.RELEASE-e3.6.2-linux-gtk-x86_64.tar.gz
cp tc-server-developer-2.1.1.RELEASE/lib/com.springsource.org.apache.commons.cli-1.2.0.jar /opt/ftpd/common/lib/
cd /opt/ftpd/cd /usr/local/src/
wget http://s3.amazonaws.com/dist.springframework.org/milestone/SPR/spring-framework-3.1.0.M1.zip
unzip spring-frame…</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=mod_evasive&amp;rev=1597026935&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>mod_evasive</title>
        <link>https://wiki.k2patel.in/doku.php?id=mod_evasive&amp;rev=1597026935&amp;do=diff</link>
        <description>mod_evasive (module to prevent DDOS)

Short Brief Source
mod_evasive is an evasive maneuvers module for Apache to provide evasive action in the event of an HTTP DoS or DDoS attack or brute force attack.

It is also designed to be a detection and network management tool, and can be easily configured to talk to ipchains, firewalls, routers, and etcetera.</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=mod_proxy_ajp&amp;rev=1597026935&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>mod_proxy_ajp</title>
        <link>https://wiki.k2patel.in/doku.php?id=mod_proxy_ajp&amp;rev=1597026935&amp;do=diff</link>
        <description>mod_proxy_ajp

There is no additional modules require to load balance jboss.

But we had some old services require it and we down to road for mod_proxy_ajp.

alternatively you can choose  mod_cluster.


Documentation

 mod_proxy_ajp

quick explanation / observation

This module does not monitor services.</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=monitor_dns_changes_for_hostname&amp;rev=1597026935&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>monitor_dns_changes_for_hostname</title>
        <link>https://wiki.k2patel.in/doku.php?id=monitor_dns_changes_for_hostname&amp;rev=1597026935&amp;do=diff</link>
        <description>Monitor DNS Changes for Hostname


#!/bin/env perl
use strict;
## Check to see if IP Address or CNAME has changed for a host
## If it has chagned, send message using mail function

require Net::DNS;
require MIME::Lite;

my %hostname = (
	&#039;cdn.djtunez.net&#039; =&gt; [ &quot;ns1.lithiumfox.com&quot;, &quot;ns1.lithiumfox.com&quot;],
	);


for (keys %hostname){
	my $record; 
	my $res = Net::DNS::Resolver-&gt;new(
		nameservers	=&gt; $hostname{$_},
		recurse		=&gt; 0,
		debug		=&gt; 0,
	);

	my $request = $res-&gt;query(&quot;$_&quot;);

	if ($reques…</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=monitor_real_time_website_with_test_case&amp;rev=1597026935&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>monitor_real_time_website_with_test_case</title>
        <link>https://wiki.k2patel.in/doku.php?id=monitor_real_time_website_with_test_case&amp;rev=1597026935&amp;do=diff</link>
        <description>Monitor Website / WebApp

There is many tool available in market to monitor websites.

Many of them fail on hard to use or does not serve purpose.

This script is simply used to generate test case. 

Easy to configure / install for system admin.

Requirement</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=monitor_snmpd_for_cacti&amp;rev=1597026935&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>monitor_snmpd_for_cacti</title>
        <link>https://wiki.k2patel.in/doku.php?id=monitor_snmpd_for_cacti&amp;rev=1597026935&amp;do=diff</link>
        <description>Monitor SNMPD for all cacti host

This script will test SNMPD against all host in cacti database.


#!/bin/bash
# Powered by k2patel :)
# please send suggestion to k2patel@hotmail.com

#################################################
###					      ###
### MySQL Information used on Cacti           ###
#################################################
sqlu=&lt;mysql_user&gt;
sqlp=&lt;mysql_pass&gt;
sqld=&lt;mysql_database&gt;

#################################################
###					      ###
### List of person /…</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=monitor_your_ip_and_send_email_if_change&amp;rev=1597026935&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>monitor_your_ip_and_send_email_if_change</title>
        <link>https://wiki.k2patel.in/doku.php?id=monitor_your_ip_and_send_email_if_change&amp;rev=1597026935&amp;do=diff</link>
        <description>Monitor Local IP

Many time it is require to track change in IP.

I have wrote this piece to help me track my home IP.


#!/usr/bin/env python
# -*- coding: utf-8 -*-
&quot;&quot;&quot;
Spyder Editor

This temporary script file is located here:
/home/k2patel/bin/sendip
&quot;&quot;&quot;

import urllib2
import smtplib


# CUSTOMIZATION START

# Define your current IP here.
currentIP = &quot;71.167.42.203&quot;
# Define you email id to notify
toaddrs = &quot;k2patel@xyz.com&quot;
# Define Source Email ID
fromaddr = &quot;k2patel@pqr.com&quot;


# CUSTOMIZ…</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=monitoring_gateway_ping&amp;rev=1597026935&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>monitoring_gateway_ping</title>
        <link>https://wiki.k2patel.in/doku.php?id=monitoring_gateway_ping&amp;rev=1597026935&amp;do=diff</link>
        <description>Loosing Gateway on freebsd 5.5

I have not seen any solution so far, so following custom scripts will help you.

add following line to rc.local.


/usr/local/bin/netmonitor


create script netmonitor


#!/bin/sh

. /etc/rc.conf

netmonitor(){
   while [ 1 ]; do
      ping -c 5 -t 1 $defaultrouter

      if [ $? -ne 0 ]; then
         sh /etc/netstart
         sh /etc/rc.virtual
      fi
      sleep 5
   done
}

netmonitor &amp;</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=mplayer_x264_from_latest_snapshot&amp;rev=1597026935&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>mplayer_x264_from_latest_snapshot</title>
        <link>https://wiki.k2patel.in/doku.php?id=mplayer_x264_from_latest_snapshot&amp;rev=1597026935&amp;do=diff</link>
        <description>MPlayer + x264 + FFMpeg from snapshot

This is too much time consuming compilation with many faliure.
following is the possible best way to succeed at once.

Prequisite :


gcc44 or gcc43


x264


git clone git://git.videolan.org/x264.git



wget -O x264.bsd.patch http://lists.freebsd.org/pipermail/freebsd-multimedia/attachments/20090302/602f1b22/x264.bsd.obj
patch -p0 &lt; x264.bsd.patch
cd x264
ln -s /usr/local/bin/bash /bin/bash</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=mpstat&amp;rev=1597026935&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>mpstat</title>
        <link>https://wiki.k2patel.in/doku.php?id=mpstat&amp;rev=1597026935&amp;do=diff</link>
        <description>mpstat

This is just snapshot of man page to refer Field description


              CPU
                     Processor  number.  The  keyword  all indicates that statistics are calculated as averages among all
                     processors.

              %usr
                     Show the percentage of CPU utilization that occurred while executing at  the  user  level  (applica‐
                     tion).

              %nice
                     Show  the  percentage  of  CPU utilization t…</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=mysql_backup_daily&amp;rev=1597026935&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>mysql_backup_daily</title>
        <link>https://wiki.k2patel.in/doku.php?id=mysql_backup_daily&amp;rev=1597026935&amp;do=diff</link>
        <description>Mysql Backup Daily

** This is need to be modified


#!/bin/sh

TIME_1=`date +%s`

cd /backup/mysql

DBS=&quot;$(mysql --user=youruser --password=yourpass -Bse &#039;show databases&#039;)&quot;

for db in ${DBS[@]}
do
echo ${db}-$(date +%m-%d-%y).sql.bz2 is being saved in /backup/mysql
# remember to add the options you need with your backups here.
mysqldump --user=youruser --password=yourpass $db --single-transaction -R | bzip2 -c &gt; ${db}-$(date +%m-%d-%y).sql.bz2
done

TIME_2=`date +%s`

elapsed_time=$(( ( $TIME_2…</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=mysql_backup_locally&amp;rev=1597026935&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>mysql_backup_locally</title>
        <link>https://wiki.k2patel.in/doku.php?id=mysql_backup_locally&amp;rev=1597026935&amp;do=diff</link>
        <description>Mysql Backup Locally


#!/bin/sh

DIR=&lt;backup_directory&gt;
PW=&lt;root_password&gt;
USER=&lt;owner_of_file&gt;
DATE=$(date +%Y%m%d)

mysqldump=$(which mysqldump)
mysql=$(which mysql)
tar=$(which tar)
chown=$(which chown)

for i in $($mysql -p$PW -e &quot;SHOW DATABASES&quot;|grep -v Database); do
        $mysqldump -p$PW --allow-keywords $i &gt; $DIR/$i.sql
done

cd $DIR
$tar -cvf $DATE.tar *.sql
rm $DIR/*.sql
$chown -R $USER $DIR

exit 0</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=mysql_cluster_5_min&amp;rev=1597026936&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:36+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>mysql_cluster_5_min</title>
        <link>https://wiki.k2patel.in/doku.php?id=mysql_cluster_5_min&amp;rev=1597026936&amp;do=diff</link>
        <description>MySQL cluster 5 Min.

From :  Kai Voigt

You have heard about MySQL Cluster, but you were always afraid to get into it

because „Cluster“ seems to be a magic and complicated topic? Then this article is for you.

In a couple of minutes, you can run your own Cluster.</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=mysql_connection_test_script&amp;rev=1597026936&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:36+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>mysql_connection_test_script</title>
        <link>https://wiki.k2patel.in/doku.php?id=mysql_connection_test_script&amp;rev=1597026936&amp;do=diff</link>
        <description>Mysql Connection Test script


&lt;?php
$db_name = Database Name;
$db_user = Database User;
$db_pass = Database password;

$link = mysql_connect(&#039;localhost&#039;, $db_user, $db_pass);
if (!$link) {
    die(&#039;Could not connect: &#039; . mysql_error());
}else
{
mysql_select_db($db_name, $link) or die(&#039;Could not select database.&#039;);
$result = mysql_query(&quot;SHOW tables&quot;, $link);
while($row = mysql_fetch_row($result))
  {
      print(&quot;$row[0]&lt;br&gt;&quot;);
  }
}
mysql_close($link);
?&gt;</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=mysql_copy_between_servers&amp;rev=1597026936&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:36+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>mysql_copy_between_servers</title>
        <link>https://wiki.k2patel.in/doku.php?id=mysql_copy_between_servers&amp;rev=1597026936&amp;do=diff</link>
        <description>Copy all database between servers

NOTE : it not fully written there is many changes needed.


#!/bin/bash

#----------change following

#destination username
d_User_nm=&lt;username&gt;

#destination password
d_Passwo=&lt;password&gt;

#source username
s_User_nm=&lt;username&gt;

#source password
s_Passwo=&lt;password&gt;


Src_host=&lt;source_server&gt;
Dst_host=&lt;Destination_server&gt;
db_skp=mysql

#------------no further

DBS=&quot;$(mysql -h $Src_host --user=$s_User_nm --password=$s_Passwo -Bse &#039;show databases&#039;)&quot;

for db in ${DB…</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=mysql_monitoring&amp;rev=1597026936&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:36+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>mysql_monitoring</title>
        <link>https://wiki.k2patel.in/doku.php?id=mysql_monitoring&amp;rev=1597026936&amp;do=diff</link>
        <description>Replication Nagios monitoring

simply use this to monitor mysql replication from nagios



#!/usr/bin/perl -w
# Originally downloaded from nagios exchange http://exchange.nagios.org/components/com_mtree/attachment.php?link_id=1937&amp;cf_id=24
# 
# Fixed check for slave IO and Slave SQL
# k2patel &lt;k2patel\@hotmail.com&gt;.


use strict;
use Getopt::Long;
use DBI;

# Set DEFAULT inputs
my $options = { 
	&#039;master&#039; =&gt; &#039;localhost&#039;, &#039;slave&#039; =&gt; &#039;localhost&#039;,
	&#039;dbuser&#039; =&gt; &#039;replication&#039;, &#039;dbpass&#039; =&gt; &#039;testing&#039;,
	…</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=mysql_replication_status&amp;rev=1597026936&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:36+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>mysql_replication_status</title>
        <link>https://wiki.k2patel.in/doku.php?id=mysql_replication_status&amp;rev=1597026936&amp;do=diff</link>
        <description>Replication Status

NOTE : This script is not yet ready.


#!/usr/bin/perl -w
#
# mysql replication monitoring
# generic attempt

use strict;
#use Data::Dumper;
my $DEBUG       = 0;

$ENV{BBPROG}    = &quot;bb-mysql-replication&quot;;
my $TESTNAME    = &quot;mysqlrep&quot;;

my $BBHOME      = $ENV{BBHOME};
my $BB          = $ENV{BB};	# full path to the bin/bb util
my $BBDISP      = $ENV{BBDISP};	# IP of the BBDISPLAY server
my $BBVAR       = $ENV{BBVAR};
my $MACHINE     = $ENV{MACHINE}; # hostname, fqdn
my $COLOR  …</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=nagios&amp;rev=1597026928&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:28+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>nagios</title>
        <link>https://wiki.k2patel.in/doku.php?id=nagios&amp;rev=1597026928&amp;do=diff</link>
        <description>Nagios

Monitoring Servers

Nagios Plugins

Links to Nagios Plugins

Memcached

To monitor memcached using nagios.

 check_memcached

Error / Resolution

CASE 1 :

Error :
DISK CRITICAL check_disk : / / / is not accessible: Permission denied

Solution :
In my case this is because it is mounted as postgres user.</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=nconf_deployer&amp;rev=1597026928&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:28+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>nconf_deployer</title>
        <link>https://wiki.k2patel.in/doku.php?id=nconf_deployer&amp;rev=1597026928&amp;do=diff</link>
        <description>NConf Deployer

nconf nice nagios configurator works awesome but i had issue with the addon script.

So i have modified to work in my environment it&#039;s not special but it working since i deployed without any issue.

I also added to keep Backup of previous working nagios configuration.</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=network_security_assesment&amp;rev=1597026928&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:28+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>network_security_assesment</title>
        <link>https://wiki.k2patel.in/doku.php?id=network_security_assesment&amp;rev=1597026928&amp;do=diff</link>
        <description>Network Security Assesment

 Site Tools 

NOTE : Some link might not work, but search based on the name and site.

technical results to management categories

OS configuration

Vulnerabilities due to improperly configured operating system software

Software maintenance</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=nfs&amp;rev=1597026928&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:28+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>nfs</title>
        <link>https://wiki.k2patel.in/doku.php?id=nfs&amp;rev=1597026928&amp;do=diff</link>
        <description>NFS Server / Client

This is the notes from my setup.

Server

Export

I am setting up server for NFSv4 without Security IP based access list.

NOTE : Match your uid with anonuid


/home   192.168.1.0/24(rw,sync,insecure,root_squash,no_subtree_check,fsid=0)
/home/download      192.168.1.4(rw,nohide,sync,insecure,no_root_squash,no_subtree_check,anonuid=1000,anongid=100)
/home/movies    192.168.1.4(rw,nohide,sync,insecure,no_root_squash,no_subtree_check,anonuid=1000,anongid=100)
/home/net/Pictures…</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=openssl&amp;rev=1692279516&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2023-08-17T13:38:36+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>openssl</title>
        <link>https://wiki.k2patel.in/doku.php?id=openssl&amp;rev=1692279516&amp;do=diff</link>
        <description>OpenSSL

Most used command

Extract ca, crt and key from .pfx


# Extract CA
openssl pkcs12 -in ${cert}.pfx -nodes -nokeys -cacerts -out ${cert}-ca.crt
# Extract Key
openssl pkcs12 -in ${cert}.pfx -nocerts -out ${cert}.key
# Extract Cert
openssl pkcs12 -in ${cert}.pfx -clcerts -nokeys -out ${cert}.crt
# Remove Password
openssl rsa -in ${cert}.key -out ${cert}.key
# Generate Bundle
cat  ${cert}.crt ${cert}-ca.crt &gt; ${cert}-bundle.crt</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=opensuse&amp;rev=1597026928&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:28+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>opensuse</title>
        <link>https://wiki.k2patel.in/doku.php?id=opensuse&amp;rev=1597026928&amp;do=diff</link>
        <description>OpenSuse

Setting up IPv6 Tunnel

	*  what ever you read where ever you read you are missing this line “modprobe sit” so run it.
	*  once you get your IPv6 from tunnel broker you need following.


NOTE : change &quot;Internal_ip&quot; &quot;Tunnel_broker_ip&quot; &quot;IPv6_ip&quot; &quot;IPv6_gateway_ip&quot; with information you get from your broker</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=oracle_coherence&amp;rev=1597026928&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:28+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>oracle_coherence</title>
        <link>https://wiki.k2patel.in/doku.php?id=oracle_coherence&amp;rev=1597026928&amp;do=diff</link>
        <description>Oracle Coherence

Advance caching server.

Config Location

Cluster configuration located at:


tangosol-coherence-override.xml         # Cluster Port configuration
tangosol-coherence-override-dev.xml     # General configuration about protocol</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=packages&amp;rev=1597026928&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:28+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>packages</title>
        <link>https://wiki.k2patel.in/doku.php?id=packages&amp;rev=1597026928&amp;do=diff</link>
        <description>Packages OR Emerge

This page i am trying to cover what ever i have found during my setup and issue.

To add build time options


EXTRA_ECONF=&quot;--with-apxs=/home/apache/bin/apxs&quot; emerge -O mod_security


Right now, users can replace the defaults:
 prefix, host, mandir, infodir, datadir, sysconfdir, localstatedir and
 datadir, infodir, localstatedir, mandir, sysconfir</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=pdu&amp;rev=1597026928&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:28+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>pdu</title>
        <link>https://wiki.k2patel.in/doku.php?id=pdu&amp;rev=1597026928&amp;do=diff</link>
        <description>PDU (Protocol Data Unit)

OSI Layers and Name

PDU names for each OSI layers are as follow.

Layer 1 - Physical -&gt; Bits

Layer 2 - Data Link -&gt; Frame

Layer 3 - Network-&gt; Packet

Layer 4 - Transport -&gt; Segment or datagram

Layer 5 - Session -&gt; Data

Layer 6 - Presentation</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=perl_db_script&amp;rev=1597026928&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:28+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>perl_db_script</title>
        <link>https://wiki.k2patel.in/doku.php?id=perl_db_script&amp;rev=1597026928&amp;do=diff</link>
        <description>#!/usr/bin/perl -w
#Jason Thomas
use strict;
use lib &quot;/home/jthomas/lib/perl5/site_perl/5.8.8/&quot;;
use Mysql;
use Statistics::Descriptive;


my $host = &quot;hostname&quot;;
my $database = &quot;keytest&quot;;
my $user = &quot;admin&quot;;
my $pw = &quot;admin&quot;;
my $beginDate = &quot;2009-07-01&quot;;
my $endDate = &quot;2009-07-31&quot;;
my @slotId = (&quot;731147&quot;,&quot;731148&quot;,&quot;799084&quot;,&quot;799086&quot;,&quot;799088&quot;,&quot;799090&quot;,&quot;799091&quot;,&quot;698549&quot;);

my $connect = Mysql -&gt; connect ($host, $database, $user, $pw);

	findTextId($beginDate, $endDate);


sub findTextId{
	my ($begi…</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=perl_execute_regex_and_insert_to_mysql_database&amp;rev=1597026928&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:28+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>perl_execute_regex_and_insert_to_mysql_database</title>
        <link>https://wiki.k2patel.in/doku.php?id=perl_execute_regex_and_insert_to_mysql_database&amp;rev=1597026928&amp;do=diff</link>
        <description>Perl script which excutes regex and insert to mysql database


#!/bin/env perl

# name: mstore
# date: 20110515
# author: jason thomas &lt;jason@lithiumfox.com&gt;
# purpose: take results of measure(site analytics utility), parse and insert into mysql backend

use strict;
use DBI;


my $ns = &quot;ns1.lithiumfox.com&quot;;
my $host = &quot;www.lithiumfox.com&quot;;
my $time = time;

export_results($time,$host,parse_results(measure($ns, $host)));

sub measure {

    my ($ns, $host) = @_;
    my $measure_cmd = &quot;/home/jason…</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=pgsql_tuneup_guide&amp;rev=1597026928&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:28+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>pgsql_tuneup_guide</title>
        <link>https://wiki.k2patel.in/doku.php?id=pgsql_tuneup_guide&amp;rev=1597026928&amp;do=diff</link>
        <description>Tunning PgSQL

This is not so hard because there is tool available to do so thnx to “Greg Smith”.

Name of tool is “pgtune“


Since Diff. machine has Diff. H.W. Profile you need to have Diff. configuration for diff. machine.

Which make available most H.W. Resources during run time.</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=php&amp;rev=1597026928&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:28+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>php</title>
        <link>https://wiki.k2patel.in/doku.php?id=php&amp;rev=1597026928&amp;do=diff</link>
        <description>PHP

pear

Change pear setting to install alpha / beta / stable / devel --- packages.


pear config-set preferred_state alpha


suPHP

&lt;note warning&gt;configure: error: cannot find install-sh, install.sh, or shtool in config “.”/config&lt;/note&gt;

Try running following before configure:</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=phpshell_scanner&amp;rev=1597026928&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:28+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>phpshell_scanner</title>
        <link>https://wiki.k2patel.in/doku.php?id=phpshell_scanner&amp;rev=1597026928&amp;do=diff</link>
        <description>PHP Shell Scanner



#!/usr/bin/perl -w
# findshell v1.0 == code taken/modified from traps.darkmindz.com
#usage: ./findshell.pl &lt;sensitivity 1-50&gt; &lt;directory to scan&gt;
use strict;
use File::Find;
my $sens = shift  || 10;
my $folder = shift || &#039;./&#039;;
find(\&amp;backdoor, &quot;$folder&quot;);
sub backdoor {
    if ((/\.(php|txt)/)){
       open (my $IN,&quot;&lt;$_&quot;) || die &quot;can not open datei $File::Find::name: $!&quot;;
       my @file =  &lt;$IN&gt;;
       #maybe evil stuffs
       my $score = grep (/function_exists\(|phpinfo\…</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=pianobar&amp;rev=1597026929&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:29+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>pianobar</title>
        <link>https://wiki.k2patel.in/doku.php?id=pianobar&amp;rev=1597026929&amp;do=diff</link>
        <description>PianoBAR

Command line client for pandora.

 Project Home 

 Get Source from 

Requirement Specification :


libmad-devel
libfaad2-devel
gmake
libao
git


You can find devel rpm @ rpmfusion

To install simply run


git clone git://github.com/PromyLOPh/pianobar.git
cd pianobar
gmake clean &amp;&amp; gmake install</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=ping_test_script_for_cron&amp;rev=1597026929&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:29+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>ping_test_script_for_cron</title>
        <link>https://wiki.k2patel.in/doku.php?id=ping_test_script_for_cron&amp;rev=1597026929&amp;do=diff</link>
        <description>Simple Ping test script

This is lame script for just to serve quick purpose.


#!/bin/bash
/sbin/ping -c 3 yahoo.com
if [ $? -eq 0 ]
then
echo &quot;Pinging&quot;
else
echo &quot;Not Pinging - Restarting Network&quot;
/etc/init.d/network restart
fi</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=ping&amp;rev=1597026929&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:29+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>ping</title>
        <link>https://wiki.k2patel.in/doku.php?id=ping&amp;rev=1597026929&amp;do=diff</link>
        <description>Ping

In this article i am trying to cover information about ping sweep.

Ping sweep is just a way to find out which hosts are alive in a network or large number of IP addresses.

List of Commands


nmap -sP 192.168.1.1-254
fping -g 192.168.1.1 192.168.1.10
nmap -sP -PT22 192.168.1.1-30                 ## Can be used when ICMP is blocked.</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=plex_media_server&amp;rev=1597026929&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:29+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>plex_media_server</title>
        <link>https://wiki.k2patel.in/doku.php?id=plex_media_server&amp;rev=1597026929&amp;do=diff</link>
        <description>Plex

After upgrading plex to v 1.0 i found that existing reverse proxy on nginx broke.&lt;br&gt;
started playing around and fixed it using following header need to be set.

In your nginx.


        proxy_set_header   X-Real-IP        $remote_addr;
        proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;
        proxy_max_temp_file_size 0;
        proxy_set_header X-Plex-Client-Identifier $http_x_plex_client_identifier;
        proxy_set_header X-Plex-Device $http_x_plex_device;
       …</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=port_management_and_help&amp;rev=1597026929&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:29+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>port_management_and_help</title>
        <link>https://wiki.k2patel.in/doku.php?id=port_management_and_help&amp;rev=1597026929&amp;do=diff</link>
        <description>FreeBSD Port Management

Port package search


pkg_info -a -I | grep -q ^awstats


Port Update


portsnap fetch extract


Port Update Manually


cvsup -g -L 2 -h cvsup3.us.freebsd.org /usr/share/examples/cvsup/ports-supfile


Port Package Install


pkg_add -r &lt;package name&gt;</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=postfix&amp;rev=1597026929&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:29+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>postfix</title>
        <link>https://wiki.k2patel.in/doku.php?id=postfix&amp;rev=1597026929&amp;do=diff</link>
        <description>Postfix

Command Ref.

display list of queue


mailq


OR


postqueue -p


process postfix queue


postqueue -f


OR


postfix flush


View Message


postcat -vq &lt;Message ID&gt;


Empty Queue ( Delete )


postsuper -d ALL</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=postgresql_replication_monitor&amp;rev=1597026929&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:29+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>postgresql_replication_monitor</title>
        <link>https://wiki.k2patel.in/doku.php?id=postgresql_replication_monitor&amp;rev=1597026929&amp;do=diff</link>
        <description>postgresql replication monitor


#!/bin/bash
# ---------------
#&lt; By k2patel &gt;
# ---------------- 
#        \   ^__^
#         \  (oo)\_______
#            (__)\       )\/\
#                ||----w |
#                ||     ||
#
#############################
# Requirement Specification
#############################
# - It require `bc`
# - Only monitor streaming replication status


############################
## Define Custom Variables
############################

## Define Nagios utils
LIBEXE…</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=prevent_freebsd_to_install_new_perl_during_make&amp;rev=1597026929&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:29+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>prevent_freebsd_to_install_new_perl_during_make</title>
        <link>https://wiki.k2patel.in/doku.php?id=prevent_freebsd_to_install_new_perl_during_make&amp;rev=1597026929&amp;do=diff</link>
        <description>Prevent Make to install new version of perl

You can specify most of the variables or static package need to be used by make at


/etc/make.conf


to define perl version you need to use following variable


PERL_VER=5.8.8
PERL_VERSION=5.8.8


In above case existing perl 5.8.8 is going to be used rather than new version.</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=print_environment_using_perl_cgi&amp;rev=1597026929&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:29+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>print_environment_using_perl_cgi</title>
        <link>https://wiki.k2patel.in/doku.php?id=print_environment_using_perl_cgi&amp;rev=1597026929&amp;do=diff</link>
        <description>Print Environment variable

# this is really helpful while working with proxy etc..


#!/usr/bin/perl -wT

use strict;
use Net::Domain qw(hostname hostfqdn hostdomain);
use CGI qw(:standard);
use CGI::Carp qw(warningsToBrowser fatalsToBrowser);

print header;
print start_html(&quot;Environment&quot;);

foreach my $key (sort(keys(%ENV))) {
    print &quot;$key = $ENV{$key}&lt;br&gt;\n&quot;;
}

my $fqdn = hostfqdn();

print &quot;Hostname = $fqdn \n&quot;;

print end_html;</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=process_check_script_for_cron&amp;rev=1597026929&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:29+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>process_check_script_for_cron</title>
        <link>https://wiki.k2patel.in/doku.php?id=process_check_script_for_cron&amp;rev=1597026929&amp;do=diff</link>
        <description>Process Check script for cron

This script will check process if it is not running 
and will start the process if not running.

First


#!/bin/bash
# check process
ps -ef | grep -v grep | grep 2200:localhost:22
# if not found - equals to 1, start it
if [ $? -eq 1 ]
then
ssh -f -N -R 2200:localhost:22 k2patel@71.245.248.138
echo &quot;Process not running - Started&quot;
else
echo “Process Running - do nothing”
fi</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=puppet_upgrade_4.x_to_5.x&amp;rev=1597026929&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:29+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>puppet_upgrade_4.x_to_5.x</title>
        <link>https://wiki.k2patel.in/doku.php?id=puppet_upgrade_4.x_to_5.x&amp;rev=1597026929&amp;do=diff</link>
        <description>Puppet Upgrade 4.x to 5.x

This is simple steps to upgrade puppet.

Stop service


systemctl stop puppetserver
systemctl stop puppetdb


Update Puppet server

Download New repo puppet-release


yum install puppetserver


Postgresql upgrade

Install New postgres pgdg-redhat9.6


systemctl stop postgresql-9.5
yum install postgresql96-server
yum install postgresql96-contrib</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=puppet&amp;rev=1597026929&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:29+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>puppet</title>
        <link>https://wiki.k2patel.in/doku.php?id=puppet&amp;rev=1597026929&amp;do=diff</link>
        <description>Puppet (data center automation and configuration management framework)

Puppet Upgrade 4.x to 5.x

Puppet YUM Repository


[Puppet_EL_Repo]
name=Puppet Enterprise Linux
baseurl=http://yum.puppetlabs.com/el/6/products/x86_64/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-Key-Puppet

[Puppet_EL_dependancies]
name=Puppet Enterprise Dependencies
baseurl=http://yum.puppetlabs.com/el/6/dependencies/x86_64/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-Key-Puppet</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=python_packages_to_rpm&amp;rev=1597026929&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:29+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>python_packages_to_rpm</title>
        <link>https://wiki.k2patel.in/doku.php?id=python_packages_to_rpm&amp;rev=1597026929&amp;do=diff</link>
        <description>Python Module RPM

Generating python module rpm is easy.

Please see the Python 3 and Python 2

Steps

	*  Download source
	*  Extract
	*  Run command as provided in the manual.


python setup.py bdist_rpm


This will create RPM in dist folder.</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=python&amp;rev=1597026929&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:29+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>python</title>
        <link>https://wiki.k2patel.in/doku.php?id=python&amp;rev=1597026929&amp;do=diff</link>
        <description>Python

User level installation of package

PYTHONUSERBASE

Defines the user base directory, which is used to compute the path of the user site-packages directory and Distutils installation paths.


python setup.py install --user


List all Installed Modules</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=qmail_and_procmail_how_to&amp;rev=1597026929&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:29+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>qmail_and_procmail_how_to</title>
        <link>https://wiki.k2patel.in/doku.php?id=qmail_and_procmail_how_to&amp;rev=1597026929&amp;do=diff</link>
        <description>Qmail and Procmail How To

qmail wrapper to check each mail


#!/bin/sh

# original modified, taken from http://openwall.info/wiki/internal/email/qmail-procmail

/var/qmail/bin/preline /usr/local/bin/procmail /usr/local/etc/procmail.rc &amp;&amp; exit 0
 
# check if procmail returned EX_TEMPFAIL (75)
[ $? -eq 75 ] &amp;&amp; exit 111
 
# do we want to discard the message?
[ $? -eq 99 ] &amp;&amp; exit 99
 
# otherwise return a permanent error
exit 100</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=qmail&amp;rev=1597026929&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:29+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>qmail</title>
        <link>https://wiki.k2patel.in/doku.php?id=qmail&amp;rev=1597026929&amp;do=diff</link>
        <description>Qmail

	*  qmail debian install

Setting up RBL for qmail

Add this code to qmail service startup file.


if [ -f /var/qmail/control/spamhaus ]; then
   rblsmtpd=&quot;/usr/local/bin/rblsmtpd -r sbl-xbl.spamhaus.org&quot;
else
   rblsmtpd=&quot;/usr/local/bin/rblsmtpd -r cbl.abuseat.org -r dul.dnsbl.sorbs.net -r http.dnsbl.sorbs.net -r misc.dnsbl.sorbs.net -r smtp.dnsbl.s
orbs.net -r socks.dnsbl.sorbs.net \
      -r spam.dnsbl.sorbs.net -r web.dnsbl.sorbs.net -r zombie.dnsbl.sorbs.net&quot;
fi</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=quick_command_list&amp;rev=1652731509&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2022-05-16T20:05:09+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>quick_command_list</title>
        <link>https://wiki.k2patel.in/doku.php?id=quick_command_list&amp;rev=1652731509&amp;do=diff</link>
        <description>Quick Command Set Daily Life

grab configure script from php installatio


php -i | grep configure | tr -d \&#039;


find the disk usage for all the listed files/foldere


du -sckh * | sort -n


find uniq ip from file


cat /etc/sitemap |  awk &#039;{print $2}&#039; | xargs -n 1 ping -c 1 -t 1 | grep PING | awk &#039;{print $3}&#039; | sort | uniq</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=quick_tips_to_securing_windows_desktop&amp;rev=1597026930&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:30+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>quick_tips_to_securing_windows_desktop</title>
        <link>https://wiki.k2patel.in/doku.php?id=quick_tips_to_securing_windows_desktop&amp;rev=1597026930&amp;do=diff</link>
        <description>How to Secure Windows desktop (Free)

Must have

Microsoft have windows defender which help you protect in many way.

 Windows Defender 

Install this first.

Make sure you run auto update when your computer online generally.

Spyware Protection &amp; Prevention

This is necessary to prevent your computer to open harmful pages.</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=ramfs_based_table_space&amp;rev=1597026930&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:30+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>ramfs_based_table_space</title>
        <link>https://wiki.k2patel.in/doku.php?id=ramfs_based_table_space&amp;rev=1597026930&amp;do=diff</link>
        <description>Tablespace in Memory

Setting up a tablespace

From PostgreSQL documentation:

Tablespaces in PostgreSQL allow database administrators to define locations in the file system where the files 

representing database objects can be stored. Once created, a tablespace can be referred to by name when creating</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=re-build_repository_index&amp;rev=1597026930&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:30+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>re-build_repository_index</title>
        <link>https://wiki.k2patel.in/doku.php?id=re-build_repository_index&amp;rev=1597026930&amp;do=diff</link>
        <description>Rebuild repository index (YUM)

this script will regenerate repository index.


#!/bin/bash
#
# Regenerate index for all High level folders in Repository.
# You can specify Location for repository in array.
#
# Developed by k2patel (k2patel@hotmail.com)
# For rpm.k2patel.in
#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


# Add all location for repository.

Location=(/var/www/html/RHEL/6 /var/www/html/EPEL/5 /var/www/html/EPEL/6 /var/www/html/puppet/el6)

## Do not modify further…</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=receipe&amp;rev=1597026930&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:30+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>receipe</title>
        <link>https://wiki.k2patel.in/doku.php?id=receipe&amp;rev=1597026930&amp;do=diff</link>
        <description>*  Indian
	*  Italian</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=referance_subroutines&amp;rev=1597026930&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:30+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>referance_subroutines</title>
        <link>https://wiki.k2patel.in/doku.php?id=referance_subroutines&amp;rev=1597026930&amp;do=diff</link>
        <description>Introduction

This page discusses both subroutines and references. They&#039;re on the same page because references are often passed into and out of subroutines. 

References

In Perl, you can pass only one kind of argument to a subroutine: a scalar. To pass any other kind of argument, you need to convert it to a scalar. You do that by passing a</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=regular_expression&amp;rev=1597026930&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:30+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>regular_expression</title>
        <link>https://wiki.k2patel.in/doku.php?id=regular_expression&amp;rev=1597026930&amp;do=diff</link>
        <description>Regular Expression

Quick Referance

Perl

Bash

Apache</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=remote_password_change&amp;rev=1597026930&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:30+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>remote_password_change</title>
        <link>https://wiki.k2patel.in/doku.php?id=remote_password_change&amp;rev=1597026930&amp;do=diff</link>
        <description>Change User password remotely


#!/usr/bin/expect
# usage: runcmd &lt;command&gt; &lt;password&gt;
#
# NB: be sure to surround the command with double quotes
# if the command string is more than 1 word
#
set timeout 30
set fid [open /root/utilz/scripts/hosts r]
set contents [read -nonewline $fid]
close $fid

set cmd [lindex $argv 0]
set password [lindex $argv 1]
set newpass [lindex $argv 2]
foreach host [split $contents &quot;\n&quot;] {
        spawn ssh -l root $host
        expect {
                &quot;assword:&quot; {
  …</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=reset_keychain_password&amp;rev=1597026930&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:30+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reset_keychain_password</title>
        <link>https://wiki.k2patel.in/doku.php?id=reset_keychain_password&amp;rev=1597026930&amp;do=diff</link>
        <description>Reset Keychain password

While using third party password authentication, many time your keychain password doesn&#039;t match your updated password.&lt;BR&gt;
In order to update password without loosing key are using following command.


# Find your default chain location
security default-keychain
    &quot;/Users/&lt;username&gt;/Library/Keychains/login.keychain-db&quot;

# Run following command to change password, followed by old and new prompt.
security set-keychain-password $(security default-keychain)</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=resources&amp;rev=1597026930&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:30+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>resources</title>
        <link>https://wiki.k2patel.in/doku.php?id=resources&amp;rev=1597026930&amp;do=diff</link>
        <description>PostgreSQL

Common Commands


List of Databases :
psql -l
\? Help
\d ~= desc

\c &lt;database&gt; -- select database

\dt Show Tables
\dT list datatypes
\df list functions
\di list indexes
\dv list views


  \da [PATTERN]  list aggregate functions
  \db [PATTERN]  list tablespaces (add &quot;+&quot; for more detail)
  \dc [PATTERN]  list conversions
  \dC            list casts
  \dd [PATTERN]  show comment for object
  \dD [PATTERN]  list domains
  \df [PATTERN]  list functions (add &quot;+&quot; for more detail)
  \dg […</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=restart_process_and_send_mail_if_fail&amp;rev=1597026930&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:30+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>restart_process_and_send_mail_if_fail</title>
        <link>https://wiki.k2patel.in/doku.php?id=restart_process_and_send_mail_if_fail&amp;rev=1597026930&amp;do=diff</link>
        <description>Restart process

This script restart process and send email if it failes.


#!/usr/bin/env python
# -*- coding: utf-8 -*-
&quot;&quot;&quot;
Created on Fri Apr  6 11:13:21 2012

@author: kpatel
&quot;&quot;&quot;

import subprocess
import time
import smtplib

# Define you email id to notify
toaddrs = &quot;kpatel@xyz.com&quot;
# Define Source Email ID
fromaddr = &quot;cron@pqr.com&quot;


def message(msg):
    server = smtplib.SMTP(&#039;localhost&#039;)
    subject = &quot;Subject: [CRON] Error : failed to execute Process&quot;
    msg = subject + &#039;\n&#039; + msg
    …</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=rpm&amp;rev=1597026930&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:30+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>rpm</title>
        <link>https://wiki.k2patel.in/doku.php?id=rpm&amp;rev=1597026930&amp;do=diff</link>
        <description>RPM

* Python packages to rpm

Package management system few tips / trick to build / modify / work with packages. 

Many hints information taken from original site  RPM

RPM Common Command
 Syntax Description rpm -ivh {rpm-file}  Install the package  rpm -Uvh {rpm-file}  Upgrade package</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=rsycn_based_on_list.txt&amp;rev=1597026930&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:30+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>rsycn_based_on_list.txt</title>
        <link>https://wiki.k2patel.in/doku.php?id=rsycn_based_on_list.txt&amp;rev=1597026930&amp;do=diff</link>
        <description>Rsycn based on list.txt

#### create file with name “list.txt” and add folder per line


#!/bin/bash
for i in $(cat list.txt); do

rsync --verbose  --progress --stats --compress --recursive --times --perms --links xx.yy.zz.dd::home/$i data/$i

done</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=rsync&amp;rev=1597026930&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:30+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>rsync</title>
        <link>https://wiki.k2patel.in/doku.php?id=rsync&amp;rev=1597026930&amp;do=diff</link>
        <description>Rsync

Commonly used switches for rsync

with status and Common variable


rsync --verbose --progress --stats --compress --recursive --times --perms --links &lt;source&gt; &lt;destination&gt;  (location is defined as [hostname]::path)


SSH Wrapper

SSH Wrapper allows to transfer files using rsync over SSH.</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=rtorrent&amp;rev=1597026930&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:30+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>rtorrent</title>
        <link>https://wiki.k2patel.in/doku.php?id=rtorrent&amp;rev=1597026930&amp;do=diff</link>
        <description>Rtorrent - Best torrent client

Quick Reference

	*  Control-q : closes rTorrent, done twice makes the program shutdown without waiting to send stopping information to the trackers.
		*  Left arrow : returns to the previous screen.
		*  Right arrow : goes to the next screen.</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=ruby&amp;rev=1597026930&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:30+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>ruby</title>
        <link>https://wiki.k2patel.in/doku.php?id=ruby&amp;rev=1597026930&amp;do=diff</link>
        <description>Issue Related to Ruby

Errors / Resolution


error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed while accessing


Resolution :


export GIT_SSL_NO_VERIFY=true</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=sar_reporting&amp;rev=1597026931&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:31+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>sar_reporting</title>
        <link>https://wiki.k2patel.in/doku.php?id=sar_reporting&amp;rev=1597026931&amp;do=diff</link>
        <description>Sar Reporting

This will give you graphical representation of system load.

Also you can use it for capacity Planning.

OR simply monitoring. Easy system monitoring with SAR

Requirement Specification

Following perl module require to be installed.


Getopt::Std
Time::Local
Date::Calc
Email::Date::Format</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=screen&amp;rev=1597026931&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:31+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>screen</title>
        <link>https://wiki.k2patel.in/doku.php?id=screen&amp;rev=1597026931&amp;do=diff</link>
        <description>Using Screen

allow people to attach to my screen


multiuser on


allow the following people full control


addacl root,aledesma,mymanager,mycoworker1,mycoworker2
aclchg aledesma +rwx “#?”


allow everyone readonly access


aclchg *,!aledesma -rwx “#?”</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=script_to_parse_space_separated_file&amp;rev=1597026931&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:31+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>script_to_parse_space_separated_file</title>
        <link>https://wiki.k2patel.in/doku.php?id=script_to_parse_space_separated_file&amp;rev=1597026931&amp;do=diff</link>
        <description>Parsing file for actions

This script i have created to create qmail user using space separated file.

File format i have received is &lt;user&gt; &lt;account / forward&gt; &lt;forward&gt; &lt;forward&gt; &lt;forward&gt; &lt;forward&gt; &lt;forward&gt; &lt;forward&gt; 

but the forwarder was not fixed.</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=scripts&amp;rev=1597026931&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:31+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>scripts</title>
        <link>https://wiki.k2patel.in/doku.php?id=scripts&amp;rev=1597026931&amp;do=diff</link>
        <description>Script I wrote for my sake

	*  mysql replication status
	*  Mysql copy between servers
	*  Convert all file name to lover
	*  create zip file and store at one location based on folder name
	*  Send result to nagios nsca acceptor
	*  FTP file fetch using perl
	*  Mysql Backup Locally
	*  Furnished Bckup Mysql
	*  Generate good password
	*  Rsycn based on list.txt
	*  Process Check script for cron
	*  Custom Log rotate script
	*  SED Based File manipulation
	*  Mysql Connection Test script
	*  Ho…</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=security&amp;rev=1597026931&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:31+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>security</title>
        <link>https://wiki.k2patel.in/doku.php?id=security&amp;rev=1597026931&amp;do=diff</link>
        <description>Security

WebDAV Readonly mode

Make sure to disable following methods in webserver.


# Disabled TRACE|TRACK|PUT|OPTIONS|DELETE|HEAD
     &lt;Directory /var/www/html &gt;
        AuthType None
        Satisfy Any
        Allow from all
        RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK|PUT|OPTIONS|DELETE|HEAD)
        RewriteRule .*$ - [F,L]
     &lt;/Directory&gt;</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=sed_based_file_manipulation&amp;rev=1597026931&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:31+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>sed_based_file_manipulation</title>
        <link>https://wiki.k2patel.in/doku.php?id=sed_based_file_manipulation&amp;rev=1597026931&amp;do=diff</link>
        <description>Manipulate File based on list


#!/bin/bash

File_line = list
Edit_file = httpd.conf

for i in $File_line; do

sed &quot;s#DocumentRoot $i#DocumentRoot $i \\
php_admin_value open_basedir \&quot;$i:/tmp\&quot;#&quot; $Edit_file

#sed -i.bak &quot;s#DocumentRoot $i#DocumentRoot $i \\
#php_admin_value disable_functions \&quot;exec,system,passthru,readfile,shell_exec,escapeshellarg,escapeshellcmd,proc_close,proc_open,ini_alter,dl,popen,parse_ini_file,show_source\&quot;#&quot; httpd.conf

done</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=send_result_to_nagios_nsca_acceptor&amp;rev=1597026931&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:31+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>send_result_to_nagios_nsca_acceptor</title>
        <link>https://wiki.k2patel.in/doku.php?id=send_result_to_nagios_nsca_acceptor&amp;rev=1597026931&amp;do=diff</link>
        <description>Send result to nagios nsca acceptor

It is not done yet there is lot to improve next weekend .... :-P


#!/bin/bash

# Configuration file for send_nsca
# Please update location accordingly.
CFG=&quot;/etc/nagios/send_nsca.cfg&quot;

#First Service Check
PRG_cl=&quot;-w 5.0,4.0,3.0 -c 10.0,6.0,4.0&quot;
Result_cl=`/usr/lib/nagios/plugins/check_load $PRG_cl`
        if `echo ${Result_cl} | grep &quot;OK&quot; 1&gt;/dev/null 2&gt;&amp;1`
        then
        STA_cl=0
        elif `echo ${Result_cl} | grep &quot;WARNING&quot; 1&gt;/dev/null 2&gt;&amp;1`
    …</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=sendmail&amp;rev=1597026931&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:31+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>sendmail</title>
        <link>https://wiki.k2patel.in/doku.php?id=sendmail&amp;rev=1597026931&amp;do=diff</link>
        <description>Sendmail

How to create .cf file from .mc

It is always best practice to build .cf file from .mc


m4 sendmail.mc &gt; /etc/sendmail.cf


Rebuild aliases

when you modify /etc/mail/aliases.

Possibly you see following message. 

alias database /etc/mail/aliases.db out of date</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=smtp_auth_test&amp;rev=1597026931&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:31+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>smtp_auth_test</title>
        <link>https://wiki.k2patel.in/doku.php?id=smtp_auth_test&amp;rev=1597026931&amp;do=diff</link>
        <description>SMTP Auth test using TELNET

This is simple but it is very useful procedure to test email functionality.

you need following information to authenticate your self.

base64 encoded value for username and password.

You can generate it using following command.</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=snapshot_backup&amp;rev=1597026931&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:31+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>snapshot_backup</title>
        <link>https://wiki.k2patel.in/doku.php?id=snapshot_backup&amp;rev=1597026931&amp;do=diff</link>
        <description>Backup

This snapshot backup enable you to have retention.

this manage my infrastructure backup on ec2.

Requirement :

	*  perl
	*  Net::Amazon::EC2
	*  DBI:SQLite
	*  bash

Files :

	*  config             # store your amazon key here
	*  db.pl              # manage local DB for your snapshot / dates / volume</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=solaris&amp;rev=1597026931&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:31+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>solaris</title>
        <link>https://wiki.k2patel.in/doku.php?id=solaris&amp;rev=1597026931&amp;do=diff</link>
        <description>Solaris

Issue connecting ssh

If you come across issue where error say &#039;no common kex alg&#039; while connecting from solaris to any machines like freebsd, freenas, Linux etc.

Try to add following line to your sshd_config.


KexAlgorithms curve25519-sha256@libssh.org,diffie-hellman-group1-sha1,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1,diffie-hellman-group-exchange-sha256,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=spices&amp;rev=1597026931&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:31+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>spices</title>
        <link>https://wiki.k2patel.in/doku.php?id=spices&amp;rev=1597026931&amp;do=diff</link>
        <description>A
Aniseed 	Saunf
Apple 	        Seb
Almonds 	Badam
Aubergine 	Baingan
Asafoetida 	Hing
Artichoke 	Hattichak
Apricot 	Khubani
Ashgourd 	Petha
Alum 	        Phitkari


B
Black Cardamoms 	Kali Elaichi, badi Elaichi
Black peppercorns 	Kalamirchi
Black salt 	        Kalanamak/Sanchal
Black gram 	        Kala chana
Black eyed beans 	Chola, alsande
Brinjal 	        Baingan
Bengal gram, whole 	Chana
Bengal gram, split 	Chana dal
Bengal gram roasted,(puffed,split)    Dalia
Buttermilk 	        Chhas/lassi…</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=squid&amp;rev=1597026931&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:31+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>squid</title>
        <link>https://wiki.k2patel.in/doku.php?id=squid&amp;rev=1597026931&amp;do=diff</link>
        <description>Squid

Password Based Authentication

After Install and default setting, you might want to enable password based proxy change following lines.

Following line will enable .htaccess based password auth.


auth_param basic program /usr/local/libexec/squid/ncsa_auth /usr/local/etc/squid/passwd</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=ssh_key_management&amp;rev=1597026931&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:31+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>ssh_key_management</title>
        <link>https://wiki.k2patel.in/doku.php?id=ssh_key_management&amp;rev=1597026931&amp;do=diff</link>
        <description>SSH Key Management

Trying to automate key Management between Machines.

It is controlled from Database.
&lt;note warning&gt; Strictly ALPHA should not work or might kill your file &lt;/note&gt;



#!/usr/bin/env python
# -*- coding: utf-8 -*-
&quot;&quot;&quot;
Created on Fri Apr 13 10:08:10 2012

This script used to manage and manipulate .ssh/authorized_keys
User home directory defined based on /etc/passwd and /etc/shadow

@author: k2patel
&quot;&quot;&quot;

import pwd
import fileinput
import subprocess
## Customization Start

pg_use…</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=ssh&amp;rev=1623182865&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-06-08T20:07:45+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>ssh</title>
        <link>https://wiki.k2patel.in/doku.php?id=ssh&amp;rev=1623182865&amp;do=diff</link>
        <description>SSH

Converting SSH2 Keys

From ssh2 to openssh


ssh-keygen -i -f id_dsa.pub &gt; id_dsa_open.pub


From OpenSSH to ssh2


ssh-keygen -e -f id_dsa.pub &gt; id_dsa_ssh2.pub


SCP Speed UP

To increase speed on transfer you can force cipher to arcfour.

You can use same mechanism with rsync when you use ssh encapsulation.</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=ssl&amp;rev=1597026931&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:31+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>ssl</title>
        <link>https://wiki.k2patel.in/doku.php?id=ssl&amp;rev=1597026931&amp;do=diff</link>
        <description>SSL / Openssl great way to secure it

SSL Issue and Resolution

Generate 2048 Bit CSR for godaddy.


openssl req -nodes -newkey rsa:4096 -sha512 -keyout www.xyz.com.key -out www.xyz.com.csr


Above command will not ask you for password. Which is not advisable on apache startup as you need to be present to supply password.</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=start&amp;rev=1694810028&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2023-09-15T20:33:48+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>start</title>
        <link>https://wiki.k2patel.in/doku.php?id=start&amp;rev=1694810028&amp;do=diff</link>
        <description>Start: This is Just Beginning

QUICK

	*  Quick Command List
	*  Why Drive space is not as marked
	*  Daily Admin Issues
	*  SMTP Auth Test
	*  guake
	*  Daily Regular Expression
	*  Where
	*  Bad_Bot List
	*  Bash
	*  Chrome
	*  python
	*  Ruby
	*  Gem
	*  ZFS
	*  OpenSSL
	*  tlog

Command Line Tools

	*  Finch
	*  BitchX
	*  w3m
	*  dig
	*  bc (calculator)
	*  rtorrent
	*  vim
	*  irssi
	*  vmware
	*  rsync
	*  top
	*  vmstat
	*  mpstat
	*  tmux
	*  pianobar
	*  mutt
	*  ls
	*  at
	*  ping
	* …</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=streaming_replication&amp;rev=1597026932&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>streaming_replication</title>
        <link>https://wiki.k2patel.in/doku.php?id=streaming_replication&amp;rev=1597026932&amp;do=diff</link>
        <description>Replication PGSQL

Building PGsQL


./configure --prefix=/usr/local/pg-9.0.3 --with-openssl --with-ossp-uuid --with-perl


NOTE : Use --with-pgport=5435 if you want to hardcode port.

postgresql.conf


listen_addresses = &#039;*&#039;
port = 5435 #### Only Define if you running on non default port.
escape_string_warning = off
shared_buffers = 8192MB 
temp_buffers = 16MB
wal_level = hot_standby                
archive_mode = on   
archive_command = &#039;rsync -a /usr/local/pg-9.0.3/Archive/%p &lt;IP&gt;:Archive/%f&#039;
…</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=subversion&amp;rev=1597026932&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>subversion</title>
        <link>https://wiki.k2patel.in/doku.php?id=subversion&amp;rev=1597026932&amp;do=diff</link>
        <description>cd /usr/ports/devel/subversion


Make backup of Makefile.


Edit Makefile and add following line. (after SVNFSTYPE?=     fsfs    OR    before any APXS appeared on file)

APXS=   /www/apache/bin/apxs

Now make with following options. 

make -DWITH_MOD_DAV_SVN -DWITH_NEON -DWITH_BDB</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=syfy&amp;rev=1597026926&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:26+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>syfy</title>
        <link>https://wiki.k2patel.in/doku.php?id=syfy&amp;rev=1597026926&amp;do=diff</link>
        <description>*  ESMF- Ubuntu 18.04</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=synergy&amp;rev=1608680227&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-12-22T23:37:07+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>synergy</title>
        <link>https://wiki.k2patel.in/doku.php?id=synergy&amp;rev=1608680227&amp;do=diff</link>
        <description>Synergy

Project : Github

:!: Barrier / Opensource forked from 1.x after it became paid.
Project : Barrier

Installation

:!: Since version 2.x there is GUI for synergy available and there is no hm.sh script in source.

I&#039;ve chose to use 2.x since it uses openssl to secure connection.</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=systemd&amp;rev=1597026926&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:26+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>systemd</title>
        <link>https://wiki.k2patel.in/doku.php?id=systemd&amp;rev=1597026926&amp;do=diff</link>
        <description>systemd

Extending configuration

This has bitten me many times, specially if you are running services as different user or require to extend the file limits.

Everytime there is update it replaces the file and it create the issue of broken services.</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=tlog&amp;rev=1703009835&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2023-12-19T18:17:15+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>tlog</title>
        <link>https://wiki.k2patel.in/doku.php?id=tlog&amp;rev=1703009835&amp;do=diff</link>
        <description>To record all session using tlog

To set up a comprehensive session recording and shipping of logs using PAM and rsyslog on a Linux system, you will need to follow several steps. Below is a general guideline for achieving this:

tlog

To record and store session logs using tlog, you can follow these steps:</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=tmux&amp;rev=1597026926&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:26+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>tmux</title>
        <link>https://wiki.k2patel.in/doku.php?id=tmux&amp;rev=1597026926&amp;do=diff</link>
        <description>tmux (terminal multiplexer)

Good replacement for screen.

Following is my own tmux config file.

Tried to setup as near as screen.


set-option -g prefix C-a
unbind-key C-b 
bind-key C-a &quot;last-window&quot;

unbind &#039;&quot;&#039;
unbind % # Remove default binding since we&#039;re replacing
bind | split-window -h
bind - split-window -v
bind &#039;&quot;&#039; list-window

# Highlight active window
set-window-option -g window-status-current-bg blue

# Rename Based on active names
setw -g automatic-rename

set -g status-right &#039;#[fg=y…</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=tomcat&amp;rev=1597026926&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:26+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>tomcat</title>
        <link>https://wiki.k2patel.in/doku.php?id=tomcat&amp;rev=1597026926&amp;do=diff</link>
        <description>Tomcat

Tomcat SSL

Setting up tomcat with HTTP Native library.


&lt;Connector port=&quot;8443&quot; protocol=&quot;org.apache.coyote.http11.Http11AprProtocol&quot; scheme=&quot;https&quot; maxThreads=&quot;200&quot; secure=&quot;true&quot; SSLEnabled=&quot;true&quot; SSLCertificateFile=&quot;/etc/pki/tls/certs/k2patel.in.crt&quot; SSLCertificateKeyFile=&quot;/etc/pki/tls/private/k2patel.in.key&quot; SSLCACertificateFile=&quot;/etc/pki/tls/certs/k2patel.in.int.ca&quot; sslEnabledProtocols=&quot;TLSv1.1,TLSv1.2&quot; SSLHonorCipherOrder=&quot;true&quot; SSLCipherSuite=&quot;ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-R…</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=top&amp;rev=1597026926&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:26+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>top</title>
        <link>https://wiki.k2patel.in/doku.php?id=top&amp;rev=1597026926&amp;do=diff</link>
        <description>TOP

command to help understanding system performance.

Block on Top


wa = waiting for IO
us = userspace
sy = system/kernel
ni = nice processs
id = idle
hi = hardware interrupts
si = software interrupts
st = steal time (time in involuntary wait by virtual cpu while hypervisor is servicing another processor)</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=tuneup_guide&amp;rev=1597026926&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:26+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>tuneup_guide</title>
        <link>https://wiki.k2patel.in/doku.php?id=tuneup_guide&amp;rev=1597026926&amp;do=diff</link>
        <description>Mysql Has tuner

 If you see your mysql is slowing down or not performing good.
 You need to run following command first.


mysqlcheck -u root --auto-repair --check --optimize --all-databases -p


Third Party tuner

Still feel slowness. see below.

First,</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=tw_cli&amp;rev=1597026926&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:26+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>tw_cli</title>
        <link>https://wiki.k2patel.in/doku.php?id=tw_cli&amp;rev=1597026926&amp;do=diff</link>
        <description>tw_cli

tw_cli is the CLI for monitoring and maintaining 3ware RAID controllers. It can be used for all maintenance operations that can be performed through the 3dmd daemon or the system BIOS.

Checking the status of controller, array or disk


info</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=two_mysql_instances&amp;rev=1597026926&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:26+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>two_mysql_instances</title>
        <link>https://wiki.k2patel.in/doku.php?id=two_mysql_instances&amp;rev=1597026926&amp;do=diff</link>
        <description>Two Mysql Instances

	*  install mysql
	*  copy the mysql data directory to say mysql1

So you have /var/db/mysql and /var/db/mysql1

	*  Open the first mysql /var/db/mysql/my.cnf

    Change
  &lt;code text&gt;
  port = &lt;The port you want the first mysql to listen to&gt;
  bind-address = &lt;The ip you want the first mysql to bind to&gt;
  &lt;/code&gt;</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=update_4.11_ports&amp;rev=1597026926&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:26+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>update_4.11_ports</title>
        <link>https://wiki.k2patel.in/doku.php?id=update_4.11_ports&amp;rev=1597026926&amp;do=diff</link>
        <description>Updating ports on freebsd 4.11

Since freebsd 4.11 is EOL there is some special way to update it.

modify following file.


*default release=cvs tag=RELEASE_4_EOL


NOTE : in above line - you are replacing “.” with “RELEASE_4_EOL”

Now in order to update file use cvsup command.</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=update_bind_configurations&amp;rev=1597026926&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:26+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>update_bind_configurations</title>
        <link>https://wiki.k2patel.in/doku.php?id=update_bind_configurations&amp;rev=1597026926&amp;do=diff</link>
        <description>Update Bind Configurations


#!/bin/bash 

# Check SVN repository for ACL update then, fetch and reload named

BINDPATH=&quot;/etc/bind&quot;
MAILTO=&quot;jason@lithiumfox.com&quot;
REPO=&quot;http://jason.lithiumfox.com/svn/repos/dns&quot;


if $(svn st -u $BINDPATH|egrep &#039;(acls.conf?|as[1-9]+.acl?)&#039; &gt; /dev/null 2&gt;&amp;1)
	then
	REVISION=$(svn update $BINDPATH | grep revision | awk &#039;{print $NF}&#039;| tr -d \.) 
	if ERROR=$(/usr/sbin/named-checkconf $BINDPATH/named.conf)
		then
		/etc/init.d/named reload &gt; /dev/null 2&gt;&amp;1
	else
		let…</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=update_next_line_based_on_list_of_variable&amp;rev=1597026926&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:26+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>update_next_line_based_on_list_of_variable</title>
        <link>https://wiki.k2patel.in/doku.php?id=update_next_line_based_on_list_of_variable&amp;rev=1597026926&amp;do=diff</link>
        <description>Manipulate File based on list


#!/bin/bash

File_line = list
Edit_file = httpd.conf

for i in $File_line; do

sed &quot;s#DocumentRoot $i#DocumentRoot $i \\
php_admin_value open_basedir \&quot;$i:/tmp\&quot;#&quot; $Edit_file

#sed -i.bak &quot;s#DocumentRoot $i#DocumentRoot $i \\
#php_admin_value disable_functions \&quot;exec,system,passthru,readfile,shell_exec,escapeshellarg,escapeshellcmd,proc_close,proc_open,ini_alter,dl,popen,parse_ini_file,show_source\&quot;#&quot; httpd.conf

done</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=upgrade_using_ius&amp;rev=1597026926&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:26+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>upgrade_using_ius</title>
        <link>https://wiki.k2patel.in/doku.php?id=upgrade_using_ius&amp;rev=1597026926&amp;do=diff</link>
        <description>Upgrade using iUS

Enable iUS repository

Follow guide available at  iUS 

Stop mariadb and install


systemctl stop mariadb
yum install yum-plugin-replace
yum replace mariadb-server --replace-with mariadb101u-server


Setup file limit for mariadb

File limit require to upgrade mariadb.</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=usage_on_fly&amp;rev=1597026926&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:26+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>usage_on_fly</title>
        <link>https://wiki.k2patel.in/doku.php?id=usage_on_fly&amp;rev=1597026926&amp;do=diff</link>
        <description>Perl

CPAN

To install Modules Locally

local::lib enables you to install modules into a specified directory, 

without requiring root or administrator access. See the bootstrapping technique for how to get started.

You can create a directory per user/project/company and deploy to other servers,</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=vim&amp;rev=1597026927&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:27+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>vim</title>
        <link>https://wiki.k2patel.in/doku.php?id=vim&amp;rev=1597026927&amp;do=diff</link>
        <description>VIM

There&#039;s an old joke that Emacs would be a great operating system if only it had a decent text editor,

whereas vi would be a great text editor if only it had a decent operating system.

vi cheat-sheet


a. cursor movements (items below are sometimes called objects):
        h - left one character
        l - right one character
        j - down one line
        k - up one line
        w - right one word
        b - back one word
        $ - to the end of line
        0 - to the beginning of…</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=vlc_streaming&amp;rev=1597026927&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:27+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>vlc_streaming</title>
        <link>https://wiki.k2patel.in/doku.php?id=vlc_streaming&amp;rev=1597026927&amp;do=diff</link>
        <description>Vlc Streaming Server

This is awsome player with all the capability.

This is simple On Demand Streaming Server Example.

Following is my setup:

Streaming server on - 5454 you can setup any port

Protocol - RTSP

Listening on All ip : 0.0.0.0 You can bind to single ip using real ip</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=vmstat&amp;rev=1597026927&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:27+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>vmstat</title>
        <link>https://wiki.k2patel.in/doku.php?id=vmstat&amp;rev=1597026927&amp;do=diff</link>
        <description>vmstat

This is just the man page snapshot for field description


FIELD DESCRIPTION FOR VM MODE
   Procs
       r: The number of processes waiting for run time.
       b: The number of processes in uninterruptible sleep.

   Memory
       swpd: the amount of virtual memory used.
       free: the amount of idle memory.
       buff: the amount of memory used as buffers.
       cache: the amount of memory used as cache.
       inact: the amount of inactive memory. (-a option)
       active: the am…</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=vmware&amp;rev=1597026927&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:27+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>vmware</title>
        <link>https://wiki.k2patel.in/doku.php?id=vmware&amp;rev=1597026927&amp;do=diff</link>
        <description>VmWare

Nice free full virtualization system. I am keeping entry of few command line tools for easy referance.

Start / Stop Guest OS from command line


vmrun -h https://localhost:8333/sdk -u root -p &lt;password&gt; stop &quot;[standard] Windows 7/Windows 7.vmx&quot;</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=vsftpd&amp;rev=1597026927&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:27+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>vsftpd</title>
        <link>https://wiki.k2patel.in/doku.php?id=vsftpd&amp;rev=1597026927&amp;do=diff</link>
        <description>VsFTPD

Very secure, but hard to configure for virtual users and chroot.

Usually virtual user help in hosting environment.

But it is good to have diff. account on FTP for each person to specific location.


Use configuration below and use the commands specified to create new user / manage users.</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=w3m&amp;rev=1597026927&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:27+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>w3m</title>
        <link>https://wiki.k2patel.in/doku.php?id=w3m&amp;rev=1597026927&amp;do=diff</link>
        <description>W3M (Text Browser)

Introduction

w3m is a pager/text-based WWW browser. You can browse local documents and/or documents on the WWW using a terminal emulator.
Options
Command line usage is


    w3m [options] [file|URL]


If you specify filenames/URLs on command line, these documents are displayed. If you specify nothing, w3m reads a document from standard input and display it. If no filename and/or URLs are specified and standard input is tty, w3m terminates without displaying anything.</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=webalizer&amp;rev=1597026927&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:27+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>webalizer</title>
        <link>https://wiki.k2patel.in/doku.php?id=webalizer&amp;rev=1597026927&amp;do=diff</link>
        <description>Webalizer

Installation Linux





Log rotate - /etc/webstat/statrotate


/www/logs/*access.log {
        monthly
	size 20M
        missingok
        notifempty
        compress
        postrotate
        /www/apache/bin/apachectl restart &gt; /dev/null
        endscript
}



Stats - script - /usr/local/bin/statsupdate.sh

#!/bin/bash

user_home=&quot;/usr/www/virtual/spicy&quot;

for i in `ls /usr/www/virtual/spicy | grep www`;
do
if [ -d $user_home/$i/stats ]
then
        if [ -s $user_home/$i/stats/webali…</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=webmin&amp;rev=1597026927&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:27+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>webmin</title>
        <link>https://wiki.k2patel.in/doku.php?id=webmin&amp;rev=1597026927&amp;do=diff</link>
        <description>Webmin</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=where&amp;rev=1597026927&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:27+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>where</title>
        <link>https://wiki.k2patel.in/doku.php?id=where&amp;rev=1597026927&amp;do=diff</link>
        <description>Where

where it is located on OS

Leased IP Information on your Machine

Linux :


/var/lib/dhclient/dhclient-eth0.leases


FreeBSD:


/var/db/dhclient.leases.fxp0</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=why_drive_space_is_not_as_marked&amp;rev=1597026927&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:27+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>why_drive_space_is_not_as_marked</title>
        <link>https://wiki.k2patel.in/doku.php?id=why_drive_space_is_not_as_marked&amp;rev=1597026927&amp;do=diff</link>
        <description>Why drives space is diff.

The issue is manufactures and OS developer.

Both see the size differently.

The short answer to there&#039;s two different measurement formats used. Decimal (GB) and binary (GiB) formats. 

Binary is used by OS and decimal is used by the manufacturers.</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=windows_quick_command&amp;rev=1597026927&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:27+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>windows_quick_command</title>
        <link>https://wiki.k2patel.in/doku.php?id=windows_quick_command&amp;rev=1597026927&amp;do=diff</link>
        <description>Command Helps On Windows

How to reboot server from command line


shutdown &lt;options&gt;

-Available Options
/? 	Displays the Help listing
/i 	Displays the graphical user interface (GUI); it must be the first option
/l 	Logs off the current user; it cannot be used with the /d or /m options
/s 	Shuts down the computer
/r 	Shuts down and restarts the computer
/g 	Shuts down and restarts the computer and then restarts any registered applications
/a 	Aborts system Shutdown
/p 	Turns off the local compu…</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=wordpress_password_reset&amp;rev=1597026927&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:27+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>wordpress_password_reset</title>
        <link>https://wiki.k2patel.in/doku.php?id=wordpress_password_reset&amp;rev=1597026927&amp;do=diff</link>
        <description>#!/usr/local/bin/bash
# Wordpress Password Reset
# &lt;Ketan Patel&gt; k2patel@hotmail.com

if [ $# -lt 2 ]
then
   echo &quot;Usage: $0 &lt;Blog Location&gt; &lt;new Password&gt; [&lt;Admin User&gt;]&quot;
   exit 1
elif [ $# -lt 3 ]
then
   WPUser=&#039;admin&#039;
else
   WPUser=$3
fi

RESET=&quot;UPDATE wp_users SET user_pass=MD5(&#039;$2&#039;) WHERE user_login=&#039;$WPUser&#039;&quot;

cd $1

DBNAME=`grep DB_NAME wp-config.php | cut -d &quot;&#039;&quot; -f 4`
DBPASS=`grep DB_PASSWORD wp-config.php | cut -d &quot;&#039;&quot; -f 4`
DBHOST=`grep DB_HOST wp-config.php | cut -d &quot;&#039;&quot; -f 4`
DBUSE…</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=xen_vm_creation&amp;rev=1597026927&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:27+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>xen_vm_creation</title>
        <link>https://wiki.k2patel.in/doku.php?id=xen_vm_creation&amp;rev=1597026927&amp;do=diff</link>
        <description>Xen VM Creation

This script will create a vm from a image.



#!/bin/env perl
## Build vm providing options
## $1 Hostname
## $2 IP Address - This will be checked to make sure that it currently not being used

# test ip address is free
# test vg for free space
# create lv if test is good
# dd image file to lv
# mount root lv to test mount and edit files
# mount var lv to test mount and edit files
# create xen configuration
# start xen

use strict;

usage(); 
check_user();

my $hostname=$ARGV[0]…</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=xfs&amp;rev=1597026927&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:27+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>xfs</title>
        <link>https://wiki.k2patel.in/doku.php?id=xfs&amp;rev=1597026927&amp;do=diff</link>
        <description>XFS

Troubleshooting while something goes wrong.


XFS+LVM

Please make sure it is scanned and activated on LVM.



vgscan -v --mknodes
vgchange -a y


Now this need to be repaired using xfs_repire command.

There is no single point of command without knowing what is broken.</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=xtrabackup_script&amp;rev=1597026927&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:27+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>xtrabackup_script</title>
        <link>https://wiki.k2patel.in/doku.php?id=xtrabackup_script&amp;rev=1597026927&amp;do=diff</link>
        <description>XtraBackup

Nice tool to create Hot Backup.

 Project Page


#!/bin/bash

today=`date +%Y%m%d`
yesterday=`date -d &#039;now -2 days&#039; +%Y%m%d`

if [ ! -d /usr/new_db_backup/$today ]; then

        if /usr/bin/innobackupex-1.5.1 --defaults-file=/etc/my.cnf --tmpdir=/tmp --user=root --password=TestDrive --no-timestamp  /usr/new_db_backup/$today
        then
                echo &quot;Backup completed Successfully Location /usr/new_db_backup/$today&quot; | mail -s &quot;[BACKUPS] `hostname` &quot; ketan@email.com
          …</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=youtube-dl&amp;rev=1597026928&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:28+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>youtube-dl</title>
        <link>https://wiki.k2patel.in/doku.php?id=youtube-dl&amp;rev=1597026928&amp;do=diff</link>
        <description>Youtube-dl

In order to install youtube-dl simply run following in terminal.

It require ffmpeg installed on your machine.


pip install youtube-dl



youtube-dl -F https://www.youtube.com/watch?v=H9tWRGxuKTw



youtube-dl -f bestaudio --extract-audio --audio-format mp3 --audio-quality 320k https://www.youtube.com/watch?v=H9tWRGxuKTw</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=zfs&amp;rev=1597026928&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:28+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>zfs</title>
        <link>https://wiki.k2patel.in/doku.php?id=zfs&amp;rev=1597026928&amp;do=diff</link>
        <description>ZFS

Zpool

To check zpool status


zpool status [&lt;volume&gt;]


To clear error on drive, which you think reported wrongly.


zpool clear &lt;volume name&gt;


To add Zeus Drive


zpool add performance log &lt;drive&gt;


Adding spare to volume


zpool add performance spare &lt;drive&gt;</description>
    </item>
    <item rdf:about="https://wiki.k2patel.in/doku.php?id=zoneli_-_zonelimit_state&amp;rev=1597026928&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-10T02:35:28+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>zoneli_-_zonelimit_state</title>
        <link>https://wiki.k2patel.in/doku.php?id=zoneli_-_zonelimit_state&amp;rev=1597026928&amp;do=diff</link>
        <description>Zoneli - Zonelimit State

Problem Explained

When there are no free mbuf clusters available, FreeBSD enters zonelimit state and stops awnsering network requests. You can see if the system has gone into “zoneli” state by using the top command.

To see current mbuf cluster usage</description>
    </item>
</rdf:RDF>
