Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
org/wiki/Ubuntu_Edgy#How_to_install_MYSQL_Database_Server
http://dev.mysql.com/doc/refman/5.1/en/index.html
To uninstall a package:
sudo apt-get remove --purge ABC and sudo aptitude purge ABC
How To Search For Missing Packages With apt-file On Debian and Ubuntu
Now let's search for the package containing the file gtk/gtk.h. You could search like this:
Ubuntu installer has configured our system to get its network settings via DHCP, Now we will change t
Edit /etc/network/interfaces and enter your ip address details (in this example setup I will use the IP a
sudo vi /etc/network/interfaces
auto eth0
iface eth0 inet static
address 172.19.0.10
netmask 255.255.255.0
network 172.19.0.0
broadcast 172.19.0.255
gateway 172.19.0.1
Now you need to restart your network services using the following command
vi /etc/hosts
add:
127.0.0.1 localhost.localdomain localhost
192.168.0.100 server1.example.com server1
You need to setup manually DNS servers in resolv.conf file when you are not using DHCP.
sudo vi /etc/resolv.conf
search domain.com
nameserver xxx.xxx.xxx.xxx
0
10 .
11
12 .
13
14
see below 1st
deb http://mirror.ubuntulinux.nl edgy-seveas all
Installing ntfs-3g
apt-get install ntfs-config
gksu ntfs-config
cp /etc/fstab /etc/fstab.bak
gksu gedit /etc/fstab
Now one more thing you want your windows (NTFS) drive to be mounted automatically add the follow
/dev/ /media/ ntfs-3g defaults,locale=en_US.utf8 0 0
Installing flash-plugin
sudo apt-get install -y flashplugin-nonfree
Installing unrar
apt-get -y install unrar
Installing mpg123
apt-get install -y mpg123
Installing beagle
apt-get install -y beagle
Installing gdesklets
apt-get install -y gdesklets
vi /etc/samba/smb.conf
Now in this file you specifically want to pay attention to the to the homes share:
[homes]
comment = Home Directories
browseable = yes
writable = yes
Before anyone can do anything with Samba, we also have to create the necessary Samba account firs
smbpasswd -a your_username
mkdir public_html
MPlayer is a movie and animation player that supports a wide range of codecs and file formats, includ
RealAudio/Video up to 9, Quicktime 5/6, and Vivo 1/2. It has many MX/SSE(2)/3Dnow(Ex) optimized na
XAnim’s and RealPlayer’s binary codec plugins, and Win32 codec DLLs. It has basic VCD/DVD playbac
supports many text-based subtitle formats too. For video output, nearly every existing interface is sup
to raw/divx/mpeg4 AVI (pcm/mp3 audio), and even video grabbing from V4L devices.
gedit /etc/apt/sources.list
gedit /etc/apt/sources.list
Now you need to run the following command to update the source list
gmplayer
or
Once you open the mplayer you should see the mplayer opened in the following screen
mplayer.png
If you want to install Mplayer with plug-in for Mozilla Firefox run the following command
w32codecs this is a package of codecs needed to play multiple formats, notably DivX. (disponible. M
libdvdcss is a highly portable library for accessing and unscrambling DVDs encrypted with the CSS sy
by VLC and all other open source DVD players such as Ogle, xine-based players and MPlayer.
#dpkg -i w32codecs_20060611-0.0_i386.deb
#wget http://www.debian-multimedia.org/pool/main/libd/libdvdcss/libdvdcss2_1.2.9-0sarge0.0_i386.de
#dpkg -i libdvdcss2_1.2.9-0sarge0.0_i386.deb
If you want to download Multimedia related software for debian you can download from here
If you are looking for debian multimedia mirrors check here
Support for WMV, RealMedia and other formats has been bundled into the w32codecs package. This p
repositories due to licensing and legal restrictions.
If you want to download and install .deb packages you can download and install
$wget -c http://packages.freecontrib.org/ubuntu/plf/pool/dapper/non-free/w32codecs_20060611-1plf1
$wget -c http://packages.freecontrib.org/ubuntu/plf/pool/dapper/free/libdvdcss2-dev_1.2.9-1plf4_i386.
Using above download locations you can install more most of the mutimedia codecs for debian and ub
miksuh Says:
September 28th, 2006 at 5:17 pm
I don’t understand why you wget those Debian packages from the debian-multimedia.org. Why don’t y
/etc/apt/sources.list file and enter the following repository:
#gedit /etc/apt/sources.list
#apt-get update
#apt-get install w32codecs libdvdcss2
Guide
http://www.ubuntugeek.com/build-low-cost-lamp-server-using-ubuntu-edgy-eft-in-about-15min.html#m
http://www.ubuntugeek.com/webmin-installation-and-configuration-in-ubuntu-linux.html
http://www.swelltech.com/support/webminguide/
Webmin consists of a simple web server, and a number of CGI programs which directly update system
server and all CGI programs are written in Perl version 5, and use no non-standard Perl modules.
Webmin is a web-based interface for system administration for Unix. Using any browser that supports
module), you can setup user accounts, Apache, DNS, file sharing and so on.
Webmin consists of a simple web server, and a number of CGI programs which directly update system
server and all CGI programs are written in Perl version 5, and use no non-standard Perl modules.
After the installation If you want to access webmin from any machine in your network edit the /etc/we
allow=127.0.0.1 to allow=0.0.0.0
If you want to restrict webmin for only your network you can do in this allow option
Once you change this and save your file and restart the webmin using following command
#/etc/init.d/webmin restart
Go to your browser and type:- https://ipaddress:10000 and you can login using the debian linux roo
If you ou need any webmin modules for your applications you can download from here
Click on Webmin Configuration under webmin tab from here click on Upgrade Webmin and select the
click on upgrade webmin button this will start the webmin upgrade from webmin site
Downloading http://www.webmin.com/download/webmin-1.290.tar.gz ..
Downloading http://easynews.dl.sourceforge.net/sourceforge/webadmin/webmin-1.290.tar.gz (103245
Received 1024 bytes (0 %)
Received 1033216 bytes (10 %)
Received 2065408 bytes (20 %)
Received 3097600 bytes (30 %)
Received 4130816 bytes (40 %)
Received 5163008 bytes (50 %)
Received 6195200 bytes (60 %)
Received 7227392 bytes (70 %)
Received 8260608 bytes (80 %)
Received 9292800 bytes (90 %)
Received 10324511 bytes (100 %)
.. Download complete.
No package signature verification done.
Running setup.sh script to upgrade Webmin .. Please wait a minute until it is complete before continui
#wget http://prdownloads.sourceforge.net/webadmin/webmin_1.290.deb
the install will be done automatically to /usr/share/webmin, the administration username set to root an
You should now be able to login to Webmin at the URL http://localhost:10000/
You can use the above procedure but if you want to install latest version you can download from webm
Prerequisites
Now you need to download the latest webmin from the above downloadlink
Download ‘webmin-1.290.tar.gz’ (at the time of writing) to some location in your machine ex:- /usr/loc
#wget http://prdownloads.sourceforge.net/webadmin/webmin-1.290.tar.gz
#cd /usr/local/src
#cd webmin-1.290
#sh setup.sh
This will start the installation and now it will prompt for several questions answer them as follows
Operating system:
Enter ‘6′
Version:
Enter ‘6′
This is where you can start to make webmin more secure then the standard install you get with apt-ge
to what ever port you want.
It is ‘admin’, so you can leave it as that, or put in any name that you like.
Login password:
By creating the user above and giving it a password, you have now made it so you will not need to log
Password again:
If you did not install ‘libnet-ssleay-perl’ you will get the following message:
‘The Perl SSLeay library is not installed. SSL not available.’ You can continue with the install, but it wo
select here y
At this point it is going to configure things, install things, and create things…
It will then tell you that you can log in to https://hostname:10000 and to accept the certificate.
If you want to change root password in webmin use this included Perl script:
If you want to install any standard modules you can download from here
If you want to install third party modules you can download from here
You can use the above procedure but if you want to install latest version you can download from webm
Prerequisites
Now you need to download the latest webmin from the above downloadlink
Download ‘webmin-1.310.tar.gz’ (at the time of writing) to some location in your machine ex:- /usr/loc
wget http://prdownloads.sourceforge.net/webadmin/webmin-1.310.tar.gz
cd /usr/local/src
cd webmin-1.310
sudo sh setup.sh
This will start the installation and now it will prompt for several questions answer them as follows
Operating system:
Enter ‘6?
Version:
Enter ‘6?
This is where you can start to make webmin more secure then the standard install you get with apt-ge
to what ever port you want.
It is ‘admin’, so you can leave it as that, or put in any name that you like.
Login password:
By creating the user above and giving it a password, you have now made it so you will not need to log
Password again:
If you did not install ‘libnet-ssleay-perl’ you will get the following message:
‘The Perl SSLeay library is not installed. SSL not available.’ You can continue with the install, but it wo
select here y
At this point it is going to configure things, install things, and create things…
It will then tell you that you can log in to https://hostipaddress:10000 and to accept the certificate.
If you want to change root password in webmin use this included Perl script:
9 Responses to “Webmin Installation and Configuration in Debian and Ubu
3. Admin Says:
December 6th, 2006 at 9:03 am
apt-get update
4. Wes Says:
December 14th, 2006 at 3:37 pm
5. tinbox Says:
January 10th, 2007 at 11:07 pm
>>>>>>>>>>>>>>>>>>
6. Pablo Says:
January 15th, 2007 at 1:01 am
para tí de mí
1. Install SSH
Code:
sudo apt-get install ssh openssh-server
2. Enable the universe and multiverse repositories in the /etc/apt/sources.list (https://wiki.ubuntu.com
3. To make this easier use a ssh client like Putty(Win32) or a Term on another machine that has a GUI
re-type them…
Below is the source I just happened to use. If it is not working go to: http://prdownloads.sourceforge.n
Code:
cd webmin*
Code:
./setup.sh
Basically just hit enter and choose SSL and the auto start the service at boot
Web server port (default 10000): (Feel Free to change this)
Login name (default admin):
Login password: AReallyGoodONE
Password again: AReallyGoodONE
Use SSL (y/n): y
Start Webmin at boot time (y/n): y
Now you can login with the user/password that you set at the https://IpAddressOfYourMachine:10000
________________________________________
https://help.ubuntu.com/community/MailServer
https://help.ubuntu.com/ubuntu/serverguide/C/email-services.html
Note 1:
However, I discover it has the same problem, only using different words: «You should configure your M
mail to this type of mailbox if it is different from the one you have configured.»
I still don't know how I can configure postfix correctly. I also think both guides should tell the user to r
all of them and pasting.
Note 2
You can get the digital certificate from a certificate authority. Alternatively, you can create the certific
a Self-Signed Certificate” for more details.
https://help.ubuntu.com/ubuntu/serverguide/C/httpd.html#creating-a-self-signed-certificate
goto
goto
http://www.parcival.org/2006/07/14/howto-install-joomla-on-your-very-own-ubuntu-server/
http://www.howtoforge.org/joomla_ispconfig
http://doc.gwos.org/index.php/ServerGuide#MySQL
In your home directory, also recursively set the proper read/write permissions (this is to ensure that Jo
Next we are going to check if we can access the site in our web browser by adressing it with the prope
When you're in the correct directory you execute a configure script: ./configure. The purpose of the co
and then create the makefile. If the script fails for some reason and tells you to install certain package
find packages in Synaptic named almost the same but with a -dev extension, remember to install thos
needed for compiling). Don't worry if it complains that there is no configure script - many packages do
and after it's been compiled you can install it. There are two ways:
Normal install: If you want to install it the normal "primitive" way, type sudo make install. To remove t
the program you run sudo make uninstall. These two clean-up commands don't always work, though,
http://www.joomlatutorials.com/joomla_tutorials/
Okay, now we have the Apache webserver installed. You can verify if it’s up and running by pointing y
machine, e.g. http://192.168.0.1 This should load the generic Apache welcome site in your browser.
Next we need a place where you can store your (Joomla) files so they are being displayed when you a
Ubuntu this is being done by creating a public_html directory in your /home directory. So do
mkdir public_html
In your home directory, also recursively set the proper read/write permissions (this is to ensure that Jo
If it worked, the command ls -l will display read/write/execute permissions for all users on your public_
Next we are going to check if we can access the site in our web browser by adressing it with the prope
#generic
http://your_ubuntu_IP/~username
#example for user Slartibartfast
http://192.168.0.1/~Slartibartfast
Now you should be greeted with the screen that lets you start with the Joomla configuration. Before w
important step left.
Joomla stores its content in a database, so we still need to setup the MySQL database in Ubuntu. First
this and this chapter of the MySQL documentation)
Furthermore, it’s also wise to set a password for the root user in MySQL:
Joomla stores its content in a database, so we still need to setup the MySQL database in Ubuntu. First
this and this chapter of the MySQL documentation)
mysql -u root
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('MyPW');
exit
Once we have the user we need to create the tables that belong to him/her: (see also the Ubuntu serv
Optional: phpmyadmin
You may be one of those users who doesn’t like managing MySQL databases in a terminal very much.
manage your MySQL from now on by means of your webbrowser, those additional steps will take you
nano -w /etc/apt/sources.list
remove the comment marks for the universe repository. This will allow you to install phpmyadmin:
aptitude update
aptitude search phpmyadmin
aptitude install phpmyadmin
After that you can connect to your MySQL Server and do all admin tasks by visiting the URL
http://localhost/phpmyadmin/
Assuming you have a working Apache web server, with PHP and a MySQL Database, you are on your w
When you have finished uploading the files and folders, go to your homepage (http://www.yoursite.co
pre-installation check page generated by Joomla.
http://help.joomla.org/content/view/39/132/
Configuring MySQL
http://help.joomla.org/content/view/37/132/
u should now see a
Install apache2 in Ubuntu server
sudo apt-get
This will installthe
complete apache2 apache2-common
installation apache2-mpm-prefork
of apache2 web server and now you apache2-utils
need to know ssl-cert
where the config
server.
Default document root for apache2 is /var/www.If you want to change the default document root you n
file and look for this line “DocumentRoot /var/www/” here you can change whereever you want to cha
the above line looks like this “DocumentRoot/home/www/”.
Bydefault Apache2 to Listen on port 80. If this is not desired, please edit /etc/apache2/ports.conf as de
For example if you want to change your apache webserver port to 78 you need to edit /etc/apache2/p
Listen 80
Listen 78
Next we edit /etc/apache2/apache2.conf file and check the index files are correct
If you want to enable some Apache modules (SSL, rewrite, suexec, and include)
You can access you apache using http://yourserverip/apache2-default/ it should appear the following s
<?php phpinfo();?>
Now access this page http://yourserverip/test.php you should see the following screen
http://www.netscape.com/viewstory/2006/10/16/ubuntu-lamp-server-installation-with-
screenshots/?url=http%3A%2F%2Fwww.debianadmin.com%2Fubuntu-lamp-server-installation-with-sc
Create a secure Linux-based wireless access point
Wednesday July 19, 2006 (02:01 PM GMT)
Wi-Fi Protected Access version 2 (WPA2) is becoming the de facto standard for securing wireless netw
Fi products certified by the Wi-Fi Alliance. We all know the security weaknesses of its predecessor, WE
implement the WPA2 protocol on a Linux host and create a secure wireless access point (WAP) for you
Mysql Database Server Installation and Configuration in Ubuntu
MySQL is a widely used and fast SQL database server. It is a client/server implementation that consist
programs/libraries.
MySQL initially only allows connections from the localhost (127.0.0.1). We’ll need to remove that restr
internet. Open the file /etc/mysql/my.cnf
#vi /etc/mysql/my.cnf
#netstat -tap
MySQL comes with no root password as default. This is a huge security risk. You’ll need to set one. So
to set a password for that too. The local-machine-name is the name of the computer you’re working o
#/etc/init.d/mysql restart
If you are looking how to create database,tables and other things check here
If you are looking for webinterface administration or GUI tools for your mysql database check here
If you want to install the Mysql base system as well as a textual client run the following command from
Now that MySQL is installed, you may want to know how to configure it.
We assume that mysqladmin and mysql, which should have been installed when you got the MySQL p
password for MySQL. You can do this by typing:
Now that the root password is set, connect to your MySQL server:
#mysql -u root -p
It will prompt you for a password. Make sure to enter the one you just/previously set. You should now
mysql>
At this point, you will create basic permissions for a user and database. For my setup, I want to allow a
also on the network, which is referred to as “windowsbox” will have access to all databases.
Note, the ‘%’ can be replaced with a database name. The ‘%’ is a wildcard.
Following the previous format, to allow access from another hostname (in this case “windowsbox”) ad
To create a user ‘djg’ who can access the MySQL server from localhost, type this:
To give the user access from another hostname, domain, etc… add other entries accordingly. For exam
Now… to give the user permissions to access a database from localhost, add this entry and change wi
Finally, create the actual database (in this case, ‘mydatabase’) type this:
After prompting you for a password, it should create the database. At this point, you must reload MyS
Congratulations. If all goes well you have set up a user and database with MySQL. You may now creat
Also, please note that by default, MySQL will open up network port 3306 to allow remote requests.
If you do not want this port open, append “–skip-networking” when running safe_mysqld to start
the daemon. Debian users can edit /etc/init.d/mysqld and change this line:
/usr/bin/safe_mysqld > /www.null 2>&1 &
to this:
Now whenever running /etc/init.d/mysql start, it will not open up port 3306.
If you want o install mysql database in ubuntu you can use the same procedure.
phpmyadmin
phpMyAdmin is a tool written in PHP intended to handle the administration of MySQL over the Web. It
tables, delete/edit/add fields, execute any SQL statement, manage keys on fields, create dumps of tab
administrate one single database and multiple MySQL servers.
http://www.phpmyadmin.net/
MySQL Users
MySQL Users provides a simple Web-based interface for creating new MySQL users and maintaining e
http://www.itlab.musc.edu/mysql_users/mysql_users_readme.html
MyClient
MyClient is a simple and clean Web client interface for the MySQL database. It runs with PHP’s registe
Features include unlimited multiple tabbed interfaces, connection to multiple databases, one-button t
saving and loading, query results saving, and localization. It is not a full featured administration tool, b
improves upon the command line interface using a Web-based implementation.
http://myclient.polarlava.com/
WebMySQL
WebMySQL is a Web interface to a MySQL database server. It supports the following SQL queries: SEL
advanced query options such as LIMIT, DISTINCT, and GROUP. Empty databases and tables and mysql
customisable look and feel, and outputs either HTML results or a downloadable CSV file.
Downloads and Documentation
http://www.thedumbterminal.co.uk/software/webmysql.shtml
MySQL Administrator
MySQL Administrator is a powerful visual administration console that enables you to easily administer
visibility into how your databases are operating. MySQL Administrator now integrates database manag
environment, with a clear and intuitive graphical user interface. By using MySQL Administrator you wi
Achieve higher database availability through improved management Reduce errors through visual dat
through improved productivity Deliver a more secure environment through easier privilege managem
Downloads
http://dev.mysql.com/downloads/administrator/1.1.html
Documentation
http://dev.mysql.com/doc/administrator/en/index.html
MySQL Query Browser is the easiest visual tool for creating, executing, and optimizing SQL queries for
gives you a complete set of drag-and-drop tools to visually build, analyze and manage your queries. P
Query Toolbar to easily create and execute queries and navigate query history Script Editor giving you
Window so you can also easily compare and work with multiple queries
Object Browser enabling you to manage your databases, bookmarks, and history using a Web Browse
Database Explorer where you can select tables and fields to query, as well as create and delete tables
tables Inline Help giving you instant help access to selected objects, parameters, and functions
Downloads
http://dev.mysql.com/downloads/query-browser/1.1.html
Documentation
http://dev.mysql.com/doc/query-browser/en/
Gmyclient is designed to be a simple, quick, and powerful way to access your MySQL database. It prov
data. It makes using MySQL very easy.
http://gmyclient.sourceforge.net/
Webmin Module for Mysql
This module allows webmin (a web-based interface for system administration for Unix) to setup datab
server.
http://www.webmin.com/standard.html
You need to stop the mysql server using the following command
sudo /etc/mysql/my.cnf
and look for “datadir = /var/lib/mysql” this si where mysql database default data directory here you n
datadir = /home/db
copy the files from the old datadir to the new location. However, make sure that the files named
ib_arch_log_0000000000, ib_logfile0 etc. are not copied to the newer location.
Make sure that the files and directories are owned by mysql user
Linux run levels are numbered 0 through 6. Run levels stop at six for practical and historical reasons
* 0 System Halt
* 1 Single user
* 2 Full multi-user mode (Default)
* 3-5 Same as 2
* 6 System Reboot
Run level 0 is the system halt condition. Nearly all modern X86 computers will power off automatically
and various different architectures will remain powered on and display a message referring to the halt
Run Level 1 is known as ’single user’ mode. A more apt description would be ‘rescue’, or ‘trouble-shoo
are started. Hopefully single user mode will allow you to fix whatever made the transition to rescue m
(You can boot into single user mode typically by using your boot loader, lilo or grub, to add the word ’
Run levels 2 through 5 are full multi-user mode and are the same in a default User Linux (Debian) sys
distributions to use run level 3 for a text console login and run level 5 for a graphical login.
Run level 6 is used to signal system reboot. This is just like run level 0 except a reboot is issued at the
In the interests of completeness, there is also a runlevel ‘S’ that the system uses on it’s way to anothe
command (”For manpage click here”) for more information, but you can safely skip this for all practica
Like everything else in a Linux system, run levels are defined by files in the file system. All the run lev
the following table:
Each defined run level should have an rcX.d directory where X is the run level number. The contents o
that run level.
Change run levels in Debian and Ubuntu Linux
Before we change run levels it might help to find out which run level is current. Use the ‘runlevel’ com
the current run level. Here is the command and the output shown together due to the sparsity of the o
# runlevel N 2
The ‘N’ stands for none, meaning there has been no run level change since powering up.
The init system controls run levels, but then again, the init system pretty much controls everything. T
article.
#telinit 3
telinit takes one argument on the command line. As always, see the man page for full details. Normall
letter ‘S’. As you may have guessed, the numbers correspond to the run level you wish to move to. Us
number 1, but don’t do it; the ‘S’ runlevel is intended for use by the UserLinux (Debian)system.
A note of caution is warranted here. You can easily use the telinit command to reboot (run level 6), or
recommended. Certain programs need special processing for an orderly shutdown. Bypassing the exp
your data. Older _Unix_ systems are especially sensitive to shutdown/bootup operations.
The preferred method for a serious runlevel change is ’shutdown’. There are easier mnemonics, but in
command. You can use the ‘halt’, or ‘poweroff’ command to stop a system and the ‘reboot’ command
’shutdown’ command with different parameters.
If you wanted runlevel 3 to be the default, then you need to edit /etc/inittab.
id:2:initdefault:
You’d change the ‘2′ to a ‘3′. Next time you reboot, your system will start in runlevel 3. There will be n
you turned it off. Therefore, runlevel 3 will become text only, and it will be the default. If that’s what y
You can only add a new service to the boot sequence if a script in /etc/init.d exists. In that case the fo
(foo being the name of a script in /etc/init.d).
Removing a service
A service may only be removed after the script in /etc/init.d as deleted already. If so, the following com
name of a script in /etc/init.d).
#update-rc.d foo remove
If you want to remove a service without removing the start/stop script as well, you may consider using
configuration file /etc/runlevel.conf. When using the SysV method you should rename the start/stop sc
start/stop script back to its old name.
There are times debian or ubuntu users and admins want to find which version of debian and ubuntu l
Find or identify which version of ubuntu Linux you are running
Solution 1
cat /etc/issue
The file /etc/issue holds the version of Ubuntu installed on your system
Solution 2
lsb_release -a
or
cat /etc/lsb-release
his is very useful for those who is helping their customers and they want to know which version they are running
which version they are running a nd if you took over new system admin job you want to know which version is r
ant to know which version is running on your servers or desktops.
What is net-snmp ?
Simple Network Management Protocol (SNMP) is a widely used protocol for monitoring the health and welfare o
devices like UPSs. Net-SNMP is a suite of applications used to implement SNMP v1, SNMP v2c and SNMP v3 usin
Net-SNMP Tutorials
http://www.net-snmp.org/tutorial/tutorial-5/
Download Net-SNMP
http://www.net-snmp.org/download.html
Net-SNMP Documentation
http://www.net-snmp.org/docs/readmefiles.html
Installing SNMP Server in Debian
If you want to install snmp server in debian you need to install snmpd package using the following command
Default Configuration files are located at /etc/snmp directory this contains the following files.
snmpd.conf snmptrapd.conf
Now we need to concentrate on snmpd.conf file for our configuration. If you want to see the default sn
Before doing any changes to your /etc/snmp/snmpd.conf file take a copy of original file using the following com
Set up the snmp server to allow read access from the other machines in your network for this you need to open
Configuration and save the file.
first step
to
#com2sec paranoid default public
com2sec local localhost public
com2sec localNet 192.168.0.0 /24 public
#com2sec readwrite default private
you can define the source whichever way you want like only allow from local machine for that you need to add
case we are using public as our community.
Second Step
####
# Second, map the security names into group names:
# sec.model sec.name
group MyROSystem v1 paranoid
group MyROSystem v2c paranoid
group MyROSystem usm paranoid
group MyROGroup v1 readonly
group MyROGroup v2c readonly
group MyROGroup usm readonly
group MyRWGroup v1 readwrite
group MyRWGroup v2c readwrite
group MyRWGroup usm readwrite
to
Third Step
####
# Third, create a view for us to let the groups have rights to:
Final Step
####
# Finally, grant the 2 groups access to the 1 view with different
# write permissions:
Optional Configuration
to
syslocation MainDatacenter
syscontact webmaster@debianhelp.co.uk
Now the above configuration able to access local and 192.168.0.0 /24 network machines to use full fu
Now you need to restart the snmp services using the following command
#/etc/init.d/snmpd restart
SNMPv2-MIB::sysDescr.0 = STRING: Linux sritest 2.4.27-2-386 #1 Wed Aug 17 09:33:35 UTC 2005 i68
SNMPv2-MIB::sysObjectID.0 = OID: NET-SNMP-MIB::netSnmpAgentOIDs.10
SNMPv2-MIB::sysUpTime.0 = Timeticks: (656698) 1:49:26.98
SNMPv2-MIB::sysContact.0 = STRING: webmaster@debianhelp.co.uk
SNMPv2-MIB::sysName.0 = STRING: debiantest
SNMPv2-MIB::sysLocation.0 = STRING: Maindatacenter
SNMPv2-MIB::sysORLastChange.0 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORID.1 = OID: IF-MIB::ifMIB
SNMPv2-MIB::sysORID.2 = OID: SNMPv2-MIB::snmpMIB
SNMPv2-MIB::sysORID.3 = OID: TCP-MIB::tcpMIB
SNMPv2-MIB::sysORID.4 = OID: IP-MIB::ip
SNMPv2-MIB::sysORID.5 = OID: UDP-MIB::udpMIB
SNMPv2-MIB::sysORID.6 = OID: SNMP-VIEW-BASED-ACM-MIB::vacmBasicGroup
SNMPv2-MIB::sysORID.7 = OID: SNMP-FRAMEWORK-MIB::snmpFrameworkMIBCompliance
SNMPv2-MIB::sysORID.8 = OID: SNMP-MPD-MIB::snmpMPDCompliance
SNMPv2-MIB::sysORID.9 = OID: SNMP-USER-BASED-SM-MIB::usmMIBCompliance
If you want more options and how to use snmpd.conf file you need to check snmpd.conf man page
If you want to monitor your server or desktop machine resources like disk capacity,load,process check
SNMP Client installation in debian
Now we have seen how to configure SNMP server in above section now we need to install client in other machin
Configuration
The system wide configuration file is /etc/snmp/snmp.conf check the community name is same as serv
Now you need to restart the snmp service using the following command
#/etc/init.d/snmp restart
SNMPv2-MIB::sysDescr.0 = STRING: Linux sritest 2.4.27-2-386 #1 Wed Aug 17 09:33:35 UTC 2005 i686
SNMPv2-MIB::sysObjectID.0 = OID: NET-SNMP-MIB::netSnmpAgentOIDs.10
SNMPv2-MIB::sysUpTime.0 = Timeticks: (168871) 0:28:08.71
SNMPv2-MIB::sysContact.0 = STRING: webmaster@debianhelp.co.uk
SNMPv2-MIB::sysName.0 = STRING: debiantest
SNMPv2-MIB::sysLocation.0 = STRING: maindatacenter
SNMPv2-MIB::sysORLastChange.0 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORID.1 = OID: IF-MIB::ifMIB
SNMPv2-MIB::sysORID.2 = OID: SNMPv2-MIB::snmpMIB
SNMPv2-MIB::sysORID.3 = OID: TCP-MIB::tcpMIB
SNMPv2-MIB::sysORID.4 = OID: IP-MIB::ip
SNMPv2-MIB::sysORID.5 = OID: UDP-MIB::udpMIB
SNMPv2-MIB::sysORID.6 = OID: SNMP-VIEW-BASED-ACM-MIB::vacmBasicGroup
SNMPv2-MIB::sysORID.7 = OID: SNMP-FRAMEWORK-MIB::snmpFrameworkMIBCompliance
SNMPv2-MIB::sysORID.8 = OID: SNMP-MPD-MIB::snmpMPDCompliance
SNMPv2-MIB::sysORID.9 = OID: SNMP-USER-BASED-SM-MIB::usmMIBCompliance
SNMPv2-MIB::sysORDescr.1 = STRING: The MIB module to describe generic objects for network interface sub-
SNMPv2-MIB::sysORDescr.2 = STRING: The MIB module for SNMPv2 entities
SNMPv2-MIB::sysORDescr.3 = STRING: The MIB module for managing TCP implementations
SNMPv2-MIB::sysORDescr.4 = STRING: The MIB module for managing IP and ICMP implementations
SNMPv2-MIB::sysORDescr.5 = STRING: The MIB module for managing UDP implementations
SNMPv2-MIB::sysORDescr.6 = STRING: View-based Access Control Model for SNMP.
Alternately, you can use scli,
#scli localhost
and then type in show or monitor.
This will confirm the SNMP service is active and working properly.
cat /proc/pci
/sbin/lspci
cat /proc/ioports
IRQ /proc/interrupts
/etc/modprobe.conf
(2.6 kernel)
/proc/scsi/scsi
scsi_info command
JE
OHCI
parted
lilo -q
will display information from the map file
lilo -R
will set lilo to automatically boot the specified system on the next reboot only. This is very co
lilo -I
will display information about the path of a kernel
lilo -u
will uninstall lilo and restore the previous boot record.
GRUB
default
specifies which system to load if the user does not make a choice within a timeout. In our ex
timeout
specifies a timeout in seconds before booting the default entry. Note that LILO uses tenths o
splashimage
Specifies the background, or
password
specifies a password that must be entered before a user can unlock the menu and either edi
Our example shows five Linux distributions (three Red Hat and two Ubuntu) plus a Windows XP
title
is a descriptive title that is shown as the menu item when Grub boots. You use the arrow key
root
specifies the partition that will be booted. As with splashimage, remember that counting star
kernel
specifies the kernel image to be loaded and any required kernel parameters. This is similar t
initrd
is the name of the initial RAM disk
savedefault
is shown here for illustration. If the menu command
boot
is an optional parameter that instructs GRUB to boot the selected operating system. This is t
lock
is used in this example with the second Ubuntu system. This system will boot into single use
rootnoverify
is similar to root, except that GRUB does not attempt to mount the filesystem or verify its pa
chainloader
specifies that another file will be loaded as a stage 1 file. The value "+1" is equivalent to 0+
MBR
Recovery
This time, the interrupt numbers are decimal in the range 0 through 15. Once
again, Compare these with the standard IRQ assignments for a PC as shown in
Listing 5.
/proc/interrupts
CPU0
0: 226300426 XT-PIC timer
1: 92913 XT-PIC keyboard
2: 0 XT-PIC cascade
5: 0 XT-PIC usb-uhci
8: 1 XT-PIC rtc
9: 2641134 XT-PIC ehci-hcd, eth0, Intel ICH4
10: 0 XT-PIC usb-uhci
11: 213632 XT-PIC usb-uhci
14: 1944208 XT-PIC ide0
15: 3562845 XT-PIC ide1
NMI: 0
ERR: 0
Hot plugging
There are two commands that your system might use to handle hot plugging of
USB devices, usbmgr and hotplug. According to which you are using, you will
find configuration files in the /etc/usbmgr or /etc/hotplug directories. Newer
systems are more likely to have hotplug.
This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU General Public License for more details.
Using /dev/hda
Information: The operating system thinks the geometry on /dev/hda is
19457/255/63. Therefore, cylinder 1024 ends at 8032.499M.
(parted)
/etc/lilo.conf example
prompt
timeout=50
compact
default=linux
boot=/dev/fd0
map=/boot/map
install=/boot/boot.b
message=/boot/message
lba32
password=mypassword
restricted
image=/boot/vmlinuz-2.4.21-32.0.1.EL
label=linux
initrd=/boot/initrd-2.4.21-32.0.1.EL.img
read-only
append="hdd=ide-scsi root=LABEL=RHEL3"
other=/dev/hda1
loader=/boot/chain.b
label=WIN-XP
matically boot the specified system on the next reboot only. This is very convenient for automatically rebooting
t in seconds before booting the default entry. Note that LILO uses tenths of a second for timeouts while GRUB u
ground, or splash, image to be displayed with the boot menu. GRUB refers to the first hard drive as (hd0) and t
ord that must be entered before a user can unlock the menu and either edit a configuration line or enter GRUB c
five Linux distributions (three Red Hat and two Ubuntu) plus a Windows XP and a floppy boot option. The comm
le that is shown as the menu item when Grub boots. You use the arrow keys to move up and down through the
tion that will be booted. As with splashimage, remember that counting starts at 0, so the first Red Hat system w
el image to be loaded and any required kernel parameters. This is similar to a combination of the LILO image an
e initial RAM disk which contains modules needed by the kernel before your file systems are mounted.
illustration. If the menu command default=saved is specified, and the savedefault command is specified for an o
ameter that instructs GRUB to boot the selected operating system. This is the default action when all commands
mple with the second Ubuntu system. This system will boot into single user mode which permits a user to make
except that GRUB does not attempt to mount the filesystem or verify its parameters. This is usually used for file
ther file will be loaded as a stage 1 file. The value "+1" is equivalent to 0+1 which means to load one sector sta
(fd0) /dev/fd0
(hd0) /dev/hda
(hd1) /dev/hdc
(hd2) /dev/sda
Once you have tested your boot floppy you are ready to install GRUB in the MBR
of your hard drive. For the first IDE hard drive, you would use:
grub-install /dev/hda
or
grub-install '(hd0)'
To install it into the partition boot record for partition 11, use:
grub-install /dev/hda11
or
grub-install '(hd0,10)'
We will now look at some things that can go wrong with your carefully prepared boot setup, particular
These strategies and tools will show you that anyone who has physical access to a machine has a lot o
Sometimes you will install another operating system and inadvertently overwrite your MBR. Some sys
If you don't happen to have a boot floppy, but you still have almost any Linux distribution available, yo
sk and chroot.
(fd0) /dev/fd0
(hd0) /dev/hda
(hd1) /dev/hdc
(hd2) /dev/sda
sh-2.05b#
[ Minimal BASH-like line editing is supported. For the first word, TAB
lists possible command completions. Anywhere else TAB lists the possible
completions of a device/filename.]
title Win/XP
rootnoverify (hd0,0)
chainloader +1
title Floppy
root (fd0)
chainloader +1
repared boot setup, particularly when you install and boot multiple operating systems.The first thing to rememb
ccess to a machine has a lot of power. Likewise, anyone who has access to a grub command line also has acces
overwrite your MBR. Some systems, such as DOS and Windows, always install their own MBR. It is usually very e
Linux distribution available, you can usually boot the Linux install media in a recovery mode. When you do so, t
203+1 records in
203+1 records out
[ Minimal BASH-like line editing is supported. For the first word, TAB
lists possible command completions. Anywhere else TAB lists the possible
completions of a device/filename.]
grub>
Possible commands are: blocklist boot cat chainloader clear cmp color configfi
le debug device displayapm displaymem dump embed find fstest geometry halt help
hide impsprobe initrd install ioprobe kernel lock makeactive map md5crypt modu
le modulenounzip pager partnew parttype password pause quit read reboot root ro
otnoverify savedefault serial setkey setup terminal terminfo testload testvbe u
nhide uppermem vbeprobe
grub>
ss,snd_seq_midi_event
_oss,snd_seq
dec,snd_pcm_oss
c,snd_seq_oss,
snd_pcm,snd_timer
mesberger
84 > 1023)
ba32' instead)
changes to this file
6) is actually on partition 7 the first hard drive (/dev/hda7 in this case), while the first U buntu system which is sp
H9 hdd=ide-scsi
hdd=ide-scsi
t are normally restricted to root access. If this is specified, then you should also specify a pass word in the initia
EL=RHEL3 hdd=ide-scsi
1 ro quiet splash
1 ro single
ultiple operating systems.The first thing to remember is to resist your initial temptation to panic. Recovery is us
o has access to a grub command line also has access to files on your system without the benefit of any ownersh
ws, always install their own MBR. It is usually very easy to recover from this situation. If you develop a habit of c
nstall media in a recovery mode. When you do so, the root filesystem on your hard drive will either be mounted
bs=512 count=1
bs=512 seek=1
y a pass word in the initial options, otherwise, a user can edit out your lock option and boot the system, or add "
n to panic. Recovery is usually only a few steps away. We will give you a few strategies here that should help yo
e benefit of any ownership or other secur ity provisions provided by a running system. Keep these points in min
you develop a habit of creating a boot floppy every time you run lilo or reinstall GRUB, you are home free. Sim
e will either be mounted at some st range recovery point, or the drive will not be mounted at all. You can use th
v/hdb11). GRUB will attempt to mount this partition to check it and provide values to the booted operating syste
and boot the system, or add "single" to one of the other entries. It is also possible to specify a different passwor
tegies here that should help you through many types of crisis.
tem. Keep these points in mind when you select your boot loader. The choice between LILO and GRUB is largely
GRUB, you are home free. Simply boot into your Linux system from the floppy and rerun lilo or grub-install.
mounted at all. You can use the chroot command to make this odd mount point become your root (/) directory. T
to the booted operating system in some cases.
ecome your root (/) directory. Then run lilo or grub-install to create a new boot floppy or to reinstall the MBR. I p
ve learned already and what we are about to show you, you should be equipped to choose the loader that best
ppy or to reinstall the MBR. I prefer to create a floppy and use it to boot, making sure that all is well before I go
o choose the loader that best suits your particular needs and style of working.
ure that all is well before I go and rewrite th e MBR, but you may be more courageous than I. Listing 9 shows an
ous than I. Listing 9 shows an example using the environment we used for our earlier configuration examples. I
rlier configuration examples. In this example, I booted a Red Hat Enterprise Linux boot disk which mounted /dev
boot disk which mounted /dev/hda11 at /mnt/sysimage. Most rescue environments will dump you into a large s
ts will dump you into a large screen with a prompt, rather than the graphical screen you might be more used to
en you might be more used to. Think of this as a terminal window with you logged in as root. In other words, be
d in as root. In other words, be very careful what you write to your hard drive. In listing 9, user entry is shown in
isting 9, user entry is shown inbold.