/var/net/sys/admin/blog

There is some instance during the Linux installation that you did not bother to set the correct timezone for any reasons like sometimes you are just lazy to set it, you’re in a rush to finish what your boss want you to complete in that day, or you just don’t give a damn 🙂 Seriously, timezone is a bit important especially if you have scheduled scripts that you intended to run.

Here are some ways to change your timezone depending on your Linux distribution:

for RHEL/CENTOS:

Assuming you have the default or current timezone as UTC and you would like to change it to Singapore timezone

Share

There are few ways to set the date and time on Linux command line. In order to do this, you must login as root and execute the following methods as follow:

For you to remember the syntax, issue the command “date” first

[root@freelinux ~]# date 
Mon Aug 20 18:30:29 SGT 2012

Let say you want to change it to Sept 6, 2012, 3pm, just follow the pattern above

[root@freelinux ~]# date 090615002012
Thu Sep  6 15:00:00 SGT 2012

where as:
09 = month (September)
06 = day
15 = hour
00 = min
2012 = year

Share

Install and Configure SNMP client on Linux

The following procedure will install and configure snmp daemon on your Redhat-based distribution such as CentOS & Fedora. Here are the steps:

1. Verify if snmp package is installed, there are few ways

[root@localhost ~]# rpm -qa | grep snmp

[root@localhost ~]# snmpwalk
-bash: snmpwalk: command not found

[root@localhost ~]# ls /etc/snmp*
ls: /etc/snmp*: No such file or directory

This mean net-snmp package is not installed yet

2. Install net-snmp & net-snmp-utils package via yum or up2date

Share

Here’s one trick to do that:
Step 1. Install  FreeTDS

FreeTDS Website: http://www.freetds.org/ choose FreeTDS source distribution

Compile parameter: –prefix=/usr/local/freetds –enable-msdblib

Then, copy /etc/ld.so.conf, to /usr/local/freetds/lib; and then run ldconfig

Step 2. Change /usr/local/freetds/etc/freetds.conf

[sql2k]

host = your.mssql.server.ip
port = 1433
client charset = cp950
tds version = 8.0

b. tds version: 4.2 (for MS SQL Server 6.x); 7.0 (for 7.x); 8.0 (for 2000)

Step 3. Test FreeTDS connect to MS SQL Server

#cd /usr/local/freetds/bin
#./tsql -S sql2k -U sa
1> use mydatabase
2> select * from mytable
3> go

Share

1. FTP & Telnet  daemons are controlled by the inetd, so to simply stop the service, just comment the lines under /etc/inetd.conf

ftp stream tcp6 nowait root /usr/lbin/ftpd ftpd -l
telnet stream tcp6 nowait root /usr/lbin/telnetd telnetd

2. Reconfigure the internet daemon to reread the /etc/inetd.conf

#inetd -c

That’s it and you can do test:

Before:

# ftp 172.16.0.100
Connected to 172.16.0.100.
220 freehpux FTP server (Revision 6.0 Version wuftpd-2.6.1 Fri Apr 1 07:44:09 GMT 2011) ready.
Name (172.16.0.100:root):

[darwin@freelinux ]$ telnet 172.16.0.100
Trying 172.16.0.100…
Connected to 172.16.0.100 (172.16.0.100).
Escape character is ‘^]’.
HP-UX freehpux B.11.31 U ia64 (ta)
login:

Share

It’s getting important now to have websites that display good on mobile devices, and according to the statistics more than 85% smartphone owners access the internet on their mobile devices. There are a lot of ways to build mobile sites and also few options how to serve these to your mobile users. There are 2 popular ways to do it:

1. detects the http user-agent and if matches a mobile user-agent, then visitors will see a mobile version of the website. Normally, the easiest way to do it by installing mobile theme plugins especially for WordPress users. URLs or domain name will be the same for desktop and mobile visitors, and they have an option to swtich between the regular or mobile theme websites.

Share

Basically, you just need to use the CLI command “ifconfig” which stands for interface configuration. It uses
to configure and query TCP/IP network interface parameters

ifconfig interface [aftype] options

where:

interface: eth0,eth1, em0
aftype: inet (default,TCP/IP), inet6(IPV6)
options: up,down, arp,promisc, mtu ##, broadcast xx.xx.xx.xx , netmask xx.xx.xx.xx

See the man page for more details

Common use of ifconfig:

Display info on all network interfaces, including active and active
#ifconfig -a

View network settings of specific interface
#ifconfig eth0

Disable an Interface
#ifconfig eth0 down

Enable an Interface
#ifconfig eth0 up

Share

INTRODUCTION

A memory upgrade can be one of the least expensive methods of improving computer’s performance. Memory is often the largest limiting factor in application deployment

especially in a Virtual Server environment. Additional RAM will provide provisioning of additional guest domains since CPU is barely utilized.

This document will provide information on the steps on upgrading the memory of server, during and after action plans that needs to undertake.

When upgrading the memory on a Linux server, it is very important to understand the existing memory of the system, which will help plan the activity without opening

Share

Installing sudo on HP-UX

Installing sudo on HP-UX

1. check your OS and server architecture to know which package
to download. Use the uname command.
If it’s an PA-RISC 2.0 architecture, you will normally see
something like this:
# uname -an
HP-UX darwin B.11.11 U 9000/800 1234567 unlimited-user license

else if it’s an Itanium 2
# uname -an
HP-UX darwin B.11.31 U ia64 0987654321 unlimited-user license

From here you can see, the following
HP-UX operating system name
darwin hostname/system name
B.11.11 operating system release identifier
U operating system version identifier
9000/800 machine and model numbers
1234567 machine identification number
unlimited-user operating system license level

Share

Red Hat sponsored Fedora project managed to release 16th version of its Linux distribution, code-named “Verne”. Aside from package updates, it improve also in the areas of virtualization and cloud computing.

The official release notes can be found here, http://docs.fedoraproject.org/en-US/Fedora/16/html/Release_Notes/index.html

It is dedicated in memory of the creator of C programming language, and key developer of Unix OS, Dennis Ritchie.

 

Share
 

About FLT

This site is dedicated to everyone who likes to learn and explore the beautiful world of Linux. If you have comments and suggestions, please feel free to email at freelinuxtutorials@gmail.com. I am happy to serve and share things esp. that is free and enjoyable as Linux.