Wednesday 2 December 2020

Ubuntu Fully remove software | Reinstall is not working correctly, due to last install

How to completely remove a package?

How to fully remove a package?

I have installed software Munin and then removed it and tried to install again, 2nd install did not have the config files, so used below, which fully removed the sofware and new install was fine with all config.
Removing packages with sudo apt purge ... or sudo apt --purge remove ... will remove them and all their global (i.e., systemwide) configuration files.

# apt-get --purge remove munin
I removing using just remove, some folders were there for software, so removed them usin 'rm', then performed an install, it did not install fully with the config fixes. So the --purge did the trick for me. root@linux-u20:~# apt remove munin munin-node Reading package lists... Done Building dependency tree Reading state information... Done Package 'munin' is not installed, so not removed Package 'munin-node' is not installed, so not removed The following packages were automatically installed and are no longer required: jo jq libalgorithm-c3-perl libb-hooks-endofscope-perl libb-hooks-op-check-perl libclass-c3-perl libclass-c3-xs-perl libclass-data-inheritable-perl libclass-method-modifiers-perl libclass-xsaccessor-perl libdata-optlist-perl libdate-manip-perl libdbi1 libdevel-callchecker-perl libdevel-caller-perl libdevel-globaldestruction-perl libdevel-lexalias-perl libdevel-stacktrace-perl libdist-checkconflicts-perl libdynaloader-functions-perl libemail-date-format-perl libeval-closure-perl libexception-class-perl libexporter-tiny-perl libfile-copy-recursive-perl libio-multiplex-perl libipc-shareable-perl libjq1 liblist-moreutils-perl liblog-dispatch-perl liblog-log4perl-perl libmail-sendmail-perl libmime-lite-perl libmime-types-perl libmodule-implementation-perl libmodule-runtime-perl libmro-compat-perl libnamespace-autoclean-perl libnamespace-clean-perl libnet-cidr-perl libnet-server-perl libnet-snmp-perl libonig5 libpackage-stash-perl libpackage-stash-xs-perl libpadwalker-perl libparams-classify-perl libparams-util-perl libparams-validationcompiler-perl libreadonly-perl libref-util-perl libref-util-xs-perl librole-tiny-perl librrd8 librrds-perl libspecio-perl libsub-exporter-perl libsub-exporter-progressive-perl libsub-identify-perl libsub-install-perl libsub-quote-perl libsys-hostname-long-perl libvariable-magic-perl libxstring-perl munin-common munin-doc munin-plugins-core munin-plugins-extra rrdtool Use 'apt autoremove' to remove them. 0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade. root@linux-u20:~# apt-get --purge remove munin Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: jo jq libalgorithm-c3-perl libb-hooks-endofscope-perl libb-hooks-op-check-perl libclass-c3-perl libclass-c3-xs-perl libclass-data-inheritable-perl libclass-method-modifiers-perl libclass-xsaccessor-perl libdata-optlist-perl libdate-manip-perl libdbi1 libdevel-callchecker-perl libdevel-caller-perl libdevel-globaldestruction-perl libdevel-lexalias-perl libdevel-stacktrace-perl libdist-checkconflicts-perl libdynaloader-functions-perl libemail-date-format-perl libeval-closure-perl libexception-class-perl libexporter-tiny-perl libfile-copy-recursive-perl libio-multiplex-perl libipc-shareable-perl libjq1 liblist-moreutils-perl liblog-dispatch-perl liblog-log4perl-perl libmail-sendmail-perl libmime-lite-perl libmime-types-perl libmodule-implementation-perl libmodule-runtime-perl libmro-compat-perl libnamespace-autoclean-perl libnamespace-clean-perl libnet-cidr-perl libnet-server-perl libnet-snmp-perl libonig5 libpackage-stash-perl libpackage-stash-xs-perl libpadwalker-perl libparams-classify-perl libparams-util-perl libparams-validationcompiler-perl libreadonly-perl libref-util-perl libref-util-xs-perl librole-tiny-perl librrd8 librrds-perl libspecio-perl libsub-exporter-perl libsub-exporter-progressive-perl libsub-identify-perl libsub-install-perl libsub-quote-perl libsys-hostname-long-perl libvariable-magic-perl libxstring-perl munin-common munin-doc munin-plugins-core munin-plugins-extra rrdtool Use 'apt autoremove' to remove them. The following packages will be REMOVED munin* 0 to upgrade, 0 to newly install, 1 to remove and 0 not to upgrade. After this operation, 0 B of additional disk space will be used. Do you want to continue? [Y/n] y (Reading database ... 175171 files and directories currently installed.) Purging configuration files for munin (2.0.56-1ubuntu1) ... apache2_invoke postrm: Purging configuration munin.conf dpkg: warning: while removing munin, directory '/var/lib/munin' not empty so not removed dpkg: warning: while removing munin, directory '/var/cache/munin/www' not empty so not removed Processing triggers for systemd (245.4-4ubuntu3.3) ... root@linux-u20:~# apt-get --purge remove munin munin-node Reading package lists... Done Building dependency tree Reading state information... Done Package 'munin' is not installed, so not removed The following packages were automatically installed and are no longer required: jo jq libalgorithm-c3-perl libb-hooks-endofscope-perl libb-hooks-op-check-perl libclass-c3-perl libclass-c3-xs-perl libclass-data-inheritable-perl libclass-method-modifiers-perl libclass-xsaccessor-perl libdata-optlist-perl libdate-manip-perl libdbi1 libdevel-callchecker-perl libdevel-caller-perl libdevel-globaldestruction-perl libdevel-lexalias-perl libdevel-stacktrace-perl libdist-checkconflicts-perl libdynaloader-functions-perl libemail-date-format-perl libeval-closure-perl libexception-class-perl libexporter-tiny-perl libfile-copy-recursive-perl libio-multiplex-perl libipc-shareable-perl libjq1 liblist-moreutils-perl liblog-dispatch-perl liblog-log4perl-perl libmail-sendmail-perl libmime-lite-perl libmime-types-perl libmodule-implementation-perl libmodule-runtime-perl libmro-compat-perl libnamespace-autoclean-perl libnamespace-clean-perl libnet-cidr-perl libnet-server-perl libnet-snmp-perl libonig5 libpackage-stash-perl libpackage-stash-xs-perl libpadwalker-perl libparams-classify-perl libparams-util-perl libparams-validationcompiler-perl libreadonly-perl libref-util-perl libref-util-xs-perl librole-tiny-perl librrd8 librrds-perl libspecio-perl libsub-exporter-perl libsub-exporter-progressive-perl libsub-identify-perl libsub-install-perl libsub-quote-perl libsys-hostname-long-perl libvariable-magic-perl libxstring-perl munin-common munin-doc munin-plugins-core munin-plugins-extra rrdtool Use 'apt autoremove' to remove them. The following packages will be REMOVED munin-node* 0 to upgrade, 0 to newly install, 1 to remove and 0 not to upgrade. After this operation, 0 B of additional disk space will be used. Do you want to continue? [Y/n] y (Reading database ... 175127 files and directories currently installed.) Purging configuration files for munin-node (2.0.56-1ubuntu1) ... Processing triggers for systemd (245.4-4ubuntu3.3) ...

