Welcome to Planet openSUSE

This is a feed aggregator that collects what openSUSE contributors are writing in their respective blogs.

To have your blog added to this aggregator, please read the instructions.


Saturday
30 July, 2016


face

I decided to install OpenSuse 10.3 in dual boot with Vista on my laptop, Sony Vaio SZ4MN. Everything it seems to work very well, without any problems, but I still have to test the modem and suspend to ram/disk.

After I did a kernel update from 2.6.22.5-31 to 2.6.22.17-0.1 and I realized that my webcam didn't work. It is a Ricoh WebCam. I found that I have to reinstall the driver (the following packages: r5u870-default and r5u870-firmware), but before, I removed uvcvideo-default and gspcav-default packages.

After installing also jasper (Kopete needs it for webcam support) everything is fine again.

Note: If you have one of the following VAIO models: AR11, FE, AR21, SZ, UX, CR, FZ, or any HP Pavilion machine with a built-in webcam, you should also install this driver.


face

Usually for Java stuff I am using Eclipse IDE.

I am also a LaTeX user and under Windows I am using MikTeX. More about which applications I am using in a next post.

As text editors, of course you can use vim/gvim (with vim-latex plugin), emacs (with AucTeX), TexnicCenter (a free windows application) or Kile (KDE aplication on Linux/Unix). There are many editors but what I pointed here I think are the most suitable for latex from my experience.

What I missed all the time was version control system (cvs, svn). Version control is very well integrated in Eclipse so I decided to give a try to Texlipse plugin which adds LaTeX publishing support. Also you can add spell checking support using Aspell.

So, I downloaded Miktex, I installed it on Windows Vista, so I played a bit with LaTeX to be sure that it is working fine, and after that I added Texlipse plugin to Eclipse, I started by play arround with it.

Trying to compile an article didn't work, I got an error: "The file system path could not be retrieved".

At the beginning I didn't know if it is a miktex instalation/configuration problem or is something strange with Texlipse configuration.

After spending some time fighting with it, I found that is a Vista problem, so here is the solution:

Open a command prompt and type:

set > pdflatex.bat

edit pdflatex.bat and put at the first line:

@echo off

because we don't want to see every time these commands on screen.

On the last line in that file, put your magic command to process the latex file, pdflatex.exe or latex.exe, depends what you want to have as output, .dvi file or .pdf file:

pdflatex.exe %*   or   latex.exe %*

Now, we go back in Texlipse configuration and point the build command to this batch file instead of the normal pdflatex.exe or latex.exe.

Everything should be fine and working now. I am sorry that I didn't add the links for every plugin/application but using google is very easy to find them if you want to play with.


face

If you are thinking to sell your computer or only its hard disk then maybe it would be nice to know how to wipe your computer data.

After you followed this procedure there will be no way to recover your data.

The magic command is here, you can use LiveCD (for example Knoppix):

#shred -vz /dev/sda

or

# shred -u -n 30 /dev/hda

This will overwrite the data on the drive with garbage using 30 passes. The drive will need to be re-formatted after this as even the filesystem structure will be destroyed.

If you want to read more about this command try man shred or info shred


face

FreeBSD is my primary choice when I need to install a new server and if I don't need virtualization (OpenVZ, Linux-VServer, XEN, Vmware, ...). If I need to implement a virtualization solution then CentOS is my friend.

Only I would like to point some interesting sysctl variables which you can set on a FreeBSD box:

TCP and UDP black hole:

net.inet.tcp.blackhole=2
net.inet.udp.blackhole=1

To prevent a user from seeing what other processes a user is running (via ps aux or otherwise), and to prevent a user from reading dmesg.

security.bsd.see_other_uids=0
security.bsd.unprivileged_read_msgbuf=0

face

