Tag-Arhiv za » svod «

Thursday, November 12th, 2009 | Autor:

If you ever find yourself updating a single application in Arch Linux (a very bad idea, btw) and it upgrades readline you might end up seeing an error along the lines of:
/bin/bash: error while loading shared libraries: libreadline.so.5: cannot open shared object file: No such file or directory
Hopefully you still have a bash prompt open and you haven’t closed them all. If you still can, immediately run the following:
pacman -S bash
else you won’t be able to run bash any more because bash would still be linking to the old version of readline.

Također, in future, don’t run
pacman -Sy application
(python in my case)
instead, run:
pacman -Syu
which will ensure that all applications are upgraded.

Personally, I think that bash should have had a dependency set saying that it required the old specific version of readline and the same for the new bash, requiring the new version of readline. Regardless, rather play it safe. 😉

Udio
Petak, 11. rujna, 2009 | Autor:

Mir u zemlji USB

Pod *ništa operativni sustav, ima više particija na USB pogon nije raketna znanost, to samo radi. U mom slučaju, moj USB disk ima dvije particije, jer prva particija za podizanje sustava Arch Linux postavili.

Imam Windows na radnoj površini kod kuće – uglavnom za igranje – i mnogi od mojih kolega ga koriste previše. Budući da Windows ne učiniti vrlo dobro s ne-Windows particija sam shvatio sam mogao stvoriti FAT32 particiju na memory stick, nakon podizanja sustava Arch Linux particije. FAT32 je gotovo sveprisutan i iskoristiv na svakom zajedničkom desktop operativni sustav na svijetu.

Bleh

Nažalost, to ne radi ravno isključiti šišmiš. Očigledno, Microsoft u svojoj beskrajnoj mudrosti odlučio da se memory stick bi trebao imati jedan (i samo jedan) particija. U stvarnosti Windows nađe prvu particiju i onda ignorira sve druge koji se dogoditi da se postavili:

Please Format

Err, nema, Ja ne želim da formatiram Arch Linux instalacijski particiju

Trik za dobivanje što rade je zavarati Windows na razmišljanje uređaj Ne redoviti USB memory stick, ali možda solid-state tvrdi disk što će se dogoditi da se priključiti preko USB-a. Da znam, ovo je ozbiljno glup da je Windows ponaša na ovaj način. Solid-state tvrdi disk je samo nevjerojatnih veliki (i brzo) Memory Stick nakon svega!

Našao sam nekoliko izvora o tome kako to učiniti, međutim još uvijek sam imao shvatiti neke stvari sam sa sobom. Konkretno, vodiči sam našao bilo preskočila neke korake ili nisu dali dovoljno informacija o tome gdje se preuzeti vozač paket.

Ovaj postupak uključuje ručno mijenjanje hardver i instaliranje “nisu potpisale” vozači “nije namijenjen za vaš hardver”. Znam netko će slomiti njihov sustav i kriviti mene tako da sam sada reći da sam ne preuzimamo odgovornost za eventualne štete možete učiniti kako bi vaš Windows sustav kao rezultat toga. Pročitajte kako opet. 😛

Upute

remove the highlighted text

kliknite za uvećanu verziju

Preuzmite i raspakirajte vozača, izvorno stvorio Hitachi, ovdje. Otvorite cfadisk.inf datoteku u Notepad (ili vaš omiljeni čistim urednica), i pronaći odjeljak označen [cfadisk_device]. Izvadite odjeljak označenog na desnoj strani:

Minimiziranje (ne zatvoriti) urednik i idite na svoje ikone – desni klik na My Computer i odaberite Prvojstva. Odaberite karticu hardvera, a zatim odaberite [Device menadžer]:

System Properties

Nađi uređaj pod “Diskovi”, desni klik svoj memory stick i odaberite Prvojstva:

Device Manager

Kliknite karticu detaljima i na dropdown box na toj stranici, odaberite “Hardver IDS”. Kliknite na prvu crtu u popis hardvera IDS i pritisnite Ctrl C za kopiranje ime:

USB Hardware Ids

Ne zatvarajte ovaj dijalog, vratiti u notepad (koji je na minimum) i zalijepite ID hardvera u kojoj je uklonjen prethodni sadržaj.

Changes pasted into notepad

Spremite datoteku u Notepad i vratite se dijaloški prozor nekretnina uređaja. Kliknite “Vozač” Kartica i kliknite [Update vozača…] Gumb. U prozorima koji pop-up, odaberite “Nema, Nije li ovo TNaziv”; [Next] -> “Instaliraj s popisa ili eOSEBNI mjesto (Napredno)”; [Next] -> “DNemoj pretragu. Ja ću odabrati vozač instalirati.”; [Next] -> [Have Disk…].

