Friday, April 12, 2013

a little review of Fedora 18


Fedora logo
This is a little review of fedora 18, when I install phpmyprepaid as hotspot billing system in fedora 18. Of course, I consider this interesting and important to build a server.

Repolist
#yum repolist
repo id                                                 repo name                                                    status
fedora/18/x86_64                                Fedora 18 - x86_64                                     33,868
updates/18/x86_64                              Fedora 18 - x86_64 - Updates                    13,795
repolist: 47,663

Forty-seven thousand. Compared to Centos 6.4, this is so many. Wow, good, but I want to install epel to getting extra update repolist. In Centos, after downloading "epel", we can run it using the command "rpm-ivh". But in Fedora 18, we can't do that. You will get error. Like this,
# rpm -ivh epel-release-6-8.noarch.rpm
warning: epel-release-6-8.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
error: Failed dependencies:
        fedora-release conflicts with epel-release-6-8.noarch

So, what will we do.?? The trick is to extract and copy manually.
# wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
# rpm2cpio epel-release-6-8.noarch.rpm | cpio -idmv
# cp ./etc/yum.repos.d/epel-testing.repo ./etc/yum.repos.d/epel.repo /etc/yum.repos.d/
# cp ./etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 /etc/pki/rpm-gpg/
# yum repolist
repo id                                        repo name                                                                   status
epel/x86_64                               Extra Packages for Enterprise Linux 6 - x86_64         8,606
fedora/18/x86_64                       Fedora 18 - x86_64                                                     33,868
updates/18/x86_64                     Fedora 18 - x86_64 - Updates                                     13,795
repolist: 56,269

we get epel, with eight thousand package. and repolist become fifty-six thousand.

Firewall
At first it difficult to set up a firewall, then after searching in google, the default firewall installed is not the iptables, but Firewalld. For configuration use the command firewall-cmd
If you want to re-use iptables, firewalld be stopped, then disabled / removed, and install iptables.
And use your favorite iptables. Then For iptables configuration via the gui, the system-config-firewall  is a good tool.
#yum install system-config-firewall system-config-firewall-tui

Another problem, when I run the "firewall.iptables" file in Fedora 18 (iptables v1.4.16.2), I get a warning.
WARNING: The state match is obsolete. Use conntrack instead.

While"firewall.iptables" file works well on Centos 6.4 (iptables v 1.4.7) and Ubuntu. This is how to fix.
Look through your iptables configuration and replace any occurences of -m state --state XYZ by the equivalent -m conntrack --ctstate XYZ. The old syntax is still supported for compatibility reasons (therefore it's only a warning), but will likely be removed in the future.

Systemd
Systemd has been introduced on fedora 14 (informed by Google). It's been a long time, but for me, it was a new thing. hahaha ... :) The last time when I was using fedora version 8. Most probably, in the future, "systemd" will replace "service" and "chkconfig". More info can be found at http://fedoraproject.org/wiki/Systemd
And this is the  example command of systemd.
# systemctl enable iptables.service
# systemctl enable snmpd.service
# systemctl enable httpd
# systemctl enable mysql
# systemctl enable mysqld
# systemctl enable dnsmasq
# systemctl -t service
# systemctl list-unit-files | grep service
# systemctl stop firewalld
# systemctl start iptables
# systemctl disable firewalld

Reference :

1 comment: