<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Solusan &#187; Linux</title>
	<atom:link href="http://www.solusan.com/blog/uncategorized/feed" rel="self" type="application/rss+xml" />
	<link>http://www.solusan.com</link>
	<description>..:: Solusan - Otro blog más ::..</description>
	<lastBuildDate>Thu, 25 Aug 2011 16:39:27 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=444</generator>
		<item>
		<title>How To: Getting Started with Amazon EC2</title>
		<link>http://www.solusan.com/how-to-getting-started-with-amazon-ec2.html</link>
		<comments>http://www.solusan.com/how-to-getting-started-with-amazon-ec2.html#comments</comments>
		<pubDate>Sun, 13 Feb 2011 16:18:03 +0000</pubDate>
		<dc:creator>Solusan</dc:creator>
				<category><![CDATA[BSD]]></category>
		<category><![CDATA[CentoOS]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[DragonFlyBSD]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Gentoo]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.solusan.com/?p=1395</guid>
		<description><![CDATA[Así.. sin valium y sin nada: Amazon EC2 is among the more potent items in Amazon&#8217;s web services arsenal. You&#8217;ve probably heard of many of the other services such as S3 for storage and FPS for payments. EC2 is all about the &#8220;elastic compute cloud.&#8221; In layman&#8217;s terms, it&#8217;s a server. In slightly less layman&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>Así.. sin valium y sin nada:</p>
<p><a href="http://www.amazon.com/gp/browse.html?node=201590011">Amazon EC2</a> is among the more potent items in Amazon&#8217;s web services arsenal. You&#8217;ve  probably heard of many of the other services such as S3 for storage and  FPS for payments. EC2 is all about the &#8220;elastic compute cloud.&#8221; In  layman&#8217;s terms, it&#8217;s a server. In slightly less layman&#8217;s terms, EC2 lets  you easily run and manage many instances (like servers) and  given the proper software and configurations, have a scalable platform  for your web application, outsource resource-intensive tasks to EC2 or  for whatever you would use a server farm.</p>
<p>There are three different <a href="http://www.amazon.com/Instances-EC2-AWS/b/ref=sc_fe_c_0_201590011_2?ie=UTF8&amp;node=370375011&amp;no=201590011&amp;me=A36L942TSJ2AJA">sizes of EC2 instances</a> you can summon and they&#8217;re all probably more powerful than the server  currently running your blog. Unless you&#8217;re offloading video processing  or something intense to EC2, the default small instance with its 1.7GB  of RAM and 160GB disk should be more than fine. It&#8217;s just nice to know  that if for any reason I need a farm of machines each with 15GB of RAM, I  can get that easily.</p>
<p>EC2 has been around for a while but has gained interest in the last  few weeks as Amazon released an elastic IP feature. One of the larger  EC2 issues deals with data persistence on instances. There are many  limitations with EC2 that make it difficult to use unless you carefully  build around the EC2 architecture and don&#8217;t just assume that you can  move your app to EC2 flawlessly. If an instance crashes and you run it  again, you&#8217;ll loose data and when the instance comes back up it will  have a new IP, adding another hurdle with DNS issues. Fortunately, the  elastic IP feature lets you assign a static IP address to your  instances.</p>
<p>As the title of this article implies, this article is meant to be a  beginner&#8217;s look into tinkering with EC2. Just because you will be able  to host a page on EC2 at the end of this article does not mean you  should start using it as your only server. Many considerations need to  be made when using EC2 to get around the data persistence issue. If your  startup is looking to use EC2 as a scalable platform, fortunately there  are many services that have already built stable systems on top of EC2,  ready for your consumption: <a href="http://weoceo.weogeo.com/">WeoCeo</a>, <a href="http://code.google.com/p/scalr/">Scalr</a> and <a href="http://www.rightscale.com/">RightScale</a>. Enough talk, shall we jump right in?</p>
<p><strong>Note:</strong> Most of the information below (and more) is available in the EC2 API doc if you enjoy reading those things.</p>
<h4><span id="more-1395"></span>Getting Started</h4>
<p>In order to interact with any EC2 instances, you&#8217;ll need to install  Amazon&#8217;s command line tools and download your X.509 certificate from  Amazon. Let&#8217;s start with the certificate. Login to your Amazon account  and visit the AWS Access Identifiers page. In the X.509 certificate  section near the bottom, click <strong>Create New</strong>. You&#8217;ll be  greeted with a page allowing you to download both the private key file  and X.509 certificate. Both of these are very important, download them  to your desktop so you don&#8217;t lose them.</p>
<div><a href="http://www.solusan.com/wp-content/2011/02/amazon_aws_create_x509.jpg"><img class="aligncenter size-full wp-image-1400" title="amazon_aws_create_x509" src="http://www.solusan.com/wp-content/2011/02/amazon_aws_create_x509.jpg" alt="" width="500" height="211" /></a></div>
<p>Next up, grab the <a href="http://developer.amazonwebservices.com/connect/entry.jspa?externalID=351&amp;categoryID=88">EC2 command line tools</a>. Extract them and you should be left with a folder named something like <em>ec2-api-tools-1.3-19403</em>. We&#8217;ll move those to a directory where we will also store the private and public keys.</p>
<p>The commands below assume you are working on an OS X machine in the Terminal.</p>
<pre><code>
mkdir ~/.ec2
cd ~/Desktop
mv *.pem ~/.ec2
cd ~/Desktop/ec2-api-tools-1.3-19403/  #depends on ec2 tools folder name
mv * ~/.ec2
</code></pre>
<p>This is what your .ec2 folder should have now.</p>
<div><a title="Amazon EC2 Folder" href="http://turbo.paulstamatiou.com/uploads/2008/04/ec2_howto_folder_800.jpg"></a><a href="http://www.solusan.com/wp-content/2011/02/ec2_howto_folder.jpg"><img class="aligncenter size-full wp-image-1402" style="border: 1px solid black;" title="ec2_howto_folder" src="http://www.solusan.com/wp-content/2011/02/ec2_howto_folder.jpg" alt="" width="500" height="181" /></a></div>
<p>Next up, we&#8217;ll set some paths in your bash profile so the OS knows where the EC2 tools are located.</p>
<p><code>sudo vi ~/.bash_profile</code></p>
<p>Add these lines, replacing &#8220;YOURKEYNAME&#8221; with the actual file name of your private and public keys, then save.</p>
<pre><code>
export EC2_HOME=~/.ec2
export PATH=$PATH:$EC2_HOME/bin
export EC2_PRIVATE_KEY=pk-YOURKEYNAME.pem
export EC2_CERT=cert-YOURKEYNAME.pem
export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home/
</code></pre>
<p>To get the changes noticed by the OS immediately, run <em>source</em>.</p>
<p><code>source ~/.bash_profile</code></p>
<p>Now we can actually use those helpful EC2 command line tools.</p>
<h4>AMIs, Keypairs and Instances, Oh My!</h4>
<p>Before proceeding, you&#8217;ll need to grok the concept of AMIs. They are  Amazon Machine Images and whenever you create an EC2 instance, an AMI is  quickly loaded on the machine. They&#8217;re essentially images of the OS. If  you terminate an instance and bring it up again, your machine will only  have the data initially included in the image. That&#8217;s why lots of work  goes into making (&#8220;bundling&#8221;) a good image you will always use that has  the configurations and software you need so you don&#8217;t have to do much  whenever you load the image. This article won&#8217;t delve into creating your  own AMIs but fortunately there are many great, public AMIs available  for use.</p>
<p>To SSH into the instance we&#8217;ll create from an AMI we find, we&#8217;ll need  to create a keypair. This is a different key from the one provided to  us by Amazon. That was for using the EC2 tools and interacting with the  instances in terms of creation and management. To actually SSH into an  instance, a separate keypair is required as there are no passwords by  default.</p>
<pre><code>
cd ~/.ec2 #we pretty much always need to be here
ec2-add-keypair pstam-keypair
</code></pre>
<p>That will print out the private key, which you&#8217;ll need to copy and paste into a file manually.</p>
<div><a title="Amazon EC2 - Adding a keypair" href="http://turbo.paulstamatiou.com/uploads/2008/04/ec2_keypair_529.jpg"></a><a href="http://www.solusan.com/wp-content/2011/02/ec2_keypair.jpg"><img class="aligncenter size-full wp-image-1403" title="ec2_keypair" src="http://www.solusan.com/wp-content/2011/02/ec2_keypair.jpg" alt="" width="500" height="189" /></a></div>
<pre><code>
vi ~/.ec2/id_rsa-pstam-keypair
#now paste the private key and save
sudo chmod 600 id_rsa-pstam-keypair
</code></pre>
<p>Now we can find which AMI we want to toss on our yet-to-be-created EC2 instance.</p>
<pre><code>
cd ~/.ec2
ec2-describe-images -a
</code></pre>
<p>Using the <em>-a</em> option will list all of the AMIs you have  access to, and there are a lot. Alternatively you can list just the  images Amazon has:</p>
<pre><code>
ec2-describe-images -o amazon
</code></pre>
<div><a title="Amazon EC2 AMIs" href="http://turbo.paulstamatiou.com/uploads/2008/04/ec2_images_1000.jpg"></a><a href="http://www.solusan.com/wp-content/2011/02/ec2_images.jpg"><img class="aligncenter size-full wp-image-1405" title="ec2_images" src="http://www.solusan.com/wp-content/2011/02/ec2_images.jpg" alt="" width="500" height="211" /></a></div>
<p>I found an AMI that I&#8217;ll try out.</p>
<blockquote><p>ami.yyang.info/gentoo-nginx-php-mysql-06feb2008.manifest.xml</p></blockquote>
<p>It&#8217;s a Gentoo Linux install with PHP, MySQL and nginx. When looking at AMIs, you need to find the AMI ID. In this case, it&#8217;s <em>ami-6138dd08</em>.</p>
<p><code> ec2-run-instances ami-6138dd08 -k pstam-keypair </code></p>
<p>The instance is now being loaded with the AMI I selected and booting  up. It should output some text with &#8220;RESERVATION&#8221; and &#8220;INSTANCE&#8221; rows.  On the instance row, it will say something like <em>pending pstam-keypair</em> until it has fully booted up. When an instance is ready to go, its URL  and internal address will be supplied with the ec2din command below.</p>
<p><code> ec2-describe-instances </code></p>
<div><a title="Amazon EC2 Describe Instances" href="http://turbo.paulstamatiou.com/uploads/2008/04/ec2_describe_instances_600.jpg"></a><a href="http://www.solusan.com/wp-content/2011/02/ec2_describe_instances.jpg"><img class="aligncenter size-full wp-image-1406" title="ec2_describe_instances" src="http://www.solusan.com/wp-content/2011/02/ec2_describe_instances.jpg" alt="" width="500" height="49" /></a></div>
<p>If you try to access the URL in a browser, nothing will happen just  yet as the firewall blocks all ports by default. You&#8217;ll have to open up  the ones you need. We&#8217;ll do port 80 for HTTP and 22 for SSH. If the AMI  you are running doesn&#8217;t have a web server installed, accessing the EC2  URL in a browser won&#8217;t bring up anything regardless.</p>
<pre><code>
ec2-authorize default -p 22
ec2-authorize default -p 80
</code></pre>
<p>If you want to undo any port authorizations you&#8217;ve made, you can use <em>ec2-revoke</em>.  Now if you access your EC2 URL in a browser you&#8217;ll get something like a  default Apache page, or in the case of the AMI I&#8217;m using, a phpinfo()  page.</p>
<div><a title="EC2 Instance loaded in Firefox" href="http://turbo.paulstamatiou.com/uploads/2008/04/ec2_phpinfo_ffox_850.jpg"></a><a href="http://www.solusan.com/wp-content/2011/02/ec2_phpinfo_ffox.jpg"><img class="aligncenter size-full wp-image-1407" title="ec2_phpinfo_ffox" src="http://www.solusan.com/wp-content/2011/02/ec2_phpinfo_ffox.jpg" alt="" width="500" height="161" /></a></div>
<p>The next step to actually using your new EC2 instance is SSHing into  it to get full root access. Run the line below and replace the EC2 URL  with the one provided to you by the <em>ec2-describe-images</em> command earlier.</p>
<pre><code>
ssh -i id_rsa-pstam-keypair root@ec2-XXX-XXX-XXX-XXX.z-2.compute-1.amazonaws.com
</code></pre>
<p>If you run into the problem I did, this won&#8217;t work and you&#8217;ll be  asked for an EC2 instance password that doesn&#8217;t exist. I found out this  was because I initially created the <em>id_rsa-pstam-keypair</em> file  as the root user but ran the ssh command as a regular user which was not  able to access that keypair. That was easily fixed with <em>sudo chown Paul id_rsa-pstam-keypair</em> but you won&#8217;t have this issue if you followed this guide.</p>
<p>Otherwise, you should be logged into your EC2 instance as root over  SSH. Now that we&#8217;re in, we can tinker with the system however we like  and even see what kind of hardware we&#8217;re running on, setup FTP and drop a  web app into <em>/var/www/localhost/htdocs</em> or whatever. Having full root access in any OS you wish is one of the boons of using Amazon EC2.</p>
<div><a title="SSHed into EC2 Instance - cpuinfo" href="http://turbo.paulstamatiou.com/uploads/2008/04/ec2_ssh_catproc_700.jpg"></a><a href="http://www.solusan.com/wp-content/2011/02/ec2_ssh_catproc.jpg"></a><a href="http://www.solusan.com/wp-content/2011/02/ec2_ssh_catproc.jpg"><img class="aligncenter size-full wp-image-1409" title="ec2_ssh_catproc" src="http://www.solusan.com/wp-content/2011/02/ec2_ssh_catproc.jpg" alt="" width="500" height="257" /></a></div>
<h4>Static IP Time</h4>
<p>If you plan on running your instance for good, you&#8217;ll want a static IP. Let&#8217;s get one for you.</p>
<p><code> ec2-allocate-address </code></p>
<div><a href="http://www.solusan.com/wp-content/2011/02/ec2_allocate_ip.jpg"><img class="aligncenter size-full wp-image-1410" title="ec2_allocate_ip" src="http://www.solusan.com/wp-content/2011/02/ec2_allocate_ip.jpg" alt="" width="500" height="93" /></a></div>
<p>Now we just need to tie that IP address to the instance ID of the  instance you wish to give a static IP. You can grab the instance ID (not  to be confused with the ami-* AMI ID) by running <em>ec2-describe-instances</em>.</p>
<p>In the line below, replace XXX.XXX.XXX.XXX with the IP address you  were given above and replace i-yourinstance with your actual instance  ID.</p>
<p><code> ec2-associate-address -i i-yourinstance XXX.XXX.XXX.XXX </code></p>
<div><a href="http://www.solusan.com/wp-content/2011/02/ec2_terminate_instance.jpg"><img class="aligncenter size-full wp-image-1411" title="ec2_terminate_instance" src="http://www.solusan.com/wp-content/2011/02/ec2_terminate_instance.jpg" alt="" width="500" height="104" /></a></div>
<p>Give it a few minutes and your instance will be accessible through  that new IP in addition to the longer EC2 URL we were previously using.  Please note that if you terminate the instance, the IP does not remain  tied to the instance, to the best of my knowledge. Terminating an  instance seems to be a nuclear option compared to simply rebooting an  instance via regular unix commands over SSH.</p>
<p>Now that the instance has an IP you can setup a domain name with it  if you want. The easiest way I&#8217;ve found of doing this is through a DNS  service like <a href="http://everydns.net/">EveryDNS</a>. Just provide  your domain name registrar with EveryDNS&#8217;s domain name servers, create  an EveryDNS account, add your domain and create an A record with your  newly associated EC2 instance IP address.</p>
<div><a title="EveryDNS - Setup Domain" href="http://turbo.paulstamatiou.com/uploads/2008/04/everydns_setup_domain_1200.jpg"></a><a href="http://www.solusan.com/wp-content/2011/02/everydns_setup_domain.jpg"><img class="aligncenter size-full wp-image-1412" title="everydns_setup_domain" src="http://www.solusan.com/wp-content/2011/02/everydns_setup_domain.jpg" alt="" width="500" height="255" /></a></div>
<p>The TTL on EveryDNS seems to be fixed at 3600 so it might take a  while for propagation, especially if you&#8217;re used to pushing down TTL to  300 when doing DNS work.</p>
<h4>Terminating Your EC2 Instance</h4>
<p>Killing your instance for good can be done, like every other action,  through an EC2 command line tool. This time, it&#8217;s the appropriately  named <em>ec2-terminate-instances</em> (ec2kill). Just provide it with the instance ID of your instance (get it from running ec2din).</p>
<p><code> ec2-terminate-instances i-yourinstance </code></p>
<div><img src="http://turbo.paulstamatiou.com/uploads/2008/04/ec2_terminate_instance.jpg" alt="Terminate EC2 Instance" /></div>
<p>It should return with a &#8220;shutting-down&#8221; status but you&#8217;ll definitely want to check back in a few minutes with <em>ec2-describe-instances</em> to make sure it shutdown successfully and comes up as &#8220;terminated&#8221;.  There are a few cases where instances will hang on shutdown and you will  continue to be charged for instance hours.</p>
<div><a title="EC2 Instances Terminated" href="http://turbo.paulstamatiou.com/uploads/2008/04/ec2_terminated_instances_600.jpg"><img src="http://turbo.paulstamatiou.com/uploads/2008/04/ec2_terminated_instances.jpg" alt="EC2 Instances Terminated" /></a></div>
<h4>The Next Step</h4>
<p>Now that you&#8217;ve successfully launched your first Amazon EC2 instance,  you&#8217;re ready to begin exploring the endless EC2 possibilities. I&#8217;m  still learning about taking the next step but overall, EC2 really isn&#8217;t  something to mess with unless you have quite a bit of sysadmin and  development experience. Actually using EC2 as an elastic compute cloud  usually involves setting up an instance as a load balancer and giving  that instance access to an array of active EC2 instances which it can  hand work to. Other hurdles include providing multiple instances access  to the same database, using Amazon S3 as a persistent filesystem and  employing highly redundant backup systems given the relatively volatile  nature of instances.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.solusan.com/how-to-getting-started-with-amazon-ec2.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Pasar muchos archivos de mayíusculas a minúsculas</title>
		<link>http://www.solusan.com/pasar-muchos-archivos-de-mayiusculas-a-minusculas.html</link>
		<comments>http://www.solusan.com/pasar-muchos-archivos-de-mayiusculas-a-minusculas.html#comments</comments>
		<pubDate>Sun, 25 Apr 2010 14:14:45 +0000</pubDate>
		<dc:creator>Solusan</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.solusan.com/?p=1356</guid>
		<description><![CDATA[Pequeño tip para pasar multitud de archivos a minúsculas. En mi caso fueron 11540 sin problemas. #!/bin/sh # Do the directories first, so that the # path doesn&#8217;t change for each in `find . -type d` do newname=`echo $each &#124; tr [A-Z] [a-z]` mv $each $newname done # Now to the files&#8230; for eachf in [...]]]></description>
			<content:encoded><![CDATA[<p>Pequeño tip para pasar multitud de archivos a minúsculas.<br />
En mi caso fueron 11540 sin problemas.</p>
<blockquote><p>#!/bin/sh<br />
# Do the directories first, so that the<br />
# path doesn&#8217;t change<br />
for each in `find . -type d`<br />
do<br />
newname=`echo $each | tr [A-Z] [a-z]`<br />
mv $each $newname<br />
done<br />
# Now to the files&#8230;<br />
for eachf in `find . -type f`<br />
do<br />
newnamef=`echo $eachf | tr [A-Z] [a-z]`<br />
mv $eachf $newnamef<br />
done</p></blockquote>
<p>ソル三。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.solusan.com/pasar-muchos-archivos-de-mayiusculas-a-minusculas.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cómo vaciar la cache dns</title>
		<link>http://www.solusan.com/como-vaciar-la-cache-dns.html</link>
		<comments>http://www.solusan.com/como-vaciar-la-cache-dns.html#comments</comments>
		<pubDate>Thu, 04 Feb 2010 14:44:48 +0000</pubDate>
		<dc:creator>Solusan</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Gentoo]]></category>
		<category><![CDATA[Hakintosh]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[SuSE]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[dns]]></category>

		<guid isPermaLink="false">http://www.solusan.com/?p=1330</guid>
		<description><![CDATA[En Mac OSX Leopard: dscacheutil -flushcache En Mac OSX Tiger: lookupd -flushcache En Microsoft Windows 2000/XP/Vista: ipconfig /flushdns En Linux: reiniciar el demonio nscd `/etc/rc.d/init.d/nscd restart` Gracias Asier Marqués]]></description>
			<content:encoded><![CDATA[<ul>
<li>En Mac OSX Leopard:</li>
</ul>
<p><code>dscacheutil -flushcache</code></p>
<ul>
<li>En Mac OSX Tiger:</li>
</ul>
<p><code>lookupd -flushcache</code></p>
<ul>
<li>En Microsoft Windows 2000/XP/Vista:</li>
</ul>
<p><code>ipconfig /flushdns</code></p>
<ul>
<li>En Linux:</li>
</ul>
<p>reiniciar el demonio nscd <code>`/etc/rc.d/init.d/nscd restart`</code></p>
<p>Gracias <a title="http://asiermarques.com/2008/04/09/vaciar-cache-dns/" href="http://asiermarques.com/2008/04/09/vaciar-cache-dns/" target="_blank">Asier Marqués</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.solusan.com/como-vaciar-la-cache-dns.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Servidor samba fácil</title>
		<link>http://www.solusan.com/servidor-samba-facil.html</link>
		<comments>http://www.solusan.com/servidor-samba-facil.html#comments</comments>
		<pubDate>Fri, 30 Oct 2009 15:08:18 +0000</pubDate>
		<dc:creator>Solusan</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[samba]]></category>

		<guid isPermaLink="false">http://www.solusan.com/?p=1281</guid>
		<description><![CDATA[Montar un servidor SAMBA para compartir una unidad o un directorio con otros ordenadores conectados a la red. Seguro que mas de uno ha estado rompiéndose la cabeza con el fichero de configuración smb.conf pero a continuación voy a explicaros uno de los porque instalamos en el anterior articulo un entorno gráfico que nos servirá [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.solusan.com/wp-content/2009/10/2704484977_ee589b0452.jpg"><img class="aligncenter size-full wp-image-1284" title="2704484977_ee589b0452" src="http://www.solusan.com/wp-content/2009/10/2704484977_ee589b0452.jpg" alt="2704484977_ee589b0452" width="300" height="299" /></a></p>
<p>Montar un <strong>servidor SAMBA</strong> para compartir una unidad o un directorio con otros ordenadores conectados a la red. Seguro que mas de uno ha estado rompiéndose la cabeza con el fichero de configuración <strong>smb.conf</strong> pero a continuación voy a explicaros uno de los porque instalamos en el anterior articulo un <a href="http://www.forat.info/2008/07/28/servidor-en-linux-ubuntu-server-vol-9-entorno-grafico/" target="blank"><strong>entorno gráfico</strong></a> que nos servirá para mas cosas que para navegar en caso de emergencia.</p>
<p>Si recordamos la instalación de <strong>Linux Ubuntu Server</strong> que hicimos al principio de este manual veremos que marcamos la opción ( <strong>Samba File Server</strong> ) …</p>
<p style="text-align: center;"><a title="Linux-Ubuntu-Server-Sistema-14 por Forat, en Flickr" onclick="javascript:urchinTracker ('/outbound/article/www.flickr.com');" href="http://www.flickr.com/photos/81828336@N00/2628999043/"></a><a href="http://www.solusan.com/wp-content/2009/10/2628999043_ceb914d5c9_o.jpg" target="_blank"></a><a href="http://www.solusan.com/wp-content/2009/10/2628999043_ceb914d5c9_o.jpg"><img class="aligncenter size-full wp-image-1285" title="2628999043_ceb914d5c9_o" src="http://www.solusan.com/wp-content/2009/10/2628999043_ceb914d5c9_o.jpg" alt="2628999043_ceb914d5c9_o" width="490" height="368" /></a></p>
<p>Al marcar esta opción se instalaron automáticamente todas las aplicaciones necesarias para poder compartir archivos entre maquinas <strong>Windows</strong> y <strong>Linux</strong>. Imaginaos lo cómodo que es tener un acceso directo en el escritorio hacia la carpeta compartida en cada uno de los ordenadores que tengamos, tengan el sistema operativo que tengan.</p>
<p>Eso es bonito pero …. ¿ <em>Como lo configuramos</em> ?</p>
<p>La manera tradicional de hacerlo es configurando el fichero llamado <strong>smb.conf</strong> ubicado en la ruta <strong>/etc/samba</strong> y hacerlo todo a mano. La otra manera de hacerlo es gráficamente con un <strong>interface</strong> que nos facilite esta labor que en un momento dado a todos nos a dado algún dolor de cabeza que otro. Este es uno de los motivos por el cual instalamos un <strong>entorno gráfico</strong> a nuestro <a href="http://www.forat.info/2008/06/30/te-gustaria-tener-un-servidor-en-linux-ubuntu-server/" target="blank"><strong>servidor en Linux Ubuntu Server</strong></a>.</p>
<p>Para empezar vamos a identificarnos en el sistema con nuestro usuario e iniciaremos el entorno <strong>grafico <a href="http://es.wikipedia.org/wiki/FluxBox">FluxBox</a></strong> con el siguiente comando …</p>
<p><strong>startx</strong></p>
<p>A continuación accedemos a una <strong>Terminal</strong> pulsando el botón derecho del ratón y siguiendo el menú <strong>Aplicaciones</strong> -&gt; <strong>Consolas</strong> -&gt; <strong>Bash</strong> …</p>
<p>Antes de tocar nada vamos a instalar la aplicación <strong>system-config-samba</strong> y un par de dependencias que necesita para poder funcionar con …</p>
<p><strong>sudo apt-get install system-config-samba python-gtk2 python-glade2</strong></p>
<p>Seguidamente arrancaremos el <strong>interface gráfico</strong> que nos acaba de instalar con …</p>
<p><strong>sudo system-config-samba</strong></p>
<p>Veremos un entorno como este …</p>
<p><a title="samba1 por Forat, en Flickr" onclick="javascript:urchinTracker ('/outbound/article/www.flickr.com');" href="http://www.flickr.com/photos/81828336@N00/2705307396/"></a><a href="http://www.solusan.com/wp-content/2009/10/confsersamba.jpg"><img class="aligncenter size-full wp-image-1286" title="confsersamba" src="http://www.solusan.com/wp-content/2009/10/confsersamba.jpg" alt="confsersamba" width="500" height="356" /></a></p>
<p>A continuación vamos a compartir carpetas de la forma mas fácil que pueda existir sin pedir passwords ni usuarios a nuestros clientes. Se supone que este servidor lo tenemos en nuestro cuarto de casa y lo usamos yo y mi mujer para poder guardar toda la información que podamos necesitar por lo que no van a conectarse extraños que no puedan ver algo o necesiten permisos para grabar o borrar nuestros archivos.<br />
<span id="more-1281"></span></p>
<p>Para hacer esto lo primero que necesitamos hacer es configurar el <strong>servidor SAMBA</strong> para que sea del mismo grupo de red que los demás equipos conectados a el con <strong>Windows</strong>. Para esto vamos a pulsar el botón ( <strong>Preferencias</strong> ) y a continuación (<strong> Configuración del Servidor …</strong> ) …</p>
<p><a href="http://www.solusan.com/wp-content/2009/10/gruptrab.jpg"><img class="aligncenter size-full wp-image-1288" title="gruptrab" src="http://www.solusan.com/wp-content/2009/10/gruptrab.jpg" alt="gruptrab" width="439" height="267" /></a></p>
<p>En la primera casilla ( <strong>Grupo de trabajo</strong> ) debemos incluir el nombre que tenemos como grupo de trabajo <strong>en Windows</strong>. Para saber que nombre tiene nuestra red <strong>en Windows</strong> arrancamos nuestro ordenador cliente con <strong>Windows XP</strong> ( <em>Que es el que he instalado expresamente para esto</em> ) y seguimos los menús <strong>Inicio </strong>-&gt; <strong>Panel de control</strong> …</p>
<p><a title="samba14 por Forat, en Flickr" onclick="javascript:urchinTracker ('/outbound/article/www.flickr.com');" href="http://www.flickr.com/photos/81828336@N00/2704625527/"></a><a href="http://www.solusan.com/wp-content/2009/10/2704625527_921d8ab270_o.jpg"><img class="aligncenter size-full wp-image-1289" title="2704625527_921d8ab270_o" src="http://www.solusan.com/wp-content/2009/10/2704625527_921d8ab270_o.jpg" alt="2704625527_921d8ab270_o" width="452" height="305" /></a></p>
<p>Redimiendo y mantenimiento …</p>
<p><a title="samba15 por Forat, en Flickr" onclick="javascript:urchinTracker ('/outbound/article/www.flickr.com');" href="http://www.flickr.com/photos/81828336@N00/2705447788/"></a><a href="http://www.solusan.com/wp-content/2009/10/2705447788_aa5e0ff649_o.jpg"><img class="aligncenter size-full wp-image-1290" title="2705447788_aa5e0ff649_o" src="http://www.solusan.com/wp-content/2009/10/2705447788_aa5e0ff649_o.jpg" alt="2705447788_aa5e0ff649_o" width="452" height="305" /></a></p>
<p>Sistema …</p>
<p><a title="samba16 por Forat, en Flickr" onclick="javascript:urchinTracker ('/outbound/article/www.flickr.com');" href="http://www.flickr.com/photos/81828336@N00/2704625619/"></a><a href="http://www.solusan.com/wp-content/2009/10/2704625619_0079d66ca6_o.jpg"><img class="aligncenter size-full wp-image-1291" title="2704625619_0079d66ca6_o" src="http://www.solusan.com/wp-content/2009/10/2704625619_0079d66ca6_o.jpg" alt="2704625619_0079d66ca6_o" width="359" height="433" /></a></p>
<p>Y vamos hacia la pestaña Nombre de equipo donde podemos dar una breve descripción del equipo y cambiar el nombre del grupo de trabajo con el botón ( <strong>Cambiar </strong>).</p>
<p>Una vez sabido esto continuamos con la segunda casilla ( <strong>Descripción</strong> ) es algo simbólico y que no afecta a la configuración por lo tanto puedes dejarlo por defecto o modificarlo a tu gusto.</p>
<p>Una vez configurado esto continuamos con el botón ( <strong>Seguridad</strong> ) y dejaremos todas las casillas tal cual podéis ver en la imagen …</p>
<p><a title="samba3 por Forat, en Flickr" onclick="javascript:urchinTracker ('/outbound/article/www.flickr.com');" href="http://www.flickr.com/photos/81828336@N00/2704484603/"></a><a href="http://www.solusan.com/wp-content/2009/10/2704484603_5e4bf47c25_o.jpg"><img class="aligncenter size-full wp-image-1292" title="2704484603_5e4bf47c25_o" src="http://www.solusan.com/wp-content/2009/10/2704484603_5e4bf47c25_o.jpg" alt="2704484603_5e4bf47c25_o" width="439" height="267" /></a></p>
<p>Continuamos con el botón ( <strong>OK</strong> )  y ya estamos listos para compartir carpetas y archivos tanto en <strong>Windows</strong> como en <strong>Linux Ubuntu</strong> en este caso. Para compartir algún directorio aremos lo siguiente …</p>
<p>Primero pulsamos el botón ( <strong>Añadir Recurso Compartido</strong> ) y veremos la siguiente ventana …</p>
<p style="text-align: center;"><a href="../wp-content/2009/10/crearrecursocomp.jpg"><img class="aligncenter" title="crearrecursocomp" src="../wp-content/2009/10/crearrecursocomp.jpg" alt="crearrecursocomp" width="500" height="264" /></a></p>
<p>Ahora pulsaremos el botón ( <strong>Examinar</strong> ) …</p>
<p><a title="samba5 por Forat, en Flickr" onclick="javascript:urchinTracker ('/outbound/article/www.flickr.com');" href="http://www.flickr.com/photos/81828336@N00/2704485263/"></a><a href="http://www.solusan.com/wp-content/2009/10/ahora.jpg"><img class="aligncenter size-full wp-image-1293" title="ahora" src="http://www.solusan.com/wp-content/2009/10/ahora.jpg" alt="ahora" width="500" height="393" /></a></p>
<p>Ahora vamos a crear una carpeta que compartiremos con todos los ordenadores de nuestra red con el botón ( <strong>Create Folder</strong> ) e introducimos el nombre que deseemos para ese directorio ( <em>En mi caso <strong>almacen</strong></em> )…</p>
<p><a title="samba6 por Forat, en Flickr" onclick="javascript:urchinTracker ('/outbound/article/www.flickr.com');" href="http://www.flickr.com/photos/81828336@N00/2704484463/"></a><a href="http://www.solusan.com/wp-content/2009/10/almacen.jpg"><img class="aligncenter size-full wp-image-1294" title="almacen" src="http://www.solusan.com/wp-content/2009/10/almacen.jpg" alt="almacen" width="500" height="393" /></a></p>
<p>Una vez creado el directorio pulsamos el botón ( <strong>OK</strong> ) y como podemos ver ya se ha agregado ese nombre a la casilla ( <strong>Directorio</strong> ) y a la casilla ( <strong>Nombre de recurso compartido</strong> ).</p>
<p>En la casilla ( <strong>Descriptión</strong> ) podemos incluir una descripción de la carpeta que vamos a compartir. Esto es opcional ya que no interviene en nada al funcionamiento del servidor, así que tu mismo.</p>
<p>Marcamos las casillas ( <strong>Permiso de Escritura</strong> ) y ( <strong>Visible</strong> ) quedándonos así …</p>
<p><a title="samba7 por Forat, en Flickr" onclick="javascript:urchinTracker ('/outbound/article/www.flickr.com');" href="http://www.flickr.com/photos/81828336@N00/2705307654/"></a><a href="http://www.solusan.com/wp-content/2009/10/crearecursocompartido.jpg"><img class="aligncenter size-full wp-image-1295" title="crearecursocompartido" src="http://www.solusan.com/wp-content/2009/10/crearecursocompartido.jpg" alt="crearecursocompartido" width="500" height="262" /></a></p>
<p>A continuación pulsamos sobre la pestaña ( <strong>Acceso</strong> ) y marcamos la casilla ( <strong>Permitir acceso a todos</strong> ) quedándonos así …</p>
<p><a title="samba8 por Forat, en Flickr" onclick="javascript:urchinTracker ('/outbound/article/www.flickr.com');" href="http://www.flickr.com/photos/81828336@N00/2705307904/"></a><a href="http://www.solusan.com/wp-content/2009/10/modificar.jpg"><img class="aligncenter size-full wp-image-1296" title="modificar" src="http://www.solusan.com/wp-content/2009/10/modificar.jpg" alt="modificar" width="500" height="264" /></a></p>
<p>Para finalizar cerramos esta ventana con el botón ( <strong>OK</strong> ).</p>
<p>Esta es la configuración menos segura ya que puede conectarse cualquiera a nuestro recurso compartido siempre y cuando pueda conectarse físicamente a nuestra red de área local conectando un cable de red a nuestro swicht o router. ( <em>Cosa que dudo bastante que alguien haga en mi casa</em> )</p>
<p>Se pueden agregar usuarios e incluso tener que identificarse en el servidor cuando queramos acceder al recurso compartido pero he pensado que esta es la solución mas sencilla con la que podríamos configurar este servicio sin el mayor problema.</p>
<p>La única medida de seguridad que necesitamos para que nadie pueda acceder al recurso compartido desde Internet es asegurarnos de no tener abierto el puerto para <a onclick="javascript:urchinTracker ('/outbound/article/www.iss.net');" rel="nofollow" href="http://www.iss.net/security_center/advice/Exploits/Ports/139/default.htm" target="blank"><strong>Netbios 139</strong></a> en nuestro<strong> Router ADSL</strong> así cuando alguien haga desde fuera una petición al puerto <strong>139</strong> nuestro <strong>Router</strong> no sabrá a que maquina redireccionarla y no le devolverá respuesta alguna.</p>
<p>Para finalizar la configuración de la carpeta que acabamos de crear necesitamos darle permisos para que se pueda escribir, borrar y leer en ella. Para esto vamos a abrir una <strong>Terminal</strong> pulsando con el botón derecho del ratón y siguiendo el menú <strong>Aplicaciones</strong> -&gt; <strong>Consolas</strong> -&gt; <strong>Bash</strong></p>
<p>En mi caso cree una carpeta llamada ( <strong>almacen</strong> ) en la ruta <strong>/home/www</strong> y voy a darle permisos totales para que todos puedan leer y escribir en el directorio con …</p>
<p><strong>sudo chmod 777 /home/www/almacen</strong></p>
<p>En mi caso dispongo de un Windows XP y Linux Ubuntu como clientes de este servidor así que voy a explicar los pasos para conectarnos desde ellos sin problemas, veréis que fácil.</p>
<p><strong>Para conectarnos desde un ordenador con Windows XP</strong> …</p>
<p>Pinchamos sobre el botón <strong>Inicio </strong>-&gt; <strong>Mis sitios de Red</strong> y allí nos encontramos con nuestra carpeta compartida como por arte de magia. <img src='http://www.solusan.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><a title="samba17 por Forat, en Flickr" onclick="javascript:urchinTracker ('/outbound/article/www.flickr.com');" href="http://www.flickr.com/photos/81828336@N00/2704625649/"></a><a href="http://www.solusan.com/wp-content/2009/10/2704625649_fb29d60e71_o.jpg"><img class="aligncenter size-full wp-image-1297" title="2704625649_fb29d60e71_o" src="http://www.solusan.com/wp-content/2009/10/2704625649_fb29d60e71_o.jpg" alt="2704625649_fb29d60e71_o" width="210" height="99" /></a></p>
<p><strong>Para conectarnos desde un ordenador con </strong><strong>Linux Ubuntu</strong> …</p>
<p>Seguimos los menús <strong>Lugares</strong> -&gt; <strong>Red</strong> …</p>
<p><a title="samba9 por Forat, en Flickr" onclick="javascript:urchinTracker ('/outbound/article/www.flickr.com');" href="http://www.flickr.com/photos/81828336@N00/2705308038/"></a><a href="http://www.solusan.com/wp-content/2009/10/network.jpg"><img class="aligncenter size-full wp-image-1299" title="network" src="http://www.solusan.com/wp-content/2009/10/network.jpg" alt="network" width="490" height="421" /></a></p>
<p>Pinchamos sobre el icono ( <strong>Red de Windows</strong> ) …</p>
<p><a title="samba10 por Forat, en Flickr" onclick="javascript:urchinTracker ('/outbound/article/www.flickr.com');" href="http://www.flickr.com/photos/81828336@N00/2705308172/"></a><a href="http://www.solusan.com/wp-content/2009/10/samba10.jpg"><img class="aligncenter size-full wp-image-1300" title="samba10" src="http://www.solusan.com/wp-content/2009/10/samba10.jpg" alt="samba10" width="490" height="483" /></a></p>
<p>Y aquí veremos nuestro grupo de trabajo. ( <em>En mi caso <strong>REDES</strong></em> ) ….</p>
<p><a title="samba11 por Forat, en Flickr" onclick="javascript:urchinTracker ('/outbound/article/www.flickr.com');" href="http://www.flickr.com/photos/81828336@N00/2704485865/"></a><a href="http://www.solusan.com/wp-content/2009/10/samba11.jpg"><img class="aligncenter size-full wp-image-1301" title="samba11" src="http://www.solusan.com/wp-content/2009/10/samba11.jpg" alt="samba11" width="476" height="468" /></a></p>
<p>Si pinchamos sobre el veremos nuestro servidor ( <em>En mi caso <strong>HSNET</strong></em> ) …</p>
<p><a title="samba12 por Forat, en Flickr" onclick="javascript:urchinTracker ('/outbound/article/www.flickr.com');" href="http://www.flickr.com/photos/81828336@N00/2704485997/"></a><a href="http://www.solusan.com/wp-content/2009/10/2704485997_4921991763_o.jpg"><img class="aligncenter size-full wp-image-1302" title="2704485997_4921991763_o" src="http://www.solusan.com/wp-content/2009/10/2704485997_4921991763_o.jpg" alt="2704485997_4921991763_o" width="476" height="468" /></a></p>
<p>Y si pinchamos sobre el veremos la carpeta que compartimos anteriormente ( <em>En mi caso <strong>almacen</strong></em> ) …</p>
<p><a title="samba13 por Forat, en Flickr" onclick="javascript:urchinTracker ('/outbound/article/www.flickr.com');" href="http://www.flickr.com/photos/81828336@N00/2704486125/"></a><a href="http://www.solusan.com/wp-content/2009/10/2704486125_e0d4944080_o.jpg"><img class="aligncenter size-full wp-image-1303" title="2704486125_e0d4944080_o" src="http://www.solusan.com/wp-content/2009/10/2704486125_e0d4944080_o.jpg" alt="2704486125_e0d4944080_o" width="476" height="468" /></a></p>
<p>Para crear un acceso directo de está carpeta a nuestro escritorio y así tenerla siempre a mano basta con arrastrarla hacia el escritorio y la podremos usar siempre que la necesitemos.</p>
<p>Si os dais cuenta con este manual hemos conseguido algo muy interesante y es que ya no necesitamos tener discos duros grandes en todos los ordenadores que tengamos por casa ya sean equipos portátiles o de sobremesa ya que podemos agregarle un disco duro o varios a nuestro <a href="http://www.forat.info/2008/06/30/te-gustaria-tener-un-servidor-en-linux-ubuntu-server/" target="blank"><strong>servidor en Linux Ubuntu Server</strong></a> y compartirlos siempre que queramos o necesitemos mas espacio.</p>
<p>Si estas siguiendo el manual sobre Como montar un <strong><a href="http://www.forat.info/2008/08/12/servidor-en-linux-ubuntu-server-manual-completo/" target="blank">Servidor en Linux Ubuntu Server</a></strong> te invito a que continues por el siguiente capitulo llamado (  <strong><a href="http://www.forat.info/2008/08/06/servidor-en-linux-ubuntu-server-vol-11-almacen-portatil-usb/">Almacén portátil USB</a></strong> )</p>
<p>Vía: <a title="http://www.forat.info/2008/08/03/servidor-en-linux-ubuntu-server-vol-10-servidor-de-archivos-samba/" href="http://www.forat.info/2008/08/03/servidor-en-linux-ubuntu-server-vol-10-servidor-de-archivos-samba/" target="_blank">Forat</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.solusan.com/servidor-samba-facil.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Recuperar password en Ubuntu</title>
		<link>http://www.solusan.com/recuperar-password-en-ubuntu.html</link>
		<comments>http://www.solusan.com/recuperar-password-en-ubuntu.html#comments</comments>
		<pubDate>Sat, 25 Jul 2009 04:02:09 +0000</pubDate>
		<dc:creator>Solusan</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[passw]]></category>

		<guid isPermaLink="false">http://www.solusan.com/?p=1241</guid>
		<description><![CDATA[Muchos me han consultado cómo recuperar la contraseña de Ubuntu para un usuario en caso de que se les haya olvidado. El caso es que una contraseña no puede ser recuperada, pero lo que si se puede hacer es generar una nueva, para ello, tendremos que seguir estos pasos. Los pasos son sencillos Enciende el [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.solusan.com/wp-content/2009/07/candado.png"><img class="alignright size-full wp-image-1245" title="candado" src="http://www.solusan.com/wp-content/2009/07/candado.png" alt="candado" width="117" height="109" /></a>Muchos me han consultado cómo recuperar la contraseña de Ubuntu para un usuario en caso de que se les haya olvidado. El caso es que una contraseña no puede ser recuperada, pero lo que si se puede hacer es generar una nueva, para ello, tendremos que seguir estos pasos.</p>
<p>Los pasos son sencillos</p>
<ul>
<li>Enciende el ordenador y cuando aparezca el prompt del grub o lilo presionas la tecla ESC</li>
<li>Desplázate hasta la linea del kernel que uses (en caso de que sea más de uno) y presiona la tecla “e”</li>
<li>Sitúate al final de la linea y agrega rw init=/bin/bash</li>
<li>Presiona Enter y después b para reiniciar el sistema</li>
<li>Tu sistema iniciará con el usuario Root y sin contraseña</li>
<li>Para poner nueva contraseña tendrás que teclear: passwd tu_usuario</li>
<li>Escribe la contraseña y evita olvidarla</li>
<li>Reinicia el sistema</li>
</ul>
<p>Ahora, lo que yo no entiendo es, si es tan fácil resetear una contraseña de administrador en un sistema Linux.. ¿para qué se utilizan? cualquiera podría resetear el sistema y acceder como administrador ¿no? supongo que en configuraciones con ordenadores al público o críticos este truco estará bloqueado por contraseñas en el boot loader.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.solusan.com/recuperar-password-en-ubuntu.html/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Reinstalación de Roundcube</title>
		<link>http://www.solusan.com/reinstalacion-de-roundcube.html</link>
		<comments>http://www.solusan.com/reinstalacion-de-roundcube.html#comments</comments>
		<pubDate>Mon, 13 Jul 2009 00:26:17 +0000</pubDate>
		<dc:creator>Solusan</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[cpanel]]></category>
		<category><![CDATA[Red Hat]]></category>

		<guid isPermaLink="false">http://www.solusan.com/?p=1236</guid>
		<description><![CDATA[Problema: Queremos reinsalar Roundcube desde cPanel en un sistema que lo tiene implementado. Basta con lanzar esta instrucción para que todo se estabilice. /usr/local/cpanel/bin/update-roundcube --force ソルサン。]]></description>
			<content:encoded><![CDATA[<p>Problema:</p>
<p>Queremos reinsalar Roundcube desde cPanel en un sistema que lo tiene implementado.</p>
<p>Basta con lanzar esta instrucción para que todo se estabilice.</p>
<pre lang="bash">/usr/local/cpanel/bin/update-roundcube --force</pre>
<p>ソルサン。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.solusan.com/reinstalacion-de-roundcube.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ayudanto a tunear /etc/my.cnf</title>
		<link>http://www.solusan.com/ayudanto-a-tunear-etcmy-cnf.html</link>
		<comments>http://www.solusan.com/ayudanto-a-tunear-etcmy-cnf.html#comments</comments>
		<pubDate>Mon, 06 Jul 2009 15:35:30 +0000</pubDate>
		<dc:creator>Solusan</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://www.solusan.com/?p=1232</guid>
		<description><![CDATA[Un pequeño script que, al ejecutarlo, nos ayudará con la información que nos da darle forma según los requerimientos y recursos que tengamos en una máquina. tuning-primer.tar # wget -c http://www.solusan.com/wp-content/2009/07/tuning-primer.tar.gz # tar xzvf tuning-primer.sh.zip # chmod +x tuning-primer.sh.zip &#38;&#38; ./tuning-primer.sh.zip ソルサン。]]></description>
			<content:encoded><![CDATA[<p>Un pequeño script que, al ejecutarlo, nos ayudará con la información que nos da darle forma según los requerimientos y recursos que tengamos en una máquina.</p>
<p><a title="http://www.solusan.com/wp-content/2009/07/tuning-primer.tar.gz" href="http://www.solusan.com/wp-content/2009/07/tuning-primer.tar.gz">tuning-primer.tar</a></p>
<p># wget -c http://www.solusan.com/wp-content/2009/07/tuning-primer.tar.gz<br />
# tar xzvf tuning-primer.sh.zip<br />
# chmod +x tuning-primer.sh.zip &amp;&amp; ./tuning-primer.sh.zip</p>
<p>ソルサン。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.solusan.com/ayudanto-a-tunear-etcmy-cnf.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Programador de tareas en Ubuntu (cron)</title>
		<link>http://www.solusan.com/programador-de-tareas-en-ubuntu-cron.html</link>
		<comments>http://www.solusan.com/programador-de-tareas-en-ubuntu-cron.html#comments</comments>
		<pubDate>Mon, 06 Jul 2009 06:22:57 +0000</pubDate>
		<dc:creator>Solusan</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[cron]]></category>

		<guid isPermaLink="false">http://www.solusan.com/?p=1228</guid>
		<description><![CDATA[En Ubuntu, cron es el “Administrador de tareas” en segundo plano (demonio) que ejecuta programas a intervalos regulares (por ejemplo, cada minuto, día, semana o mes). Los procesos que deben ejecutarse y la hora en la que deben hacerlo se especifican en el archivo crontab. Los usuarios habilitados para crear su archivo crontab se especifican [...]]]></description>
			<content:encoded><![CDATA[<p>En Ubuntu, cron es el “Administrador de tareas” en segundo plano (demonio) que ejecuta programas a intervalos regulares (por ejemplo, cada minuto, día, semana o mes). Los procesos que deben ejecutarse y la hora en la que deben hacerlo se especifican en el archivo crontab.</p>
<p>Los usuarios habilitados para crear su archivo crontab se especifican en el archivo cron.allow. De manera análoga, los que no lo tienen permitido figuran en /etc/cron.d/cron.deny, o /etc/cron.deny, dependiendo de la versión de unix.</p>
<p>Cómo programar una tarea en crontab</p>
<p>Nada mejor que un ejemplo del archivo crontab</p>
<p><code>skrdz@root:#crontab -e<br />
SHELL=/bin/bash<br />
PATH=/sbin:/bin:/usr/sbin:/usr/bin<br />
MAILTO=root<br />
HOME=/</code></p>
<p><code># run-parts<br />
01  * * * * root nice -n 19 run-parts /etc/cron.hourly<br />
50  0 * * * root nice -n 19 run-parts /etc/cron.daily<br />
22 4 * * 0 root nice -n 19 run-parts /etc/cron.weekly<br />
42 4 1 * * root nice -n 19 run-parts /etc/cron.monthly</code></p>
<p>Para agregar, quitar o modificar tareas, hay que editar el crontab. Esto se hace con la orden crontab -e, que abrirá el editor definido en la variable de entorno EDITOR y cargará el archivo crontab correspondiente al usuario que está logueado.</p>
<p>Cada vez que se ejecuta el crontab, se envía un mail al usuario que aparece en la variable de entorno MAILTO, si está habilitado, indicándole la tarea realizada.</p>
<p>La sintaxis en sí…</p>
<p>El símbolo Numeral “#” es un comentario, todo lo que se encuentre después de ese carácter no será ejecutado por cron. El momento de ejecución se especifica de acuerdo con la siguiente tabla:</p>
<p>Minutos: (0-59)<br />
Horas: (0-23)<br />
Días: (1-31)<br />
Mes: (1-12)<br />
Día de la semana: (0-6), siendo 1=Lunes, 2=Martes, … 6=sábado y 0=Domingo<br />
Para especificar todos los valores posibles de una variable se utiliza un asterisco (*).<br />
La última columna corresponde al path absoluto del binario o script que se quiere ejecutar.</p>
<p>Por ejemplo:</p>
<p><code>24 12 * * 1 /usr/bin/who &gt;&gt; /home/hola.txt</code><br />
Ejecuta la orden who todos los lunes a las 12:24 y guarda la salida en el archivo hola.txt</p>
<p>Para especificar dos o más valores en cada variable, estas deben estar separadas por comas, siguiendo con el ejemplo anterior:</p>
<p><code>0,24 * * * 1 /usr/bin/who &gt;&gt; /home/hola.txt</code></p>
<p>Ejecuta la orden who todos los lunes cada media hora y guarda la salida en el archivo hola.txt</p>
<p>Si queremos que se ejecute cada 15 minutos sería:</p>
<p><code>0,15,30,45 * * * * /usr/bin/who &gt;&gt; /home/quien.tex</code><br />
ó<br />
<code>*/15 * * * * /usr/bin/who &gt;&gt; /home/quien.tex</code><br />
En este ejemplo veremos como pasarle mas de un comando al cron y de paso como puede programarse una descarga:</p>
<p><code>30 21 * * * cd /media/sda7/dexter/distributions/isos;wget http://hola.com/archivo_a_descargar.loquesea</code></p>
<p>Este otro es para programar el apagado de la PC. En este caso todos los sábados a las 9:30 pm.</p>
<p><code>30 21 * * 6 /sbin/shutdown -h now</code></p>
<p>Espero que les haya servido!!! A mi me sirvió para programarle a moodle correr el script necesario para que envíe los correos de los foros o información importante a los estudiantes.</p>
<p>Vía: <a title="http://skrdz.wordpress.com/2007/08/31/programador-de-tareas-en-ubuntu-cron/" href="http://skrdz.wordpress.com/2007/08/31/programador-de-tareas-en-ubuntu-cron/" target="_blank">http://skrdz.wordpress.com/2007/08/31/programador-de-tareas-en-ubuntu-cron/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.solusan.com/programador-de-tareas-en-ubuntu-cron.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Borrando congelados</title>
		<link>http://www.solusan.com/borrando-congelados.html</link>
		<comments>http://www.solusan.com/borrando-congelados.html#comments</comments>
		<pubDate>Mon, 06 Jul 2009 06:19:55 +0000</pubDate>
		<dc:creator>Solusan</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[exim]]></category>

		<guid isPermaLink="false">http://www.solusan.com/?p=1223</guid>
		<description><![CDATA[Una solución de mantener limpia la cola de exim, sobre todo cuando mueve cantidades ingentes de correo puede ser la inclusión en crontab de este pequeño script: #!/bin/sh /usr/sbin/exim -bpr &#124; grep frozen &#124; awk {'print $3'} &#124; xargs /usr/sbin/exim -Mrm Aunque a veces se nos quedan correos que están &#8216;mal formados&#8217; para ello tira [...]]]></description>
			<content:encoded><![CDATA[<p>Una solución de mantener limpia la cola de exim, sobre todo cuando mueve cantidades ingentes de correo puede ser la inclusión en crontab de este pequeño script:</p>
<pre lang="bash">#!/bin/sh

/usr/sbin/exim -bpr | grep frozen | awk {'print $3'} | xargs /usr/sbin/exim -Mrm</pre>
<p>Aunque a veces se nos quedan correos que están &#8216;mal formados&#8217; para ello tira directamente del spool.<br />
<code><br />
# cd /var/spool/exim/<br />
# rm */message-id*</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.solusan.com/borrando-congelados.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Actualizar todas las bbdd del server</title>
		<link>http://www.solusan.com/actualizar-todas-las-bbdd-del-server.html</link>
		<comments>http://www.solusan.com/actualizar-todas-las-bbdd-del-server.html#comments</comments>
		<pubDate>Mon, 06 Jul 2009 02:39:57 +0000</pubDate>
		<dc:creator>Solusan</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://www.solusan.com/?p=1210</guid>
		<description><![CDATA[TIP para con una linea sóla actualizar todas las bbdd de MySQL del server. mysqlcheck -uda_admin -p -ro --all-databases]]></description>
			<content:encoded><![CDATA[<p>TIP para con una linea sóla actualizar todas las bbdd de MySQL del server.</p>
<pre lang="bash">mysqlcheck -uda_admin -p -ro --all-databases</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.solusan.com/actualizar-todas-las-bbdd-del-server.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

