Showing posts with label ubuntu. Show all posts
Showing posts with label ubuntu. Show all posts

Friday, February 8, 2013

Adding storage to root volume of Ubuntu Amazon EBS Instance

Recently I had to increase the size of root volume of my EBS based Amazon instance. After performing search on Google I got the reply from a Amazon executive.

You can expand the existing root EBS volume for an EBS-backed Ubuntu instance.
Here are the following steps you need to perform.

  • Stop the instance.
  • Create a snapshot of the root EBS volume.
  • Create an EBS volume from that snapshot with the new desired size. (Please ensure it is in the same Availability Zone as the instance)
  • Detach the root EBS volume of the instance.
  • Now attach the newly created EBS volume to /dev/sda1 on the instance.
  • Now start the instance and then login again.
  • Enter 'df -h' to see the current size of the root volume. You should see the new size coming into picture for the /dev/sda1 or /dev/xdva1. If you are still not getting the new size then execute the following command. 
  • Enter 'sudo resize2fs /dev/sda1' or 'sudo resize2fs /dev/xvda1' to get the rest of the expanded disk depending on your instance.
  • Enter 'df -h' again to see the new size of the root volume. Now you should see the new size coming into picture for the /dev/sda1 or /dev/xdva1 as per your instance configuration.
Please note that some of the recent ubuntu instances don't need to execute the resize2fs command. 

Sphere: Related Content

Wednesday, February 29, 2012

Setting up FTP server on Ubuntu

https://help.ubuntu.com/10.04/serverguide/C/ftp-server.html

Sphere: Related Content

Friday, February 17, 2012

How to install OpenVPN on Ubuntu Linux

Make sure you run all mentioned command as root not sudo
$sudo su

http://www.howtoforge.com/internet-and-lan-over-vpn-using-openvpn-linux-server-windows-linux-clients-works-for-gaming-and-through-firewalls

Sphere: Related Content

How to setup Amazon EC2 on ubuntu

https://help.ubuntu.com/community/EC2StartersGuide

Sphere: Related Content

Sunday, December 12, 2010

Create subversion repository on Ubuntu

Recently I had to setup a ubuntu box with subversion on it. I had to also provide web access from subversion with authentication. After few hiccups I managed to do this with installing few packages and configuring them.

Step 1: login to your ubuntu box

#ssh root@x.y.z.t

Step 2: Install required packages
#yum install subversion
#yum install mod_dav_svn httpd

Step 3: Create a parent directory where all your repositories will be set up.
#mkdir -p /srv/svn

Step 4: Create a sample repository using svnadmin tool
#svnadmin create /srv/svn/app
In this step we have created a repository named as app.

Step 5: Change the user and group of the created app repository to give the permission to apache user.
#chown -R apache.apache /srv/svn/app
This user is created when you installed httpd package in step 2. Without this step user will not be able to access it via webserver http protocal, they can however access it using command promp using ssh protocol.

Step6: Restart apache webserver.
#service httpd restart

Step 7: Create a password file for the authentication of users which will be accessing your app repository via http protocol.
#mkdir -p /srv/auth/svn/
#htpasswd -c /srv/auth/svn/app.htpasswd ahsan.javed
In this step we are creating a directory first to store the htpasswd file. then using the htpasswd tool we are creating an user name and password hash entry in created file. This htpasswd tool is by default installed when you perform step 2.

Step 8: Create a virtual host for hosting your subversion access
create a new virtual host file at /etc/httpd/conf.d/svn.conf with the content

    LoadModule dav_svn_module     modules/mod_dav_svn.so
    LoadModule authz_svn_module   modules/mod_authz_svn.so

    <Location /repos>
       DAV svn
       SVNParentPath /srv/svn
    </Location>
    <Location /repos/app>
       AuthType Basic
       AuthName "Subversion Repository"
       AuthUserFile /srv/auth/svn/app.htpasswd
       Require valid-user
    </Location>

Step 9: Restart apache webserver
#service httpd restart


Step 10: Access your setup repository in a browser by typing
http://x.y.z.t:80/repos/app
This will ask a user name and password, provide the username and password created in step 7 to access the repository.

Sphere: Related Content