22Jun
Filed in Network and Server
Leave a comment
Do not user “vga=” parameter, it is deprecated. Edit /etc/default/grub, and uncomment:
GRUB_GFXMODE=640x480
Edit /etc/grub.d/00_header search for:
set gfxmode=${GRUB_GFXMODE}
on the next line, insert:
set gfxpayload=keep
verify that the new line is before insmod gfxterm
# update-grub2
# reboot
15Apr
Filed in Network and Server
Leave a comment
How to override php.ini:
1. If you allow user to override php.ini, then edit /home/user/public_html/.htacces :
suPHP_ConfigPath /home/user
Or if you don’t want user freely edit their php.ini file, then add these directive in virtual host configuration /etc/apache2/sites-enabled/:
<VirtualHost *:80>
…………………
IfModule mod_suphp.c
suPHP_ConfigPath /home/perpus
</IfModule>
</VirtualHost>
2. Copy /etc/php5/cgi/php.ini into /home/user/php.ini, then edit accordingly. Warning, if you just create a new php.ini and add a few options in it, then the other options (max upload, disabled function, etc) will be resetted in to default php configuration. So, it will be better if you copy from the main php configuration.
04Mar
Filed in Network and Server
Leave a comment
Viewing current queue:
postqueue -p
Delete all deferred messages:
postsuper -d ALL deferred
Delete all message from admin@yahoo.com:
postqueue -p | grep admin@yahoo.com | cut -c 0-12 | tr -d [:blank:] |postsuper -d -
Whitelist IP:
Create or edit file: /etc/postfix/rbl_client_exceptions, then add IP that you want to whitelist. For example 98.139.91.0/32, you can write:
98.139.91 OK
Then, run this command:
postmap /etc/postfix/rbl_client_exceptions
Finally, restart postfix:
/etc/init.d/postfix restart
26Feb
Filed in Network and Server
Leave a comment
I just want to access my web server from my local address:
iptables -I INPUT -p tcp --dport 80 -s ! 127.0.0.1 -j DROP -m comment --comment "Only for local address"
19Feb
Filed in Network and Server
Leave a comment
Specifications:
- Ubuntu Server 8.10 Intrepid Ibex
- Dell Poweredge 1650
SCSI with RAID Controller
Three SCSI hard disks, 32GB each
RAID 0, each hard disk has its own array controller
- dev/sda1 = /grub, /dev/sda2 = / , /dev/sda5 = swap
Problem:
- After Ubuntu Server installation has finished, server couldn’t boot normally. It stucked forever at BIOS screen, not even reached Grub.
- I reinstalled it with different RAID type, but the result was null.
Solution:
- Install Ubuntu Server
- Boot with Ubuntu Desktop (Live CD)
- Open Partition editor, select each partition’s flag to be marked the flag as “raid”, and “boot” + “raid” for boot partition.
- Open terminal, escalate to root, then reinstall Grub.
#grub
grub> root (hd0,0)
grub> setup hd0
grub> quit
- Edit menu.lst file, then add “root=/dev/sda5” to your kernel’s argument. I still can’t figure out, how could Grub data in /dev/sda1 to be read at /dev/sda5 partition after I boot it. But that’s the fact.
- Reboot the system, eject CD. If you are thrown into BusyBox, from that command prompt, try locate the Grub path. Then fix the kernel’s argument in menu.lst file.
Bad english huh? but … whatever….