Unsigned Drivers - Click Continue Anyway

Pronađite mapu u koju ste spremili izmijenjenu cfadisk.inf datoteku. Kliknite [U redu]. Naći ćete

postoji Hitachi Microdrive vozač navedene. Odaberite ovaj i kliknite [Next]. Kad upozorenje

pojavljuje, klik [Yje]. Drugi upozorenja će se pojaviti u vezi sličnoj pitanju (to su “nepotpisani” i “nije namijenjen za vaš hardver” Upozorenja sam spomenuo ranije). Kliknite [CU svakom slučaju ontinue]:

U tom trenutku sam se preporučuju zatvaranje svih dijaloških okvira koji se odnose na postavljanje. Konačno, izvadite i ponovno umetnite memorijski stick u USB port i trebali uvidjeti da je extra particija na palice su dostupni. U najgorem scenariju, još uvijek može trebati particionirati disk Međutim, tvrdi dio je gotov. 🙂

Udio
Nedjelja, April 26th, 2009 | Autor:

Trust me. We’re still dealing with regexesjust in a roundabout (and vaguely practical) way. This is a pretty comprehensive listing of how to go about flushing DNS caches while using regexes to show where similar methods deviate.

Why do we want to clear DNS caches exactly?

There are a number of reasons to clear DNS caches, though I believe these are the most common:

  • An intranet service has an private (internal) IP address when on the company network but it has a public IP address for outside access. When you try to access that service from outside after accessing it from inside, there’s a chance that you would have cached the private (inaccessible) IP. A good long-term solution is to make the service inaccessible except via VPN. A simpler solution is to leave work at work. 😛
  • An internet service or web site changes their DNS settings and your desktop/laptop is looking at theoldsetting. In this case, the new setting has not yet propagated. Hosting Admins come across this case very often.
  • Privatnost: If someone can track your DNS history then it wouldn’t be too hard to figure out which web sites you’ve been viewing. Though the individual pages you’ve viewed can’t be tracked in this way, the hostnames, kao “dogma.swiftspirit.co.za” ili “google.comwill be in the DNS cache, likely in the order you first accessed each site. There are better ways to do this though. One example is to use a Tor network for all DNS requests.

Flushing WindowsDNS cache, from command prompt:

Evidence suggests that prior to Windows 2000, Windows OS’s didn’t cache DNS results. The ipconfig command, run from the command prompt, was given some control over the DNS cache and has remained roughly the same since.

To get to the prompt if using Vista as non-Admin: Start -> Programs -> Accessories -> Right-clickCommand Prompt” -> Run As Administrator

Otherwise: Start -> Run -> [cmd ] -> [ U redu ]

ipconfig /flushdns

Flush the DNS Resolver Cache in Windows

It is also possible to clear the cache in Windows by restarting the “DNS Client” ili “Dnscache” usluga.

Flushing Mac OS X DNS cache, from shell prompt:

Since Mac OS X, Apple Macs have been running a Unix-based, POSIX-compliant, operating system based on Nextstep, itself originally containing code from FreeBSD i NetBSD. Mac OS X uses lookupd ili dscacheutil to manage the DNS cache, depending on the version.

To get to the prompt: Applications -> Utilities -> Terminal

(lookupd|dscacheutil) -flushcache

What have we here? As per dio 1, the vertical bar indicates that eitherlookupdILIdscacheutilare acceptable. The parenthesis indicate that the vertical bar only applies to thelookupd|dscacheutilportion of the expression. Thus, the ” -flushcacheis not optional and must be included in the command in order for it to work. Note that these commands produce no output unless there is an error.

Use dscacheutil if you’re using Mac OS X 10.5 (Leopard) or later.

Mac OS X:

lookupd -flushcache

Mac OS X Leopard:

dscacheutil -flushcache

Use dscacheutil to flush the cache in Mac OS X Leopard

There is also a GUI tool, DNS Flusher, which automatically uses the correct command available.

Flushing Linux/UnixDNS cache, from shell prompt:

N.B. If you don’t already have either bind (with caching lookup enabled), nscd, or dnsmasq installed and running on your *nix-based desktop/server, you are probably not caching DNS at all and there is nothing to flush. In that case you will be utilising your DNS server for every web request, probably slowing your web experience.* If so, I recommend at least installing nscd as it is the easiest to set up. **

Flushing nscd’s cache

As with the Mac OS command, this produces absolutely no output unless there is an error:

