1、启动mysql
/opt/sudytech/mysql/bin/mysqld_safe &
2、启动tomcat
/jwebplus_sudy/jwebplus/apache-tomcat-6.0.13/bin/startup.sh
3、关闭tomcat
/jwebplus_sudy/jwebplus/apache-tomcat-6.0.13/bin/shutdown.sh
4、杀死某id线程
kill -9 线程id
5、查看8080端口是否开启
netstat -anp|grep 8080
6、打开防火墙
service iptables stop
7、导出数据库
/opt/sudytech/mysql/bin/mysqldump -uroot -p12344 scs > /yfli/scs.sql
8、导入数据库
source /opt/sudytech/ghs/T_SF_C.sql 导入数据库
./mysql -uroot -p12344 hnxy < /tmp/hn_mysql.sql
9、解压tar.gz格式的压缩文件命令
tar xvfz /sudytech/hnxy/apache-tomcat-6.0.13.tar.gz -C /sudytech/hnxy/
10、解压zip格式的压缩文件
unzip /sudytech/hnxy/apache-tomcat-6.0.13/webapps/webapps.zip -d /sudytech/hnxy/apache-tomcat-6.0.13/webapps/
11、仅打包,不压缩!
tar -cvf /tmp/etc.tar /etc
打包后,以 gzip 压缩
tar -zcvf /tmp/etc.tar.gz /etc
打包后,以 bzip2 压缩
tar -jcvf /tmp/etc.tar.bz2 /etc
tar xvfz 目标文档 解压
jar -xvf webplus3 解压
12、linux删除文件夹命令
rm -rf /路径
13、开启防火墙
service iptables start
关闭防火墙
service iptables stop
14、授权语句
GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY 'hhxy12344' WITH GRANT OPTION;
15、连接数据库命令
/opt/sudytech/mysql/bin/mysql -u root -p12344