I spent the last week in Leeds, for a conference. Leeds is a quite nice city, I like it. I took some photos, they will be available soon on my flickr page. Below are two photos with Ubuntu Cola. I don't know if there is something between Ubuntu Linux and Ubuntu Cola, but it is interesting. So, now, I am waiting to find somewhere "FreeBSD Beer" or maybe "OpenSUSE Cocktails", the true "fuel" for the true sysadmin's.

noalt

noalt

Enjoy your preferred drink Ubuntu Cola.


face

As you saw in my previous post, I have this wireless card, so let see what I did to have the wireless connection working on my OpenSUSE box.

The card is coming with some drivers for linux, on the box is mentioned that it has support for Mac OS, Windows x64 Edition, Linux Debian, Fedora, Redhat and Suse.. I was not able to install their drivers on my computer, I have the feeling that something is wrong with their default drivers and I decided to use the drivers which you can download here.

"rt2x00 Project" is a development effort to provide free, stable and feature rich Linux drivers for wireless 802.11b/g/i cards based on the following Ralink chipsets: rt2400, rt2500, rt2570, rt61 and rt73.

So, the steps are here:

1. prepare the kernel first:

# cd /usr/src/linux # make mrproper # make cloneconfig # make modules_prepare

2. Unpack the archive which you just download it somewhere on your hdd:

# tar -zxvf rt61-cvs-daily.tar.gz

3. change the current directory:

# cd rt61-cvs-2008032308/Module

4. compile and install the module:

# make # make install

Now if everything is fine, you can see if you have the drivers installed:

# ifconfig -a # iwconfig
lo        no wireless extensions. eth0      no wireless extensions. vmnet1    no wireless extensions. vmnet8    no wireless extensions.

For the last two commands you have to look after wlan0 or ra0 device. If you still don't have them (like in my case) try:

# modprobe rt61

If you run again the command iwconfig you will see now the device:

# iwconfig  

lo        no wireless extensions. eth0      no wireless extensions. vmnet1    no wireless extensions. vmnet8    no wireless extensions.

wlan0 RT61 Wireless ESSID:"" Nickname:""  
Mode:Managed Frequency:2.412 GHz Bit Rate=54 Mb/s  
RTS thr:off Fragment thr:off  
Encryption key:off  
Link Quality=0/100 Signal level:-121 dBm Noise level:-143 dBm  
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0  
Tx excessive retries:0 Invalid misc:0 Missed beacon:0  
Now you are ready to configure your wi-fi card with yast, so type
**yast2** at the command prompt, and configure it.

At this point the card will work only (in my case it did) if I disable the SECURITY on my router and if I will set NO-Encryption for Autentification Mode in Yast. I don't like this, I want to use WPA, so here is a nice and small script which will do the work:

#!/bin/sh # # Script to configure Edimax EW-7128G Wireless Lan PCI Adapter # to work with WPA mode

iwconfig wlan0 mode managed  
iwpriv wlan0 set AuthMode=WPAPSK  
iwpriv wlan0 set EncrypType="TKIP"  
iwconfig wlan0 essid "YOUR\_ESSID" \# change here  
iwpriv wlan0 set WPAPSK="YOUR\_PASSPHRASE" \# change here  

Now everything is working, I hope that this small howto is useful also for you, so please let a comment if it is working or if you have some problems with it.


face

As you read in my previous post , we arrived in UK already. I have internet connection at work, but I need also at home internet, because during the evening I am reading news, emails, messenger, .... I prefer now, to set up a wirelesss network for my home, because I don't like to have cables in the house.

My computers are here. For Amilo notebook I had already a PCMCIA card "Netgear WG511T" which is working fine on Windows XP, FreeBSD and Linux, Vaio notebook come with an integrated wifi card, I have installed on it Vista and I don't have problems with the wireless card, so what I needed it was a PCI/USB wireless card for the desktop computer which has to work with Linux, Windows and also *BSD operating system and also a wireless router.

Surfing on the internet, reading opinions and different forums, I decided to buy a Linksys WRT54G wireless broadband router, maybe in the future I will try to install  linux on it (openwrt or something similar), and as PCI card I took Edimax EW-7128G wireless adapter which it seems that is working fine with Linux, Windows and FreeBSD/OpenBSD.

