实体服务器安装

1、磁盘阵列模拟成一块硬盘使用,磁盘分两个区 (配置写入"/etc/fstb")    
    a.) 分区1     2TB             格式化为ext4       挂载到"/xxxxxx"路径
    b.) 分区2     剩余容量        格式化为ext4       挂载到"/test"路径

2、开机时钟同步脚本添加
     a.) chmod +x /etc/rc.local
     b.) echo "/usr/sbin/ntpdate ntp-01.com ntp-02.com >/dev/null 2>&1 &"  >> /etc/rc.local
    
3、crontab时钟同步计划添加
     echo "*/20 * * * * /usr/sbin/ntpdate ntp-01.com ntp-02.com >/dev/null &"  >> /var/spool/cron/root

4、mysql安装 (安装到 /szmetro/mysql下)
yum -y install numactl mkdir
-p /szmetro/mysql && tar -xzvf /download/mysql-5.7.21-linux-glibc2.12-x86_64.tar.gz -C /szmetro/mysql/ --strip-components 1 mv /etc/my.cnf /etc/my_cnf_bak cp my.cnf /etc/my.cnf mkdir -p /szmetro/mysql/data && mkdir -p /szmetro/mysql/log cd /szmetro/mysql/bin ./mysqld --initialize --user=root --console ./mysqld_safe --user=root --skip-grant-tables & ./mysql -uroot -e"update mysql.user set authentication_string=password('xxxx@xxxx'), password_expired='N' where User='root'" ./mysql -uroot -e"flush privileges" 5、添加vsftp用户和目录权限 a.) echo -e "allow_writeable_chroot=YES\nchroot_local_user=YES\npasv_min_port=45050\npasv_max_port=45060\n" >> /etc/vsftpd/vsftpd.conf b.) mkdir -p /szmetro/ftp/ && useradd -g ftp -s /sbin/nologin -d /szmetro/ftp/afcuploader afcuploader c.) echo "123456" | passwd --stdin afcuploader d.) service vsftpd restart 6、关闭系统自带防火墙 systemctl stop firewalld.service systemctl disable firewalld.service 7、关闭SELINUX=disabled sed -i "s/SELINUX=.*/SELINUX=disabled/g" /etc/selinux/config

chroot --userspec=nobody:nobody / sh -c vim

 

posted @ 2018-04-07 19:47  挨踢淫才  阅读(291)  评论(0编辑  收藏  举报