apt-get -o DPkg::options::=--force-confmiss --reinstall install <package>
Update: apt-get only reinstalls missing config files. You can use dpkg --purge <package> to remove the config files before reinstalling the package.
September 16th, 2008 in
Posteet | tags:
apt-get,
debian |
3 Comments
source: Racker Hacker
rpm hangs after printing this error : “rpmdb: Lock table is out of available object entries”.
First, kill (-9) all hanged rpm processes. Then remove the corrupted databases, and rebuild them.
rm /var/lib/rpm/__db.*
rpm --rebuilddb
Tip: if this happens on a server, check that yum-updatesd is not running. yum-updatesd can be the source of such errors. yum-updatesd is evil. I don’t think that yum-updatesd is useful on a server anyway.
chkconfig yum-updatesd off
service yum-updatesd stop
September 9th, 2008 in
Posteet | tags:
rpm |
No Comments
Deepest Sender :: Firefox Add-ons:
Deepest Sender is a client that will allow you to post to blogs from directly within Firefox. It is primarily a LiveJournal client, although it supports Blogger (GData) and WordPress (metaWeblog) too.
September 4th, 2008 in
Posteet | tags:
firefox,
wordpress |
No Comments
source: support arkeia
Drive locked or reserved
Question
The backup fails with “Drive is locked”?
The backup fails with “Drive is reserved”?
Answer
Arkeia uses lock files to prevent other processes from accessing
and obtaining an Arkeia resource that is in use by a running process.
The drive defintion file also contains the PID of the Arkeia Backup
Process (arkbkp). When the PID is active, the drive is considered
locked or reserved.
CAUSE #1
The drive definition file in locked in the Arkeia Configuration
Message : drive list is locked
Message : drive master file is locked
Arkeia uses lock (.lck files), to prevent different process
from accessing the file at the same time.
CAUSE #2
The drive is reserved by an Arkeia process:
Message : Drive “drivename” is already reserved, try later ..
Arkeia processes reserves the drive in order to use it for I/O operations.
The PID of the process is added in the Drive Definition file. (ex: PID “432432″).
SOLUTIONS:
1) If the drive definition file is locked, then no other process can access this file.
To remove this lock, you must stop all running processes:
- Stop all backup and restore jobs
- Exit the Arkeia GUI
- Stop Arkeia using /opt/arkeia/bin/arkboot stop
- Kill all remaining processes
ps -ef |grep ark
kill -15 PID
- Now start Arkeia and the GUI
2) The drive is reserved by an Arkeia process:
Sometimes the drive is reserved while the process which reserved as terminated
or hung.
To correct the issue, you must remove the PID from the file.
- Check the drvxxxx.lst file for the PID
cd /opt/arkeia/server/dbase/f3drv
cat drvxxxxx/drvxxxxx.lst | grep PID
- Check the process list to see if the PID is still active.
Mormally it is arkbkp or arkrst.
ps -ef |grep ark
- kill the process if you know it is hung or not active.
- Now delete the PID line from the drvxxxxxx.lst file
- Restart Arkeia using:
/opt/arkeia/bin/arkboot stop
/opt/arkeia/bin/arkboot start
EOF
February 29th, 2008 in
Posteet | tags:
arkeia |
1 Comment
time command > timelog doesn’t work, because time outputs to stderr
time command 2> timelog doesn’t work either, because time actually is a bash keyword, and it’s always run in a subshell
Redirecting the output of time can be achieved by executing the whole command in a block, then redirecting its output:
{ time command; } 2> timelog
Note: Linux also provides a time binary (/usr/bin/time), but with a different output (and might be less efficient ?)
source
February 28th, 2008 in
Posteet | tags:
bash,
linux,
time |
No Comments
tasklist -> ps
taskkill -> kill
(taskkill /PID < pid >)
February 25th, 2008 in
Posteet | tags:
windows |
No Comments
$ openssl pkcs12 -in pkcs12file.p12 -out pemfile.pem
(by default, pkcs12 will ask for an import password, to decrypt the p12 file (just press Enter if you don’t have a password), and finally a passphrase to encrypt your key)
pemfile.pem now contains your CA certificate, your client certificate, and your (encrypted) key.
February 25th, 2008 in
Posteet | tags:
ssl |
No Comments
Lock a database:
$ mysql -u user -p
mysql> FLUSH TABLES WITH READ LOCK;
This closes all open tables and locks all tables for all databases with a read lock until you execute UNLOCK TABLES.
Unlock:
mysql> UNLOCK TABLES;
(to lock a single table: LOCK TABLES table READ;)
February 25th, 2008 in
Posteet | tags:
mysql |
No Comments
sudo dscacheutil -flushcache
source
February 25th, 2008 in
Posteet | tags:
macosx |
No Comments
quick & dirty…
openssl req -new -x509 -days 365 -nodes -out /etc/apache2/ssl/apache.pem -keyout /etc/apache2/ssl/apache.pem
hint: to generate a wildcard certificate for multiple name-based virtualhosts, use *.domain.tld as the common name.
source
February 25th, 2008 in
Posteet | tags:
apache,
ssl |
No Comments