(|sudo )(|/usr/sbin/)nscd -i hosts
  • Use sudo if you’re not already root otherwise the first selection is blank.
  • Specify /usr/sbin/ if nscd is not already within thepath”. If your distribution has nscd in a strange place, locate it first:
locate -r bin/nscd$

Notice that the abovebin/nscd$is itself a regular expression. 🙂

Using nscd, invalidate thehosts” cache memorije, logged in as a user:
sudo nscd -i hosts
Using nscd, invalidate thehosts” cache memorije, logged in as root:
nscd -i hosts
Using nscd, invalidate thehosts” cache memorije, logged in as root, specifying the full path:
/usr/sbin/nscd -i hosts

Flushing bind’s cache

To flush bind’s cache, we issue a command via rndc. Use sudo if you are not already root:

(|sudo )rndc flush

Restarting the cacheing services also works!

Here’s how to restart either of the caching daemons:

(|sudo )(usluga |/etc/(rc\.d|rc\.d/init\.d|init\.d)/)(bind|dnsmasq|nscd) restart

That’s starting to get difficult to read. *** Luckily I’ve explained in detail:

  • As with the previous command, use sudo if you’re not already root.
  • The second selection has the first option “usluga “. This applies mainly to Red Hat/CentOS and Fedora systems.
  • The “/etc/(rc\.d|rc\.d/init\.d|init\.d)/” needs to be expanded further. This is for most other systems. Generally, the rc.d is for if you’re using a BSD-style init system (for example: Arch Linux, FreeBSD, or OpenBSD). The best way to know for sure which command to use is to ‘locatethe correct nscd or dnsmasq path. Most Unix flavours, even Solaris, use nscd:
locate -r \.d/nscd$ ; locate -r \.d/dnsmasq$ ; locate -r \.d/rndc$
  • The last choice is betweenbind”, “nscd”, i “dnsmasq”. This depends entirely on which is installed and in use.
  • The last of the pattern, ” restart”, is the instruction given to the daemon’s control script.

Svod, using dnsmasq, restarting the cache daemon, logged in as root:

/etc/rc.d/dnsmasq restart

Svod, using nscd, restarting the cache daemon, logged in as user:

sudo /etc/rc.d/nscd restart

CentOS / Red Hat, using nscd, restarting the daemon, as root:

service nscd restart

nscdrestart

Flush Mozilla Firefox’s internal DNS cache:

Mozilla Firefox keeps its own DNS cache for performance. Firefox 2 would cache only 20 entries for up to 60 seconds. The default setting as of Firefox 3 appears to be 512 entries for up to 60 minutes which seems much more reasonable for every-day browsing. If your desktop has a built-in cache (which most now do) then the cache here is actually redundant. I’m not aware of any other browsers that implement DNS caching.

I’ve found a few solutions for when you need to clear the cache. It seems there are many ways to do this however these are the easiest, which I’ve put into order of preference.:

  1. Install the Firefox DNS Flusher Addonprovides a button to flush the cache.
  2. Install the DNS Cache Addonprovides a toggle which disables or enables the DNS cache.
  3. Clear Cache (clears browser cache as well as DNS Cache): Select Tools -> Clear Private Data; Deselect all checkboxes except for Cache; Kliknite [ Clear Private Data Now ].
  4. Manually do what DNS Cache does: set the following 2 about:config optionsnetwork.dnsCacheExpiration” i “network.dnsCacheEntries” za 0 and then back to the default.

I had a bad cached record and I cleared my browser’s cache. But its still giving me the wrong info. What gives?

Because of how DNS propagation works, you preferably need to flush the DNS on all DNS hosts between yourself and theauthoritivehost, starting with the host closest to the authoritive host (furthest away from your browser).

As an example, if you have a router that is caching DNS, reset the router’s cache before restarting the DNS cache of your operating system, and only then should you clear the cache in Firefox. The reason is that even if you only clear your OS and Firefox’s caches, your desktop is still going to ask the router for its bad record anyway.

What if my DNS server is a server on the net outside my control?

You could try temporarily using a different nameserver, possibly even a publicly open server. OpenDNS shows some good information on how to do this. If you’d like, you should also be able to get relevant information from your own ISP regarding their resolving DNS servers. A local example (South Africa) is SAIX which lists their resolving DNS servers.

* Likely the reason why Firefox has a DNS cache built-in ****
** “((Pacman|jogurt) -S|emerge|(yum|aptitude|apt-get) install) nscdand then ensure that the service is added to the startup scripts. Refer to your distribution’s installation documentation.
*** I’m looking for a syntax highlighting plugin that can work with regex
**** I’ve read statements that restarting the network(ing|) service also clears the DNS cache however I haven’t seen any evidence that this is true. If anyone has a example where this is true, please provide me with the details.
Udio
Srijeda, 22. travnja, 2009 | Autor:

