After Fresh Installation of Linux


Basic Linux commands which will be required after new installation


Login as root


sudo su


Install MySQL 5


apt-get install mysql-server mysql-client


Installing Apache2


apt-get install apache2


Installing PHP5


apt-get install php5 libapache2-mod-php5


and then, restart apache — /etc/init.d/apache2 restart


Getting MySQL Support In PHP5


To get MySQL support in PHP, we can install the php5-mysql package. It’s a good idea to install some other PHP5 modules as well as you might need them for your applications. You can search for available PHP5 modules like this: 

apt-cache search php5 

Pick the ones you need and install them like this: 

apt-get install php5-mysql php5-curl php5-gd php5-intl php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-ming php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl 

Now restart Apache2: 

/etc/init.d/apache2 restart


Install phpMyAdmin

sudo apt-get install -y mysql-server


phpMyAdmin is a web interface through which you can manage your MySQL databases. It’s a good idea to install it:

apt-get install phpmyadmin


Change required to browse phpmyadmin


  1. Open /etc/apache2/apache2.conf
  2. Add following line at last: Include /etc/phpmyadmin/apache.conf


Run Below Command, if you are getting apache could not reliably determine domain name error while restarting apache service


sudo sh -c ‘echo “ServerName localhost” >> /etc/apache2/conf.d/name’ && sudo service apache2 restart



Install SVN:


sudo apt-get install subversion libapache2-svn


1) Create SVN Repos

=> sudo svnadmin create /var/lib/svn/repo_name


2) Give permissions to created repos

=> sudo chown -R www-data:www-data /var/lib/svn/repo_name


3) Checkout from svn repos into your /var/www/

=> svn co


4) Create new SVN user

=> sudo htpasswd -m /etc/apache2/dav_svn.passwd user_name


Enable mod_rewrite


a2enmod rewrite


phpmyadmin without password


Open etc/phpmyadmin/

// $cfg[‘Servers’][$i][‘AllowNoPassword’] = TRUE;

uncomment above line, it should read as follows

$cfg[‘Servers’][$i][‘AllowNoPassword’] = TRUE;


Anybody interested in sublime text editor

add-apt-repository ppa:webupd8team/sublime-text-2

apt-get update

apt-get install sublime-text


If CURL is not working try following

sudo apt-get install curl libcurl3 libcurl3-dev php5-curl


sudo /etc/init.d/apache2 restart


To Display Errors 

Open php.ini file – sudo gedit /etc/php5/apache2/php.ini

search for – display_errors

uncomment – Default Value: On

search for – error_reporting

uncomment – Default Value: E_ALL & ~E_NOTICE


Access WWW directory

cd /

cd var


Change owner to your user for complete access

chown -R <your_user_name>:<your_group_name> <path_to_directory>

<your_user_name> would be generally ‘administrator’



Other SVN Commands

Update SVN files

svn up


Commit files to SVN repository

svn ci -m “your comment for this commit” <files>

Add new files to SVN

svn add <file_name or dir_name>


Delete SVN file

svn delete <file_name or dir_name>


Yii framework Live svn checkout URL

svn checkout yii



Enable .HTACCESS on localhost

1) To make .htaccess files work as expected, you need to edit this file:



2) Look for a section that looks like this:

<Directory /var/www/>

Options Indexes FollowSymLinks MultiViews

AllowOverride None

Order allow,deny

allow from all

# Uncomment this directive is you want to see apache2’s

# default start page (in /apache2-default) when you go to /

#RedirectMatch ^/$ /apache2-default/



3) You need to modify the line containing AllowOverride None to read AllowOverride All. This tells Apache that it’s okay to allow .htaccess files to over-ride previous directives. You must restart Apache after the change

sudo /etc/init.d/apache2 restart


PHP.INI settings to be done

1) Open file :- /etc/php5/apache2/php.ini

2) Change below values as per requirement


upload_max_filesize = 128M

max_execution_time = 30 ; Maximum execution time of each script, in seconds

max_input_time = 60 ; Maximum amount of time each script may spend parsing request data

memory_limit = 4M ; Maximum amount of memory a script may consume (16MB)

3) Restart Apache



Enable Remote Access in mysql / Binding Database


To install safari and other window software in Ubuntu


To install opera in Ubuntu


How to create Virtual Host into Ubuntu:


How to convert / cut videos:


avconv -ss <start-time> -t <duration> -i long-video.mp4 -codec copy funny-clip.mp4


MySQL backup and restore databases



mysqldump -u root -ptmppassword –all-databases > /tmp/all-database.sql


To restore the sugarcrm database, execute mysql with < as shown below. When you are restoring the dumpfilename.sql on a remote database, make sure to create the sugarcrm database before you can perform the restore.

# mysql -u root -ptmppassword

mysql> create database sugarcrm;

Query OK, 1 row affected (0.02 sec)

# mysql -u root -ptmppassword sugarcrm < /tmp/sugarcrm.sql

# mysql -u root -p[root_password] [database_name] < dumpfilename.sql


Mail Service:


Ubuntu 12.04 LTS LAMP Server Setup


Netbeans Installation:




Remove all SVN folder from Directory 

Try this:

find . -name .svn -exec rm -rf {} \;

Before running a command like that, I often like to run this first:

find . -name .svn -exec ls {} \;


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s