:: Cheap Web Hosting :: ~ only from Rp. 900/mo; 250Mb/mo of Bandwidth ~ :: Web Hosting Murah Meriah :: ~ mulai dari Rp. 900/bln; Bandwidth 250Mb/bln ~

Wednesday, November 11, 2009

:: SSH[scp] without Password Authentication

:: What is
Please take a look at this.

:: Install Dependency
Installing SSH Client (Ubuntu)
[ tox : ~ ]$ sudo aptitude install openssh-client

:: Configure SSH without password authentication
+ generate dsa keygen
[ tox : ~ ]$ ssh-keygen -t dsa
Generating public/private dsa key pair.
Enter file in which to save the key (/home/tox/.ssh/id_dsa):
Enter passphrase (empty for no passphrase): [ just return/enter ]
Enter same passphrase again: [ just return/enter ]
Your identification has been saved in /home/tox/.ssh/id_dsa.
Your public key has been saved in /home/tox/.ssh/id_dsa.pub.
The key fingerprint is:
e0:be:0a:93:b9:01:d2:4a:18:25:fa:d8:8b:48:13:9b tox@blackonsole
The key's randomart image is:
+--[ DSA 1024]----+
|. . |
|.o |
|o. . |
|.*+ . . |
|=E+ . S |
|=+.+ . |
|+ B . |
| = . |
| . ... |
+-----------------+

+ copy [ scp] dsa keygen to SSH Server (10.100.100.35)
[ tox : ~ ]$ scp .ssh/id_dsa.pub username@10.100.100.35:~username/.ssh/authorized_keys
Password : [ usernamepass ]
make sure the .ssh directory is at the username home directory.

:: Testink
+ ssh
[ tox : ~ ]$ ssh username@10.100.100.35
Last login: Wed Nov 11 10:40:56 2009 from 10.100.100.33
Have a lot of fun...
[ username: ~ ]$ whoami
username

+ scp
[ tox : ~ ]$ scp username@10.100.100.35:/tmp/test /tmp
test 100% 0 0.0KB/s 00:00
[ tox : ~ ]$ ls -l /tmp/test
-rw-r--r-- 1 tox tox 0 2009-11-11 20:22 /tmp/test

:: Links
+ GoogleLinux
+ TaraGana

Friday, October 30, 2009

:: SVN with Apache on SuSE Linux

:: What is
Please take a look at this.

:: Installing Dependency
+ Installing Apache
+ Installing APR
[ linux:~ ] # mkdir download
[ linux:~ ] # cd download
[ linux:download ] # wget http://apache.pesat.net.id/apr/apr-1.3.8.tar.bz2
[ linux:download ] # cd apr-1.3.8/
[ linux:apr-1.3.8 ] # ./configure --prefix=/usr/local
[ linux:apr-1.3.8 ] # make && make install

+ Installing BerkeleyDB
[ linux:download ] # wget http://download.oracle.com/berkeley-db/db-4.8.24.tar.gz
[ linux:download ] # tar -xzf db-4.8.24.tar.gz
[ linux:download ] # cd db-4.8.24/build_unix/
[ linux:~/db-4.8.24/build_unix ] # ../dist/configure
[ linux:~/db-4.8.24/build_unix ] # make && make install
[ linux:~/db-4.8.24/build_unix ] # echo '/usr/local/BerkeleyDB.4.8/lib/' >> /etc/ld.so.conf
[ linux:~/db-4.8.24/build_unix ] # ldconfig

+ Installing APR-Utils
[ linux:download ] # wget http://apache.pesat.net.id/apr/apr-util-1.3.9.tar.bz2
[ linux:download ] # tar -xjf apr-util-1.3.9.tar.bz2
[ linux:download ] # cd apr-util-1.3.9/
[ linux:apr-util-1.3.9 ] # ./configure --prefix=/usr/local --with-apr=/usr/local --with-berkeley-db=/usr/local/BerkeleyDB.4.8
[ linux:apr-util-1.3.9 ] # make && make install

+ Installing NEON
[ linux:download ] # wget http://www.webdav.org/neon/neon-0.29.0.tar.gz
[ linux:download ] # tar -xzf neon-0.29.0.tar.gz
[ linux:download ] # cd neon-0.29.0/
[ linux:neon-0.29.0 ] # ./configure
[ linux:neon-0.29.0 ] # make && make install

:: Installing SubVersioN (SVN)
+ Downloading Subversion packages
[ linux:~ ] # cd download/
[ linux:download ] # wget http://subversion.tigris.org/downloads/subversion-1.6.6.tar.bz2
[ linux:download ] # tar -xjf subversion-1.6.6.tar.bz2

+ Configure Sqlite for Subversion
[ linux:download ] # wget http://www.sqlite.org/sqlite-amalgamation-3.6.13.tar.gz
[ linux:download ] # tar -xzf sqlite-amalgamation-3.6.13.tar.gz
[ linux:download ] # mkdir /root/download/subversion-1.6.6/sqlite-amalgamation
[ linux:download ] # cp sqlite-3.6.13/sqlite3.c /root/download/subversion-1.6.6/sqlite-amalgamation/

