Powered By

Powered by Blogger

Tampilkan postingan dengan label server. Tampilkan semua postingan
Tampilkan postingan dengan label server. Tampilkan semua postingan

Senin, 28 Februari 2011

Start uTorrent Server As A Daemon With This Upstart Script

uTorrent server Linux

I've recently built a small home server powered by Ubuntu and wanted to give uTorrent Server for Linux a try. I needed a way to demonize uTorrent so it starts automatically and I can easily start/stop it so I've used an upstart script (found here) for this. Here's exactly how to do it:

To create an upstart script for uTorrent, move all the uTorrent files to the /home/yourusername/.utorrent folder, then run the following command:

sudo nano /etc/init/utorrent.conf
(replace "nano" with your favourite editor)

and copy/paste the following code:

description "utorrent startup script"

start on (local-filesystems and started dbus and stopped udevtrigger)
stop on runlevel [016]

script
cd /home/yourusername/.utorrent
exec su yourusername -c "/home/yourusername/.utorrent/utserver"
end script

Of course, replace "yourusername" with your username in the commands above. Now there's only one step left:
sudo ln -s /lib/init/upstart-job /etc/init.d/utorrent

From now on you can start/stop uTorrent using the following commands:
sudo start utorrent
sudo stop utorrent

Also see:

Senin, 27 September 2010

Script To Manage A Lot Of Linux Servers Through SSH

sshdialog

It seems we're having a scripts week here, at WebUpd8. Remy sent us a script he wrote to easily manage a lot of servers through SSH. You can find the script and instructions on using it @ Raymii.org.

Kamis, 11 Februari 2010

RHEL: Chmod or Chown Issued By Mistake On System Folders [Fix]

Problem:
Permissions and Ownership on critical system files (in /etc/) directory modified. This may cause the system to not boot, lots of errors and Kernel Panic.

Cause:
Someone accidentally typed chmod -R 777 /etc.

Solution:
You may use the following solutions (if you use Chmod or Chown by mistake on System Folders and changed Permissions & Owners) to avoid the re-installation of whole RHEL O.S. This should work for any Red Hat Enterprise Linux version and what you have to do is reset the ownership and permissions of the files installed by RPM.


The RPM package manager maintains a database for all files that it installs onto the system. This includes information such as the filename, installation path, owning package and the file system ownership and permissions (including SELinux file context information). In the event that ownership or permissions are inadvertently changed, for example, through accidental misuse of the chown or chmod commands, it is possible to revert these to their values as stored in the database.

The command-line rpm tool provides the --setperms and --setugids switches to allow this to be done.

To re-set ownership and permissions for all packages on the system:
rpm --setperms -a
rpm --setugids -a


To re-set ownership and permissions for a specific package on the system:

rpm --setperms <package name>
rpm --setugids <package name>


Note: This will not restore ownership or permissions information for files that were not installed by an RPM package. Any incorrect ownership or permissions for user-owned files, or for packages installed outside of RPM control must be addressed separately.



This post was sent by Web Upd8 reader rkv (Credits: Purna) - thanks! You may also want to read his previous post: [How-To] Recover LVM Partition On Damaged HDD.

Rabu, 30 September 2009

4 GB Of RAM In Ubuntu 32bit [How-to]

Ubuntu 32bit only supports 3 GB of RAM so if you have 4, only 3 will be used. You can use the 64bit version for all 4GB of RAM memory to work, or follow the instructions in this post to make the 32bit version of Ubuntu to work with 4GB or RAM.

Firstly, please note that to achieve this, you must install the Ubuntu Server Kernel which has Phisical Extencion Address Enabled (PAE) enabled thus allowing Ubuntu to see all 4 GB of RAM. You can also compile the 32 Kernel desktop version yourself, and enable PAE but that's difficult to explain so I'll not cover that :). Once, that was easily done with Kernelcheck, but now kernel.org changed something which made Kernelcheck to stop working. Another solution would be to just install the 64bit Ubuntu.

Installing the Ubuntu Server Kernel is basically for lazy people and should only take 1-2 minutes. If you wish to continue with this solution, follow the steps below:

Open a terminal and paste the following command:
sudo sudo apt-get install linux-headers-server linux-image-server linux-server


Once the installation is completed, restart your computer and boot into the new Kernel. That's basically it.

Note: This is basically a quick "fix". I strongly suggest newbies don't install this Server Kernel! Why? Because the server version will be more stable, but at the expense of performance and compatibility with various hardware (graphics,sound, etc.). The desktop version will likely provide better user interface response and better handle the latest 3D drivers and other "desktop" hardware. More advanced users should be able to tweak the settings for better responsiveness and hardware compatibility.

[via pmabox]