Updated: 2023-07-02 ::
Published: 2009-12-29
:: JR
#CentOS
#FastCGI
#Fedora
#Memcache
#MySQL
#nginx
#PHP
#PHP 5.3
#PostgreSQL
#Red Hat
This is guide howto install nginx, PHP 5.3 and FastCGI webserver with MySQL and/or PostgreSQL and Memcache support on Fedora 12 and Fedora 13, CentOS 5.5, Red Hat (RHEL) 5.5/6.
nginx (engine x) is a robust, small and high performance http server, reverse proxy server and also mail proxy server.
- Add and enable needed repositories: Updated 19.3.2010 Use following repositories to install nginx 0.8.xx version (currently 0.8.36 version)
rpm -Uvh http://download.
Updated: 2023-07-02 ::
Published: 2009-12-30
:: JR
#Coding
#Object
#PHP
#stdClass
I think every PHP coders have come accross Arrays and stdClass Objects (belongs to PHP Predefined Classes). Sometimes it’s very useful convert Objects to Arrays and Arrays to Objects. This is easy if arrays and objects are one-dimensional, but might be little tricky if using multidimensional arrays and objects.
This post defines two ultra simple recursive function to convert multidimensional Objects to Arrays and multidimensional Arrays to Objects.
Function to Convert stdClass Objects to Multidimensional Arrays <?
Updated: 2023-07-02 ::
Published: 2010-01-08
:: JR
#Coding
#PHP
In many cases, it is really useful to know the exact time for how long a PHP script is running or how long will take PHP web page load. On the other hand it is also useful to know that how long a particular script operation or part of page load will take.
Following PHP Timing class is very simple to use, only create class and start timing and stop timing.
Updated: 2023-07-02 ::
Published: 2010-01-12
:: JR
#Bash
#CLI
#Coding
#Command line
#Linux
#Perl
#PHP
#UNIX
PHP Command Line Interface (CLI) has not built-in coloring for script output, like example Perl language has (perldoc.perl.org/Term/ANSIColor.html). So I decided to make own class for adding colors on PHP CLI output. This class works only Bash shells. This class is easy to use. Just create new instance of class and call getColoredString function with string and foreground color and/or background color.
PHP Class for Coloring PHP Command Line (CLI) Scripts Output <?
Updated: 2023-07-02 ::
Published: 2010-01-19
:: JR
#Bash
#Command line
#date
#Hostname
#Linux
#Load Average
#One Liners
#Terminal
#UNIX
#Uptime
#Users
This tip is really useful if you need/want to monitor multiple servers at the same time. This Tip works, as the tip, by which you can add the date and time the title of the Linux terminal, but it adds more usefull info to terminal title. Following bash one liner add hostname, date, time, uptime, users and load Average to Linux Terminal Title and updates it every second.
This trick works at least following terminals: Gnome Terminal, xterm, urxvt, rxvt.
Updated: 2023-07-02 ::
Published: 2010-01-19
:: JR
#Bash
#CentOS
#Command line
#Fedora
#Linux
#openSUSE
#Red Hat
#Yum
#Yum history
Yum (Yellowdog Update Modified) is RPM Packet Management system for Fedora, CentOS, Red Hat, OpenSuse etc. Yum history (list, info, summary, repeat, redo, undo, new) commands is added on 3.2.25 version. So this works every Linux Distros, which uses yum 3.2.25 or newer. Yum history command is a really useful in situations where the need to example rollback latest yum activity or undelete some deletes or just see what is updated lately.
Updated: 2023-07-02 ::
Published: 2010-01-21
:: JR
#CentOS
#Database
#Fedora
#Firewall
#Iptables
#Linux
#PostgreSQL
#psql
#Red Hat
#SQL
This is quick guide howto install PostgreSQL 8.4 (current stable 8.4.7) database server on CentOS, Fedora and Red Hat. Fedora 14, Fedora 13, CentOS 5.5 and Red Hat (RHEL) 5.5 has PostgreSQL 8.4 database server as default so extra repositories is not needed. Personally, I like to use Postgres own repositories, because the latest version of PostgreSQL may be quickly and easily installed. The following commands run as root and postgres user, so “su -” or “sudo -i” first.
Updated: 2023-07-02 ::
Published: 2010-01-23
:: JR
#Apache
#Bash
#bashrc
#Brotli
#Command line
#Compression
#cURL
#Gzip
#Linux
#nginx
This is a quick method to check with using cURL that Nginx/Apache (or any other web server) compression with Nginx ngx_http_gzip_module (gzip), Nginx google/ngx_brotli (br), Apache mod_brotli (br), Apache mod_gzip (gzip) and Apache mod_deflate (deflate) is working. Only the remote server headers are needed.
Check that the Nginx/Apache Compression is Working Get headers curl -s -I -H 'Accept-Encoding: br,gzip,deflate'
https://www.if-not-true-then-false.com -s option silent, disable progress bar.
-I option which will make just HEAD request to server and get headers.
Updated: 2023-07-02 ::
Published: 2010-01-23
:: JR
#Bash
#Command line
#find
#Linux
#locate
#UNIX
This is quick guide howto find files and directories quick and efficiently on Linux with locate command. Linux find command is outdated, slow and complicated to use, so locate command is much better option.
Locate basic usage find files and directories locate file # example locate httpd.conf locate path # example locate /X11/ Find (locate) ignore-case (not case sensitive) locate -i file # example locate -i netbeans Find (locate) only file name (basename) locate -b file # example locate -b shadow Limit locate output locate -l 100 file # example locate -l 50 conf Print number of found entries locate -c file # example locate -c conf Find (locate) with full file info Simply locate something and pipe output to ls command.
Updated: 2023-07-02 ::
Published: 2010-01-26
:: JR
#Coding
#date
#PHP
I was using simple function to calculate difference between two dates and timestamps until I noticed, it’s not working correctly in long intervals. It’s very easy to calculate difference between two timestamps in seconds, but it’s much more complicated print difference in human readable format. The Internet can be found in a wide range of ways to do this thing, but as a rule they use a fixed amount of seconds for the year and the month.
Updated: 2023-07-02 ::
Published: 2010-02-08
:: JR
#Bash
#cat
#Coding
#Command line
#Linux
#Terminal
#UNIX
This is a very typical case, the need to create a temp file on the command line quickly. Opening editor, writing content, save file and quit editor is not the fastest possible way. A faster way is to use the cat command with the name of the file and write contents of the file and give the end-of-file character (Ctrl-D).
This is guide, howto create (or append to) text file without text editor on Linux shell / command line.
Updated: 2023-07-02 ::
Published: 2010-02-18
:: JR
#CentOS
#Command line
#DOS
#Fedora
#Linux
#OpenBSD
#OpenSolaris
#Oracle
#Red Hat
#Solaris
#Sun
#UNIX
#VBox
#VirtualBox
#Windows
Oracle VirtualBox is a powerful x86 and AMD64/Intel64 virtualization product for enterprise as well as home use. VirtualBox is a general-purpose full virtualizer for x86 hardware. Targeted at server, desktop and embedded use, it is now the only professional-quality virtualization solution that is also Open Source Software.
Check video guide howto install VirtualBox 7.0.8 on Fedora 38/37/36 using Oracle’s own dnf repo: Check video guide howto install VirtualBox 7.0.8 / 7.
Updated: 2023-07-02 ::
Published: 2010-02-18
:: JR
#Applications
#CentOS
#CentOS 6
#CentOS 7
#Command line
#Fedora
#Linux
#Lovelock
#OpenOffice.Org
#Red Hat
#Red Hat 6
Are you looking LibreOffice 5.2/5.1/5.0 Install guide?
This is quick guide to install Apache OpenOffice 4.1.2 on Fedora 24/23/22/21/20/19/18/17/16/15/14/13/12, CentOS 7.2/6.8, Red Hat (RHEL) 7.2/6.8 with using Apache OpenOffice original RPM packages.
What’s new in Apache OpenOffice 4.1.2 release New Sidebar – The Sidebar makes better use of today’s widescreen displays than traditional toolbars Interoperability Improvements DrawObject Improvements/Enhancements Extensions Improvements/Enhancements Many resource leaks were fixed Check full feature list here.
Updated: 2023-07-02 ::
Published: 2010-02-19
:: JR
#Coding
#Magic Constants
#PHP
#Predefined Constants
PHP has large number of predefined constants. This HOWTO will present the seven most important, most practical and most useful PHP Magic Constants.
FILE – The full path and filename of the file. DIR – The directory of the file. FUNCTION – The function name. CLASS – The class name. METHOD – The class method name. LINE – The current line number of the file. NAMESPACE – The name of the current namespace This is example PHP script with comments, which demonstrate howto use all previously mentioned PHP Magic Constants.
Updated: 2023-07-02 ::
Published: 2010-02-20
:: JR
#CentOS
#Command line
#Fedora
#Linux
#Red Hat
#Yum
This is a quick tip, howto find, query and list all available packages from a specific Yum repository/repositories on Fedora, CentOS, Red Hat (RHEL). This trick does not show the already installed packages from selected repository.
List All Repositories and Check Repository ID’s $ yum repolist Loaded plugins: dellsysidplugin2, refresh-packagekit repo id repo name status adobe-linux-i386 Adobe Systems Incorporated enabled: 17 fedora Fedora 12 - i386 enabled: 15,366 google Google - i386 enabled: 4 livna rpm.
Updated: 2023-07-02 ::
Published: 2010-02-21
:: JR
#Command line
#KDE
#Laptop
#Linux
#UNIX
#Vertical Scrolling
I noticed that the Fedora Linux with KDE desktop, has reasonably poor support for laptop touchpad adjustment. For example, the KDE > System Settings > Keyboard & Mouse > Mouse options will not be able to enable vertical scrolling and touchpad tapping. So I decided to write this short guide, howto enable Touchpad vertical scrolling and tapping from command line without any GUI.
Enable Laptop Touchpad Vertical Scrolling Simply write following on command line:
Updated: 2023-07-02 ::
Published: 2010-02-21
:: JR
#Applications
#Fedora
#Firefox
#Linux
#Mozilla
#Yum
This is guide, howto install Mozilla Firefox 3.6 versions (currently 3.6.13) on Fedora 12 using Yum. Firefox 3.6 stable installation works also with older Fedora Linux versions, like f11, f10.
Note: Fedora 13 and Fedora 14 already has Firefox 3.6 as default browser
Install Mozilla Firefox 3.6 Stable Version on Fedora Linux Using Remi Repository 1. Change to root User su - ## OR ## sudo -i 2. Enable Remi Repository ## Fedora 12 rpm -Uvh http://rpms.
Updated: 2023-07-02 ::
Published: 2010-02-24
:: JR
#Command line
#Fedora
#KDE
#Linux
#Yum
Updated 26.2.2010, Read First
Currently, the latest version of the KDE desktop in Fedora is 4.3.5. I had some problems with its stability, so I decided to try out, how will work KDE 4.4.0 the latest stable version of KDE. At first I tried to install KDE 4.4 from Rawhide repository, but it failed to install from there. Here is instructions on how to install KDE 4.4 successfully using RPMFusion and KDE Packaging Project Repositories.
Updated: 2023-07-02 ::
Published: 2010-02-26
:: JR
#ATI
#Catalyst
#Fedora
#Graphics Drivers
#Linux
#Mesa
#Radeon
#Radeon HD
Fedora 13 Users check Fedora 13 ATI Drivers Guide » Like all ATI and Fedora users probably already knows, currently AMD’s ATI Catalyst 10.2 proprietary Linux display drivers are not working on Fedora 12. That is why I decided to write this guide for those who are fighting with ATI drivers in Fedora.
As Fedora 12 release notes says: Improvements for graphics support – Introduces experimental 3D support for AMD Radeon HD 2400 and later graphics cards.
Updated: 2023-07-02 ::
Published: 2010-02-28
:: JR
#Applications
#Desktop
#Fedora
#Gnome
#Gnome Shell
#Linux
What is Gnome Shell? GNOME Shell is the defining technology of the GNOME 3 desktop user experience.
It provides following core interface functions:
Launching applications Opening files Switching between open windows Adding and deleting workspaces Moving windows between workspaces Dynamic system-related information display (including transient notifications) Providing a flat list of user-account related actions Logging out or switching the session, and stopping or restarting the machine GNOME Shell takes advantage of the capabilities of modern graphics hardware and introduces innovative user interface concepts to provide a delightful and easy to use experience.