Posts Tagged ‘install’

Image

What's inside a Network Socket?

Back to Basic!

We usually look for a Network Socket every time we need a “wired” Internet Connection (most are familiar with the name Internet Socket).

Network Sockets is the end point in a communication across a network, that’s what Wikipedia says.

I use to wire twisted pair cables, the EIA/TIA 568A or B Standard (the WoOWbBWgGWbrBr stuff!) but never I had experience wiring an Ethernet socket. How would the crimped cable work if there’s no network socket installed? Unless cables are directly connected to routers and switches! I saw this easy to follow instruction on ‘How to Wire an Ethernet Socket’. http://www.handymanhowto.com/2009/01/19/how-to-install-an-ethernet-jack-for-a-home-network/. The order of wires is basically  the same but the method of wiring them is different. It is really not an easy or should I mean a fast-to-do job, specially the cabling part. The technicians within my team usually do this network socket stuff. Well, If in case you want to wire a personal network socket, check the link and I hope it helps. 😉

A Web Server delivers web pages requested by clients via the internet. Apache has been the most popular and widely used web server today; in fact, it is the default web server on most Linux Distros. Web pages from the Apache Server can be accessed from a web browser, any web browser initiates communication from a web server by making a request using HTTP or HTTPS.

Installing Apache2 on an Ubuntu machine.

sudo apt-get install apache2

After installing apache2, important files are stored in /etc/apache2.
httpd.conf is the main configuration file for Apache.
apache2.conf is the main configuration file for Apache2.

Starting Apache

sudo /etc/init.d/apache2 start
or
sudo service apache2 start
or
sudo service apache2 graceful --> calls apachectl

Stoping Apache2

sudo /etc/init.d/apache2 stop
or
sudo service apache2 stop

apache2ctl
apache2ctl is a management utility, an Apache HTTP server control interface that is also used to start and stop Apache. Commands are:

start -Start the daemon
stop -Stop the daemon
restart -Restart or start the daemon
fullstatus -Report status of server (requires lynx)
graceful -Gracefully restart the server
configtest -Test config file syntax
help -Display commands

For apache2 options, type man apache2 on the terminal. If apache version 1 is installed on a machine, same commands are used, instead apache2 is replaced with httpd.

OpenSSH is a FREE version of the SSH connectivity tools that technical users of the Internet rely on. Users of telnet, rlogin, and ftp may not realize that their password is transmitted across the Internet unencrypted, but it is. OpenSSH encrypts all traffic (including passwords) to effectively eliminate eavesdropping, connection hijacking, and other attacks. Additionally, OpenSSH provides secure tunneling capabilities and several authentication methods, and supports all SSH protocol versions. [www.openssh.com]

Here’s the summary of commands on installing and configuring SSH in Ubuntu.

SSH INSTALLATION

To install OpenSSH client:

sudo apt-get install openssh-client 

(open-ssh client is installed by default)

To install OpenSSH server:

sudo apt-get install openssh-server

SSH CONFIGURATION

To test if ssh server is running:

ssh localhost
ssh user@server_ip_address

To stop ssh server:

sudo /etc/init.d/ssh stop

To start ssh server:

sudo /etc/init.d/ssh start

To restart ssh server

sudo /etc/init.d/ssh restart

CONNECT AND DISCONNECT FROM A CLIENT

To connect to a remote host:

ssh user@remote_pc's_ip_address

To disconnect from a remote host:

exit

Package management automate the process of installing, upgrading, configuring, and removing software packages.
dpkg is the basic tool for package management. dpkg does not handle dependencies. Here’s a list of of tasks using dpkg.

Package Management Task using dpkg

Install a package: dpgk -i package-file
Remove a package: dpkg -r package-name
Purge a package: dpkg -P package-name
Find out which files a package owns: dpkg -L package-name
Find out which package a file belongs to: dpkg -S filename
Extract information from package: dpkg -e package-file
List contents of package-file: dpkg -c package-file

configuration file for dpkg (dpkg.cfg) is stored in /etc/dpkg directory.
/var/lib/dpkg/ directory contains package management status and system files. The most important are:
alternatives – contains files that define and store configuration for the command alternatives on the system.
available – information about packages available to the system, retrieved from every specified sources.
status – information about packages installed on, or removed from the system.

You may also use apt tool, the ultimate package tool to manage packages. apt handles dependecies and it is one of the strengths of dpkg. apt provides users an easy way of installing and upgrading a system. Here’s a list of tasks using apt.

Package Management Task using apt

Choose which mirror to download from: apt-setup
Allows CD-ROM to be scanned for packages: apt-cdrom
Search all package description: apt-cache search package-name
Search a package full description: apt-cache show package-name
Install a package: apt-get install package-name
update list of packages: apt-get update
Upgrade any packages: apt-get upgrade
Upgrade entire distribution: apt-get dist-upgrade
Remove package: apt-get remove package-name

Configuration file for apt is stored in /etc/apt directory. apt.conf contains general options for APT, such as which release of Debian to install, which proxy settings to use, etc.
apt.conf.d is managed by the software that integrates with apt such as dpkg-reconfigure and apt-list changes.
apt-config is useful for troubleshooting apt.conf problems.