Tuesday 1 December 2020

Installing Munin on Ubuntu 20

Useful Links: https://www.howtoforge.com/tutorial/server-monitoring-with-munin-and-monit-on-ubuntu-16-04-lts/
https://www.digitalocean.com/community/tutorials/how-to-install-the-munin-monitoring-tool-on-ubuntu-14-04
Following worked for me without any changes. 



As root or using sudo option, install Munin (of course, do an update 1st) # apt install munin munin-node # systemctl restart munin-node

Alias /munin /var/cache/munin/www
<Directory /var/cache/munin/www>
 # Require local
 Require all granted
 Options FollowSymLinks SymLinksIfOwnerMatch
 Options None
</Directory>

ScriptAlias /munin-cgi/munin-cgi-graph /usr/lib/munin/cgi/munin-cgi-graph
<Location /munin-cgi/munin-cgi-graph>
 # Require local
 Require all granted
 Options FollowSymLinks SymLinksIfOwnerMatch
 <IfModule mod_fcgid.c>
 SetHandler fcgid-script
 </IfModule>
 <IfModule !mod_fcgid.c>
 SetHandler cgi-script
 </IfModule>
</Location> 


Appendix

root@linux-u20:~# apt install munin munin-node Reading package lists... Done Building dependency tree Reading state information... Done Suggested packages: munin-plugins-java The following NEW packages will be installed munin munin-node 0 to upgrade, 2 to newly install, 0 to remove and 0 not to upgrade. Need to get 71.8 kB/204 kB of archives. After this operation, 919 kB of additional disk space will be used. Get:1 http://gb.archive.ubuntu.com/ubuntu focal/universe amd64 munin-node all 2.0.56-1ubuntu1 [71.8 kB] Fetched 71.8 kB in 0s (843 kB/s) Preconfiguring packages ... Selecting previously unselected package munin. (Reading database ... 175120 files and directories currently installed.) Preparing to unpack .../munin_2.0.56-1ubuntu1_all.deb ... Unpacking munin (2.0.56-1ubuntu1) ... Selecting previously unselected package munin-node. Preparing to unpack .../munin-node_2.0.56-1ubuntu1_all.deb ... Unpacking munin-node (2.0.56-1ubuntu1) ... Setting up munin (2.0.56-1ubuntu1) ... apache2_invoke: Enable configuration munin.conf Setting up munin-node (2.0.56-1ubuntu1) ... Initializing plugins..done. Restarting munin-node..Created symlink /etc/systemd/system/multi-user.target.wants/munin-node.service → /lib/systemd/system/munin-node.service. Processing triggers for man-db (2.9.1-1) ... Processing triggers for systemd (245.4-4ubuntu3.3) ...

