当前位置: 首页 > 工具软件 > Amoeba > 使用案例 >

Nginx 虚拟机 Amoeba常用命令

宇文勇
2023-12-01

Ctrl+Z从当前指令中退出来
0.Nginx
1.启动nginx start nginx
2.停止nginx nginx -s stop
3.重启nginx nginx -s reload

1.启动Amoeba
命令:
1.启动 ./launcher
2.关闭 ./shutdown
要求:在nginx.exe下执行该命令

2.关闭防火墙
临时关闭命令: service iptables stop
永久关闭防火墙:chkconfig iptables off
查看防火墙关闭状态 :service iptables status

3.启动mysql服务
1.service mysql start
2.service mysql stop
3.service mysql restart

4.导入数据库
1.mysql> source jtdb.sql;

5.开放mysql权限
mysql> grant all on . to ‘root’@’%’ identified by ‘root’;

6.开启二进制日志文件:
说明:修改 /etc/my.cnf
vim /etc/my.cnf
1.编辑从库的mysql配置文件
vim /etc/my.cnf
7.数据库关闭命令:
svrmgr> shutdown +
nomal; 正常退出。在所有用户已退出情况下使用
immediate; 立即关机。中断所有用户,并回退所有未保存命令。(推荐使用)
abort; 异常关机。只关闭实例,是一种危险关机。
transactional; 事物终结后关机。等待所有用户完成提交后关机。
8. 解压各种压缩包:
tar -xvf file.tar //解压 tar包
tar -xzvf file.tar.gz //解压tar.gz
tar -xjvf file.tar.bz2 //解压 tar.bz2
tar -xZvf file.tar.Z //解压tar.Z
unrar e file.rar //解压raref
unzip file.zip //解压zip

9.删除压缩包
rm+压缩包名字

[root@localhost src]# ls
amoeba  java  mycat  Mycat-server-1.7.0-DEV-20170416134921-linux.tar.gz
[root@localhost src]# re Mycat-server-1.7.0-DEV-20170416134921-linux.tar.gz 
-bash: re: command not found
[root@localhost src]# rm Mycat-server-1.7.0-DEV-20170416134921-linux.tar.gz 
rm: remove regular file `Mycat-server-1.7.0-DEV-20170416134921-linux.tar.gz'? y
[root@localhost src]# ls
amoeba  java  mycat

杀死进程PID

 查看进程ps  -ef |grep mysql 
 查看进程ps -ef|grep amoeba
  杀死进程kill -9  5597
[root@localhost bin]# ps  -ef |grep mysql
root      6479  6335  0 17:45 pts/0    00:00:00 grep mysql
[root@localhost bin]# ps -ef|grep amoeba
root      5597     1  0 11:46 ?        00:01:35 /usr/local/src/java/jdk1.8.0_51/bin/java -server -Xms256m -Xmx1024m -Xss256k -XX:PermSize=16m -XX:MaxPermSize=96m -Dproject.home=/usr/local/src/amoeba -Damoeba.home=/usr/local/src/amoeba -Dproject.name=Amoeba-MySQL -Dproject.output=/usr/local/src/amoeba/logs -Dignore.signals=1,2 -Dclassworlds.conf=/usr/local/src/amoeba/bin/launcher.classpath -classpath /usr/local/src/amoeba/lib/plexus-classworlds-2.4.2-HEXNOVA.jar org.codehaus.classworlds.Launcher
root      6386  6380  0 16:44 pts/0    00:00:00 tail -f /usr/local/src/amoeba/logs/console.log
root      6481  6335  0 17:45 pts/0    00:00:00 grep amoeba
[root@localhost bin]# ^C
[root@localhost bin]# kill -9  5597
[root@localhost bin]# ./launcher
2019-01-30 16:44:12,135 ERROR net.ServerableConnectionManager - Failure listening to socket on port '8066'.
java.net.BindException: Address already in use
	at sun.nio.ch.Net.bind0(Native Method)
	at sun.nio.ch.Net.bind(Net.java:437)
	at sun.nio.ch.Net.bind(Net.java:429)
	at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
	at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
	at com.meidusa.toolkit.net.ServerableConnectionManager.willStart(ServerableConnectionManager.java:144)
	at com.meidusa.toolkit.net.util.LoopingThread.run(LoopingThread.java:59)
 2019-01-30 16:44:12 [INFO] Project Name=Amoeba-MySQL, PID=6385 , System shutdown ....
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=16m; support was removed in 8.0
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=96m; support was removed in 8.0
 2019-01-30 17:48:27 [INFO] Project Name=Amoeba-MySQL, PID=6487 , starting...
log4j:WARN log4j config load completed from file:/usr/local/src/amoeba/conf/log4j.xml
2019-01-30 17:48:27,985 INFO  context.MysqlRuntimeContext - Amoeba for Mysql current versoin=5.1.45-mysql-amoeba-proxy-3.0.4-BETA
log4j:WARN ip access config load completed from file:/usr/local/src/amoeba/conf/access_list.conf
2019-01-30 17:48:28,480 INFO  net.ServerableConnectionManager - Server listening on 0.0.0.0/0.0.0.0:8066.
^Z
[2]+  Stopped                 ./launcher
[root@localhost bin]# 

**查看日志cat console.log **

[root@localhost amoeba]# cd  logs/
[root@localhost logs]# cat console.log 
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=16m; support was removed in 8.0
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=96m; support was removed in 8.0
 2019-01-29 22:51:42 [INFO] Project Name=Amoeba-MySQL, PID=5230 , starting...
log4j:WARN log4j config load completed from file:/usr/local/src/amoeba/conf/log4j.xml
2019-01-29 22:51:44,036 INFO  context.MysqlRuntimeContext - Amoeba for Mysql current versoin=5.1.45-mysql-amoeba-proxy-3.0.4-BETA
log4j:WARN ip access config load completed from file:/usr/local/src/amoeba/conf/access_list.conf
2019-01-29 22:51:45,060 INFO  net.ServerableConnectionManager - Server listening on 0.0.0.0/0.0.0.0:8066.
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=16m; support was removed in 8.0
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=96m; support was removed in 8.0
 2019-01-29 23:19:58 [INFO] Project Name=Amoeba-MySQL, PID=5320 , starting...
log4j:WARN log4j config load completed from file:/usr/local/src/amoeba/conf/log4j.xml
2019-01-29 23:19:58,523 INFO  context.MysqlRuntimeContext - Amoeba for Mysql current versoin=5.1.45-mysql-amoeba-proxy-3.0.4-BETA
log4j:WARN ip access config load completed from file:/usr/local/src/amoeba/conf/access_list.conf
2019-01-29 23:19:58,978 ERROR net.ServerableConnectionManager - Failure listening to socket on port '8066'.
java.net.BindException: Address already in use
 类似资料: