Category Archives: Unix

Unix

PC-BSD 7 beta 1 released

PC-BSD 7 beta 1 released, many interesting feature came with this release, some of them :

- FreeBSD 7-STABLE
- KDE 4.1
- Xorg 7.3
- Nvidia Driver 173.14.12
- Nvidia Driver 96.43.07
- Nvidia Driver 71.86.06

For full release note click here

For download iso file click here

Unix

BSD movement, PCBSD 7 and next FreeBSD release

FreeBSD movement always make me interest as latest news from distrowatch :

1. PCBSD7, big move from version 1.5 to version 7. Estimated for release at mid-september

Full news

2. Tentative release of FreeBSD 7.1 and 6.4

Full news

For PCBSD I’ll download their vmware version first icon smile BSD movement, PCBSD 7 and next FreeBSD release

Unix Work

Detect RB44GV on FreeBSD 7

New ethernet card we order arrived yesterday, its RB44GV from mikrotik. I just curious to see if its work with my FreeBSD box icon smile Detect RB44GV on FreeBSD 7

materibasuki# ifconfig -a
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=19b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4>
ether 00:1a:92:b3:db:c2
inet 172.88.1.7 netmask 0xfffff000 broadcast 172.88.15.255
media: Ethernet autoselect (1000baseTX <full-duplex>)
status: active
em1: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=19b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4>
ether 00:1a:92:b3:db:c3
media: Ethernet autoselect
status: no carrier
vge0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=1b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING>
ether 00:0c:42:1a:26:48
media: Ethernet autoselect (none)
status: no carrier
vge1: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=1b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING>
ether 00:0c:42:1a:26:49
media: Ethernet autoselect (none)
status: no carrier
vge2: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=1b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING>
ether 00:0c:42:1a:26:4a
media: Ethernet autoselect (none)
status: no carrier
vge3: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=1b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING>
ether 00:0c:42:1a:26:4b
media: Ethernet autoselect (none)
status: no carrier
plip0: flags=108810<POINTOPOINT,SIMPLEX,MULTICAST,NEEDSGIANT> metric 0 mtu 1500
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
inet6 fe80::1%lo0 prefixlen 64 scopeid 0×8
inet6 ::1 prefixlen 128
inet 127.0.0.1 netmask 0xff000000

Another question from my friend. Is it real gigabit card?

Hmmm, I dunno but after few moment :

edp# cd /sys/i386/conf/
edp# ls
.cvsignore GENERIC MAC NOTES XBOX
DEFAULTS GENERIC.hints Makefile PAE

edp# cat GENERIC | grep vge
device vge # VIA VT612x gigabit Ethernet
edp#

Yes, its gigabit ethernet card icon wink Detect RB44GV on FreeBSD 7

rb44gv Detect RB44GV on FreeBSD 7

Unix

Make Virtual Host in Engine X (nginx)

Since last time I install php-fpm in my freebsd box I still looking way to make virtualhost. I think its not easy to make vhost in nginx but I’m wrong icon smile Make Virtual Host in Engine X (nginx)

Just add :

server {

directive

}

will add new vhost.

Full sample from my vhost :

server {
        listen          80;
        server_name     sandbox.digitalfusi.com;

        location / {
            index index.php index.html;
            root  /usr/local/www/nginx/sandbox;
        }
            location ~ \.php$ {
           fastcgi_pass    127.0.0.1:9000;
           fastcgi_index   index.php;
          fastcgi_param     SCRIPT_FILENAME
  /usr/local/www/nginx/sandbox$fastcgi_script_name;
           include      fastcgi_params;
           }

    }

another feature that I learn too is ‘autoindex’ since my friend need to list all files and directory if no index files exists.

nginx autoindex Make Virtual Host in Engine X (nginx)

For more fancy index I need to recompile it with fancyindex but I’m OK with it icon smile Make Virtual Host in Engine X (nginx)

Full sample of nginx.conf for two vhost with autouindex on and off can be download from here.

Linux Unix

101 nginx tutorial and articles

I’m bit lazy to read manual and prefer to read it as a case. Nginx is my favourite now, by collecting related tutorial, blog posting and articles I hope I can learn nginx more.

Links I found so far :

  1. Reverse proxy in depth tutorial
  2. Step by step install Engine X (nginx) and php-fpm in FreeBSD
  3. Dreamier Dream Server with Nginx
  4. Setting Up nginx
  5. New Nginx.conf with optimizations
  6. NginxVirtualHostExample
  7. Nginx as a reverse proxy for Apache
  8. WordPress with Apache and NginX
  9. Moving to Nginx
  10. Nginx + PHP + PHP-FPM on Debian Etch 4.0
  11. WordPress + NGINX : plain permalinks without rewrite
  12. HOWTO: Install WordPress on Nginx
  13. NginX Reporting for Duty
  14. How to do your Nginx rewrites on a Multi User WordPress Integrated with BBPress
  15. Rewrite Non-SSL traffic to SSL Virtual Host with Nginx
  16. HOWTO: Configure nginx for Debian / Ubuntu
  17. Nginx Hacking Tips
  18. Tips on Configuring Nginx for Virtual Hosting
  19. Nginx and Memcached, a 400% boost!
  20. Install Nginx On Ubuntu Server 9.04

More links will be add.

Last Update : May 14 2009

Step By Step Unix

