Andrew Hudson - Fedora™ Unleashed, 2008 edition

Здесь есть возможность читать онлайн «Andrew Hudson - Fedora™ Unleashed, 2008 edition» весь текст электронной книги совершенно бесплатно (целиком полную версию без сокращений). В некоторых случаях можно слушать аудио, скачать через торрент в формате fb2 и присутствует краткое содержание. Город: Indianapolis, Год выпуска: 2008, ISBN: 2008, Издательство: Sams Publishing, Жанр: ОС и Сети, на английском языке. Описание произведения, (предисловие) а так же отзывы посетителей доступны на портале библиотеки ЛибКат.

Fedora™ Unleashed, 2008 edition: краткое содержание, описание и аннотация

Предлагаем к чтению аннотацию, описание, краткое содержание или предисловие (зависит от того, что написал сам автор книги «Fedora™ Unleashed, 2008 edition»). Если вы не нашли необходимую информацию о книге — напишите в комментариях, мы постараемся отыскать её.

Quick Glance Guide
Finding information you need is not always easy. This short index provides a list of common tasks discussed inside this book. Browse the table of contents or index for detailed listings and consult the specified chapter for in-depth discussions about each subject.
left How Do I…?
See…
How Do I…?
See…
left Back up my system?
Chapter 13
Partition a hard drive?
Appendix B, Chapters 1, 35
left Build a new Linux kernel?
Chapter 36
Play MP3s and other music?
Chapter 7
left Burn a CD?
Chapter 7
Print a file?
Chapter 8
left Change a password?
Chapter 4
Read a text file?
Chapter 4
left Change the date and time?
Chapter 32
Read or send email?
Chapter 21
left Compress a file?
Chapter 13
Read or post to newsgroups?
Chapter 5
left Configure a modem?
Chapter 2
Reboot Fedora?
Chapter 1
left Configure a printer?
Chapter 8
Rescue my system?
Chapter 13
left Configure a scanner?
Chapter 7
Set up a DNS server?
Chapter 23
left Configure a sound card?
Chapter 7
Set up a firewall?
Chapter 14
left Configure my desktop settings?
Chapter 3
Set up a web server?
Chapter 15
left Connect to the Internet?
Chapter 5
Set up an FTP server?
Chapter 20
left Control a network interface?
Chapter 14
Set up Samba with SWAT?
Chapter 19
left Copy files or directories?
Chapters 13, 32
Set up wireless networking?
Chapter 14
left Create a boot disk to boot Fedora?
Chapter 1
Shut down Fedora?
Chapter 1
left Create a database?
Chapter 16
Use a spreadsheet?
Chapter 6
left Create a user?
Chapter 4
Use Instant Messaging?
Chapter 5
left Delete a file or directory?
Chapter 32
Watch television on my computer?
Chapter 7
left Get images from a digital camera?
Chapter 7
Edit a text file?
Chapter 4
left Install Fedora?
Chapter 1
Make Fedora more secure?
Chapter 14
left Log in to Fedora?
Chapter 1
Mount a CD-ROM or hard drive?
Chapter 35

Fedora™ Unleashed, 2008 edition — читать онлайн бесплатно полную книгу (весь текст) целиком

Ниже представлен текст книги, разбитый по страницам. Система сохранения места последней прочитанной страницы, позволяет с удобством читать онлайн бесплатно книгу «Fedora™ Unleashed, 2008 edition», без необходимости каждый раз заново искать на чём Вы остановились. Поставьте закладку, и сможете в любой момент перейти на страницу, на которой закончили чтение.

Тёмная тема
Сбросить

Интервал:

Закладка:

Сделать

postgres:x:26:26:PostgreSQL Server:/var/lib/pgsql:/bin/bash

Otherwise, you need to create a user called postgresduring the installation. This user shouldn't have login privileges because only root should be able to use suto become this user and no one will ever log in directly as the user. (Refer to Chapter 10, "Managing Users," for more information on how to add users to a Fedora system.) After you have added the user, you can install each of the PostgreSQL RPMs you downloaded using the standard rpm -icommand for a default installation.

Initializing the Data Directory in PostgreSQL

After the RPMs are installed, you need to initialize the data directory. To do so, you must first create the data directory and you must be the root user. The following example assumes that the data directory is /usr/local/pgsql/data.

Create the /usr/local/pgsql/datadirectory (using mkdir) and change the ownerships of the directory (using chownand chgrp) so it is owned by the user postgres. Then use suand, as the user postgres, issue the following commands:

# mkdir /usr/local/pgsql

# chown postgres /usr/local/pgsql

# chgrp postgres /usr/local/pgsql

# su - postgres

-bash-2.05b$ initdb -D /usr/local/pgsql/data

The files belonging to this database system will be owned by user "postgres".

