Fedora 18 introduced firewalld as a replacement for the previous iptables service. Since RHEL7 and Oracle Linux 7 are based on Fedora 19, the switch from iptables service to firewalld is now part of the Enterprise Linux distributions. This article is a rework of the previous Linux Firewall article, bringing it up to date.
Note. You need to distinguish between the iptables service and the iptables command. Although firewalld is a replacement for the firewall management provided by iptables service, it still uses the iptables command for dynamic communication with the kernel packet filter (netfilter). So it is only the iptables service that is replaced, not the iptables command. That can be a confusing distinction at first.
Reverting to the iptables Service
Installation
firewall-config
firewall-cmd
Backups and Transfers of Firewall Configuration
Related articles.
Linux Firewall (iptables, system-config-firewall)
Reverting to the iptables Service
If you are not ready to make the break to firewalld, you can still use the iptables service by issuing the following commands.
The GUI screen to control the firewall is available from the menu.
Fedora : System > Administration > Firewall
RHEL7/OL7 : Applications > Sundry > Firewall
Alternatively, if can be started from the command line using the firewall-config command. If it is not already present, it can be installed using the following command.
# yum install firewall-config
Once started, the "Configuration:" drop-down allows you to decide if you are modifying currently running settings (Runtime) or those saved for future use (Permanent). You can also configure basic trusted services, such as SSH, FTP and HTTP, by putting a tick in the appropriate checkbox. All changes are applied immediately.
The "Ports" tab allows you to manually open ports that are not covered in the "Trusted Services" section.
Remember, changes to the runtime configuration will be lost after the next reboot. If in doubt, make all changes to the permanent configuration and reload the runtime configuration using the "Options > Reload Firewalld" menu option.
firewall-cmd
In addition to the GUI interface, the firewall rules can be amended directly using the firewall-cmd command. The full extent of the firewall configuration is beyond the scope of this article, so instead a few specific examples will be given to allow you to get a feel for it. This article also assumes you have a single network interface and are happy to keep it set to the default zone (public).
The firewall-cmd usage notes are displayed when you use the "-h" or "--help" options.
# firewall-cmd --help
Check the current top-level firewall configuration using the following commands.
# Check firewall state.
firewall-cmd --state
# Check active zones.
firewall-cmd --get-active-zones
# Check current active services.
firewall-cmd --get-service
# Check services that will be active after next reload.
firewall-cmd --get-service --permanent
Lock down and unlock the firewall using the following commands.
You shouldn't edit these. Instead, copy a specific service file to the "/etc/firewalld/services/" directory and editing it there. The firewalld service always uses files in "/etc/firewalld/services/" directory in preference to those in the "/usr/lib/firewalld/services/" directory. Remember to reload the config after making any changes.
# firewall-cmd --reload
As with the GUI interface, you need to decide if you want to make changes to either the runtime configuration, permanent configuration or both. If you want to set both the runtime and permanent configuration you have two choices. Set them both independently, or set the permanent configuration and reload the firewall.
Add an existing service to a zone.
# # Set runtime and permanent independently.
# firewall-cmd --zone=public --add-service=https
# firewall-cmd --permanent --zone=public --add-service=https
or
# # Set permanent and reload the runtime config.
# firewall-cmd --permanent --zone=public --add-service=https
# firewall-cmd --reload
All subsequent examples will assume you want to amend both the runtime and permanent configuration and will only set the permanent configuration and then reload the runtime configuration.
Once you've amended the default configuration, the "/etc/firewalld/zones/public.xml" file will be created. You can manually amend this file, but you will need to issue a reload for the changes to take effect.
Check the services in a zone.
# firewall-cmd --zone=public --list-services
dhcpv6-client https ss
# firewall-cmd --permanent --zone=public --list-services
dhcpv6-client https ss
#
The "/etc/firewalld/zones/public.xml" file now contains the rich rule.
PublicFor use in public areas. You do not trust the other computers on networks
to not harm your computer. Only selected incoming connections are accepted.
The rule can be removed directly from the XML file, or removed using the "--remove-rich-rule" option.
The following example opens and closes port 8080 for a specific source IP address using a rich rule.
# firewall-cmd --permanent --zone=public --add-rich-rule="rule family="ipv4" \
source address="192.168.0.4/24" \
port protocol="tcp" port="8080" accept"
# cat /etc/firewalld/zones/public.xml
PublicFor use in public areas. You do not trust the other computers on networks
to not harm your computer. Only selected incoming connections are accepted.
#
# firewall-cmd --permanent --zone=public --remove-rich-rule="rule family="ipv4" \
source address="192.168.0.4/24" \
port protocol="tcp" port="8080" accept"
Backups and Transfers of Firewall Configuration
As all non-default configuration is placed under the "/etc/firewalld/" directory, taking a copy of the contents of this directory and its sub-directories constitutes a backup of the firewall configuration.
Not surprisingly, transferring the contents of this directory will allow you to duplicate the firewall configuration in other servers.
openjdk上关于hotspot将移除永久带的描述非常详细,http://openjdk.java.net/jeps/122
JEP 122: Remove the Permanent Generation
Author Jon Masamitsu
Organization Oracle
Created 2010/8/15
Updated 2011/
PL/SQL也是一门高级语言,所以流程控制是必须要有的,oracle数据库的pl/sql比sqlserver数据库要难,很多pl/sql中有的sqlserver里面没有
流程控制;
分支语句 if 条件 then 结果 else 结果 end if ;
条件语句 case when 条件 then 结果;
循环语句 loop
/*
*开发子程序
*/
--子程序目是指被命名的PL/SQL块,这种块可以带有参数,可以在不同应用程序中多次调用
--PL/SQL有两种类型的子程序:过程和函数
--开发过程
--建立过程:不带任何参数
CREATE OR REPLACE PROCEDURE out_time
IS
BEGIN
DBMS_OUTPUT.put_line(systimestamp);
E
long 长的
show 给...看,出示
mouth 口,嘴
write 写
use 用,使用
take 拿,带来
hand 手
clever 聪明的
often 经常
wash 洗
slow 慢的
house 房子
water 水
clean 清洁的
supper 晚餐
out 在外
face 脸,