background preloader

Linux

Facebook Twitter

Installing on RHEL and CentOS. Managing CentOS 6 Users and Groups. From Techotopia During the installation of CentOS 6, the Setup Agent prompted for information to create a single user account for the system. We should not lose sight of the fact that CentOS 6 is actually an enterprise class, multi-user and multi-tasking operating system. In order to use the full power of CentOS, therefore, it is likely that more than one user will need to be given access to the system.

Each user should have his or her own user account login, password, home directory and privileges . Users are further divided into groups for the purposes of easier administration and those groups can have different levels of privileges. For example, you may have a group of users who work in the Accounting department. [edit] Adding a New User to a CentOS 6 System There are two methods for adding new users to a system, one way is using the graphical User Manager tool and the other is to use the useradd command-line tool.

Su - useradd --home /home/john john passwd john man useradd. MySQL: Exporting, Backup and Restore. This note briefly covers how to export a database out of MySQL and back in. This is useful for moving databases between test environments. Exporting a Database To export a database, use the mysqldump utility normally located in your mysql/bin directory . For example, to export all the tables and data for a database named guestdb: mysqldump guestdb > guestdb.txt This will create a text file containing all the commands necessary to recreate all the tables and data found in guestdb.

Mysqldump guestdb guestTbl > guestdb.txt One important point. Mysqldump -p --user=username --add-drop-table guestdb guestTbl Enter password: ******** The -p option tells MySQL to prompt for a password. Guestdb.txt # MySQL dump 8.11 # # Host: localhost Database: guestdb #-------------------------------------------------------- # Server version 3.23.28-gamma # # Table structure for table 'guestTbl' # # # Dumping data for table 'guestTbl' # Importing the Database mysql -p --user=username < guestdb.txt. Nginx and passenger install in production environment - Lone Gunman.

So we've installed ruby as described in my previous post. But we are nothing with only a ruby installation. To serve our ruby / rails apps, we'll need a webserver. Until last year, I always used Apache to do the heavy lifting. But after some research, I decided to make the switch to Nginx. Either way, I'll be using Nginx in combination with Passenger. Essentials Ok, first of all, you need to know that Nginx can't load modules dynamically like Apache does. First start with installing a few essential tools for Nginx. Sudo aptitude install libpcre3 libpcre3-dev libpcrecpp0 Passenger Before we install the passenger gem and start the installation process, we need to get the nginx source and another extra module I use.

I know that comes with a certain nginx install, but in most cases, isn't the latest release. Wget tar xvzf nginx-1.0.14.tar.gz Second thing you need is to get the headers-more module. So lets download the extra module: Configuration vhost. Basic Linux Commands. Basic Linux Commands mkdir - make directories Usage mkdir [OPTION] DIRECTORY Options Create the DIRECTORY(ies), if they do not already exist. Mandatory arguments to long options are mandatory for short options too. -m, mode=MODE set permission mode (as in chmod), not rwxrwxrwx - umask -p, parents no error if existing, make parent directories as needed -v, verbose print a message for each created directory -help display this help and exit -version output version information and exit cd - change directories Use cd to change directories. Mv- change the name of a directory Type mv followed by the current name of a directory and the new name of the directory. Ex: mv testdir newnamedir pwd - print working directory will show you the full path to the directory you are currently in.

Rmdir - Remove an existing directory rm -r Removes directories and files within the directories recursively. chown - change file owner and group chown [OPTION] OWNER[:[GROUP]] FILE chown [OPTION] :GROUP FILE u - User who owns the file. bg. OpenSUSE 12.2 x86_64 (Apache2, Dovecot, ISPConfig 3. Version 1.0 Author: Falko Timme <ft [at] falkotimme [dot] com> Follow me on Twitter Last edited 09/06/2012 This is a detailed description about how to set up an OpenSUSE 12.2 64bit (x86_64) server that offers all services needed by ISPs and hosters: Apache web server (SSL-capable) with PHP, CGI and SSI support, Postfix mail server with SMTP-AUTH, TLS and virtual mail users, BIND DNS server, Pureftpd FTP server, MySQL server, Dovecot POP3/IMAP, Quota, Firewall, Mailman, etc.

Since version 3.0.4, ISPConfig comes with full support for the nginx web server in addition to Apache; this tutorial covers the setup of a server that uses Apache, not nginx. I will use the following software: Web Server: Apache 2.2 with PHP 5 Database Server: MySQL Mail Server: Postfix with virtual users DNS Server: BIND FTP Server: pureftpd POP3/IMAP: Dovecot Webalizer and AWStats for web site statistics I want to say first that this is not the only way of setting up such a system. 1 Requirements 2 Preliminary Note. Linux - Partition layout and types. 3.1.2.2. Partition layout and types There are two kinds of major partitions on a Linux system: data partition: normal Linux system data, including the root partition containing all the data to start up and run the system; andswap partition: expansion of the computer's physical memory, extra memory on hard disk.

Most systems contain a root partition, one or more data partitions and one or more swap partitions. Most Linux systems use fdisk at installation time to set the partition type. Apart from these two, Linux supports a variety of other file system types, such as the relatively new Reiser file system, JFS, NFS, FATxx and many other file systems natively available on other (proprietary) operating systems. The standard root partition (indicated with a single forward slash, /) is about 100-500 MB, and contains the system configuration files, most basic commands and server programs, system libraries, some temporary space and the home directory of the administrative user.

SDB:Live USB stick. Version: 12.2+This applies to openSUSE 12.2 and later. Warning The instructions on this page will destroy all data currently on the USB stick being used. Please be certain it does not contain important information. Warning Do not try to apply procedures found on the internet for other distributions to convert the images into bootable sticks (unetbootin). Doing that will break the images.

Download the latest openSUSE ISO file Official URL: Backup your USB drive You could, if you prefer, make a backup image of the stick prior to using it for installation, with dd, and recover it after the installation. Using SUSE Studio Image Writer Install ImageWriter for openSUSE Install SUSE Imagewriter with 1-Click Install For openSUSE Leap 42.1: For openSUSE 13.2: For openSUSE 13.1: For openSUSE Tumbleweed: Or you can use this command as a root to install Imagewriter. # zypper install imagewriter Write ISO to USB # live-fat-stick -l For more help, run: # live-fat-stick -h Optional steps.