Home » Linux Basics (page 7)

Linux Basics

CentOS: yum Command Reinstall Package

How do I re-install a package using the yum command under CentOS Linux server? You can use the yum command with the reinstall option. This will reinstall the identical versioned package as currently installed. The syntax is as follows:   yum reinstall packageName yum reinstall packageName1 packageName2 In this example reinstall a package called keepalived, type: # yum reinstall keepalived Sample outputs: Loaded plugins: product-id, rhnplugin, subscription-manager Updating certificate-based …

Read More »

Nginx Redirect URL With HTTP/1.1 301 Moved Permanently Header

How do I redirect old ugly urls such as http://example.com/store/view.jsp?product=foo with clean url – http://example.com/store/view/product/foo using nginx reverse proxy? You need to use HttpRewriteModule under nginx web server. This module makes it possible to change URI using regular expressions (PCRE), and to redirect and select configuration depending on variables. The syntax is as follows to chage URI in accordance with …

Read More »