The router was very easy to set up and is working fine. I had some problems in installing the PCI wireless card on my Opensuse 10.3 box, finally it is working, I will write here a short tutorial in the next post.

I am really happy with my new wireless network.


face

If you are wainting for UBahn and you are tired, please take a sit ...

berlin_ubahn_waiting.jpg


face

If you are trying a solution to disconnect idle users automatically from your server,  take a look at /usr/ports/sysutils/idled. Maybe also is possible to activate this option directly in sshd but I don't find that option. Please let me know if it is possible.
But, idled works well, and can be used with all types of user login sessions.


Ioan Vancea: SOCKS proxy with SSH

12:00 UTCmember

face

Do you want to connect to irc network you realize that the ports are blocked. Using ssh -X you can forward programs on your computer but if you have a slow connection it doesn't work very well. It is possible to use -D option to create a SOCKS proxy:

    -D [bind_address:]port

    Specifies a local ``dynamic'' application-level port forwarding.
    This works by allocating a socket to listen to port on the local
    side, optionally bound to the specified bind_address.  Whenever a
    connection is made to this port, the connection is forwarded over
    the secure channel, and the application protocol is then used to
    determine where to connect to from the remote machine.  Currently
    the SOCKS4 and SOCKS5 protocols are supported, and ssh will act
    as a SOCKS server.  Only root can forward privileged ports.  Dy-
    namic port forwardings can also be specified in the configuration
    file.

So the magic command is (you need a ssh account on remote server):

$ssh -D 10000 user@ssh-server

this will create a SOCKS proxy on port “10000″ of your computer. This is a nice tunnel to the server. Now, all you need to do is to set in xchat to use a SOCKS proxy. The proxy is, “localhost”, with the port 10000. That's all, the xchat works and you can spend a lot of time on irc.

Also you can use this kind of tunnel for safe browsing. You have to set your preferences in Firefox to use a SOCKS proxy. When you browse, all the connections you make to websites will seem to originate from the server to which you SSH-ed. In addition, all outgoing and incoming data for the browsing session will be encrypted since it passes through the SSH connection. I am using the SOCKS proxy when I need access to websites and I don't have access from home (for example if I need scientific papers), so I open a ssh-tunnel to university and then I can access them.

There are also applications (email clients) which may also support SOCKS proxy.


face

Finally, I found some time to update my virtual machine, Kubuntu from Feisty Fawn to Gutsy Gibbon. I didn't before because I had to resize the virtual disk, the empty space didn't allow me to do the update. So, the necessary steps are here:

1. resize the virtual disk with:

vmware-vdiskmanager -t 1 -x 12GB KUbuntu.vmdk

the options for command are:
t 1 - growable virtual disk split in 2Gb files
x 12 -GB the new size for disk

2. Now we have a large virtual disk but we still need some work to have also a bigger disk in Kubuntu. So, change in bios, for virtual machine to boot from cd in order to resize also the ext3 partition. I used Knoppix for this task and Gparted as application.
3. Reboot and change in bios to boot from hdd.
4. Using Adept as is described on Kubuntu site do the update. After about 1 hour I had the last version of Kubuntu installed and a lot of free space.


face

This weekend we are in Bremen, so here are some images with our Saturday dinner and Sunday lunch.

The dinner to Amico restaurant:

dsc00857.jpg

dsc00858.JPG

dsc00860.JPG

dsc00861.JPG

The lunch, Sunday, was to Sailor's Inn Restaurant:

dsc00926.JPG

dsc00928.JPG

I can say that the food was great ...

If you want to see some photos during our short visit in Bremen feel free to visit my flickr page.


face

