Fedora 11 Configuration and Management
CentOS
http://www.server-world.info/en/note?os=CentOS_6&p=samba
Download and install guide
https://www.redhat.com/apps/download/
http://docs.fedoraproject.org/install-guide/f11/zh-CN/html-single/
Partition Recommendation: Size and type (Total: 80G RAM: 3G)
/boot 200 MB ext3 partition
LVM物理卷 保留空间,做为一个LVM卷组
物理卷分配到默认的卷组中并被分为以下逻辑卷:
Partition Size and type
swap 3 GB swap
/ 10 GB ext4
/var 4 GB ext4
/home 58 GB ext4
Some notes:
通常将 /home 独立出来是一个不错的主意,因为你的所有文件都保存在 /home 中。
M = 内存的 GB 数,S = 交换空间的 GB 数,然后
If M < 2
S = M *2
Else
S = M + 2
A root partition (3.0 GB - 5.0 GB)
This is where "/" (the root directory) is located. In this setup, all files (except those stored in /boot) are on the root partition.
Root and /root
The / (or root) partition is the top of the directory structure. The /root directory/root (sometimes pronounced "slash-root") directory is the home directory of the user account for system administration.
/var目录包含了大量的安装程序文件,包括Apacheweb服务器。同时它也存放下载的更新包。确保/var目录所在分区有足够的空间来保存下载的更新和您的其它内容。
/usr目录
Fedora系统中/usr目录存放主要软件。对于安装默认的软件包来说,至少需要4GB空间。如果您是程序开发员或打算用Fedora学习软件开发,则需要8GB以上的空间。
Do not place /usr on a separate partition
如果/usr是/之外一个独立分区的话,启动过程会变得更加复杂,某些情况下(如在iSCSI设备上安装)可能还会不工作。
Configuration (For personal desktop users, refer to http://gsion.blog.163.com/blog/static/123056504200963091639107/)
Network
Can't access computer using hostname
http://forums.fedoraforum.org/showthread.phps=5024f05c6afabff782ce14939194ae68&t=74920
It works after requesting a static IP.
Telnet
#rpm -q telnet
#rpm -q xinetd
如果无任何显示则表示没有安装,则需要下载.
http://www.rpmfind.net/linux/rpm2html/search.phpquery=telnet-server
#rpm -ivh telnet-server-0.17-25.i386.rpm
#rpm -ivh xinetd-2.3.14-21.fc10.i386.rpm
#vi /etc/xinetd.d/telnet
将
disable = yes
改成
disable = no
#:wq
#setup
在这边将防火墙停用.
#service xinetd restart
VNC
Tigervnc which was a fork of realvnc is now renamed to tigervnc.
So if you want vncserver as root do this:
#yum install tigervnc-server
and for vncviewer
#yum install vnc
Another detailed doc for vnc server setup: http://www.server-world.info/en/noteos=Fedora_11&p=x&f=2
/etc/sysconfig/vncservers
Visit: panku:1
FTP
http://www.server-world.info/en/note?os=Fedora_11&p=ftp
http://hi.baidu.com/760159/blog/item/4a005e0b66d08f34b1351df1.html
Service name: vsftpd
Samba
Configure:
/etc/samba/smb.conf
http://www.server-world.info/en/note?os=Fedora_11&p=samba&f=1
http://www.mjmwired.net/resources/mjm-fedora-f11.html
log: /var/log/samba/log.smbd
Issues:
smbd undefined symbol _talloc_get_type_abort
http://www.mail-archive.com/samba@lists.samba.org/msg103417.html
ldd /usr/sbin/smbd
http://www.fedoraforum.de/viewtopic.php?f=23&p=106710
[root@music samba]# rpm -qa | grep samba
system-config-samba-1.2.76-1.fc11.noarch
samba-client-3.4.2-0.42.fc11.i586
samba-common-3.4.2-0.42.fc11.i586
samba-3.4.2-0.42.fc11.i586
samba-winbind-3.4.2-0.42.fc11.i586
[root@music samba]# rpm -qa | grep talloc
libtalloc-1.2.0-29.14.fc11.i586
[root@music samba]# yum update libtalloc
---> Package libtalloc.i586 0:1.3.1-0.fc11 set to be updated
Downloading Packages:
libtalloc-1.3.1-0.fc11.i586.rpm | 18 kB 00:00
Updating : libtalloc 1/2
Cleanup : libtalloc 2/2
Updated:
libtalloc.i586 0:1.3.1-0.fc11
Complete!
[root@music samba]# service smb start
Starting SMB services: [ OK ]
fedora samba cannot copy access is denied
#/etc/init.d/smb stop or #service smb stop
#/usr/sbin/smbd
(使用/etc/init.d/smb启动可能因为输入参数的问题导致access denial,使用/usr/sbin/smbd即不带参数启动就成功了.但是重启之后还是acess denial.)
Apache
service name: httpd
http://httpd.apache.org/docs/2.2/mod/core.html
http://blog.163.com/qiao-wl/blog/static/624875662009101092536900/
http://www.server-world.info/en/note?os=Fedora_11&p=httpd&f=2
http://www.9527u.cn/viewthread.php?tid=143
http://www.9527u.cn/redirect.phpfid=12&tid=142&goto=nextnewset
#vi /etc/httpd/conf/httpd.conf
ServerRoot “/etc/httpd” 默认的服务所在目录
Listen 80 如有需要增加端口
ServerAdmin 主机邮件地址
ServerName panku.xxx.com:80 服务器辨别自己的名字和端口,这个必须自己来改,否则启动出错. (Could not reliably determine the server's fully qualified domain name)
DirectoryIndex index.php index.html index.html.var 增加主页的后缀名称
AddDefaultCharset UTF-8 默认UTF-8编码但是php中会出现乱码
同时要注释掉php.ini中的
#default_charset = “UTF-8″
DocumentRoot “/var/www/html” 默认主页的目录,change to "/home/www". The DocumentRoot should be specified without a trailing slash(结尾斜线).
#service httpd restart/status/stop
or
[root@panku conf]# apachectl configtest
Syntax OK
[root@panku conf]# apachectl graceful
# /etc/rc.d/init.d/httpd restart
Appache error log: /var/log/httpd/error_log
Issues:
"Forbidden / You don't have permission to access /~user/index.html on this server."
As /etc/init.d/httpd restart does not work, and /usr/sbin/httpd does work!
(Comment out all lines in /etc/init.d/httpd and it worked. However, when I reboot the machine, it doesn't work.)
http://www.linuxquestions.org/questions/linux-newbie-8/forbidden-you-dont-have-permission-to-access-userindex.html-on-this-server.-595305/
Perl
#yum install perl
/usr/bin/perl
Fedora Management
About runlevels
The following runlevels are defined by default under Fedora:
0 — 停止
1 — 单用户文本模式
2 — 未使用(用户可自定义)
3 — 完全的多用户文本模式
4 — 为使用(用户可自定义)
5 — 完全的多用户图形模式(基于 X Window 的登录屏幕)
6 — 重启模式
sudo chmod u=rwx,g=rx,o=rx /your/file/here
sudo chmod a+r yourfile.txt
sudo chmod u=rw,g-rwx,o-rwx folder/thisotherfile
where a = all three
where u = user (owner)
where g = group
where o = others (everyone else)
7 = rwx
6 = rw
5 = rx
4 = r
3 = wx
2 = w
1 = x