/var/net/sys/admin/blog

Linux comes with a built-in syslog package that you can use as a centralized syslog server. Basically, it can be used to send all log files from your network devices or appliances in a remote and centralized location. There are also some popular syslog packages for Linux that you can use  such as syslog-ng,rsyslog & splunk syslog server which all offers more features and flexibility.

On this tutorial, we are going to use the syslogd/sysklogd server which is a multi-platform and proven stable software.

[Syslog Server]

1.verify if the sysklogd package is installed.

Important note to remember:
a. capture it in full length, using the -s 0 options
b. save it in a file, better to make the extension as .pcap so wireshark can associate directly

1.Identify which interface you want to listen to

[root@freelinux tmp]# ifconfig 

eth0 Link encap:Ethernet HWaddr 08:00:27:72:24:E6
inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe72:24e6/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:942 errors:0 dropped:0 overruns:0 frame:0
TX packets:612 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:78095 (76.2 KiB) TX bytes:198882 (194.2 KiB)
Interrupt:10 Base address:0xd020

2. Run “tcpdump” command with the following options. For instance, you want to monitor the DNS packets.Run:

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

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

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

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

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:

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.

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

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

 

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.