Favicon is a 16×16 bitmap in Microsoft icon resource file format. There are a lot of tools available to create a favicon.ico. I used GIMP, which is available for any linux/unix system or can be downloaded from http://www.gimp.org and can be also used on windows. So, first step is to rescale your image to 16x16 pixels and save your rescaled image in pnm or ppm format. Using the command line utility ppmtowinicon which is part of Netpbm package you can obtain the favicon:

ppmtowinicon -output favicon.ico \<inputfile.pnm | inputfile.ppm\>

The other method is to use convert command which is part of ImageMagick package. Since almost all Linux distributions install ImageMagick by default, all you need to generate your own favicon.ico is a shell access to a Linux box:

convert file.jpg -resize 16x16! favicon.ico

All you need now is to copy favicon.ico in your web site root folder and add to your webpage next line, to the \<head> section:

\<link rel="Shortcut Icon"
href="http://www.yourdomain.com/favicon.ico"\>

That's all.


face

Last days I saw a lot of warnings in /var/log/messages, that my hard disk will die soon, thanks smartd. I used this disk only as a storage, to backup my work, my notebooks, movie, music, .... I don't want to lose all these things, so, I decided that is the time to buy a new hard disk. There are many options here, I can buy an internal hdd and put it in my desktop, buy a dedicated NAS, for home use, use a old computer and install FreeNAS on it, or just take an USB external hard disk. I would stay away from the NAS the reason being the cost, and flexibility reasons. I am looking for an external storage, and I am not interested in sharing files off computers.

The best option would be to take two external USB drives, which are simpler, so they are generally less expensive, much less expensive than NASs. I said two drives, because every hard drive will fail and I will need one as a backup. It's cheaper to buy two external drives and using one as a backup than purchasing a NAS and setting up the RAID. Also after, you still don't have a stand alone backup.

Finally, I decided to buy a Buffalo, DriveStation TurboUSB.

buffalohdd_small.jpeg

The drive enclosure contains a 500GB, SATA disk, 7200 RPM. More details about this nice external drive here. It is quiet and uses a heat sink for heat dissipation, but also has a connector to use an optional fan that Buffalo sells as well. This drive contains Buffalo's TurboUSB technology, which seems to be a software method to allow increased data transfer speeds of up to 37% faster than those of standard USB hard drives. It comes with FAT32 preformated file system, ready to be used:

*vioan:\~ \# fdisk -l /dev/sdc*

*Disk /dev/sdc: 500.1 GB, 500107862016 bytes  
255 heads, 63 sectors/track, 60801 cylinders  
Units = cylinders of 16065 \* 512 = 8225280 bytes  
Disk identifier: 0x00000000*

*Device Boot Start End Blocks Id System  
/dev/sdc1 1 60801 488384001 c W95 FAT32 (LBA)*

Also, on cd, there is Memeo™ AutoBackup software (Download Memeo™ AutoBackup), and the disk comes with SecureLockWare™ technology. I was surprised to see in the box also an plug adapter for UK (they have three pins, not two as in germany).

Because, I don't have many files larger than 4G, and I would like to use this external hdd also on unix/linux machines, not only on windows, I decided to keep fat32 as file system. Finally, I copied all my files from the old hard drive on the new external drive. For moment my files are safe. I am planning to buy a second one, in the near future, but I am still not sure when :). This was my story, I am waiting for your comments, and, also please fell free to share it.


face

Are you really interested about what is FreeBSD and how the FreBSD project works? I found a very nice presentation, about 50 minutes, talking about this, so, enjoy to listen:


face

Today I upgraded my Wordpress from 2.2.1 to 2.2.2. They didn't change many things, it was only a security update. So, being not a major update, it is possible to copy the new wordpress files overwriting the old files from your installation, without being necessary to update your database. This worked well, but here I want to point the other method to update your wordpress blog, using a plugin that will upgrade your blog automatically to the latest version. The plugin can be downloaded here and the detailed instructions to using it are here.

The steps which the plugin does;

