fcgid

標準

cd /etc/httpd/conf/sites-available;ls

How to install mod_fcgid on CentOS / RHEL

Now we will install mod_fcgid by using yum command.

Step 1: To install mod_fcgid on CentOS / RHEL , first we will install EPEL repo .

rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm OR yum install wget wget dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm rpm -ivh epel-release-6-8.noarch.rpm

OR

yum install wget
wget dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
rpm -ivh epel-release-6-8.noarch.rpm

Step 2: Now install the mod_fcgid

yum install mod_fcgid

To confirm mod_fcgi package is installed

Run the command –

rpm -qa|grep mod_fcgid

Below given is the reference from our Server :
In below given output you can see, mod_fcgi version is 2.3.9-1

[root@Server ~]# rpm -qa|grep mod_fcgid mod_fcgid-2.3.9-1.el6.x86_64 [root@Server ~]#

[root@Server ~]# rpm -qa|grep mod_fcgid
mod_fcgid-2.3.9-1.el6.x86_64
[root@Server ~]#

How to change date, time, timezone on centos

標準

Display Date and Time in Linux

# date

and its output
Sat Mar 15 03:14:29 PDT 2014

Change Timezone in Linux

Fist, we are going to get a list of timezone that came with Linux.
# cd /usr/share/zoneinfo/ # ls

Africa Canada GB Indian Mexico ROK iso3166.tab America Chile GB-Eire Iran NZ Singapore posix Antarctica Cuba GMT Israel NZ-CHAT Turkey posixrules Arctic EET GMT+0 Jamaica Navajo UCT right Asia EST GMT-0 Japan PRC US zone.tab Atlantic EST5EDT GMT0 Kwajalein PST8PDT UTC Australia Egypt Greenwich Libya Pacific Universal Brazil Eire HST MET Poland W-SU CET Etc Hongkong MST Portugal WET CST6CDT Europe Iceland MST7MDT ROC Zulu
Africa Canada GB Indian Mexico ROK iso3166.tab
America Chile GB-Eire Iran NZ Singapore posix
Antarctica Cuba GMT Israel NZ-CHAT Turkey posixrules
Arctic EET GMT+0 Jamaica Navajo UCT right
Asia EST GMT-0 Japan PRC US zone.tab
Atlantic EST5EDT GMT0 Kwajalein PST8PDT UTC
Australia Egypt Greenwich Libya Pacific Universal
Brazil Eire HST MET Poland W-SU
CET Etc Hongkong MST Portugal WET
CST6CDT Europe Iceland MST7MDT ROC Zulu

There are countries, or continent with different timezone, for example when you list all file and directories in zoneinfo directory as I did above, there are timezone for countries with only one timezone, and directories for countries and continent with several timezones. For example my timezone is America Pacific, I will need to go to America directory to get my timezone.

# cd /usr/share/zoneinfo/America/
# ls

