≡ Menu

Sudo command in Ubuntu Tutorial

Sudo command is used to provide root access privileges to specific users. so if we want to run a root command not need to log in as root, simply log on as a user who is granted root privileges by typing sudo before running another command.

The first scenario

below, I’ll give an example, suppose a user with a name will be given privileges wise as root, so the wise user can run all the commands that can be run by root. there are several steps that must be run to set up user wise to be as root.

1. edit the file /etc/sudoers with visudo command

2. add a line of blue reply as below in the file /etc/sudoers

3. save the changes.
wise users can now run commands as root. for example we run the samba, do I like this:

The second scenario

for example the user is given only priveleges wise to run some commands only, so not all commands can be executed by user root wise. for example, a user can execute commands wise only to display the status of the samba service only. must not stop, restart, or start. same command as above for step 1. for step 2 replaced the line to something like this:

wise if the user run a command other than that is in the file /etc/sudoers, then the notice will appear as below.

asep user can only run the command only displays the status of samba.

The third scenario

in order asep users do not need to enter a password when running the sudo command, then in step 2 changed to be like this

to separate commands dengang another one on writing the file in /etc/sudoers, use a comma. for example:

Explanation of the sudo command syntax:

asep ALL=(ALL) ALL
[field 1] [field 2] [field 3] [field 4]

Explanation:

[field 1] -> user who would use sudo
[field 2] -> hostname where the computer can run the command
[field 3] -> hostname specific computer or can also be set all
[field 4] -> commands can be executed by the user using sudo

NOTE: do not forget to log into the user’s wise to first to run a sudo command and change the file /etc/ sudoers can direct effect on the PC, so no need to reboot.

{ 0 comments }

After trying CloudLinux, it never hurts when I try to share information on this issue, although can not be implemented by all parties at least there are insights to be gained from the development of information technology, especially Linux:)

CloudLinux is an operating system (OS) commercially supported and enabled to be exchanged with the distribution-base RPM (Redhat Package Manager), the most popular. CloudLinux apply Lightweight Virtual Environment Technology (LVE) is a technology that increases the density of server isolation, stability and reliability. LVE limit the amount of resources (CPU, I / O and memory) are available for a particular process or customer / user.

CloudLinux is devoted to the webhosting service providers to provide features that are highly coveted by web hosting providers. CloudLinux very light and transparent, LVE will wrap account is on shared hosting and give control to the hosting provider for CPU resources.

Some things you can do LVE including:

  • Provide hosting provider control over the CPU resources (I / O and memory limits will be released)
  • Prevent an account that uses excessive server resources and burden the server performance
  • Protect your server from the unexpected problems that drain resources
  • Increase the density so you can have more hosting accounts on one server
  • Identify the account that excessive use of resources so that you can address their needs
  • Reduce risk and improve efficiency on a shared server
  • Improve server performance

CloudLinux designed to surpass the standard OS

Standard OS

  • Some web sites per server
  • Each web site can drain resources for various reasons
  • a single site can overload servers
  • There is no additional security or protection from hackers or script that drain resources
  • Improving the efficiency of servers and lowering risk

CloudLinux

  • Resource wrapped through LVE Technology
  • LVE websites prevent individuals from using too much resources
  • Technology LVE provides better security and protect the server from the issues that deplete resources
    for other tenants
  • Single website cannot overload the server
  • Allows you to maximize the many sites on one server
  • Reduce risk, improve efficiency and increase server performance
{ 0 comments }

How to Optimize Speed Up Booting Ubuntu

Here I will present how to optimize speed up booting UBuntu, so not much time is wasted just waiting for us ever booting ubuntu

If you feel slow booting Ubuntu, try some of these tricks.

1. Using preload package

preload is a package that is used to optimize the boot process and startup applications. To install the preload run this command in a terminal:

Once installed preload will walk alone, you do not need any configuration, because the developer has optimize preload. Or if you want to know the configuration, open files in /etc/preload.conf

2. Using the profile option on the Grub

You can also create profile your boot, so that future booting will read the saved profile file. To create a profile on the grub boot screen, press e on line

at the end of the line add the profile. Then press b to booting your system. When the boot process, boot the system will learn what is being done and then will read it back to the booting process next.

3. Disabling IPv6 (if not used)

By default, Ubuntu activate the IPv6 protocol, you must create a file to block this protocol. Type this command in terminal

then add the line alias net-pf-10 off then quit with SAVE it, how to: control + c then type “: wq”

4. Using prelink package

  • install prelink package with the command in terminal
  • then open the prelink configuration file with the command
  • Change the line PRELINKING = unknown becomes PRELINKING = yes
  • To run the prelink run the command in terminal
  • Next prelink will run a quick prelink every day, usually at night (less than 1 minute), while every 14 days full prelink will run. You can change these prelink time in crontab

5. Enabling multi-processing (special dual core)

If you have a computer with dual core processor, you can use it to process for faster booting. Open your terminal, then edit the rc file with the command in terminal

In line CONCURRENCY=none change into CONCURRENCY=shell, then exit with his SAVE it, how to: control + c then type “: wq”

Concurrency own means to do together, in this case the boot process will be conducted simultaneously by two processors so that it could be faster.

Hopefully this tutorial How to Optimize Speed Up Booting Ubuntu, your Ubuntu operating system become more comfortable to wear

source: jauhdimata

{ 0 comments }

Nginx is a powerful web server. few large sites start using this web server. This web server is superior in terms of memory usage and requests can be served