1. Backs up the files and database and makes them available for download.
2. Downloads the latest files from http://wordpress.org/latest.zip and unpack it.
3. Puts the site in maintenance mode, deactivates all active plugins and will enable them at the end.
4. Upgrades wordpress files and give you the possibility to upgrade the database.
5. Re-activates the plugins.

If you don't want to see/use the intermediate steps let the plugin to be run in an automated mode, and you don't have to carry about, you will see only the final page and you are invited to check your blog.

That's all .

Minor problems in my case:

1. the plugin had no rights to write in wordpress install directory, so I had to fix this first, and rerun the update

2. all plugins were activated but only the sidebar plugin was not activated at the end, so, it was necessary to activate it manually


face

PHP is a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML. It is a very nice, used and easy to learn web programming language. I decided to play arround a bit with it and for this I needed a graph library to create dynamic scientific, business and stock-market charts. So, trying to find something I stopped on these two: PHPlot and JpGraph which are fine for my needs. You also can find useful to look for a nice Tutorial for Component Graph. I finish by tell you “happy programming and nice plots with PHP”.


face

I had the possibility to upgrade my Plesk instalation from 8.0.1 to 8.1.1 without to pay additional money . In the new release notes they mentioned that Ruby on Rails is supported, so I tried it to see. The upgrade was fine, and now I have RoR installed.

To activate it you have to add fast_cgi support for your site. This option is in the same place like the others options (perl/php/python/cgi support).

To check that RoR is installed and it is working:

1. go into the document root folder for that domain.com:

# cd /srv/www/vhosts/domain.com/httpdocs/

2. create a simple RoR application:

# rails myapp

3. go into application directory:

# cd myapp

4. start WEBrick server on 9999 port:

# ruby script/server -p 9999

If you don’t specify a port, default is 3000 but in my case this port was already used.

For more options use the –help option:

[root@bijoux]# ruby script/server --help
=> Booting WEBrick...
Usage: ruby server [options]

    -p, --port=port                  Runs Rails on the specified port.
                                     Default: 3000
    -b, --binding=ip                 Binds Rails to the specified ip.
                                     Default: 0.0.0.0
    -e, --environment=name           Specifies the environment to run this server under (test/development/production).
                                     Default: development
    -m, --mime-types=filename        Specifies an Apache style mime.types configuration file to be used for mime types
                                     Default: none
    -d, --daemon                     Make Rails run as a Daemon (only works if fork is available -- meaning on *nix).
    -c, --charset=charset            Set default charset for output.
                                     Default: UTF-8

    -h, --help                       Show this help message.

5. check your application in browser:

http://www.domain.com:9999

Now, you can see: Welcome aboard so, it is working.

That’s all, bye!


face

Disable ZMD before proceeding:

su -c "rczmd stop"
su -c "rpm -e zmd libzypp-zmd-backend sqlite-zmd rug zen-updater"

Now you can use YaST, Zypper or Smart.

Zypper is the new command line tool in the openSUSE package management stack. You can use it just like rug.

To add the relevant sources, issue the following commands:

su
rpm --import http://linux01.gwdg.de/~pbleser/guru-rpm.asc http://packman.unixheads.com/suse/10.2/gpg-pubkey-1abd1afb.asc
zypper -v sa http://ftp.skynet.be/pub/ftp.opensuse.org/opensuse/distribution/10.2/repo/oss/ suse-oss102
zypper -v sa http://ftp.skynet.be/pub/ftp.opensuse.org/opensuse/distribution/10.2/repo/non-oss/ suse-non-oss102
zypper -v sa http://ftp.skynet.be/pub/ftp.suse.com/suse/update/10.2/ update102
zypper -v sa http://ftp.skynet.be/pub/suser-guru/rpm/10.2/ guru102
zypper -v sa http://ftp.skynet.be/pub/packman/suse/10.2/ packman102

The -v option just provides a little extra verbosity; it isn’t required. For other options, see Using Zypper

Smart is a popular meta-package manager contained on the openSUSE CDs and DVD. To add the repositories via Smart, simply:

