DevReview.net

More development notices …

Archive for the ‘freebsd’ Category

Setting up SSH public/private keys

leave a comment

SSH (Secure Shell) can be set up with public/private key pairs so that you don’t have to type the password each time. Because SSH is the transport for other services such as SCP (secure copy), SFTP (secure file transfer), and other services (CVS, etc), this can be very convenient and save you a lot of typing.

SSH Version 2

On the local machine, type the BOLD part. The non-bold part is what you might see as output or prompt.

  • Step 1:
    % ssh-keygen -t dsa
    Generating public/private dsa key pair.
    Enter file in which to save the key (~/.ssh/id_dsa):
    (just type return)
    Enter passphrase (empty for no passphrase):
    (just type return)
    Enter same passphrase again:
    (just type return)
    Your identification has been saved in ~/.ssh/id_dsa
    Your public key has been saved in ~/.ssh/id_dsa.pub
    The key fingerprint is:
    Some really long string
    %
  • Step 2:
    Then, paste the content of the local ~/.ssh/id_dsa.pub file into the file ~/.ssh/authorized_keys on the remote host.

Read the rest of this entry »

Written by admin

November 13th, 2010 at 12:16 am

Install Confluence on FreeBSD

leave a comment

1. download tar.gz from atlassian site
2. create new user for ex.: “wiki” (better with .cshrc)
3. add “setenv JAVA_HOME /usr/local/jdk1.6.0″ to .cshrc
4. check with echo $JAVA_HOME
5. create new dir in /home/wiki/confluence-data

6. set home directory for confluence
confluence.home = /home/wiki/confluence-data
in [common]/confluence/WEB-INF/classes/confluence-init.properties

7. change port for server (usually 8080 is busy)
<Connector className=”org.apache.coyote.tomcat4.CoyoteConnector” port=”8090″ minProcessors=”5″ …

6. start bin/.startup.sh
7. check sockstat -4
8. open http://192.168.81.128:8090
9. config other option via jira via web interface
[10. choose embedded storage for testing purposes]

done

Written by admin

October 17th, 2010 at 8:45 am

Install JIRA on FreeBSD

leave a comment

How to install jira on freebsd manual

1.  First of all you should register on atlassian.com site, select needed version, find url for download. Also this registration needed for obtaining jira license (doesn’t matter if its for evaluation or for parmanent use). In this article I have downloaded Jira 4.2

2. Create separate new user from root on your machine with command:

#adduser

(for example: jira, with shell for example: csh)

login under jira user

su - jira

Read the rest of this entry »

Written by admin

October 17th, 2010 at 4:54 am

FreeBSD useful commands

leave a comment

One huge mess

Add user

#adduser

Delete user:

#pw user del myname

Untar tar.gz file:

tar -zxvf file.tar.gz

Put java_home dir manually for user:
add line into shell config:
for ex.: mcedit .cshrc

setenv JAVA_HOME /usr/local/jdk1.6.0

Chown recursively owner for whole directory, example:

chown -R jira:jira atlassian-jira-enterprise-4.1.2-standalone

All list of installed packages with versions

pkg_info

(or find some particular...)
pkg_info | grep mysql

Create symlink

(always mixup source and target meanings for this command …)

ln -s /home/username/dev dev

Turn on slow log queries for mysql

SET GLOBAL log_slow_queries = ‘ON’;
SET GLOBAL long_query_time = 1;


Written by admin

October 17th, 2010 at 12:46 am

Posted in freebsd

Tagged with ,

Upgrading FreeBSD ports & src with cvsup

leave a comment

cvsup – tool for updating FreeBSD source files, ports, docs, etc.

Base page from handbook: http://www.freebsd.org/doc/en/books/handbook/cvsup.html

hockey# cd /usr/ports/net/cvsup-without-gui/
hockey# make install clean

Read the rest of this entry »

Written by admin

May 30th, 2010 at 9:03 am

Installing and using PF (packet filter) firewall for FreeBSD 8.0

leave a comment

First of all pf should be included into kernel. So, you should rebuild kernel for using pf and rebuild it.
(For rebuilding kernel check if you have installed full collection of src from sysinstall)

Build and install FreeBSD kernel

hockey# cd /usr/src/sys/amd64/conf
hockey# mkdir /root/kernels
hockey# cp GENERIC /root/kernels/MYKERNEL
hockey# ln -s /root/kernels/MYKERNEL
hockey# vi /root/kernels/MYKERNEL

Read the rest of this entry »

Written by admin

May 30th, 2010 at 12:15 am

Install FreeBSD 8.0 on hetzner.de

leave a comment

Installation FreeBSD 8.0 amd64 from rescue system for Hetzner EQ6 server, which has on board:

Intel® Core™ i7-920 Quadcore, incl. Hyper-Threading Technology,
* RAM 12 GB DDR3 RAM
* Hard discs 2 x 1500 GB SATA-II HDD (Software-RAID 1)
* NIC 1 GBit OnBoard connected at 100 MBit
* Backup Space 100 GB

Thats my details grabbed from preinstalled by default Debian-50-lenny-64-minimal:

Debian-50-lenny-64-minimal:~# lshw -short
H/W path         Device     Class      Description
==================================================
/0                          bus        MSI X58 Pro-E (MS-7522)
/0/0                        memory     64KiB BIOS
/0/4                        processor  Intel(R) Core(TM) i7 CPU         920  @ 2.67GHz
/0/4/5                      memory     256KiB L1 cache
/0/4/6                      memory     1MiB L2 cache
/0/4/7                      memory     8MiB L3 cache
/0/23                       memory     System Memory
/0/23/0                     memory     2GiB DIMM 1333 MHz (0.8 ns)
/0/23/1                     memory     2GiB DIMM 1333 MHz (0.8 ns)
/0/23/2                     memory     2GiB DIMM 1333 MHz (0.8 ns)
/0/23/3                     memory     2GiB DIMM 1333 MHz (0.8 ns)
/0/23/4                     memory     2GiB DIMM 1333 MHz (0.8 ns)
/0/23/5                     memory     2GiB DIMM 1333 MHz (0.8 ns)

During reading this article I have used next links:

http://habrahabr.ru/blogs/hosting/91429/ (as base, but didn’t worked for me), or mirror found here:

http://pcvector.ru/t1091/

http://wiki.hetzner.de/index.php/FreeBSD_installieren

Preparation

Visit https://robot.your-server.de/server – Main function (servers) – choose server – Rescue – Choose FreeBSD 64bit – Submit – Remember given password

Read the rest of this entry »

Written by admin

May 29th, 2010 at 1:43 pm

How to send mail or file from console

leave a comment

For FreeBSD, with pre-installed postfix

mail -s "test1" test@test.com < /usr/home/username/test-email.txt

Written by admin

March 20th, 2010 at 7:34 pm

How to shutdown FreeBSD

leave a comment

There are 2 commands for shutdowning OS:

shutdown -h now

or

halt

Written by admin

March 9th, 2010 at 7:09 pm

Posted in freebsd

Tagged with , , ,

How to install JAVA on FreeBSD

leave a comment

How to install JDK on FreeBSD:

hockey# cd /usr/ports/java/jdk16

hockey# make config

I’ve removed all default checkbox here … like WEB and TZUPDATE as well

hockey# make install clean

Read the rest of this entry »

Written by admin

March 6th, 2010 at 2:30 pm

Posted in Java, freebsd

Tagged with , , , , ,