Comparison of the number of requests Apache web server, lighttpd and nginx

From the chart above, it appears that Nginx can serve more requests than the other web server.

In terms of memory usage, nginx also not less powerful in this regard.


Comparison of memory usage

wow .. amazing ..

To install nginx, it can be done easily. I’m using ubuntu linux maverick 10:10

1. Install nginx, php5-fpm, php5-xcache, php5-mysql

2. Run service php5 fastcgi dan nginx

php5-fpm is the service to run php as FastCGI. This service will open port 9000. whereas Nginx is a webserver that uses a standard web server port of 80. check port 80 and 9000 whether or not already listen

port 80 and port 9000 already listen

3. Change the nginx configuration for processing documents with extensi.php to be processed by php-FastCGI service

Please be as follows, namely by removing the remark and changing some directory locations.

4. Restart nginx #service nginx restart 5. We test. Create the file /var/www/info.php with the following contents:

Access via browser http://localhost/info.php

TIME benchmarking

Let us compare the performance between the apache with nginx. tool use is apache-bench. This tool is included in the package apache2-utils. how to check:

Nginx result:

Turn off nginx, restart apache and this is the test results.

Apache Results

So little information about how Powerful Web Server Using nginx, php5 FastCGI, xcache on ubuntu 10.10 that when compared to Apache

source: taujago.web.id

{ 0 comments }

How (using what is) the best way to synchronize folders in Windows, Mac, and Linux?

The story I have a folder that I used to teach college. Sometimes I work on a desktop computer running Windows and Linux. Meanwhile, if I’m moving (mobile) and chase, I use Linux. Synchronization is done manually, i.e. by creating a duplicate in each computer. Well, files are often scattered. On one machine there is a file that has not been updated and so forth. Chaotic …

Wish there are applications that can perform such synchronization. Yes there is, but usually only one platform only. Is there for a multiplatform?

{ 0 comments }

Now I will try for a bit of explaining how to set up a web server using webmin on CentOS, for those of you who want to save costs, webmin is a solution for you, but if you have more funds, use the cpanel is a solution that is easier to set up a web server.

The steps to install webmin on CentOS is as follows:

1. Install Webmin (if you have money rental CPanel / WHM more comfortable and easy to use as the beginning). Webmin is used to manage servers easily without having to always type the command in a shell. Check the latest Webmin RPM at webmin official website.

Login to shell use Putty or other programs that support and secure.

2. Open a browser go to: http://yourIP:10000 and then Login with username admin and password in accordance with new_password.

3. Install Apache

Click the Server-> Apache Webserver. There is a section labeled “Click here to have it downloaded and installed using YUM.”

Click there, going to install the Apache web server quickly and automatically.

Click the Start button after confirming a successful installation.

4. Install MySQL

Click the Server-> MySQL Database Server. There is a section labeled “Click here to have it downloaded and installed using YUM.”

Click there and going to install the MySQL Server on the web server quickly and automatically.

Click the Start button after confirming a successful installation.

5. Install PHP5

Back to Putty and enter the following command.

6. PHP Test

Create a PHP file and test whether all that we’ve successfully installed and running well.

Log in vi text editor. To start writing the letter i type the key once and the bottom the words “INSERT”

Type

Press ESC
:w ENTER
:q ENTER

7. Return to the browser and go to http://yourIP/

If you see the display info from PHP then all the above installation has been completed successfully.

Take a break or go directly to the installation of Bind DNS and Virtual Host settings

8. Install Bind DNS

Back to the Webmin pages. Go to the menu server-> Bind DNS. There are papers “Click here to have it downloaded and installed using YUM.”
Click there and to install the Bind will quickly and automatically. Once completed there is a choice answers, select the answer number 2 or another number, which means “Used to control the Internet and the Download Zone.” Then press the Start button.

9. Setting domain name
Assumed to have registered a domain name: asep.us
Register ns1.asep.us and ns2.asep.us given to a dedicated IP. Register at the domain registrar where you have registered domain. After that point asep.us name servers to ns1.asep.us and ns2.asep.us

10. Back to page Webmin

Click the Server-> Bind DNS

Click the “Edit Config Files” and add the following to it and press SAVE

11. Back to Shell. Create a new file as an example the number 6 with name asep.us.host in /etc/

File content

Replace server.asep.us accordance with the name server that gives a chance and 123.123.123.123 provided with a dedicated IP. Save and restart Bind

12. Install Virtual Host.

Back to the Webmin menu and click Server-Apache WebServer – Global Configuratin.

Click on Edit Config Files. Add at the bottom section of this field

Save and restart Apache Server.

13. Creating Index file to asep.us

Go Putty. Create a new file like the example at number 6 with name of the index.php in the folder /var/www/html/asepus

the content of file:

Save the file you just created.

14. Test all results.

Repeat step 7. If the browser’s appearance changed to the words “Welcome to ASEP.US” then everything above is 99% successful.

Enter in your browser https://www.asep.id/ or http://asep.us should display in the browser will still show the words “Welcome to ASEP.US”. If the exit “Server Not Found” do not rush to worried. The possibility of a new domain name gives a chance at number 9 and Bind DNS is still not resolved. Just wait for about 2-6 hours and try again. If after 24 hours was also “Server not Found”, then it’s time to worry about finding fault where.

Enjoy your Web Server.

How to Set Up a Web Server using Webmin on CentOS is still ignoring the various security holes that occur because the setting is still the standard PHP and MySQL. For security issue, Google has a lot of stories and articles.

{ 1 comment }