su
smart channel --add suse-oss102 type=yast2 baseurl=http://ftp.skynet.be/pub/ftp.opensuse.org/opensuse/distribution/10.2/repo/oss/
smart channel --add suse-non-oss102 type=yast2 baseurl=http://ftp.skynet.be/pub/ftp.opensuse.org/opensuse/distribution/10.2/repo/non-oss/
smart channel --add update10.2 type=rpm-md name="update 10.2" baseurl=http://ftp.skynet.be/pub/ftp.suse.com/suse/update/10.2/ 
smart channel --add packman102 type=rpm-md name="Packman 10.2" baseurl=http://ftp.skynet.be/pub/packman/suse/10.2/
smart channel --add guru102 type=yast2 name="Guru 10.2" baseurl=http://ftp.skynet.be/pub/suser-guru/rpm/10.2/
smart update

Note that the sources above all use ftp.skynet.be. More mirrors exist, it’s recommended to use one in your vicinity. See Package_Sources/Mirrors for more information.


face

I will try to explain step by step how I installed Subversion on a Virtual Private Server wich runs Plesk 8.1.1 as control panel and Suse Linux 9.3 as operating system:

First step is to download subversion package, now the latest version is 1.4.4. It is very nice that they offer also a package with dependencies. So, we download:

subversion-1.4.4.tar.gz

subversion-deps-1.4.4.tar.gz

Unpack them:

# tar -zxvf subversion-1.4.4.tar.gz
# tar -zxvf subversion-deps-1.4.4.tar.gz

The second command will include the dependencies in the same directory with main subversion package.

We compile and install the subversion package and dependencies:

# cd subversion-1.4.4
# ./autogen.sh
# ./configure
# make
# cp /etc/apache2/sysconfig.d/loadmodule.conf /etc/apache2/httpd2-prefork.conf
# make install
# cp /etc/apache2/httpd2-prefork.conf /etc/apache2/sysconfig.d/loadmodule.conf

Now, checking the differences between these two files we have:

# diff /etc/apache2/sysconfig.d/loadmodule.conf /etc/apache2/httpd2-prefork.conf
30a31,32

> LoadModule dav_svn_module /usr/lib/apache2/mod_dav_svn.so
> LoadModule authz_svn_module   /usr/lib/apache2/mod_authz_svn.so

so, we can see that already the modules are in the right place.

Edit /etc/ld.so.conf to include /usr/lib and /usr/lib/apache2 and then run:

# /sbin/ldconfig

IMPORTANT: in /etc/apache2/sysconfig.d/loadmodule.conf we need also:

LoadModule dav_module   /usr/lib/apache2-prefork/mod_dav.so

before the previous two lines. dav_module has to appear before dav_svn_module in file. If you don’t have this line before, you will see next message when you try to restart apache server:

Cannot load /usr/lib/apache2/mod_dav_svn.so into server: /usr/lib/apache2/mod_dav_svn.so: undefined symbol: dav_xml_get_cdata

so, my file looks like this (only last three important lines):

[...]
LoadModule dav_module   /usr/lib/apache2-prefork/mod_dav.so
LoadModule dav_svn_module     /usr/lib/apache2/mod_dav_svn.so
LoadModule authz_svn_module   /usr/lib/apache2/mod_authz_svn.so

Edit /etc/sysconfig/apache2 and add: “dav mod_dav_svn mod_authz_svn” to APACHE_MODULES section. My specific section is like this:

APACHE_MODULES="mod_perl access actions alias auth auth_dbm autoindex cgi dir env expires include log_config mime negotiation setenvif ssl   userdir php4 php5 /usr/lib/apache2-prefork/mod_frontpage.so python   suexec rewrite dav mod_dav_svn mod_authz_svn"

Now is time to create our repository and set the correct owner and group for it:

# svnadmin create /home/svn
# chown -R apacheuser:apachegroup /home/svn