Step by step install Engine X (nginx) and php-fpm in FreeBSD

nginx Step by step install Engine X (nginx) and php fpm in FreeBSDNginx already in my list for almost 3 month but I don’t have time for play around with it. As usual freebsd ports is my preferable method to install software in FreeBSD icon smile Step by step install Engine X (nginx) and php fpm in FreeBSD

I’m lucky to get php-fpm ports from php-fpm site that work for php-5.2.3RC. After change it a bit for php 5.2.6 I can test it together with nginx stable from ports too.

Here’s my steps for install nginx with php-fpm using FreeBSD ports :

1. Install nginx

alamster# cd /usr/ports/www/nginx
alamster# make install

I choose :

HTTP_MODULE
HTTP_REWRITE_MODULE
HTTP_SSL_MODULE
HTTP_STATUS_MODULE

2. Install php

alamster# cd /usr/ports/lang/php5
alamster# make install

I choose :

CLI
CGI
SUHOSIN
IPV6
FASTCGI
PATHINFO

read more »

PHP Unix

undefined function imagecreatefromjpeg()

Call to undefined function imagecreatefromjpeg() in /home/materi/prog/cms_study/admin/pageuploadadd.php on line 88
 
Yes, that message show up when my friend try to access web based application.

I think thats my fault icon smile undefined function imagecreatefromjpeg()

Doing preliminary check :

edp# pkg_info | grep php5-gd
edit /etc/make.conf

PERL_VER=5.8.8
PERL_VERSION=5.8.8
WITHOUT_X11=yes

save.

edp# whereis php5-gd
php5-gd: /usr/ports/graphics/php5-gd
edp# cd /usr/ports/graphics/php5-gd && make install

edp# apachectl restart
done.

That message disappear icon smile undefined function imagecreatefromjpeg()

Linux Unix

mod_unique_id: unable to gethostbyname

Yes, that message display when I try to start apache inside my jail box.

 [Thu Jul 10 13:23:41 2008] [alert] mod_unique_id: unable to gethostbyname(”mailserver”)

To resolve this problem, just edit /etc/hosts

add record for ‘mailserver’ entry, like :

::1                     localhost localhost.my.domain
127.0.0.1               localhost localhost.my.domain
172.88.1.5              email.rasyid.com mailserver

Restart apache and test it yourself.

Unix

Step by Step Install AtMail Open On FreeBSD

AtMail Open, I just know if atmail have free version.

Being curious on how it goes in FreeBSD box, I give it a try as my campus interface.

As usual I try to record it in notepad plus screenshot for guide, perhaps useful icon smile Step by Step Install AtMail Open On FreeBSD

1. Download latest version

mail# wget http://atmail.org/download/atmailopen.tgz

2. Extract and change ownership

mail# tar xvzf atmailopen.tgz

mail# chown -R www:www atmailopen

3. Create database and grant access

mail# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or

\g.
Your MySQL connection id is 35030
Server version: 5.0.51a-log FreeBSD port:

mysql-server-5.0.51a

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the

buffer.

mysql> create database atmail;
Query OK, 1 row affected (0.00 sec)

mysql> grant all privileges on atmail.* to

atmail@localhost identified by ‘atmailpass’ with grant

option;
Query OK, 0 rows affected (0.05 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.04 sec)

read more »

Step By Step Unix

Step by step install wpmu in FreeBSD

A client need to install wordpress multi user to teach their employee about blog. They want it installed in their server, running FreeBSD 7 stable.

Here’s step by step install wpmu in FreeBSD, might be useful for someone icon smile Step by step install wpmu in FreeBSD

1. Download latest wpmu file.

wget http://mu.wordpress.org/latest.tar.gz

2. Extract and  rename

phantom# pwd
/home/phantom/public_html

phantom# ls
info.php        latest.tar.gz

phantom# rm latest.tar.gz && mv wordpress-mu-1.5.1 wpmu

phantom# ls
info.php        wpmu
read more »

Unix

Find out Hard Disk position on FreeBSD

I just replace first HD in our email server with new one, little HD to replace 500GB HD icon smile Find out Hard Disk position on FreeBSD
Until I forgot to copy important file in old HD to new one.
My friend ask me to show my way to find out hard disk location in FreeBSD.

System layout before put old HD :

email# df -H
Filesystem     Size    Used   Avail Capacity  Mounted on
/dev/ad4s1a    2.1G     40M    1.9G     2%    /
devfs          1.0k    1.0k      0B   100%    /dev
/dev/ad4s1d     21G    403k     19G     0%    /home
/dev/ad4s1f     40G    2.0G     35G     5%    /usr
/dev/ad4s1e     10G     60M    9.5G     1%    /var
/dev/ad5s1d    484G    102G    344G    23%    /email
/dev/ad6s1d    484G    3.8G    442G     1%    /email2

My first method is : dmesg

email# dmesg
ad4: 76319MB <Seagate ST380215AS 4.AAB> at ata2-master SATA150
ad5: 476940MB <Seagate ST3500320AS SD15> at ata2-slave SATA150
ad6: 476940MB <Seagate ST3500630AS 3.AAK> at ata3-master SATA150
ad7: 476940MB <Seagate ST3500320AS SD15> at ata3-slave SATA150

Yes, ad7. Last added HD detected as ad7

Second method : sysinstall

read more »