1. Install curl:
sudo apt-get install curl
2. Enable SSL module:
sudo a2enmod ssl
3. Restart Apache server:
sudo /etc/init.d/apache2 restart
4. Enable site default-ssl:
sudo a2ensite default-ssl
5. Activate new configuration:
sudo /etc/init.d/apache2 reload
6. Test both http and https output with curl:
curl -k http://localhost
curl -k https://localhost
Both commands will have the same output like this:
<html><body><h1>It works!</h1></body></html>
Tuesday, September 8, 2009
Subversion and Eclipse
It needs to install subclipse plugin before Eclipse can use Subversion. Please make sure Subversion has been installed on the server and is functional.
1. Start up Eclipse,from Help->Install New Software. Click Add button, type in http://subclipse.tigris.org/update in Location, click OK button. Select subclipse plugin then click Next button twice. Accept license agreement then click Finish button.
2. Restart Eclipse. From Windows->Open Perspective->Other. Highlight the new item SVN Repository Exploring then click OK button. Enter URL with the path of SVN repository, like http://localhost/svn/myproject, then click OK button. The URL just entered will be displayed under SVN Repository. The SVN exploring is ready to use. Multiple Repository can be added through Add SVN Repository button.
1. Start up Eclipse,from Help->Install New Software. Click Add button, type in http://subclipse.tigris.org/update in Location, click OK button. Select subclipse plugin then click Next button twice. Accept license agreement then click Finish button.
2. Restart Eclipse. From Windows->Open Perspective->Other. Highlight the new item SVN Repository Exploring then click OK button. Enter URL with the path of SVN repository, like http://localhost/svn/myproject, then click OK button. The URL just entered will be displayed under SVN Repository. The SVN exploring is ready to use. Multiple Repository can be added through Add SVN Repository button.
Monday, September 7, 2009
Setup Subversion with Apache on Ubuntu
1. Install subversion and libapache2-svn:
sudo apt-get install subversion libapache2-svn
2. Add new group as subversion, and add www-data and subversion users to this group.
3. Logout and login again to become the member of subversion group.
4. Update/etc/apache2/mods-enabled/dav_svn.conf to something like this for the repository at /var/lib/svn/myporject:
DAV svn
SVNP ath /var/lib/svn
AuthType Basic
AuthName "myproject Subversion Repository"
AuthUserFile /etc/apache2/dav_svn.passwd
Require valid-user
5. Create directory for repository and setup the ownership and permission:
sudo mkdir /var/lib/svn
cd /var/lib/svn
sudo mkdir myproject
sudo chown www-data:subversion myproject
sudo chmod -R g+rws myproject
6. Create the repository:
sudo svnadmin create /var/lib/svn/myproject
7. Restart Apache server:
sudo /etc/init.d/apache2 restart
8. Create user password:
sudo htpasswd -c /etc/subversion/passwd user
9. Test local svn server setup:
svn co http://localhost/svn/myproject --username username
Note: An empty myproject is checkout.
10. Create a project structure named mywork at the current directory then import the directory to the repository:
svn import -m "New import" mywork http://localhost/svn/myproject
To check the repository, and mywork should be shown up:
svn ls http://localhost/svn/myproject
11. To checkout myproject:
svn co http://localhost/svn/myproject/mywork mywork-new
sudo apt-get install subversion libapache2-svn
2. Add new group as subversion, and add www-data and subversion users to this group.
3. Logout and login again to become the member of subversion group.
4. Update/etc/apache2/mods-enabled/dav_svn.conf to something like this for the repository at /var/lib/svn/myporject:
DAV svn
SVNP ath /var/lib/svn
AuthType Basic
AuthName "myproject Subversion Repository"
AuthUserFile /etc/apache2/dav_svn.passwd
Require valid-user
5. Create directory for repository and setup the ownership and permission:
sudo mkdir /var/lib/svn
cd /var/lib/svn
sudo mkdir myproject
sudo chown www-data:subversion myproject
sudo chmod -R g+rws myproject
6. Create the repository:
sudo svnadmin create /var/lib/svn/myproject
7. Restart Apache server:
sudo /etc/init.d/apache2 restart
8. Create user password:
sudo htpasswd -c /etc/subversion/passwd user
9. Test local svn server setup:
svn co http://localhost/svn/myproject --username username
Note: An empty myproject is checkout.
10. Create a project structure named mywork at the current directory then import the directory to the repository:
svn import -m "New import" mywork http://localhost/svn/myproject
To check the repository, and mywork should be shown up:
svn ls http://localhost/svn/myproject
11. To checkout myproject:
svn co http://localhost/svn/myproject/mywork mywork-new
Sunday, September 6, 2009
Setup CVS server on Ubuntu
1. Install CVS client and server:
apt-get install cvs cvsd
With the default installation, the root for cvsd is at /var/lib/cvsd, and the bin, dev, etc, lib, tmp, and usr directories should be created during the install. The default repositories demo and myrepos are defined in the configuration file /etc/cvsd/cvsd.conf.
2. Start the CVS server:
sudo /etc/init.d/cvsd start
It looks like that the command /etc/init.d/cvsd status has problem to display the correct status of the CVS server, run following command to make sure if the server is running:
ps -def | grep cvsd
If the server is not running, modify the line with the word Listen in the configuration file /etc/cvsd/cvsd.conf:
from "Listen * 2401" to "Listen 0.0.0.0 2401".
Restart the server and check again.
3. Create myrepos and CVSROOT directories with following command (Note: the absolute path is needed to initialize the repose):
sudo cvs -d /var/lib/cvsd/myrepos init
sudo chown -R cvsd:cvsd /var/lib/cvsd/myrepos
The basic structures of cvsd and the repository $CVSROOT are ready.
4. Add user to the group cvsd and create the password for users.
From System->Administration->Users and Groups. Click Unlock button and enter the password, then click Manage Groups button. Highlight cvsd then click Properties and select the username from the Group Members list.
Create the user password for CVS login as shown below:
cvsd-passwd /var/lib/cvsd/myrepos username
5. The syntax to login to the local CVS server is shown below:
cvs -d :pserver:username@localhost:/myrepos login
However, if the $CVSROOT is defined just simply enter "cvs login" instead. Add following line in ~/.bashrc is the easiest way to add it to the environment.
export CVSROOT=:pserver:username@localhost:/myrepos
If log in has no problem, CVS should be working fine.
6. Following is the syntax to import an example tools project in the current directory to the repository. Please note that the CVS import function requires $CVSROOT defined.
cd tools
cvs import -m "Initial import into CVS" tools initial start
A new directory, tools, is created at /var/lib/cvsd/myrepos.
7. For any reason to completely uninstall cvsd, enter following command:
apt-get --purge remove cvsd
8. In Eclipse environment, the CVS repository location should be defined as /myrepos instead the full path.
apt-get install cvs cvsd
With the default installation, the root for cvsd is at /var/lib/cvsd, and the bin, dev, etc, lib, tmp, and usr directories should be created during the install. The default repositories demo and myrepos are defined in the configuration file /etc/cvsd/cvsd.conf.
2. Start the CVS server:
sudo /etc/init.d/cvsd start
It looks like that the command /etc/init.d/cvsd status has problem to display the correct status of the CVS server, run following command to make sure if the server is running:
ps -def | grep cvsd
If the server is not running, modify the line with the word Listen in the configuration file /etc/cvsd/cvsd.conf:
from "Listen * 2401" to "Listen 0.0.0.0 2401".
Restart the server and check again.
3. Create myrepos and CVSROOT directories with following command (Note: the absolute path is needed to initialize the repose):
sudo cvs -d /var/lib/cvsd/myrepos init
sudo chown -R cvsd:cvsd /var/lib/cvsd/myrepos
The basic structures of cvsd and the repository $CVSROOT are ready.
4. Add user to the group cvsd and create the password for users.
From System->Administration->Users and Groups. Click Unlock button and enter the password, then click Manage Groups button. Highlight cvsd then click Properties and select the username from the Group Members list.
Create the user password for CVS login as shown below:
cvsd-passwd /var/lib/cvsd/myrepos username
5. The syntax to login to the local CVS server is shown below:
cvs -d :pserver:username@localhost:/myrepos login
However, if the $CVSROOT is defined just simply enter "cvs login" instead. Add following line in ~/.bashrc is the easiest way to add it to the environment.
export CVSROOT=:pserver:username@localhost:/myrepos
If log in has no problem, CVS should be working fine.
6. Following is the syntax to import an example tools project in the current directory to the repository. Please note that the CVS import function requires $CVSROOT defined.
cd tools
cvs import -m "Initial import into CVS" tools initial start
A new directory, tools, is created at /var/lib/cvsd/myrepos.
7. For any reason to completely uninstall cvsd, enter following command:
apt-get --purge remove cvsd
8. In Eclipse environment, the CVS repository location should be defined as /myrepos instead the full path.
Monday, August 31, 2009
Setup Openfiler 2.3 iSCSI on ESXi 4 for Windows
1. Upload folder openfiler-2.3-x86 to the datastore through Datastore Browser. Right click openfiler-2.3-x86.vmx in the folder and select Add to Inventory. Enter the name then click Next button twice, and Finish button to complete the process.
2. Click Edit settings for openfiler, the add hard disk from ESXi as the new iSCSI storage device for Openfiler.
3. Power on the Openfiler, and open the console to confirm the URL for web administration. I use https://192.168.1.105:446 as an example.
4. Logon to Openfiler with your web browser at https://192.168.1.105:446 with the openfiler and password as the user name and password respectively.
5. Go to Volumes, a warning "No existing physical volumes were found, or all existing physical volumes are used. You can create new physical volumes" shows up. Click create new physical volumes, the newly added disk, /dev/sdb, has no partition. Select /dev/sdb from the Edit Disk list, then click Create button to use the entire disk space for the single partition.
6. Go to Volume Groups to create a group by entering the Volume group name and select physical volume /dev/sdb1 to add, then click Add volume group button to complete. Click Add volume, enter the volume name, description, select required space, and then select the filesystem/volume type to iSCSI, finally click Create to create the volume.
7. Go to System, in Network Access Configuration section, enter 192.168.1.0 for both Name and Network/Host, select 255.255.255.0 as Netmask, and select Share as Type, then click Update button.
8. Go to Services and enable iSCSI target server.
9. Go to Volumes, click iSCSI targets, select target configuration, the default target name is shown up, if no changes needed, click Add button to add the new target. Select LUN Mapping, then click Map button. Select Network ACL, select Allow from the Access list, and then click Update button.
10. Windows XP is used to test this iSCSI storage. Download the software from http://www.microsoft.com/downloads/details.aspx?familyid=12cb3c1a-15d6-4585-b385-befd1319f825&displaylang=en, and then install it to you PC.
11. On Windows, from All programs, select Microsoft iSCSI Initiator for configuration. Select Discovery then click Add button to add target portal, enter the IP address of the Openfiler, then click OK.
12. Select Targets then click Log On button. Select Automatically restore this connection when the system boots, then click OK button twice to finish the Windows XP setup.
13. From the disk manager, the Initialize and Convert Disk Wizard pops up automatically. Click Next button to continue. Select the correct disk, then click Next button. It reminds you that the disk will be converted to dynamic disk. Reselect the disk, then click Next then Finish button. Right click on the new disk, and then select New Volume to start the Wizard, click Next button to continue. The simple volume is the default for a single disk volume, click Next button to continue. If the entire disk is used, click Next button to continue. Select the drive letter, the click Next button. Select the Volume label, the click Next button. Click Finish button to finish performing the disk format. Finally, the iSCSI disk is created like a local disk to Windows.
2. Click Edit settings for openfiler, the add hard disk from ESXi as the new iSCSI storage device for Openfiler.
3. Power on the Openfiler, and open the console to confirm the URL for web administration. I use https://192.168.1.105:446 as an example.
4. Logon to Openfiler with your web browser at https://192.168.1.105:446 with the openfiler and password as the user name and password respectively.
5. Go to Volumes, a warning "No existing physical volumes were found, or all existing physical volumes are used. You can create new physical volumes" shows up. Click create new physical volumes, the newly added disk, /dev/sdb, has no partition. Select /dev/sdb from the Edit Disk list, then click Create button to use the entire disk space for the single partition.
6. Go to Volume Groups to create a group by entering the Volume group name and select physical volume /dev/sdb1 to add, then click Add volume group button to complete. Click Add volume, enter the volume name, description, select required space, and then select the filesystem/volume type to iSCSI, finally click Create to create the volume.
7. Go to System, in Network Access Configuration section, enter 192.168.1.0 for both Name and Network/Host, select 255.255.255.0 as Netmask, and select Share as Type, then click Update button.
8. Go to Services and enable iSCSI target server.
9. Go to Volumes, click iSCSI targets, select target configuration, the default target name is shown up, if no changes needed, click Add button to add the new target. Select LUN Mapping, then click Map button. Select Network ACL, select Allow from the Access list, and then click Update button.
10. Windows XP is used to test this iSCSI storage. Download the software from http://www.microsoft.com/downloads/details.aspx?familyid=12cb3c1a-15d6-4585-b385-befd1319f825&displaylang=en, and then install it to you PC.
11. On Windows, from All programs, select Microsoft iSCSI Initiator for configuration. Select Discovery then click Add button to add target portal, enter the IP address of the Openfiler, then click OK.
12. Select Targets then click Log On button. Select Automatically restore this connection when the system boots, then click OK button twice to finish the Windows XP setup.
13. From the disk manager, the Initialize and Convert Disk Wizard pops up automatically. Click Next button to continue. Select the correct disk, then click Next button. It reminds you that the disk will be converted to dynamic disk. Reselect the disk, then click Next then Finish button. Right click on the new disk, and then select New Volume to start the Wizard, click Next button to continue. The simple volume is the default for a single disk volume, click Next button to continue. If the entire disk is used, click Next button to continue. Select the drive letter, the click Next button. Select the Volume label, the click Next button. Click Finish button to finish performing the disk format. Finally, the iSCSI disk is created like a local disk to Windows.
Monday, August 24, 2009
Application Menu on Ubuntu 9.04
To add manually installed Eclipse 3.5 to the Applications->System Tools for easy start up.
1. From System->Preferences->Main Menu to start the menu editing, highlight System Tools, select New Item, the Create Launcher dialog pops up.
2. The default type is Application, Enter "Eclipse 3.5" in the Name field, Browse the executable /usr/local/lib/eclipse/eclipse, click OK, then enter the comment as Java Development Tool. Click OK. The new item Eclipse 3.5 is created and selected at Main Menu dialog. Click Close to finish the Main Menu editing.
3. The item Eclipse 3.5 is the new item in Application->System Tools now.
1. From System->Preferences->Main Menu to start the menu editing, highlight System Tools, select New Item, the Create Launcher dialog pops up.
2. The default type is Application, Enter "Eclipse 3.5" in the Name field, Browse the executable /usr/local/lib/eclipse/eclipse, click OK, then enter the comment as Java Development Tool. Click OK. The new item Eclipse 3.5 is created and selected at Main Menu dialog. Click Close to finish the Main Menu editing.
3. The item Eclipse 3.5 is the new item in Application->System Tools now.
Tools for Android development on Ubuntu 9.04
1. Install Sun Java tool kit 6:
sudo apt-get install sun-java6-jdk
2. Verify the Java version:
java -version
javac -version
3. Download Android SDK, android-sdk-linux_x86-1.5_r3.zip, from http://developer.android.com/sdk/1.5_r3/index.html, and extract to /usr/local/lib. Update the ~/.bashrc to append the Android SDK tools to $PATH:
export PATH=$PATH:/usr/local/lib/android-sdk-linux_x86-1.5_r3/tools
4. Download current Eclipse 3.5, eclipse-java-galileo-linux-gtk.tar.gz, from http://www.eclipse.org/downloads/. Extract to /usr/local/lib.
5. Start up Eclipse, select Help->Install New Software. In the Install dialog, click Add..., then enter http://dl-ssl.google.com/android/eclipse/ in the location then click OK. Select Developer Tool which contains Android DDMS and Android Development Tools, click Next, Next. Accept the terms of License agreement, then click Finish. Go ahead at the restart Eclipse prompt.
6.Set up the Android SDK PATH in Eclipse. Select Windows->Preferences->Android. Browse the SDK Location to set the path.
7. Create an Android Virtual Device (AVD):
android create avd --target 2 --name my_avd
8. If Subversion is not on the system, run follwing to install Subversion:
sudo apt-get install subversion
Otherwise, run following command to checkout the example source from Google to learn and start:
svn checkout http://android-examples.googlecode.com/svn/trunk/ android-examples
sudo apt-get install sun-java6-jdk
2. Verify the Java version:
java -version
javac -version
3. Download Android SDK, android-sdk-linux_x86-1.5_r3.zip, from http://developer.android.com/sdk/1.5_r3/index.html, and extract to /usr/local/lib. Update the ~/.bashrc to append the Android SDK tools to $PATH:
export PATH=$PATH:/usr/local/lib/android-sdk-linux_x86-1.5_r3/tools
4. Download current Eclipse 3.5, eclipse-java-galileo-linux-gtk.tar.gz, from http://www.eclipse.org/downloads/. Extract to /usr/local/lib.
5. Start up Eclipse, select Help->Install New Software. In the Install dialog, click Add..., then enter http://dl-ssl.google.com/android/eclipse/ in the location then click OK. Select Developer Tool which contains Android DDMS and Android Development Tools, click Next, Next. Accept the terms of License agreement, then click Finish. Go ahead at the restart Eclipse prompt.
6.Set up the Android SDK PATH in Eclipse. Select Windows->Preferences->Android. Browse the SDK Location to set the path.
7. Create an Android Virtual Device (AVD):
android create avd --target 2 --name my_avd
8. If Subversion is not on the system, run follwing to install Subversion:
sudo apt-get install subversion
Otherwise, run following command to checkout the example source from Google to learn and start:
svn checkout http://android-examples.googlecode.com/svn/trunk/ android-examples
Subscribe to:
Posts (Atom)