Apache config change

Faced two error during apache Restart

Invalid command 'RewriteEngine'

Invalid command 'ProxyPass'


To fix, had to enable the apache module, in Ubuntu, used this: sudo a2enmod rewrite sudo a2enmod proxy_http sudo systemctl restart apache2

Appendix errors faced

Dec 01 13:01:38 linux-u20 systemd[1]: Starting The Apache HTTP Server... Dec 01 13:01:38 linux-u20 apachectl[6829]: AH00526: Syntax error on line 3 of /etc/apache2/sites-enabled/mysite.conf: Dec 01 13:01:38 linux-u20 apachectl[6829]: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration Dec 01 13:01:38 linux-u20 apachectl[6809]: Action 'start' failed. Dec 01 13:01:38 linux-u20 apachectl[6809]: The Apache error log may have more information. Dec 01 13:01:38 linux-u20 systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE Dec 01 13:01:38 linux-u20 systemd[1]: apache2.service: Failed with result 'exit-code'. Dec 01 13:01:38 linux-u20 systemd[1]: Failed to start The Apache HTTP Server. Dec 01 13:03:42 linux-u20 systemd[1]: Starting The Apache HTTP Server... Dec 01 13:03:42 linux-u20 apachectl[6921]: AH00526: Syntax error on line 6 of /etc/apache2/sites-enabled/mysite.conf: Dec 01 13:03:42 linux-u20 apachectl[6921]: Invalid command 'ProxyPass', perhaps misspelled or defined by a module not included in the server configuration Dec 01 13:03:42 linux-u20 apachectl[6906]: Action 'start' failed. Dec 01 13:03:42 linux-u20 apachectl[6906]: The Apache error log may have more information. Dec 01 13:03:42 linux-u20 systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE Dec 01 13:03:42 linux-u20 systemd[1]: apache2.service: Failed with result 'exit-code'. Dec 01 13:03:42 linux-u20 systemd[1]: Failed to start The Apache HTTP Server.

Monday 30 November 2020

Grafana

Did not go for Enterprise, went for open source

From: https://grafana.com/grafana/download?edition=oss

Config: https://community.grafana.com/t/grafana-and-apache/5508

