Merge pull request #37 from LCTT/master

Update Repository
This commit is contained in:
joeren 2014-08-09 18:20:32 +08:00
commit 5651de9c26
9 changed files with 533 additions and 154 deletions

View File

@ -1,19 +1,18 @@
2q1w2007翻译中
法国图卢兹市通过使用Libreoffice省了100万欧元
================================================================================
![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/07/FRance_LibreOffice.jpg)
[图卢兹][1],是法国第四大城市,坐落于法国西南部,它通过迁移到开源办公套件[LibreOffice][2]已经节省了一百万欧元。
[图卢兹][1]是法国第四大城市,坐落于法国西南部,它通过迁移到开源办公套件[LibreOffice][2]已经节省了一百万欧元。
迁移到LibreOffice是这个城市新的数字化政策的重要部分。在2011年作出决定后,2012年开始迁移。迁移总共花费了一年半,到今天已有90%的桌面(10000工作人员)运行LibreOffice。
迁移到LibreOffice是这个城市新的数字化政策的重要部分。在2011年作出决定后2012年开始迁移迁移总共花费了一年半到今天已有90%的桌面(大约10000工作人员)运行LibreOffice。
政府每三年的办公软件授权大约要花180万欧元,而迁移总共花了80万欧元。所以城市总共省了100万欧元。
政府每三年的办公软件授权大约要花180万欧元而迁移总共花了80万欧元所以城市总共省了100万欧元。
一切起始于Pierre Cohen在2008年被选作卢兹市市长。Cohen是一位IT专家,他的数字化政策起始于对开源软件的特别关注。正式他和他的副手(his associate)Erwane Monthubert的努力下,图卢兹市在2011年决定切换到开源软件。
一切起始于Pierre Cohen在2008年被选作卢兹市市长。Cohen是一位IT专家他的数字化政策起始于对开源软件的特别关注。正是他和他的助手Erwane Monthubert的努力下图卢兹市在2011年决定切换到开源软件。
不只是LibreOffice。大多数的图卢兹市的官方门户网站,比如toulouse.fr、toulouse-metropole.fr、toulouse-metropole.fr和data.grandtoulouse.fr,由自由软件支持。Alfresco被选作协同工具。
不只是LibreOffice。大多数的图卢兹市的官方门户网站比如toulouse.fr、toulouse-metropole.fr、toulouse-metropole.fr和data.grandtoulouse.fr由自由软件支持。Alfresco被选作协同工具。
切换到开源软件看起来正在成为欧洲城市的潮流。在临近的西班牙瓦伦西亚和[加那利群岛抛弃了Microsoft Office节省了几百万][3]。[法国首都的警察开发了他们自己的Linux OS][4]基于Ubuntu。列表没有终结,我希望我目前的城市Cote de Azur可以不久后加入这个列表。
切换到开源软件看起来正在成为欧洲城市的潮流。在临近的西班牙瓦伦西亚和[加那利群岛抛弃了Microsoft Office节省了几百万][3][法国首都的警察基于Ubuntu开发了他们自己的Linux OS][4]。这个列表还在继续增长,我希望我目前的城市Cote de Azur可以不久后加入这个列表。
点[这里][5]阅读所有报道。
@ -23,7 +22,7 @@ via: http://itsfoss.com/french-city-toulouse-saved-1-million-euro-libreoffice/
作者:[Abhishek][a]
译者:[2q1w2007](https://github.com/2q1w2007)
校对:[校对者ID](https://github.com/校对者ID)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出

View File

@ -1,6 +1,7 @@
开源媒体中心XBMC宣布启用新名字
开源媒体中心XBMC为什么要改名?
================================================================================
![Beginnings: the project began life as an Xbox video player](http://www.omgubuntu.co.uk/wp-content/uploads/2014/06/89ee51bbc7feb9d64b00913bdfe703c4.png)
早期项目一开始是运行在Xbox上的视频播放器。
**一个在Linux平台以及其他各种平台上最受欢迎的开源媒体中心软件将启用新名字。**
@ -9,23 +10,24 @@ XBMC将不再使用在项目的下一个重要发布版第14版
这个社区项目建立于2002年用于在Xbox游戏机上播放数字媒体内容。总的来说在那之后项目一直使用从Xbox衍生出来的名字。早期版本被命名为**Xbox媒体播放器**’,然后改成‘**Xbox媒体中心**以展示新增的功能。在移植到微软游戏机之外的平台后于2008年确定了首字母缩写XBMC的名称。
在这个网站早期的时候重复敲过无数次的XBMC
之前在这个网站上XBMC出现了一遍又一遍
为什么要换名字为什么是现在Kodi到底有没有什么特殊含义
> 这个软件仅仅勉强能运行在第一代Xbox上...
“*这个软件仅仅勉强能运行在第一代Xbox上因为之后许多聪明的开发人员仍然在那个平台上开发它不能在Xbox 360或者Xbox One上运行。*”项目负责人**Nathan Betzen**在XBMC博客上这样解释。
“*这个软件仅仅勉强能运行在第一代Xbox上那是因为许多聪明的开发人员仍然在那个平台上开发它不能在Xbox 360或者Xbox One上运行。*”项目负责人**Nathan Betzen**在XBMC博客上这样解释。
如今这个软件已经拥有远远超过以往的功能,包括针对不同市场的插件,游戏功能以及流媒体支持,这已经不能用‘*一个简单的媒体中心*’来包含所有的一切了。
因为这个原因Betzen这样总结“**XB**”和“**MC**”就已经没有有太大意义。
对于XBMC信徒也无可厚非名字改动也**解决了许多长期存在的法律风险**。“*我们从来都没有真正在法律意义上拥有过项目名字的使用权...*”Betzen说并且补充道XBMC基金会成立于2009年旨在更好地协助和管理软件开发一直在面临拥有相似商标的其他公司的潜在法律威胁的情况下运作。
对于XBMC信徒也无可厚非名字改动也**解决了许多长期存在的法律风险**。“*我们从来都没有真正在法律意义上拥有过项目名字的使用权...*”Betzen说并且补充道XBMC基金会成立于2009年旨在更好地协助和管理软件开发一直在面临拥有相似商标的其他公司的潜在法律威胁的情况下运作
### 于是乎Kodi ###
![The (temporary) new logo](http://www.omgubuntu.co.uk/wp-content/uploads/2014/08/kodi-logo.jpg)
新标志(临时)
即将发布的XBMC 14版本中项目将正式过渡采用新名字Kodi。除了听起来特别酷以外这个名字貌似没有什么特殊含义。
@ -34,7 +36,7 @@ XBMC将不再使用在项目的下一个重要发布版第14版
“但是”Betzen这样总结“我们相信在你的支持以及整个社区的支持下Kodi这个我们都热爱的媒体中心或娱乐平台或是不管你叫做什么将会比以往更加强大。”
非常正确。关于这次号变更的更深层意义,你可以去官方网站溜达一下,链接在下边。
非常正确。关于这次号变更的更深层意义,你可以去官方网站溜达一下,链接在下边。
- [Kodi 14简介官方声明贴][1]
@ -48,7 +50,7 @@ via: http://www.omgubuntu.co.uk/2014/08/xbmc-renamed-lodi-starting-version-14
作者:[Joey-Elijah Sneddon][a]
译者:[zpl1025](https://github.com/zpl1025)
校对:[校对者ID](https://github.com/校对者ID)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出

View File

@ -0,0 +1,38 @@
Lime Text: An Open Source Alternative Of Sublime Text
================================================================================
![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/08/Lime_Text_Editor.jpeg)
[Sublime Text][1] is one of the best (if not best) text editor for programmers. Packed with numerous feature and great looking interface, Sublime is available for all three major desktop OS i.e. Windows, Mac and Linux.
But it is not that Sublime Text is perfect. There are bugs, crashes and almost no support. If you have been following Sublime Text development, you know that the beta version of Sublime Text has been out for more than a year now and there is no clear communication to users about its release date. And above all, Sublime Text is neither free nor [Open Source][2].
All these issues also frustrated [Fredrik Ehnbom][3] and hence he started an Open Source project, [Lime Text][4], on [Github][5] to make a new text editor which looks and works exactly the same way as Sublime Text. On the question of why he decided to “clone” an existing text editor, Frederic mentions:
> As none of the other text editors Ive tried come close to the love I had for Sublime Text, I decided I had to create my own.
Lime Text is built in Go for backend while the frontend is in ermbox, Qt (QML) and HTML/JavaScript. The development is in progress with clear [goals][6] in sight. You can contribute to the project on its [Github page][7].
![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/08/LimeTextEditor.jpeg)
If you want to try the beta version, you can build Lime Text by following the instructions on the [wiki][8]. Meanwhile, if you are looking for other powerful text editors, give [SciTE][9] a go.
--------------------------------------------------------------------------------
via: http://itsfoss.com/lime-text-open-source-alternative/
作者:[bhishek][a]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[a]:http://itsfoss.com/author/Abhishek/
[1]:http://www.sublimetext.com/
[2]:http://itsfoss.com/category/open-source-software/
[3]:https://github.com/quarnster
[4]:http://limetext.org/
[5]:https://github.com/
[6]:https://github.com/limetext/lime/wiki/Goals
[7]:https://github.com/limetext/lime/issues
[8]:https://github.com/limetext/lime/wiki/Building
[9]:http://itsfoss.com/scite-the-notepad-for-linux/

View File

@ -1,84 +0,0 @@
[su-kaiyao]翻译中
Command Line Tuesdays Part Seven
================================================================================
Heya geekos. Ive checked the curriculum, and were at part 7 of 8 as of today. Which means there will be one more and sadly final CLT next tuesday. So for today, lets deal with some **permissions**!
As we all know, we can have many users using one machine. To protect the users from each other, permissions have been devised. And we have already discussed file permissions, so lets refresh our memories with a single [click][1].
![](http://linuxcommand.org/images/file_permissions.png)
### chmod ###
The **chmod** command is used for changing permissions on a directory or a file. To use it, you first type the chmod command, after that you type the permissions specification, and after that the file or directory youd like to change the permissions of. It can be done in more way, but mr Shotts focuses on the octal notation method.
Imagine permissions as a series of bits. For every permission slot thats not empty, theres a 1, and for every empty one theres a 0. For example:
rwx = 111
rw- = 110
etc.
And to see how it looks in binary:
rwx = 111 —> in binary = 7
rw- = 110 —> in binary = 6
r-x = 101 —> in binary = 5
r = 100 —> in binary = 4
Now, if we would like to have a file with read, write and executing permissions for the file owner and for the group owner of the file, but make it unavailable to all other users, we do:
chmod 770 example_file
…where example_file is any file youd like to try this command on. So, you always have to enter three separate digits, for three separate groups known already from our second lesson. The same can be done for directories.
### su and sudo ###
It is sometimes needed for a user to become a super user, so he can accomplish a task (usually something like installing software, for example). For temporary accessing to the super user mode, theres a program called **su**, or substitute user. You just have to type in
su
and type your superuser password, and youre in. However, a word of warning: dont remember to log out and use it for a short period of time.
Also theres an option probably more used in openSUSE and Ubuntu, and its called sudo. Sudo is only different in the aspect, that its a special command thats allocated to one specific user. So unlike su, with sudo you can use your user password instead of the superusers password. Example:
sudo zypper in goodiegoodie
### Changing file and group ownership ###
To change the owner of the file, you have to run **chown** as a superuser. For example, if Id want to change ownership from nenad to suse, I do it this way:
su
[enter password]
chown suse example_file
I can also accomplish the same with changing group ownership, but with a slightly different command **chgrp**. Easy peasy:
chgrp suse_group example_file
…and thats it.
### Next time ###
As I already stated, next time well have a photo-finish of sorts. And after that, youll be on your own (along with me, wandering through the terminals darkness, with only a blinking green cursor as a lighthouse :) ). Until then geekos, remember to…
…have a lot of fun!
--------------------------------------------------------------------------------
via: https://news.opensuse.org/2014/08/05/command-line-tuesdays-part-seven/
作者:[Nenad Latinović][a]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[a]:https://news.opensuse.org/author/holden87/
[1]:https://news.opensuse.org/2014/07/01/command-line-tuesdays-part-three/

View File

@ -1,56 +0,0 @@
Linux FAQs with Answers--How to enable and configure desktop sharing on Linux Mint Cinnamon desktop
================================================================================
> **Question**: I was trying to enable desktop sharing via Vino VNC server (vino-server) on Linux Mint 17 Cinnamon desktop. However, I notice that vino-preferences tool which allows us to configure vino-server (e.g., sharing option, security, notification on/off) no longer exists. Also, I cannot find desktop sharing menu on Cinnamon desktop. How can I configure desktop sharing via vino-server on the latest Linux Mint 17 Cinnamon desktop?
The latest Linux Mint Cinnamon desktop comes with vino-server pre-installed for VNC desktop sharing, but it's reported that desktop sharing configuration menu is missing.
An alternative way to configure vino-server and enable desktop sharing is to use dconf-editor's graphical interface.
First install dconf-editor:
$ sudo apt-get install dconf-editor
Launch dconf-editor.
$ dconf-editor
Navigate to "org->gnome->desktop->remote-access" on the left panel of dconf-editor. Then you will see various desktop sharing options.
![](https://farm4.staticflickr.com/3916/14843965473_e68598b01b_z.jpg)
Most importantly, click on "enabled" to activate desktop remote access. Besides this, you can customize other options.
For example, you can enable VNC password authentication by changing the following fields:
- **authentication-methods**: set it to ['vnc']
- **vnc-password**: change it to Base64-encoded string of a preferred password.
In this example, we choose VNC password as "password", and its Base64-encoded string is "cGFzc3dvcmQK".
$ echo "password" | base64
> cGFzc3dvcmQK
Optionally, you can enable other options:
- **notify-on-connect**: shows a desktop notification when vino-server receives a connection request.
- **prompt-enabled**: a remote user is not allowed to access a desktop via VNC until the VNC request is approved by the desktop owner.
### Troubleshoot ###
1. I am getting the following error when attempting to start vino-server.
> ** (vino-server:4280): WARNING **: The desktop sharing service is not enabled, so it should not be run.
To enable desktop sharing service, use dconf-editor as described above. Alternatively, run the following command.
# gsettings set org.gnome.Vino enabled true
--------------------------------------------------------------------------------
via: http://ask.xmodulo.com/enable-configure-desktop-sharing-linux-mint-cinnamon-desktop.html
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出

View File

@ -0,0 +1,46 @@
Vic020
Check Hard drive for bad sectors or bad blocks in linux
================================================================================
**badblocks** is the command or utility in linux like operating system which can **scan** or test our **hard disk** and **external drive** for **bad sectors**. Bad sectors or **bad blocks** is the space of the disk which can't be used due to the **permanent damage** or OS is unable to access it.
Badblocks command will detect all **bad blocks(bad sectors)** on our hard disk and save them in a text file so that we can use it with **e2fsck** to configure Operating System(OS) to not store our data on these damaged sectors.
### Step:1 Use fdisk command to identify your hard drive info ###
# sudo fdisk -l
### Step:2 Scan your hard drive for Bad Sectors or Bad Blocks ###
# sudo badblocks -v /dev/sdb > /tmp/bad-blocks.txt
Just replace “/dev/sdb” with your own hard disk / partition. When we execute above command a text file “bad-blocks” will be created under /tmp , which will contains all bad blocks.
Example :
![](http://www.linuxtechi.com/wp-content/uploads/2014/08/badblocks.png)
### Step:3 Inform OS not to use bad blocks for storing data ###
Once the scanning is completed , if the bad sectors are reported , then use file “bad-blocks.txt” with e2fsck command and force OS not to use these bad blocks for storing data.
# sudo e2fsck -l /tmp/bad-blocks.txt /dev/sdb
Note : Before running e2fsck command , you just make sure the drive is not mounted.
For any futher help on badblocks & e2fsck command , read their man pages
# man badblocks
# man e2fsck
--------------------------------------------------------------------------------
via: http://www.linuxtechi.com/check-hard-drive-for-bad-sector-linux/
作者:[Pradeep Kumar][a]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[a]:http://www.linuxtechi.com/author/pradeep/

View File

@ -0,0 +1,197 @@
How to install Puppet server and client on CentOS and RHEL
================================================================================
As a system administrator acquires more and more systems to manage, automation of mundane tasks gets quite important. Many administrators adopted the way of writing custom scripts, that are simulating complex orchestration software. Unfortunately, scripts get obsolete, people who developed them leave, and without an enormous level of maintenance, after some time these scripts will end up unusable. It is certainly more desirable to share a system that everyone can use, and invest in tools that can be used regardless of one's employer. For that we have several systems available, and in this howto you will learn how to use one of them - Puppet.
### What is Puppet? ###
Puppet is an automation software for IT system administrators and consultants. It allows you to automate repetitive tasks such as the installation of applications and services, patch management, and deployments. Configuration for all resources are stored in so called "manifests", that can be applied to multiple machines or just a single server. If you would like to know more information, The Puppet Labs site has a more complete description of [what Puppet is and how it works][1].
### What are we going to achieve in this tutorial? ###
We will install and configure a Puppet server, and set up some basic configuration for our client servers. You will discover how to write and manage Puppet manifests and how to push it into your servers.
### Prerequisites ###
Since Puppet is not in basic CentOS or RHEL distribution repositories, we have to add a custom repository provided by Puppet Labs. On all servers in which you want to use Puppet, install the repository by executing following command (RPM file name can change with new release):
**On CentOS/RHEL 6.5:**
# rpm -ivh https://yum.puppetlabs.com/el/6.5/products/x86_64/puppetlabs-release-6-10.noarch.rpm
**On CentOS/RHEL 7:**
# rpm -ivh https://yum.puppetlabs.com/el/7/products/x86_64/puppetlabs-release-7-10.noarch.rpm
### Server Installation ###
Install the package "puppet-server" on the server you want to use as a master.
# yum install puppet-server
When the installation is done, set the Puppet server to automatically start on boot and turn it on.
# chkconfig puppetmaster on
# service puppetmaster start
Now when we have the server working, we need to make sure that it is reachable from our network.
On CentOS/RHEL 6, where iptables is used as firewall, add following line into section ":OUTPUT ACCEPT" of /etc/sysconfig/iptables.
> -A INPUT -m state --state NEW -m tcp -p tcp --dport 8140 -j ACCEPT
To apply this change, it's necessary to restart iptables.
# service iptables restart
On CentOS/RHEL 7, where firewalld is used, the same thing can be achieved by:
# firewall-cmd --permanent --zone=public --add-port=8140/tcp
# firewall-cmd --reload
### Client Installation ###
Install the Puppet client package on your client nodes by executing the following:
# yum install puppet
When the installation finishes, make sure that Puppet will start after boot.
# chkconfig puppet on
Your Puppet client nodes have to know where the Puppet master server is located. The best practice for this is to use a DNS server, where you can configure the Puppet domain name. If you don't have a DNS server running, you can use the /etc/hosts file, by simply adding the following line:
> 1.2.3.4 server.your.domain
> 2.3.4.5 client-node.your.domain
1.2.3.4 corresponds to the IP address of your Puppet master server, "server.your.domain" is the domain name of your master server (the default is usually the server's hostname), "client-node.your.domain" is your client node. This hosts file should be configured accordingly on all involved servers (both Puppet master and clients).
When you are done with these settings, we need to show the Puppet client what is its master. By default Puppet looks for a server called "puppet", but this setting is usually inappropriate for your network configuration, therefore we will exchange it for the proper FQDN of the Puppet master server. Open the file /etc/sysconfig/puppet and change the "PUPPET_SERVER" value to your Puppet master server domain name specified in /etc/hosts:
> PUPPET_SERVER=server.your.domain
The master server name also has to be defined in the section "[agent]" of /etc/puppet/puppet.conf:
> server=server.your.domain
Now you can start your Puppet client:
# service puppet start
We need to force our client to check in with the Puppet master by using:
# puppet agent --test
You should see something like the following output. Don't panic, this is desired as the server is still not verified on the Puppet master server.
> Exiting; no certificate found and waitforcert is disabled
Go back to your puppet master server and check certificate verification requests:
# puppet cert list
You should see a list of all the servers that requested a certificate signing from your puppet master. Find the hostname of your client server and sign it using the following command (client-node is the domain name of your client node):
# puppet cert sign client-node
At this point you have a working Puppet client and server. Congratulations! However, right now there is nothing for the Puppet master to instruct the client to do. So, let's create some basic manifest and set our client node to install basic utilities.
Connect back to your Puppet server and make sure the directory /etc/puppet/manifests exists.
# mkdir -p /etc/puppet/manifests
Now create the manifest file /etc/puppet/manifests/site.pp with the following content
node 'client-node' {
include custom_utils
}
class custom_utils {
package { ["nmap","telnet","vim-enhanced","traceroute"]:
ensure => latest,
allow_virtual => false,
}
}
and restart the puppetmaster service.
# service puppetmaster restart
The default refresh interval of the client configuration is 30 minutes, if you want to force the application of your changes manually, execute the following command on your client node:
# puppet agent -t
If you would like to change the default client refresh interval, add:
> runinterval = <yourtime>
to the "[agent]" section of /etc/puppet/puppet.conf on your client node. This setting can be a time interval in seconds (30 or 30s), minutes (30m), hours (6h), days (2d), or years (5y). Note that a runinterval of 0 means "run continuously" rather than "never run".
### Tips & Tricks ###
#### 1. Debugging ####
It can happen from time to time that you will submit a wrong configuration and you have to debug where the Puppet failed. For that you will always start with either checking logs in /var/log/puppet/ or running the agent manually to see the output:
# puppet agent -t
By default "-t" activates verbose mode, so it allows you to see the output of Puppet. This command also has several parameters that might help you identify your problem a bit more. The first useful option is:
# puppet agent -t --debug
Debug shows you basically all steps that Puppet goes through during its runtime. It can be really useful during debug of really complicated rules. Another parameter you might find really useful is:
# puppet agent -t --noop
This option sets puppet in so called dry-run mode, where no changes are performed. Puppet only writes what it would do on the screen but nothing is written on the disk.
#### 2. Modules ####
After some time you find yourself in the situation where you will want to have more complicated manifests. But before you will sit down and start to program them, you should invest some time and browse [https://forge.puppetlabs.com][2]. Forge is a repository of the Puppet community modules and it's very likely that you find the solution for your problem already made there. If not, feel free to write your own and submit it, so other people can benefit from the Puppet modularity.
Now, let's assume that you have already found a module that would fix your problem. How to install it into the system? It is actually quite easy, because Puppet already contains an interface to download modules directly. Simply type the following command:
# puppet module install <module_name> --version 0.0.0
<module_name> is the name of your chosen module, the version is optional (if not specified then the latest release is taken). If you don't remember the name of the module you want to install, you can try to find it by using module search:
# puppet module search <search_string>
As a result you will get a list of all modules that contain your search string.
# puppet module search apache
----------
Notice: Searching https://forgeapi.puppetlabs.com ...
NAME DESCRIPTION AUTHOR KEYWORDS
example42-apache Puppet module for apache @example42 example42, apache
puppetlabs-apache Puppet module for Apache @puppetlabs apache web httpd centos rhel ssl wsgi proxy
theforeman-apache Apache HTTP server configuration @theforeman foreman apache httpd DEPRECATED
And if you would like to see what modules you already installed, type:
# puppet module list
### Summary ###
By now, you should have a fully functional Puppet master that is delivering basic configuration to one or more client servers. At this point feel free to add more settings into your configuration to adapt it to your infrastructure. Don't worry about experimenting with Puppet and you will see that it can be a genuine lifesaver.
Puppet labs is trying to maintain a top quality documentation for their projects, so if you would like to learn more about Puppet and its configuration, I strongly recommend visiting the Puppet project page at [http://docs.puppetlabs.com][3].
If you have any questions feel free to post them in the comments and I will do my best to answer and advise.
--------------------------------------------------------------------------------
via: http://xmodulo.com/2014/08/install-puppet-server-client-centos-rhel.html
作者:[Jaroslav Štěpánek][a]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[a]:http://xmodulo.com/author/jaroslav
[1]:https://puppetlabs.com/puppet/what-is-puppet/
[2]:https://forge.puppetlabs.com/
[3]:http://docs.puppetlabs.com/

View File

@ -0,0 +1,158 @@
How to set up a Samba file server to use with Windows clients
================================================================================
According to the [Samba][1] project web site, Samba is an open source/free software suite that provides seamless file and print services to SMB/CIFS clients. Unlike other implementations of the SMB/CIFS networking protocol (such as LM Server for HP-UX, LAN Server for OS/2, or VisionFS), Samba (along with its source code) is freely available (at no cost to the end user), and allows for interoperability between Linux/Unix servers and Windows/Unix/Linux clients.
For these reasons, Samba is the preferred solution for a file server in networks where different operating systems (other than Linux) coexist - the most common setup being the case of multiple Microsoft Windows clients accessing a Linux server where Samba is installed, which is the situation we are going to deal with in this article.
Please note that on the other hand, if our network consists of only Unix-based clients (such as Linux, AIX, or Solaris, to name a few examples), we can consider using NFS (although Samba is still an option in this case), which has greater reported speeds.
### Installing Samba in Debian and CentOS ###
Before we proceed with the installation, we can use our operating system's package management system to look for information about Samba:
On Debian:
# aptitude show samba
On CentOS:
# yum info samba
In the following screenshot we can see the output of 'aptitude show samba' ('yum info samba' yields similar results):
![](https://farm4.staticflickr.com/3868/14837993244_0fa525eb35_z.jpg)
Now let's install Samba (the screenshot below corresponds to the installation on a Debian 7 [Wheezy] server):
On Debian:
# aptitude install samba
On CentOS:
# yum install samba
### Adding Users to Samba ###
For versions earlier than 4.x, a local Unix account is required for adding users to Samba:
# adduser <username>
![](https://farm6.staticflickr.com/5574/14837266181_fed68bddf2_o.png)
Next, we need to add the user to Samba using the smbpasswd command with the '-a' option, which specifies that the username following should be added to the local smbpasswd file. We will be prompted to enter a password (which does not necessarily have to be the same as the password of the local Unix account):
# smbpassword -a <username>
![](https://farm6.staticflickr.com/5555/14653711099_578f8613ca.jpg)
Finally, we will give access to user xmodulo to a directory within our system that will be used as a Samba share for him (and other users as well, if needed). This is done by opening the /etc/samba/smb.conf file with a text editor (such as Vim), navigating to the end of the file, and creating a section (enclose name between square brackets) with a descriptive name, such as [xmodulo]:
# SAMBA SHARE
[xmodulo]
path = /home/xmodulo
available = yes
valid users = xmodulo
read only = no
browseable = yes
public = yes
writeable = yes
We must now restart Samba and -just in case- check the smb.conf file for syntax errors with the testparm command:
# service samba restart
# testparm
![](https://farm6.staticflickr.com/5589/14653655390_becb4f4981_z.jpg)
If there are any errors, they will be reported when testparm ends.
### Mapping the Samba Share as a Network Drive on a Windows 7 PC ###
Right click on Computer, and select "Map network drive":
![](https://farm6.staticflickr.com/5571/14837993154_981b73ea92.jpg)
Type the IP address of the machine where Samba is installed, followed by the name of the share (this is the name that is enclosed between single brackets in the smb.conf file), and make sure that the "Connect using different credentials" checkbox is checked:
![](https://farm4.staticflickr.com/3881/14839997172_d67ec98933_o.png)
nter the username and password that were set with '**smbpasswd -a**' earlier:
![](https://farm6.staticflickr.com/5563/14653711029_ddfea53bd6_o.png)
Go to Computer and check if the network drive has been added correctly:
![](https://farm6.staticflickr.com/5584/14837993124_c664728039_o.png)
As a test, let's create a pdf file from the man page of Samba, and save it in the /home/xmodulo directory:
![](https://farm6.staticflickr.com/5593/14860219723_e8380f0d0f_o.png)
Next, we can verify that the file is accessible from Windows:
![](https://farm4.staticflickr.com/3869/14817386696_74a12dfdcd_o.png)
And we can open it using our default pdf reader:
![](https://farm6.staticflickr.com/5584/14653655350_8a243b1493_z.jpg)
Finally, let's see if we can save a file from Windows in our newly mapped network drive. We will open the change.log file that lists the features of Notepad++:
![](https://farm6.staticflickr.com/5565/14817386676_18c1d7bc60_o.png)
and try to save it in Z:\ as a plain text file (.txt extension); then let's see if the file is visible in Linux:
![](https://farm4.staticflickr.com/3841/14817386656_fb09a95a65_o.png)
### Enabling quotas ###
As a first step, we need to verify whether the current kernel has been compiled with quota support:
# cat /boot/config-$(uname -r) | grep
![](https://farm4.staticflickr.com/3867/14837993054_081dc9b0dc_z.jpg)
Each file system has up to five types of quota limits that can be enforced on it: user soft limit, user hard limit, group soft limit, group hard limit, and grace time.
We will now enable quotas for the /home file system by adding the usrquota and grpquota mount options to the existing defaults option in the line that corresponds to the /home filesystem in the /etc/fstab file, and we will remount the file system in order to apply the changes:
![](https://farm6.staticflickr.com/5561/14653806067_b8b0dc2333_z.jpg)
Next, we need to create two files that will serve as the databases for user and group quotas: **aquota.user** and **aquota.group**, respectively, in **/home**. Then, we will generate the table of current disk usage per file system with quotas enabled:
# quotacheck -cug /home
# quotacheck -avugm
![](https://farm6.staticflickr.com/5584/14837265971_654e8f3bc0_o.png)
# quota -u <username>
# quota -g <groupname>
![](https://farm6.staticflickr.com/5582/14653735848_8de88d69c4_o.png)
Finally, the last couple of steps consist of assigning the quotas per user and / or group with the quotatool command (note that this task can also be performed by using edquota, but quotatool is more straightforward and less error-prone).
To set the soft limits to 4 MB and the hard limit to 5 MB for the user called xmodulo, and 10 MB / 15 MB for the xmodulo group:
# quotatool -u xmodulo -bq 4M -l '5 Mb' /home
# quotatool -g xmodulo -bq 10M -l '15 Mb' /home
![](https://farm4.staticflickr.com/3888/14653806037_5438b5034e_z.jpg)
And we can see the results in Windows 7 (3.98 MB free of 4.00 MB):
![](https://farm4.staticflickr.com/3919/14653805967_c2b1551869_o.png)
--------------------------------------------------------------------------------
via: http://xmodulo.com/2014/08/samba-file-server-windows-clients.html
作者:[Gabriel Cánepa][a]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[a]:http://xmodulo.com/author/gabriel
[1]:http://www.samba.org/

View File

@ -0,0 +1,79 @@
命令行星期二 第七部分
==============================================================================================================
Heyageekos我已经检查了我们的课程今天我们在八章课程里的第七部分。这意味着下周二我们还有一次课程但也是最后一次CLT课程。所以今天我们讨论一些关于**权限**的问题!
众所周知,一台机器可能会有多名用户共同使用。为了保证用户之间互不干扰,权限会被分配。我们已经讨论了文件权限的问题,所以让我们用一个简单的[点击](1)回顾一下
![](http://linuxcommand.org/images/file_permissions.png)
### chmod ###
**chmod**命令被用来修改目录或者文件的权限。为了使用它首先你得输入chmod命令之后你得输入规范的权限修改然后你就可以把目录或者文件的权限修改成你想要的。这可以采用多种方式完成但是Shotts先生关注八进制表示法
把权限想象成一系列的位每一个不为空的权限槽就是1,空的权限槽就是0。举个例子
rwx = 111
rw- = 110
etc.
看一下二进制表示法:
rwx = 111 —> in binary = 7
rw- = 110 —> in binary = 6
r-x = 101 —> in binary = 5
r = 100 —> in binary = 4
现在,如果你想把一个文件的权限改为:文件所有者和文件所有组拥有读,写,执行权限,但是其他用户没有该文件任何权限,我们可以这样做:
chmod 770 example_file
### su 和 sudo ###
有些时候普通用户想要成为超级用户,这样才能完成一些任务(通常是一些安装软件任务)。为了暂时的获取超级用户权限,我们可以使用**su**程序,输入:
su
输入你的超级用户密码,你就成为超级用户了。但是,警告:别忘记退出超级用户模式,仅仅使用它一小段时间
也有一些选择可能更多的应用于openSUSE和Ubuntu它叫做sudosudo只是在某些方面和su不同它是分配给制定用户的特殊命令不像su,你可以用你自己用户的密码执行sudo而不需要超级用户密码举个例子
sudo zypper in goodiegoodie
### 修改文件和组所有权 ###
想要改变文件的所有者,你可以在超级用户模式下运行**chown**举个例子如果我想把文件的所有权从nenad改为suse我可以这样做
su
[enter password]
chown suse example_file
同样地,我也可以改变组的所有权,但是是使用稍有不同的**chgrp**命令,很简单:
chgrp suse_group example_file
### 下一次 ###
正如我所阐述的下一次我们会有各种各样的终点在这之后你会有自己的选择和我一起徜徉在终端的黑暗之中只有一个绿色的闪烁光标作为灯塔。在那之前geekos记住
....享受更多的乐趣!
---------------------------------------------------------------
via: https://news.opensuse.org/2014/08/05/command-line-tuesdays-part-seven/
作者:[Nenad Latinović][a]
译者:[su-kaiyao](https://github.com/su-kaiyao)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[a]:https://news.opensuse.org/author/holden87/
[1]:https://news.opensuse.org/2014/07/01/command-line-tuesdays-part-three/