This user must also own the server process.

The database cluster will be initialized with locale en_US.UTF-8.

This locale setting will prevent the use of indexes for pattern matching

operations. If that is a concern, rerun initdb with the collation order

set to "C". For more information see the Administrator's Guide.

creating directory /usr/local/pgsql/data... ok

creating directory /usr/local/pgsql/data/base... ok

creating directory /usr/local/pgsql/data/global... ok

creating directory /usr/local/pgsql/data/pg_xlog... ok

creating directory /usr/local/pgsql/data/pg_clog... ok

creating template1 database in /usr/local/pgsql/data/base/1... ok

creating configuration files... ok initializing pg_shadow... ok

enabling unlimited row size for system tables... ok

initializing pg_depend... ok

creating system views... ok

loading pg_description... ok

creating conversions... ok

setting privileges on built-in objects... ok

vacuuming database template1... ok

copying template1 to template0... ok

Success. You can now start the database server using:

/usr/bin/postmaster -D /usr/local/pgsql/data

or

/usr/bin/pg_ctl -D /usr/local/pgsql/data -l logfile start

This initializes the database and sets the permissions on the data directory to their correct values.

CAUTION

The initdbprogram sets the permissions on the data directory to 700. You should not change these permissions to anything else to avoid creating a security hole.

You can start the postmasterprogram with the following command (make sure that you are still the user postgres):

$ postmaster -D /usr/local/pgsql/data &

If you have decided to use a directory other than /usr/local/pgsql/dataas the data directory, you should replace the directory in the postmastercommand line with what ever directory you are using.

TIP

By default, Fedora makes the PostgreSQL data directory /var/lib/pgsql/data. This isn't a very good place to store the data, however, because most people do not have the necessary space in the /varpartition for any kind of serious data storage. Note that if you do change the data directory to something else (such as /usr/local/pgsql/data, as in the examples in this section), you need to edit the PostgreSQL startup file (named postgres) located in /etc/rc.d/init.dto reflect the change.

Creating a Database in PostgreSQL

Creating a database in PostgreSQL is straightforward, but it must be performed by a user who has permissions to create databases in PostgreSQL — for example, initially the user named postgres. You can then simply issue the following command from the shell prompt (not the PSQL client prompt, but a normal shell prompt):

# su – postgres

-bash-2.05b$ createdb database

where database is the name of the database you want to create.

The createdbprogram is actually a wrapper that makes it easier to create databases without having to log in and use psql. However, you can also create databases from within psql with the CREATE DATABASEstatement. Here's an example:

CREATE DATABASE database;

You need to create at least one database before you can start the pgsqlclient program. You should create this database while you're logged in as the user postgres. To log in as this user, you need to use suto become root and then use suto become the user postgres. To connect to the new database, you start the psqlclient program with the name of the new database as a command-line argument, like so:

$ psql sampledata

If you don't specify the name of a database when you invoke psql, the command attempts to connect to a database that has the same name as the user as which you invoke psql(that is, the default database).

Creating Database Users in PostgreSQL

To create a database user, you use suto become the user postgresfrom the Linux root account. You can then use the PostgreSQL createusercommand to quickly create a user who is allowed to access databases or create new database users, like this:

$ createuser phudson

Shall the new user be allowed to create databases? (y/n) y

Shall the new user be allowed to create more new users? (y/n) y

CREATE USER

In this example, the new user named phudsonis created and allowed to create new data bases and database users (you should carefully consider who is allowed to create new databases or additional users).

You can also use the PostgreSQL command-line client to create a new user by typing psqlalong with name of the database and then use the CREATE USERcommand to create a new user. Here is an example:

CREATE USER foobar ;

CAUTION

PostgreSQL allows you to omit the with passwordportion of the statement. However, doing so causes the user to be created with no password. This is a security hole, so you should always use the with passwordoption when creating users.

NOTE

When you are finished working in the psqlcommand-line client, you can type \q to get out of it and return to the shell prompt.

Читать дальше
Тёмная тема
Сбросить

Интервал:

Закладка:

Сделать

Похожие книги на «Fedora™ Unleashed, 2008 edition»

Представляем Вашему вниманию похожие книги на «Fedora™ Unleashed, 2008 edition» списком для выбора. Мы отобрали схожую по названию и смыслу литературу в надежде предоставить читателям больше вариантов отыскать новые, интересные, ещё непрочитанные произведения.


Отзывы о книге «Fedora™ Unleashed, 2008 edition»

Обсуждение, отзывы о книге «Fedora™ Unleashed, 2008 edition» и просто собственные мнения читателей. Оставьте ваши комментарии, напишите, что Вы думаете о произведении, его смысле или главных героях. Укажите что конкретно понравилось, а что нет, и почему Вы так считаете.

x