In some situations, the system time zone will be different than the one in MySQL, even though MySQL is set to use the system time zone. This normally means that a user has changed the system time zone, but they haven't started MySQL to cause it to change as well.
$ date
Sun Jul 1 11:32:56 UTC 2007
mysql> show variables like '%time_zone%';
+------------------+--------+
| Variable_name | Value |
+------------------+--------+
| system_time_zone | CDT |
| time_zone | SYSTEM |
+------------------+--------+
2 rows in set (0.00 sec)
If you find yourself in this situation, just restart MySQL and the situation should be fixed:
mysql> show variables like '%time_zone%';
+------------------+--------+
| Variable_name | Value |
+------------------+--------+
| system_time_zone | UTC |
| time_zone | SYSTEM |
+------------------+--------+
2 rows in set (0.00 sec)
Monday, October 4, 2010
Thursday, September 30, 2010
Installing zend optimizer 3.3 in cpanel
Run this command
/scripts/installzendopt 3.3.0
[~]# /scripts/installzendopt 3.3.0
Installing Zendopt
Determining PHP version
Installing Zend Optimizer binary
Activating Zend Optimizer in /usr/local/lib/php.ini
Zend Optimizer activated
[~]# php -v
PHP 5.2.13 (cli) (built: Jul 14 2010 18:00:25)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies
with the ionCube PHP Loader v3.3.20, Copyright (c) 2002-2010, by ionCube Ltd., and
with Zend Optimizer v3.3.9, Copyright (c) 1998-2009, by Zend Technologies
/scripts/installzendopt 3.3.0
[~]# /scripts/installzendopt 3.3.0
Installing Zendopt
Determining PHP version
Installing Zend Optimizer binary
Activating Zend Optimizer in /usr/local/lib/php.ini
Zend Optimizer activated
[~]# php -v
PHP 5.2.13 (cli) (built: Jul 14 2010 18:00:25)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies
with the ionCube PHP Loader v3.3.20, Copyright (c) 2002-2010, by ionCube Ltd., and
with Zend Optimizer v3.3.9, Copyright (c) 1998-2009, by Zend Technologies
Tuesday, September 7, 2010
Changing cPanel servers main IP or full IP address pool
Changing main shared server IP.
/etc/sysconfig/network-scripts/ifcfg-eth0
/etc/sysconfig/network
/etc/hosts
Then add the cpanel license to the new IP.
Update cPanel configurations.
replace $oldip $newip -- /var/cpanel/mainip
replace $oldip $newip -- /var/cpanel/userdata/*/*
replace $oldip $newip -- /var/named/*.db
replace $oldip $newip -- /etc/*
service named restart
/scripts/rebuildhttpconf
If you are adding new block IP's
1) Add the IP through the cpanel.
2) /etc/init.d/ipaliases restart
/etc/sysconfig/network-scripts/ifcfg-eth0
/etc/sysconfig/network
/etc/hosts
Then add the cpanel license to the new IP.
Update cPanel configurations.
replace $oldip $newip -- /var/cpanel/mainip
replace $oldip $newip -- /var/cpanel/userdata/*/*
replace $oldip $newip -- /var/named/*.db
replace $oldip $newip -- /etc/*
service named restart
/scripts/rebuildhttpconf
If you are adding new block IP's
1) Add the IP through the cpanel.
2) /etc/init.d/ipaliases restart
Thursday, May 6, 2010
How to Disable Telnet
How to Disable Telnet
SSH into server and login as root.
At shell command prompt type the following command and press Enter. This example use pico to edit text file, you can use vi or other text editor if you want.
pico -w /etc/xinetd.d/telnet
Locate the following line:
disable = no
Change the “disable = no” to “disable = yes” (no to yes).
Save and exit.
Restart the inetd service by using the following command:
/etc/rc.d/init.d/xinetd restart
Turn off Telnet through chkconfig as well because it can still start through that:
/sbin/chkconfig telnet off
SSH into server and login as root.
At shell command prompt type the following command and press Enter. This example use pico to edit text file, you can use vi or other text editor if you want.
pico -w /etc/xinetd.d/telnet
Locate the following line:
disable = no
Change the “disable = no” to “disable = yes” (no to yes).
Save and exit.
Restart the inetd service by using the following command:
/etc/rc.d/init.d/xinetd restart
Turn off Telnet through chkconfig as well because it can still start through that:
/sbin/chkconfig telnet off
How to Disable Telnet
How to Disable Telnet
SSH into server and login as root.
At shell command prompt type the following command and press Enter. This example use pico to edit text file, you can use vi or other text editor if you want.
pico -w /etc/xinetd.d/telnet
Locate the following line:
disable = no
Change the “disable = no” to “disable = yes” (no to yes).
Save and exit.
Restart the inetd service by using the following command:
/etc/rc.d/init.d/xinetd restart
Turn off Telnet through chkconfig as well because it can still start through that:
/sbin/chkconfig telnet off
SSH into server and login as root.
At shell command prompt type the following command and press Enter. This example use pico to edit text file, you can use vi or other text editor if you want.
pico -w /etc/xinetd.d/telnet
Locate the following line:
disable = no
Change the “disable = no” to “disable = yes” (no to yes).
Save and exit.
Restart the inetd service by using the following command:
/etc/rc.d/init.d/xinetd restart
Turn off Telnet through chkconfig as well because it can still start through that:
/sbin/chkconfig telnet off
Saturday, April 24, 2010
Disabling root Login
Security Tip: Disable Root SSH Login on Linux
One of the biggest security holes you could open on your server is to allow directly logging in as root through ssh, because any cracker can attempt to brute force your root password and potentially get access to your system if they can figure out your password.
It’s much better to have a separate account that you regularly use and simply sudo to root when necessary. Before we begin, you should make sure that you have a regular user account and that you can su or sudo to root from it.
To fix this problem, we’ll need to edit the sshd_config file, which is the main configuration file for the sshd service. The location will sometimes be different, but it’s usually in /etc/ssh/. Open the file up while logged on as root.
vi /etc/ssh/sshd_config
Find this section in the file, containing the line with “PermitRootLogin” in it.
#LoginGraceTime 2m
#PermitRootLogin no
#StrictModes yes
#MaxAuthTries 6
Make the line look like this to disable logging in through ssh as root.
PermitRootLogin no
Now you’ll need to restart the sshd service:
/etc/init.d/sshd restart
Now nobody can brute force your root login, at least.
One of the biggest security holes you could open on your server is to allow directly logging in as root through ssh, because any cracker can attempt to brute force your root password and potentially get access to your system if they can figure out your password.
It’s much better to have a separate account that you regularly use and simply sudo to root when necessary. Before we begin, you should make sure that you have a regular user account and that you can su or sudo to root from it.
To fix this problem, we’ll need to edit the sshd_config file, which is the main configuration file for the sshd service. The location will sometimes be different, but it’s usually in /etc/ssh/. Open the file up while logged on as root.
vi /etc/ssh/sshd_config
Find this section in the file, containing the line with “PermitRootLogin” in it.
#LoginGraceTime 2m
#PermitRootLogin no
#StrictModes yes
#MaxAuthTries 6
Make the line look like this to disable logging in through ssh as root.
PermitRootLogin no
Now you’ll need to restart the sshd service:
/etc/init.d/sshd restart
Now nobody can brute force your root login, at least.
Saturday, January 30, 2010
[error] mod_ssl: Init: (domainname.com:443) Unable to configure verify locations for client authentication
commented out the SSLCACertificateFile line and then restart httpd
# SSLCACertificateFile /usr/share/ssl/certs/domainname.com.cabundle
# SSLCACertificateFile /usr/share/ssl/certs/domainname.com.cabundle
Subscribe to:
Posts (Atom)