Helpful, basic proxy
https://www.digitalocean.com/community/tutorials/how-to-use-apache-as-a-reverse-proxy-with-mod_proxy-on-ubuntu-16-04 sudo apt-get install -y adduser libfontconfig1 wget https://dl.grafana.com/oss/release/grafana_7.3.4_amd64.deb sudo dpkg -i grafana_7.3.4_amd64.deb # To start the service and verify that the service has started: sudo systemctl daemon-reload sudo systemctl start grafana-server sudo systemctl status grafana-server # Configure the Grafana server to start at boot: sudo systemctl enable grafana-server.service Install output # sudo apt-get install -y adduser libfontconfig1 Reading package lists... Done Building dependency tree Reading state information... Done adduser is already the newest version (3.118ubuntu2). adduser set to manually installed. libfontconfig1 is already the newest version (2.13.1-2ubuntu3). libfontconfig1 set to manually installed. 0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade. # wget https://dl.grafana.com/oss/release/grafana_7.3.4_amd64.deb --2020-12-01 01:01:22-- https://dl.grafana.com/oss/release/grafana_7.3.4_amd64.deb Resolving dl.grafana.com (dl.grafana.com)... 151.101.18.217, 2a04:4e42:4::729 Connecting to dl.grafana.com (dl.grafana.com)|151.101.18.217|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 54013792 (52M) [application/x-debian-package] Saving to: ‘grafana_7.3.4_amd64.deb’ grafana_7.3.4_amd64.deb 100%[=======================================================================================================>] 51.51M 1.84MB/s in 28s 2020-12-01 01:01:51 (1.84 MB/s) - ‘grafana_7.3.4_amd64.deb’ saved [54013792/54013792] # sudo dpkg -i grafana_7.3.4_amd64.deb Selecting previously unselected package grafana. (Reading database ... 168816 files and directories currently installed.) Preparing to unpack grafana_7.3.4_amd64.deb ... Unpacking grafana (7.3.4) ... Setting up grafana (7.3.4) ... Adding system user `grafana' (UID 128) ... Adding new user `grafana' (UID 128) with group `grafana' ... Not creating home directory `/usr/share/grafana'. ### NOT starting on installation, please execute the following statements to configure grafana to start automatically using systemd sudo /bin/systemctl daemon-reload sudo /bin/systemctl enable grafana-server ### You can start grafana-server by executing sudo /bin/systemctl start grafana-server Processing triggers for systemd (245.4-4ubuntu3.3) ...

Hardening ubuntu Server for internet

Disable Root Logins Over SSH

$ sudo vi /etc/ssh/sshd_config

Make sure PermitRootLogin is changed from yes to no

PermitRootLogin no

Install fail2ban

Fail2ban is an intrusion-prevention system that monitors log files and searches for particular patterns that correspond to a failed login attempt. If a certain number of failed logins are detected from a specific IP address (within a specified amount of time), fail2ban blocks access from that IP address.

sudo apt-get install fail2ban sudo vi /etc/fail2ban/jail.local 

Add following in the new file

[sshd] enabled = true port = 22 filter = sshd logpath = /var/log/auth.log maxretry = 3 Run sudo systemctl restart fail2ban

Sunday 29 November 2020

Ubuntu and lamp

sudo apt install apache2 libapache2-mod-fcgid sudo apt-get install mysql-server sudo apt-get install php libapache2-mod-php php-mysql sudo vi /etc/apache2/mods-enabled/dir.conf

Make index.php 1st item, from from end. and save exit.


sudo systemctl restart apache2 sudo apt-get install php-cli sudo systemctl restart apache2

Allow ssh

1. First update OS # Fetches the list of available updates sudo apt update # Installs some updates; does not remove packages sudo apt upgrade # Removes any old packages that are no longer needed sudo apt autoremove

2. Install ssh sudo apt install openssh-server sudo systemctl status ssh 3. Update Firewall sudo ufw allow ssh

Firewall

$ sudo ufw status Status: inactive $ sudo ufw enable Firewall is active and enabled on system startup $ sudo ufw status Status: active $ sudo ufw allow 80 $ sudo ufw allow 443 $ sudo ufw disable Firewall stopped and disabled on system startup Restart with above command sudo ufw status verbose Status: active Logging: on (low) Default: deny (incoming), allow (outgoing), disabled (routed) New profiles: skip To Action From -- ------ ---- 22/tcp ALLOW IN Anywhere 80 ALLOW IN Anywhere 443 ALLOW IN Anywhere 22/tcp (v6) ALLOW IN Anywhere (v6) 80 (v6) ALLOW IN Anywhere (v6) 443 (v6) ALLOW IN Anywhere (v6)


SSH commands


