Tuesday, November 15, 2011

Common unused / rarely used daemons
The following list contains daemons that may not be used by a 'normal' end-user. You can compare the list of daemons started up on your system to this list, and see if you could safely disable some of those daemons.
Bluetooth
hcid, sdpd and hidd (These daemons provide Bluetooth services and are unnecessary if you don't have any Bluetooth hardware)
Printing
cups and cups-config-daemon (These daemons provide printer services and are unnecessary if you don't have any printer hardware attached to your local pc or to a network pc)
hpiod and hpssd (These daemons provide extensive support for HP printers. They can safely be disabled if you never print using an HP printer)
Console
gpm (This daemon provides mouse support for text-based applications, like Midnight Commander. It also provides copying/pasting with the middle mouse button in console environments. Can be disabled if you do not use the console much)
Webserver
httpd (This daemon provides web hosting services, and is unecessary on workstations and servers that do not host any websites or webinterfaces)
mysqld and postgresqld (These daemons provide database backend services. You can usually disable them if you're not running a webserver, although some applications use these databases for their data storage)
Firewall
netfilter/iptables (This daemon provides firewall services. Those are not that necessary if you're behind a router or smoothwall with a built-in firewall)
InfraRed
irda (This daemon enables your computer to communicate with other devices using IR (InfraRed) hardware. If you haven't got such hardware, you can safely disable this service)
lircd (This daemon provides remote control support using IR (InfraRed) receivers. Can be disabled if you don't have hardware capable of receiving IR signals)
Multiple CPU's
irqbalance (This daemon balances interrupts over multiple CPU's in the system. Can be disabled if you don't have multiple CPU's or a dual core processor)
Software RAID
mdmonitor, mdadm and mdmpd (These daemons provide information about and management functionality over software RAID devices. They are unnecessary if you don't use software RAID)
DNS Server
named (also known as BIND) (This daemon provides DNS server functionality. It is usually not needed on workstations)
Remote kernel logging
netdump, netcrashdump and netconsole (These services provide functionality for kernel logging and debugging over network connections. Only necessary if you want to view your kernel's log and debugging messages on an other computer)
Fileservers
NFS server
nfs (This daemon provides NFS server functionality, allowing other computers with NFS clients to connect to your computer and access files. You can disable this if you don't need/want others to access your system using NFS)
portmap (This daemon manages RPC connections, used by protocols like NFS and NIS. Only needed on computers that need to act as a server)
rpcsvcgssd (This daemon manages RPCSEC GSS contexts for the NFSv4 server and is not needed unless you are running an NFS server)
Samba server
smbd and nmbd (These daemons provides other computers (Windows computers, too) with access to your files. This is not needed if you don't want others to be able to access your files over the network)
Network Authentication
nscd (This daemon handles passwd and group lookups and caches their results. Only needed when using a 'slow' name service, like NIS, NIS+, LDAP, or hesiod)
portmap (This daemon manages RPC connections, used by protocols like NFS and NIS. Only needed on computers that need to act as a server)
Remote time setting
ntpd (This daemon sets your system time to a value it retrieves from a so-called ntp server, which usually serves a very accurate time. Although it is a useful feature, it tends to slow your system's startup a lot, especially if the server cannot be found)
Process Accounting
psacct (also known as acct) (This daemon provides process accounting, which gives a more detailed insight into the execution of commands on your system. This is usually not needed unless you are running a server that is accessed by a lot of people that you cannot trust entirely)
Plaintext Authentication Requests
saslauthd (This daemon handles SASL Plaintext Authentication Requests, and is only required on a server that needs to communicate using SASL mechanisms)
Mailserver
sendmail (This daemon sends and forwards email messages, acting as a server. You don't
need this daemon to be able to send a normal message. It is only needed if you need your computer to act as a mailserver)
spamd (also known as Spamassassin) (This daemon checks incoming mail messages for spam. This can usually be disabled, but keep in mind that some mail clients, like KMail, can use spamd's functionality)
SSH Server
sshd (This daemon allows remote login to your computer using the SSH protocol. It can be disabled if you don't want/need this access)
VNC Server
vncserver or xvnc (This daemon allows others to get a virtual graphical Desktop that actually runs on your computer)
Task Scheduler
cron (and variants, like vixie-cron...) (This daemon runs periodic tasks on your system, like updating the search index or the manpage index, but also rotating logfiles. This one is generally required for a server system to run correctly, but workstations may be able to run without it)
Step by Step installation of mysql under linux using source file.

# groupadd mysql
# useradd -r -g mysql mysql
# cd /usr/local
# tar zxvf /path/to/mysql-VERSION-OS.tar.gz
# ln -s full-path-to-mysql-VERSION-OS mysql
# cd mysql
# chown -R mysql .
# chgrp -R mysql .
# scripts/mysql_install_db --user=mysql
# chown -R root .
# chown -R mysql data ;

# cp support-files/my-medium.cnf /etc/my.cnf ;

# bin/mysqld_safe --user=mysql &

# cp support-files/mysql.server /etc/init.d/mysql.server ;
# ln -s /usr/local/mysql/bin/mysql /usr/bin/mysql ;
# ln -s /usr/local/mysql/bin/mysqladmin /usr/bin/mysqladmin ;
# /etc/init.d/mysql.server restart ;
# chkconfig mysql.server on ;

Delete ALL users who are not root:
mysql> delete from mysql.user where not (host="localhost" and user="root");
Query OK, 5 rows affected (0.15 sec)

mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)

mysql>
Change root database admin password: (note: once this step is complete you’ll need to login with: mysql -p -u root)
mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('mypass');
Query OK, 0 rows affected (0.00 sec)

mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)


Change root username to something less guessable for higher security.
mysql> update mysql.user set user="mydbadmin" where user="root";
Query OK, 2 rows affected (0.00 sec)
Rows matched: 2 Changed: 2 Warnings: 0

mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)
Remove anonymous access to the database(s):
mysql> DELETE FROM mysql.user WHERE User = '';
Query OK, 2 rows affected (0.00 sec)

mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)
Add a new user with database admin privs for all databases:
mysql> GRANT ALL PRIVILEGES ON *.* TO 'warren'@'localhost' IDENTIFIED BY 'mypass' WITH GRANT OPTION;
Query OK, 0 rows affected (0.00 sec)

mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)
Add a MySQL database:
mysql> create database bugzilla;
Query OK, 1 row affected (0.15 sec)

mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)
Configuring the ODBC Connector under wine

downlaod mysql connector
http://mysql.mirror.iweb.ca/Downloads/Connector-ODBC/5.1/mysql-connector-odbc-5.1.9-win32.msi
downlaod MDAC
http://software-files-l.cnet.com/s/software/10/72/94/97/mdac_typ.exe?e=1321303803&h=703f96c1be2d85c8a1be98dab1ff2220&lop=link&ptype=1901&ontid=10250&siteId=4&edId=3&spi=6cb40692746e8d5a1961a5439319e4c2&pid=10729497&psid=10729498&&fileName=mdac_typ.exe

Install Mdac in wine
wine mdac_typ.exe

Install mysql connector odbc
wine msiexec /i mysql-connector-odbc-5.1.9-win32.msi

configuring ODBC Data Sourc

# wine control

in User DSN add new data source → select new odbc driver - > enter data sourc name ,mysql server ip
,port,user,password,database etc.. check test if succesfully show then click on ok
then apply connection pooling to new odbc driviers. Then Driver meny and selecty driver and apply