If you edit /srv/www/vhosts/domain.com/conf/httpd.include and add at the end something, Plesk will remove your changes.

So, we need to create a new file vhost.conf and to use this file. I will create /srv/www/vhosts/domain.com/conf/vhost.conf and I will put inside:

<Location /svn>
DAV svn
SVNPath /home/svn
</Location>

for a subdomain the file has to be in /srv/www/vhosts/domain.com/subdomains/NAME/conf

Now, you need to tell Plesk to update it’s information. You have to run:

# /usr/local/psa/admin/sbin/websrvmng -u --vhost-name=domain.com

this will configure plesk only for one


face

You can obtain the latest Drupal release archive from here. The files are in .tar.gz format and can be extracted using most compression tools. On a typical Unix command line, use:

    # wget http://drupal.org/files/projects/drupal-x.x.tar.gz

    # tar -zxvf drupal-x.x.tar.gz

This will create a new directory drupal-x.x/ containing all Drupal files and directories. Move the contents of that directory into a directory within your web server's document root or your public HTML directory:

    # mv drupal-x.x/* drupal-x.x/.htaccess /srv/www/htdocs/drupal

Next step is to create a database using PHPMyAdmin or mysql command line. If you chose to use command line, additional information about privileges, and instructions to create a database using the command line are available in INSTALL.mysql.txt (for MySQL) or INSTALL.pgsql.txt (for PostgreSQL).

To run the install script point your browser to the your website (i.e. http://www.domain.com/drupal). You will be presented with the "Database Configuration" page, where you have to fill the information from the previous step (database name, database user, password)

If you receive in apache log file, next message:

    [Sun Jul 29 11:49:32 2007] [alert] [client 127.0.0.2] /srv/www/htdocs/drupal/.htaccess: order not allowed here

then you have to include next lines in your apache.conf:

    <Directory /srv/www/htdocs/drupal/>
    Options +Includes +FollowSymlinks -Indexes
    AllowOverride All
    Order allow,deny
    Allow from all
    <Files ~ "^\.ht">
    Deny from all
    </Files>
    </Directory>

now, point your browser to: http:/domain.com/drupal/ and fill the information regarding database. Create you initial accout, which is admin user, and configure your website.


face

To reset a root password that you forgot (using paths on our system):

    [root@host root]#killall mysqld
    [root@host root]#/usr/libexec/mysqld -Sg --user=root &

You may have better luck with:

    mysqld --skip-grant-tables --user=root

Go back into MySQL with the client:

    [root@host root]# mysql
    Welcome to the MySQL monitor.  Commands end with ; or g.
    Your MySQL connection id is 1 to server version: 3.23.41
    Type 'help;' or 'h' for help. Type 'c' to clear the buffer.

    mysql> USE mysql
    Reading table information for completion of table and column names
    You can turn off this feature to get a quicker startup with -A
    Database changed

    mysql> UPDATE user
    -> SET password=password("newpassword")
    -> WHERE user="root";
    Query OK, 2 rows affected (0.04 sec)
    Rows matched: 2  Changed: 2  Warnings: 0

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

    mysql> exit;

    [root@host root]#killall mysqld

Start MySQL the normal way for your system, and all is good. For Red Hat this is:

    /etc/init.d/mysqld start

Bye!


face

Maybe you need to do some specific configurations for a domain or subdomain and you tried to do directly in httpd.include file. You saw that it works for the momment but plesk will delete again your specific configurations from this file. So, in this case the answer is vhost.conf file. This file will be placed inside your domain’s conf directory, usually found at /var/www/vhosts/domain.com/conf. Create a file called vhost.conf in whatever editor you prefer. I use vim.

You can now put in any Apache configuration options like you would into httpd.include. In my case I wanted to do only one thing, to have subversion repository accesible over web, without any kind of access restriction.
Here is my vhost.conf file:

    DAV svn
    SVNPath /home/svn

Now, you need to tell Plesk to update it’s information.
You have to run:

    # /usr/local/psa/admin/sbin/websrvmng -u --vhost-name=domain.com

this will configure plesk only for one single domain, in this case domain.com
If you want to configure it for all sites run:

    # /usr/local/psa/admin/bin/websrvmng -a

After this command if you look to httpd.include file, will see that your httpd.include will have an include line for your vhost.conf, something like this:

    Include /srv/www/vhosts/domain.com/conf/vhost.conf

There is also a vhost.conf file for subdomain in their DocumentRoot directory, if you want to do some specific things for subdomain.

That's all, bye!


face

Create a backup of the repository using the following command:

    svnadmin dump /path/to/repository | gzip > repository-backup.gz

Run the svnadmin recover command on the repository:

    svnadmin recover /path/to/repository

Delete any unused log files in the repository:

    svnadmin list-unused-dblogs /path/to/repository | xargs rm -vf

Delete any remaining shared-memory files in the repository:

    rm -f /path/to/repository/db/__db.0*

face

Data repository dump:

Dump first entry to current:

    svnadmin dump /home/svn/repos --revision 0:HEAD > repos.dump 

Dump revision 150 to current:

    svnadmin dump /home/svn/repos --revision 150:HEAD --incremental > repos-150.dump 

Data repository load:

First load:

    svnadmin load /home/svn/repos < repos.dump 

Incremental load:

    svnadmin load /home/svn/repos < repos-150.dump

face

Installing Microsoft's TrueType core fonts for the web on any rpm based linux box with TrueType support is now easy:

I will show you a few solutions with the same final result :)
1. download the .spec file:

    wget http://corefonts.sourceforge.net/msttcorefonts-2.0-1.spec