SSH service by running:

$ sudo systemctl stop ssh

To start it again run:

$ sudo systemctl start ssh

To disable the SSH service to start during system boot run:

$ sudo systemctl disable ssh br />
To enable it again type:

$ sudo systemctl enable ssh



Saturday 28 November 2020

Shrink Windows 10 disk to install Linux as dual boot

This note is for you:
  • Not able to Shrink Windows partition that has been 100% used

  • Defrag is not working and not able to shrink C drive

  • Have lots of free disk but shink only offering small amount

I had 150 GB hard disk. Single C drive and disk was near 100% used up. After clearning freed 80GB, i wante to install Linux on 70GB. So first had to shrink but Windows shrink only allowed my to string 150GB by 2 GB, which is no where near the 70GB i wanted. So did defrag, still only allowed my shrink to 2gb, since system files were scartered all over the disk. So searching, found in asnwers.microsoft.com forume an solution and that worked for me. That is. 

  1. Download 'AOMEI Partition Assistant' Freeware 
    1. I have downloaded from diskpart.com/download.html
    2. I have selected Freeware Version 9.0 (file FAssist_Std.exe)
  2. Install AOMEI Partition Assistant. It goes on installs mini os like software to go in shrink, as you using host 
  3. Use the shrink option, if you try to do split option you have purchase the full version of software. 
  4. Once you have shrunk your disk
  5. Restart your machine and you will see the unalloacted disk and original disk shrunk. 

 

I have installed Ubunto and new unallocated and and kept my Windows side by side, everything working like a treat.

 

Thanks You "AOMEI Partition Assistant"

Thursday 29 October 2020

HTML CSS Icon : Simple line icon unicode list

My Fav Icon, Line icon code.

Heart icon: \e08a

Bag: \e04f

Basket: \e04e

Search: \e090