Svod Linux je postupak instalacije je dokumentirano na Arch Wiki. Preporučujem da osobe novi u Arch pokušajte izvrsna Vodič za početnike umjesto Službeni Arch Linux Install Guide. Iako su obje wiki unosi pokriti sličnu zemlju, početnike Vodič daje puno više relevantnih informacija za one koji su novi u sustav. Početnike Vodič je usmjeren na desktop instalacije i, kao što sam instalirate poslužitelj, Neću se ide kroz instalaciju grafičkom okruženju uopće. Pod pretpostavkom da ste nakon moje instalacije, Pretpostavljam da sam slijedio Vodič za početnike pa sve do i uključujući instalaciju sudo. Ja instalirao ssh demon poslije nego tijekom početnog postavljanja međutim.

Nekoliko malih preporuke i napomene u vezi instalacije:

  • Ako možete,, razmotriti korištenje USB memory stick za instalatera i držati ga pri ruci za buduće instalacije.
  • Držim kopiju moje lokalne “repozitorij” instaliranih aplikacija na mom instalater memory stick. Nakon instalacije će se spremiti malo preuzimanje i ažuriranje vremena kopiranjem na novi server je / var / cache memorije / Pacman / PKG / mape. Spremište na moj desktop je obično 1.7 GB
  • Za rc.conf, Južnoafrički-odgovarajuće regionalne postavke:
    LOKALNI =”en_ZA.utf8″
    TIMEZONE =”Afrika / Johannesburg”
  • Ja sam postavio mrežu vrlo jednostavno, prema vodiču, te će se proširiti na mreži postava u kasnijoj poštom.
  • Kao što je za poslužitelj, moja ne-privilegirani korisnik na poslužitelju je samo dio 3 skupine: kotača (za sudo), skladištenje, i korisnici. Desktop korisnik će vjerojatno biti na mnogo više skupina.

Ja radije koristite aplikaciju pod nazivom jogurt umjesto Arch je zadano Voditelj paket. Yaourt ima isti korištenja sintaksu kao Pacman osim što podržava nekoliko dodatnih mogućnosti. To je zapravo omot zahtjev u tom njemu, pak, koristi Pacman. Važnije, yaourt podržava instalaciju aplikacija iz Arch-a ZLATO. The ZLATO je repozitorij instalacijskih skripti izgradili Arch korisnike za Arch korisnicima da lako instalirati aplikacije koje nisu službeno podržan od strane glavnih Arch spremištima. Yaourt možete preuzeti i instalirati aplikacije iz AUR ili glavnom repozitorija sa istim zapovjedništvom, liječenje Aur kao “samo još jedan repozitorij”. Pacman nažalost ne podržava taj.

Opet, Instalacija je prekrivena Wiki. Preporučujem jednostavan put spominje u wiki, ako ste novi na Arch. Njegova previše prerano to učiniti na teži način (Također je spomenuo u unosu wiki).

Kad je učinio, nadogradnju sustava izdavanjem jednu naredbu:

yaourt -Syu

ILI

Pacman -Syu

i slijedite dane preporuke.

Udio
Srijeda, March 25th, 2009 | Autor:

I finally got Ignite Realtime'S Spark to work. I don’t particularly like Sparkits a necessity though and I’m sure others have had trouble with it.

As some readers might be aware, I’m using 64-bit Arch Linux. Spark runs on top of a JRE, independent of the base platform. Therefore, this shouldn’t be an issue. Međutim, Spark appears to come bundled with a 32-bit JRE.

After a lot of hassle, I eventually figured all I had to do was obscure or remove (rename or delete) the bundled JRE. This way, Spark’s startup script wouldn’t find the bundled JRE and it would be forced to search for the one built into the system. I had previously installed openjdk, an open source JRE from Arch’s [ekstra] repozitorij.

There also happens to be a minor bug in the startup script in that its looking for a folder called “prozori” when there’s clearly no such folder except one named “linux”. Go figure.

Anyway, here’s the gist of the installation if you’re doing it manually on 64bit i you already have a JRE (such as openjdk) installed for your system:

mkdir -p ~/src
cd ~/src
wget http://download.igniterealtime.org/spark/spark_2_5_8.tar.gz
tar -zxvf spark_2_5_8.tar.gz
mv Spark/jre Spark/jre.not
sed -i 's/\/lib\/windows/\/lib\/linux/g' Spark/Spark
sudo mkdir -p /opt
sudo mv Spark /opt
Udio