首页 > 代码库 > centos初始配置
centos初始配置
修改语言环境
[root@oracledb ~]# sudo vim /etc/sysconfig/i18n
将将zh_CH修改为"en_US.UTF-8"
搭建yum本地源
参考:centos如何安装软件vsftpd安装配置
参考:CentOS配置VSFTP服务器
yum install vsftpd
设置vsftpd开机启动
Last login: Tue Aug 12 08:21:26 2014 from l-001812.lan
[root@oracledb ~]# chkconfig --list|grep vsftpd
vsftpd 0:off 1:off 2:off 3:off 4:off 5:off 6:off
[root@oracledb ~]# chkconfig vsftpd on
[root@oracledb ~]# chkconfig --list|grep vsftpd
vsftpd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
[root@oracledb ~]#
[root@oracledb ~]# chkconfig --list|grep vsftpd
vsftpd 0:off 1:off 2:off 3:off 4:off 5:off 6:off
[root@oracledb ~]# chkconfig vsftpd on
[root@oracledb ~]# chkconfig --list|grep vsftpd
vsftpd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
[root@oracledb ~]#
配置防火墙
打开/etc/sysconfig/iptables文件
- vi /etc/sysconfig/iptables
在REJECT行之前添加如下代码
- -A INPUT -m state --state NEW -m tcp -p tcp --dport 21 -j ACCEPT
保存和关闭文件,重启防火墙
- service iptables restart
创建ftp连接,连接模式为主动,字符集为utf8(可选)
修改ftp访问权限
使用命令getsebool -a|grep ftp 查看
[root@oracledb vsftpd]# getsebool -a|grep ftp
allow_ftpd_anon_write --> off
allow_ftpd_full_access --> off
allow_ftpd_use_cifs --> off
allow_ftpd_use_nfs --> off
ftp_home_dir --> off
ftpd_connect_db --> off
ftpd_use_fusefs --> off
ftpd_use_passive_mode --> off
httpd_enable_ftp_server --> off
tftp_anon_write --> off
tftp_use_cifs --> off
tftp_use_nfs --> off
allow_ftpd_anon_write --> off
allow_ftpd_full_access --> off
allow_ftpd_use_cifs --> off
allow_ftpd_use_nfs --> off
ftp_home_dir --> off
ftpd_connect_db --> off
ftpd_use_fusefs --> off
ftpd_use_passive_mode --> off
httpd_enable_ftp_server --> off
tftp_anon_write --> off
tftp_use_cifs --> off
tftp_use_nfs --> off
查看上述红色是否为on
如果不是则使用
setsebool allow_ftpd_full_access on
setsebool ftp_home_dir on
[root@oracledb vsftpd]# getsebool -a|grep ftp
allow_ftpd_anon_write --> off
allow_ftpd_full_access --> on
allow_ftpd_use_cifs --> off
allow_ftpd_use_nfs --> off
ftp_home_dir --> on
ftpd_connect_db --> off
ftpd_use_fusefs --> off
ftpd_use_passive_mode --> off
httpd_enable_ftp_server --> off
tftp_anon_write --> off
tftp_use_cifs --> off
tftp_use_nfs --> off
allow_ftpd_anon_write --> off
allow_ftpd_full_access --> on
allow_ftpd_use_cifs --> off
allow_ftpd_use_nfs --> off
ftp_home_dir --> on
ftpd_connect_db --> off
ftpd_use_fusefs --> off
ftpd_use_passive_mode --> off
httpd_enable_ftp_server --> off
tftp_anon_write --> off
tftp_use_cifs --> off
tftp_use_nfs --> off
CentOS配置JAVA环境变量
vi /etc/profile //在文件尾增加内容#set Java environment export JAVA_HOME=/usr/local/javaexport CLASSPATH=./:$JAVA_HOME/lib:$JAVA_HOME/jre/libexport PATH=$PATH:$JAVA_HOME/bin
centos初始配置
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。