List of icon, found in simple-line-icon-unicode-list.txt (credit to site developers.oxwall.com), searched for icon e04f .icon-user-female:before { content: "\e000"; } .icon-user-follow:before { content: "\e002"; } .icon-user-following:before { content: "\e003"; } .icon-user-unfollow:before { content: "\e004"; } .icon-trophy:before { content: "\e006"; } .icon-screen-smartphone:before { content: "\e010"; } .icon-screen-desktop:before { content: "\e011"; } .icon-plane:before { content: "\e012"; } .icon-notebook:before { content: "\e013"; } .icon-moustache:before { content: "\e014"; } .icon-mouse:before { content: "\e015"; } .icon-magnet:before { content: "\e016"; } .icon-energy:before { content: "\e020"; } .icon-emoticon-smile:before { content: "\e021"; } .icon-disc:before { content: "\e022"; } .icon-cursor-move:before { content: "\e023"; } .icon-crop:before { content: "\e024"; } .icon-credit-card:before { content: "\e025"; } .icon-chemistry:before { content: "\e026"; } .icon-user:before { content: "\e005"; } .icon-speedometer:before { content: "\e007"; } .icon-social-youtube:before { content: "\e008"; } .icon-social-twitter:before { content: "\e009"; } .icon-social-tumblr:before { content: "\e00a"; } .icon-social-facebook:before { content: "\e00b"; } .icon-social-dropbox:before { content: "\e00c"; } .icon-social-dribbble:before { content: "\e00d"; } .icon-shield:before { content: "\e00e"; } .icon-screen-tablet:before { content: "\e00f"; } .icon-magic-wand:before { content: "\e017"; } .icon-hourglass:before { content: "\e018"; } .icon-graduation:before { content: "\e019"; } .icon-ghost:before { content: "\e01a"; } .icon-game-controller:before { content: "\e01b"; } .icon-fire:before { content: "\e01c"; } .icon-eyeglasses:before { content: "\e01d"; } .icon-envelope-open:before { content: "\e01e"; } .icon-envelope-letter:before { content: "\e01f"; } .icon-bell:before { content: "\e027"; } .icon-badge:before { content: "\e028"; } .icon-anchor:before { content: "\e029"; } .icon-wallet:before { content: "\e02a"; } .icon-vector:before { content: "\e02b"; } .icon-speech:before { content: "\e02c"; } .icon-puzzle:before { content: "\e02d"; } .icon-printer:before { content: "\e02e"; } .icon-present:before { content: "\e02f"; } .icon-playlist:before { content: "\e030"; } .icon-pin:before { content: "\e031"; } .icon-picture:before { content: "\e032"; } .icon-map:before { content: "\e033"; } .icon-layers:before { content: "\e034"; } .icon-handbag:before { content: "\e035"; } .icon-globe-alt:before { content: "\e036"; } .icon-globe:before { content: "\e037"; } .icon-frame:before { content: "\e038"; } .icon-folder-alt:before { content: "\e039"; } .icon-film:before { content: "\e03a"; } .icon-feed:before { content: "\e03b"; } .icon-earphones-alt:before { content: "\e03c"; } .icon-earphones:before { content: "\e03d"; } .icon-drop:before { content: "\e03e"; } .icon-drawer:before { content: "\e03f"; } .icon-docs:before { content: "\e040"; } .icon-directions:before { content: "\e041"; } .icon-direction:before { content: "\e042"; } .icon-diamond:before { content: "\e043"; } .icon-cup:before { content: "\e044"; } .icon-compass:before { content: "\e045"; } .icon-call-out:before { content: "\e046"; } .icon-call-in:before { content: "\e047"; } .icon-call-end:before { content: "\e048"; } .icon-calculator:before { content: "\e049"; } .icon-bubbles:before { content: "\e04a"; } .icon-briefcase:before { content: "\e04b"; } .icon-book-open:before { content: "\e04c"; } .icon-basket-loaded:before { content: "\e04d"; } .icon-basket:before { content: "\e04e"; } .icon-bag:before { content: "\e04f"; } .icon-action-undo:before { content: "\e050"; } .icon-action-redo:before { content: "\e051"; } .icon-wrench:before { content: "\e052"; } .icon-umbrella:before { content: "\e053"; } .icon-trash:before { content: "\e054"; } .icon-tag:before { content: "\e055"; } .icon-support:before { content: "\e056"; } .icon-size-fullscreen:before { content: "\e057"; } .icon-size-actual:before { content: "\e058"; } .icon-shuffle:before { content: "\e059"; } .icon-share-alt:before { content: "\e05a"; } .icon-share:before { content: "\e05b"; } .icon-rocket:before { content: "\e05c"; } .icon-question:before { content: "\e05d"; } .icon-pie-chart:before { content: "\e05e"; } .icon-pencil:before { content: "\e05f"; } .icon-note:before { content: "\e060"; } .icon-music-tone-alt:before { content: "\e061"; } .icon-music-tone:before { content: "\e062"; } .icon-microphone:before { content: "\e063"; } .icon-loop:before { content: "\e064"; } .icon-logout:before { content: "\e065"; } .icon-login:before { content: "\e066"; } .icon-list:before { content: "\e067"; } .icon-like:before { content: "\e068"; } .icon-home:before { content: "\e069"; } .icon-grid:before { content: "\e06a"; } .icon-graph:before { content: "\e06b"; } .icon-equalizer:before { content: "\e06c"; } .icon-dislike:before { content: "\e06d"; } .icon-cursor:before { content: "\e06e"; } .icon-control-start:before { content: "\e06f"; } .icon-control-rewind:before { content: "\e070"; } .icon-control-play:before { content: "\e071"; } .icon-control-pause:before { content: "\e072"; } .icon-control-forward:before { content: "\e073"; } .icon-control-end:before { content: "\e074"; } .icon-calendar:before { content: "\e075"; } .icon-bulb:before { content: "\e076"; } .icon-bar-chart:before { content: "\e077"; } .icon-arrow-up:before { content: "\e078"; } .icon-arrow-right:before { content: "\e079"; } .icon-arrow-left:before { content: "\e07a"; } .icon-arrow-down:before { content: "\e07b"; } .icon-ban:before { content: "\e07c"; } .icon-bubble:before { content: "\e07d"; } .icon-camcorder:before { content: "\e07e"; } .icon-camera:before { content: "\e07f"; } .icon-check:before { content: "\e080"; } .icon-clock:before { content: "\e081"; } .icon-close:before { content: "\e082"; } .icon-cloud-download:before { content: "\e083"; } .icon-cloud-upload:before { content: "\e084"; } .icon-doc:before { content: "\e085"; } .icon-envelope:before { content: "\e086"; } .icon-eye:before { content: "\e087"; } .icon-flag:before { content: "\e088"; } .icon-folder:before { content: "\e089"; } .icon-heart:before { content: "\e08a"; } .icon-info:before { content: "\e08b"; } .icon-key:before { content: "\e08c"; } .icon-link:before { content: "\e08d"; } .icon-lock:before { content: "\e08e"; } .icon-lock-open:before { content: "\e08f"; } .icon-magnifier:before { content: "\e090"; } .icon-magnifier-add:before { content: "\e091"; } .icon-magnifier-remove:before { content: "\e092"; } .icon-paper-clip:before { content: "\e093"; } .icon-paper-plane:before { content: "\e094"; } .icon-plus:before { content: "\e095"; } .icon-pointer:before { content: "\e096"; } .icon-power:before { content: "\e097"; } .icon-refresh:before { content: "\e098"; } .icon-reload:before { content: "\e099"; } .icon-settings:before { content: "\e09a"; } .icon-star:before { content: "\e09b"; } .icon-symbol-female:before { content: "\e09c"; } .icon-symbol-male:before { content: "\e09d"; } .icon-target:before { content: "\e09e"; } .icon-volume-1:before { content: "\e09f"; } .icon-volume-2:before { content: "\e0a0"; } .icon-volume-off:before { content: "\e0a1"; } .icon-users:before { content: "\e001"; }

