1、 进入超级用户
su
输入密码
2、 打开终端 新建目录/home/ostv,/home/ostv/database
mkdir /home/ostv
mkdir /home/ostv/database
3、 将所有文件拷贝至 /home/ostv
cd /home/ostv
wget http://xx.xx.xx.xx/ostv.zip
unzip ostv.zip
4、 将下面指令复制粘贴至终端
rpm -e --allmatches --nodeps mysql-libs-5.1.71-1.el6.x86_64
rpm -ivh *.rpm
tar -zxvf tomcat.tar.gz
echo "bash /home/ostv/apache-tomcat-7.0.55/bin/startup.sh" >> /etc/rc.d/rc.local
/sbin/iptables -I INPUT -p tcp --dport 80 -j ACCEPT
/etc/rc.d/init.d/iptables save
/etc/init.d/iptables restart
/etc/init.d/mysql start
/usr/bin/mysqladmin -u root password ‘root‘
mysql -uroot -proot
create database oiptv;
use oiptv
source /home/ostv/db.sql
use mysql
insert into mysql.user(Host,User,Password) values("localhost","oiptv",password("oiptv"));
grant all privileges on *.* to [email protected] identified by ‘oiptv‘;
flush privileges;
exit
cp /home/ostv/my.cnf /etc/my.cnf
/etc/init.d/mysql restart
echo "# remove all old backup files less than 29 days " >> /etc/crontab
echo "10 2 1 * * root find /home/ostv/database -name ‘*.sql.gz‘ -type f -mtime -29 -mtime +7 -exec rm -f {} ; " >> /etc/crontab
echo "# automatically backup mysql every day " >> /etc/crontab
echo "15 2 * * * root mysqldump -u root -proot --all-databases | gzip > /home/ostv/database/\`date +‘/%Y-/%m-/%d‘\`.sql.gz " >> /etc/crontab
rm -f *
reboot
mysql> update b_d_znzdxx set znzdip = ‘192.168.8.72‘ where uuid =‘02ce352d1aeb4650b3488e62ded4a67a‘;
update b_d_znzdxx set znzdip = ‘192.168.1.210‘ where uuid =‘ffde56455b2645bab4584578288aa9fd‘;
update b_d_znzdxx set znzdip = ‘192.168.1.91‘ where uuid =‘f82f2c6ce9f942fd9541380756f5cb70‘;