+ Compilling Subversion
[ linux:download ] # cd subversion-1.6.6/
[ linux:subversion-1.6.6 ] # ./configure --prefix=/usr/local/subversion --with-apxs=/usr/local/apache2/bin/apxs --with-apr=/usr/local --with-apr-util=/usr/local --with-neon=/usr/local --with-ssl
[ linux:subversion-1.6.6 ] # make && make install
[ linux:subversion-1.6.6 ] # echo '/usr/local/subversion/lib' >> /etc/ld.so.conf
[ linux:subversion-1.6.6 ] # ldconfig

:: Make Repository
[ linux:~ ] # mkdir /usr/local/subversion/repos
[ linux:~ ] # /usr/local/subversion/bin/svnadmin create --fs-type fsfs /usr/local/subversion/repos
[ linux:~ ] # ls /usr/local/subversion/repos/
conf db format hooks locks README.txt

:: Create and Add SVN users
+ Create user (admin)
[ linux:~ ] # /usr/local/apache2/bin/htpasswd -cmd /usr/local/subversion/repos/conf/svn-auth-file admin
New password: [adminpass]
Re-type new password: [adminpass]
Adding password for user admin

+ Add other users
[ linux:~ ] # /usr/local/apache2/bin/htpasswd -md /usr/local/subversion/repos/conf/svn-auth-file user
New password: [userpass]
Re-type new password: [userpass]
Adding password for user user

:: Testink
+ Importing svn
[ linux:~ ] # /usr/local/subversion/bin/svn import /usr/local/apache2/htdocs file:///usr/local/subversion/repos/trunk/dev -m 'test importing htdocs'

+ Checking svn
[ linux:~ ] # /usr/local/subversion/bin/svn checkout file:///usr/local/subversion/repos/trunk/dev #/svnwork

:: Configure SVN on Apache
+ Configure SVN work directory
[ linux:~ ] # chown -R wwwrun.www /usr/local/subversion/repos/

+ Configure Apache
[ linux:~ ] # vi /usr/local/apache2/conf/httpd.conf
#
# Make sure SVN modules loaded on Apache:
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so

#
# Add line like this:
<Location /repos>
DAV svn
SVNPath /usr/local/subversion/repos/
AuthType Basic
AuthName "SVN Repos"
AuthUserFile /usr/local/subversion/repos/conf/svn-auth-file
Require valid-user
</Location>

+ Starting Apache server
[ linux:~ ] # /usr/local/apache2/bin/apachectl start
You can check this out on 'http://youripserver/repos'

:: Links
+ GoogleLinux
+ MarcGrabanSki
+ HowToForge

Wednesday, October 28, 2009

:: [re]Compile PHP Imap on OpenSUSE 11

:: What is
Please take a look at this.

:: Dependency
Make sure OpenSSL installed on your system.
[ linux:~ ] # rpm -qa | grep openssl
libopenssl0_9_8-0.9.8g-47.1
libopenssl-devel-0.9.8g-47.8
openssl-certs-0.9.8g-47.1
openssl-0.9.8g-47.1

:: Installing PHP Imap from Source
[ linux: ~ ] # mkdir download
[ linux: ~ ] # cd download/
[ linux:download ] # wget ftp://ftp.cac.washington.edu/imap/imap-2007a1.tar.Z
[ linux:download ] # tar -xzf imap-2007a1.tar.Z -C /usr/local/
[ linux:download ] # cd /usr/local/imap-2007a/
[ linux:imap-2007a ] # make slx SSLINCLUDE=/usr/include/openssl/
[ linux:imap-2007a ] # cp /usr/local/imap-2007a/c-client/c-client.a /usr/lib/libc-client.a
[ linux:imap-2007a ] # cp /usr/local/imap-2007a/src/c-client/mail.h /usr/include/
[ linux:imap-2007a ] # cp /usr/local/imap-2007a/src/c-client/rfc822.h /usr/include/
[ linux:imap-2007a ] # cp /usr/local/imap-2007a/c-client/linkage.h /usr/include/

:: [re]Compile PHP5 from Source
[ linux:~ ] # cd download/php-5.3.0/
[ linux:php-5.3.0 ] # ./configure [_other_options_] --with-imap=/usr/local/imap-2007a --with-imap-ssl=/usr/include/openssl
[ linux:php-5.3.0 ] # make && make install
I think that the previous PHP5 packages are stored in the directory /root/download/php-5.3.0
[_other_options_] are options used to compile the previous PHP5.

:: Testink
[ linux:php-5.3.0 ] # /usr/local/php5/bin/php -m | grep imap
imap

:: Restart Apache Service
[ linux:php-5.3.0 ] # /usr/local/apache2/bin/apachectl stop
[ linux:php-5.3.0 ] # /usr/local/apache2/bin/apachectl start

:: Links
+ GoogleLinux
+ DominionWeb