Checking Status of Oracle Materialized View


Checking status of an Oracle Materialized View
Few basic SQL to checking status of Oracle Materialized View.
Common Error ORA-12034: materialized view log on"DEV_USER"."NFS_MOUNT" younger than last refresh
Checks -- Change OWNER SQL> SELECT owner, object_name, object_type, status from dba_objects WHERE owner='DEV_USER' and object_type='MATERIALIZED VIEW'; OWNER OBJECT_NAME OBJECT_TYPE STATUS --------------- ----------------- ------------------- ------- DEV_USER NFS_MOUNT MATERIALIZED VIEW VALID SQL> SELECT owner, mview_name, last_refresh_date, staleness FROM dba_mviews WHERE owner ='DEV_USER'; OWNER MVIEW_NAME LAST_REFRESH_DATE STALENESS --------------- ----------------- -------------------- -------------- DEV_USER NFS_MOUNT 29-OCT-20 UNDEFINED

Monday 16 March 2020

Tuning MySQL on windows


My MySQL import of 1.2GB files was taking 1hr 30min, after 1st tunring it took 50min and finally after 30hr searching, got the import to run in 10min....phew
innodb_buffer_pool_size=1024M # Changed from 5M to 256M 1/4 of pool size innodb_log_file_size=256M # Kept the default 8M innodb_log_buffer_size=8M

Wednesday 5 February 2020

impdb error

col owner_name for a30; col job_name for a30; col operation for a30; col state for a20; col job_mode for a20; SELECT owner_name, job_name, operation, job_mode, state, attached_sessions FROM dba_datapump_jobs WHERE job_name NOT LIKE 'BIN$%' ORDER BY 1,2; SELECT o.status, o.object_id, o.object_type, o.owner||'.'||object_name "OWNER.OBJECT" FROM dba_objects o, dba_datapump_jobs j WHERE o.owner=j.owner_name AND o.object_name=j.job_name AND j.job_name NOT LIKE 'BIN$%' ORDER BY 4,2;

Tuesday 21 January 2020

MySQL memory change

SHOW ENGINE INNODB STATUS; BUFFER POOL AND MEMORY ---------------------- Total memory allocated 135987200; in additional pool allocated 0 Dictionary memory allocated 1124711 Buffer pool size 8191 Free buffers 3303 Database pages 4833 Old database pages 1804 After changes vi /etc/mysql/my.cnf # Added innodb_buffer_pool_size = 512M /etc/init.d/mysql stop /etc/init.d/mysql start BUFFER POOL AND MEMORY ---------------------- Total memory allocated 543948800; in additional pool allocated 0 Dictionary memory allocated 890055 Buffer pool size 32767 Free buffers 29924 Database pages 2840 Old database pages 1068