* build the binary rpm with:

    rpmbuild -bb msttcorefonts-2.0-1.spec

* install the package:

    rpm -ivh /usr/src/packages/RPMS/noarch/msttcorefonts-2.0-1.noarch.rpm

* reload xfs server

    /sbin/service xfs reload

2. a)
Get the install script:

    wget http://penguinfonts.com/packages/fetchmsttfonts.sh

* And run it as root:

    sh ./fetchmsttfonts.sh

b)
Or you can build an rpm package, get the spec file:

    wget http://penguinfonts.com/packages/msttcorefonts-2.0-1.spec

* Then build it:

    rpmbuild -ba msttcorefonts-2.0-1.spec

* Then install the resulting rpm file:

    rpm -i /usr/src/packages/RPMS/noarch/msttcorefonts-2.0-1.noarch.rpm

* reload xfs server

    /sbin/service xfs reload

3. just download and install this package:

MicrosoftFonts-1-jen14.noarch.rpm

The fonts are: Andale Mono, Arial, Comic Sans MS, Courier New, Georgia, Impact, Times New Roman, Trebuchet MS, Verdana and Webdings. Andale, Courier New and Lucida Console are monospaced fonts that are suited for terminal apps.


face

To create the iso file do:

    mkisofs -o /storage/myfiles.iso -J -R -r -V -v /dir/path/

Replace /dir/path/ with the full path to whatever directory contains the files you wish burned to CD.


face
    octave
    a=0:0.1:5
    plot(a,kernelGauss(a,2))
    xlabel(’r')
    ylabel(’W(r)’)
    title(’Gaussian Smoothing Kernel - h=2′)
    print(’kernel.png’,'-dpng’)

face
    mencoder “mf://*.png” -mf fps=10 -o output.avi -ovc lavc -lavcopts vcodec=mpeg4

face

Here are some tips & tricks for Opera browser:

News feed reader

* to mark all messages inside a feed as read: CTRL + SHIFT + a

* show the news only for current week and the new posts at the top. For this you have to edit .opera/mail/index.ini, is necessary to do this modifications for every feed :

Model Age=1
Sort Type=4
Sort Ascending=0

* the update frequency at every 30 minutes:

Update Frequency=1800

<- Current blog entries