Archive for the ‘Linux’ Category

How to enable mod_rewrite in apache2 (debian/ubuntu)

apache_display

First install the apache with this command:

apt-get install apache2

Now use locate to find if the mod_rewrite.so is availble on your server:

updatedb
locate mod_rewrite.so

it will found in “/usr/lib/apache2/modules”

New apache follow some folders to enable and disable mods so now do this:

cd /etc/apache2/mods-enabled
touch rewrite.load
vim rewrite.load (you may use any editor to edit this file)
Continue reading

Advertisements

Debian – PHP, MySQL, Apache2

computer-server
This article is a walkthrough on installing PHP environment – PHP, Apache, MySQL and xDebug on Debian.

When it comes to database servers, there are several free database server applications available. The intended use of the database server will have some impact on which database package you choose. MySQL is the most widely used free database server. However, it’s use is primarily to act as a back end database for Web site applications written in embedded scripting languages like PHP because it doesn’t support things like triggers, stored procedures, and replication (yet).

Open a terminal. You will need to install all the parts as root, so… suit up!

Install Apache web server

apt-get install apache2

Install MySQL server

apt-get install mysql-server

Continue reading

Using Screen for Session Management

terminal-icon_128x128Lost your shell connection? Need multiple shell sessions?
You are logged into your remote server via SSH and happily plucking along at your keyboard and then it happens. Suddenly, the characters stop moving and then you get the dreaded “Connection Closed” message. You have just lost your session. You were halfway through some task and now you have to start over. Ugh. Well you can prevent this from happening by using screen. Screen can not only save you from disconnection disasters, but it also can increase your productivity by using multiple windows within one SSH session. Use Screen for Session Management!

What is Screen?
As the man page states, “Screen is a full-screen window manager that multiplexes a physical terminal between several processes (typically interactive shells).” This can be a life saver when working on your dedicated server. Screen has a several great features for helping you administer your server more productively and safely. I am going to discuss the three features (multiple windows, logging, sessions) that I use the most but be sure to see the man page for full details.

$ sudo apt-get install screen

Using Screen
Screen is started from the command line just like any other command:

$ screen

Continue reading