Adak Coral_Harbour Hermosillo Moncton Santarem Anchorage Cordoba Indiana Monterrey Santiago Anguilla Costa_Rica Indianapolis Montevideo Santo_Domingo Antigua Creston Inuvik Montreal Sao_Paulo Araguaina Cuiaba Iqaluit Montserrat Scoresbysund Argentina Curacao Jamaica Nassau Shiprock Aruba Danmarkshavn Jujuy New_York Sitka Asuncion Dawson Juneau Nipigon St_Barthelemy Atikokan Dawson_Creek Kentucky Nome St_Johns Atka Denver Knox_IN Noronha St_Kitts Bahia Detroit Kralendijk North_Dakota St_Lucia Bahia_Banderas Dominica La_Paz Ojinaga St_Thomas Barbados Edmonton Lima Panama St_Vincent Belem Eirunepe Los_Angeles Pangnirtung Swift_Current Belize El_Salvador Louisville Paramaribo Tegucigalpa Blanc-Sablon Ensenada Lower_Princes Phoenix Thule Boa_Vista Fort_Wayne Maceio Port-au-Prince Thunder_Bay Bogota Fortaleza Managua Port_of_Spain Tijuana Boise Glace_Bay Manaus Porto_Acre Toronto Buenos_Aires Godthab Marigot Porto_Velho Tortola Cambridge_Bay Goose_Bay Martinique Puerto_Rico Vancouver Campo_Grande Grand_Turk Matamoros Rainy_River Virgin Cancun Grenada Mazatlan Rankin_Inlet Whitehorse Caracas Guadeloupe Mendoza Recife Winnipeg Catamarca Guatemala Menominee Regina Yakutat Cayenne Guayaquil Merida Resolute Yellowknife Cayman Guyana Metlakatla Rio_Branco Chicago Halifax Mexico_City Rosario Chihuahua Havana Miquelon Santa_Isabel
Adak Coral_Harbour Hermosillo Moncton Santarem
Anchorage Cordoba Indiana Monterrey Santiago
Anguilla Costa_Rica Indianapolis Montevideo Santo_Domingo
Antigua Creston Inuvik Montreal Sao_Paulo
Araguaina Cuiaba Iqaluit Montserrat Scoresbysund
Argentina Curacao Jamaica Nassau Shiprock
Aruba Danmarkshavn Jujuy New_York Sitka
Asuncion Dawson Juneau Nipigon St_Barthelemy
Atikokan Dawson_Creek Kentucky Nome St_Johns
Atka Denver Knox_IN Noronha St_Kitts
Bahia Detroit Kralendijk North_Dakota St_Lucia
Bahia_Banderas Dominica La_Paz Ojinaga St_Thomas
Barbados Edmonton Lima Panama St_Vincent
Belem Eirunepe Los_Angeles Pangnirtung Swift_Current
Belize El_Salvador Louisville Paramaribo Tegucigalpa
Blanc-Sablon Ensenada Lower_Princes Phoenix Thule
Boa_Vista Fort_Wayne Maceio Port-au-Prince Thunder_Bay
Bogota Fortaleza Managua Port_of_Spain Tijuana
Boise Glace_Bay Manaus Porto_Acre Toronto
Buenos_Aires Godthab Marigot Porto_Velho Tortola
Cambridge_Bay Goose_Bay Martinique Puerto_Rico Vancouver
Campo_Grande Grand_Turk Matamoros Rainy_River Virgin
Cancun Grenada Mazatlan Rankin_Inlet Whitehorse
Caracas Guadeloupe Mendoza Recife Winnipeg
Catamarca Guatemala Menominee Regina Yakutat
Cayenne Guayaquil Merida Resolute Yellowknife
Cayman Guyana Metlakatla Rio_Branco
Chicago Halifax Mexico_City Rosario
Chihuahua Havana Miquelon Santa_Isabel

I will use Toronto for Pacific time, so I will need to copy/set Toronto file as my localtime on my server (this will work with any linux system I believe).

# cp /usr/share/zoneinfo/America/Toronto /etc/localtime

Change Date and Time in Linux

Now your Linux system should have the timezone that you want. If the date or time is not correct, you can set date and time with date command.

# date MMDDhhmmYYYY

MM: two digit month number
DD: two digit date
hh: two digit hour (24 hour system)
mm: two digit minute
YYYY: four digit of year

You can also sync your system time and date with ntp (Network Time Protocol) over a network or internet. Normally ntp should be installed to your Linux system as default, in case your system does not have ntp, you can easily install ntp package with a simple command.

To install ntp on Ubuntu, Linux or debian based distribitions
# apt-get update
# apt-get install ntp

To install ntp on Fedora, Centos or redhat based distribitions
# yum install ntp

After you set your timezone correcly, you should be able to synce your date and time with ntp command
# ntpdate pool.ntp.org

Note: if you have a VPS (virtual private server) and not a real dedicated server, you will properly won’t be able to adjust time on your VPS. When you are on VPS, you do not have the right to modify or update time and date, only the VPS owner or provider have the rights to adjust time and date on that VPS node.

You will properly get one of this error if you are on a VPS.

Can’t adjust the time of day: Operation not permitted
rdate: could not set system time: Operation not permitted
ntpdate: Can’t adjust the time of day: Operation not permitted