publish service

Database middleware reviews zebar Ali cobar I used mycat

message middleware Ali's rockmq



CentOS:
see the version
input lsb_release -a
LSB Version:    :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Distributor ID: CentOS
Description:    CentOS release 6.8 (Final)
Release:        6.8
Codename:       Final


Switch user
1. Open the terminal, the prompt is "$", indicating that the user is a common user, at this time, directly enter su, press Enter, enter the root password, press Enter, you can switch to the root user, the prompt at this time character becomes "#".
  Note that the terminal is not displayed when entering the password, and every time you switch to the root user, you have to go through this process.
2. Switch back to the normal user, just enter "su username" and it will be OK.

The software installation tool of CentOS is not apt-get but yum
to install jdk:
# yum search java|grep jdk
# yum install java-1.7.0-openjdk
//select jdk
alternatives --config java
Note: The directory where openJDK is installed is located at: /usr/lib/jvm/java-1.7

Install wget:
yum -y install wget


Download activemq:
wget http://archive.apache.org/dist/activemq/5.13.5/apache-activemq-5.13.5-bin.tar.gz

start activemq
[root@centos64 *] cd  /home/hailong/activemq/apache-activemq-5.13.5/bin
[root@centos64 bin]./activemq start  


Download maven:
http://maven.apache.org/download.cgi
Versionapache-maven-3.3.9-bin.tar.gz
tar -xvf apache-maven-3.3.9-bin.tar.gz


start nginx
[root@centos64 nginx]#./sbin/nginx
restart ./sbin/nginx -s reload


start zookeeper
[root@centos64 bin]#./zkServer.sh start

unzip files:
tar -xzf apache-activemq-5.9.0-bin.tar.gz.tar.gz
 


start redis
[root@centos64 hailong]# cd /usr/local/bin/
service redisd start
[root@centos64 bin]# redis-server /etc/redis/redis.conf
[root @ centos64 bin] # ps -ef | grep redis
[root@centos64 bin]#service iptables stop //Close the firewall


install unzip
yum install -y unzip zip


Start tomcat:
./starup.sh
// Start tomcat, you can view the startup information
./catalina.sh run

tomcat status query view:
ps -ef|grep tomcat
// if there is, use kill;
kill -9 pid #pid is the corresponding process number


tomcat view log
1. First switch to: cd tomcat/logs
2、tail -f catalina.out
3、tail -n 20 catalina.out
Description: Display the last 20 lines of catalina.out.
more or vi View all


Check ip, query ip
Method 1: ip addr
Method 2: Centos7 cancels ifconfig,
check the IP address of the machine, ifconfig -a check
Install ifconfig command 1. Enter the [yum search ifconfig] command to check that ifconfig belongs to the command package is net-tools .x86_64 2. [yum install net-tools.x86_64] installation command package
Query the Internet public network IP, curl ifconfig.me command to check
the installation of CURL: http://blog.csdn.net/makenothing/article/details/ 39250491
GCC compiler environment:
# yum -y install gcc
Query Internet gateway IP, tracepath www.baidu.com

Ubuntu:
Tools: WinSCP, Putty
install python-software-properties
$sudo apt-get install python-software-properties
$sudo apt-get install software-properties-common

First add ppa
$ sudo add-apt-repository ppa:webupd8team/java

then update the system
$ sudo apt-get update

Start installing jdk8
$ sudo apt-get install oracle-java8-installer
$ java -version
java version "1.8.0_05"
Java(TM) SE Runtime Environment (build 1.8.0_05-b13)
Java HotSpot(TM) Server VM (build 25.5-b02, mixed mode)

java version switch
sudo update-java-alternatives -s java-8-oracle


CentOS remarks:
tar xvf wordpress.tar ####Unzip the tar file ####
unzip phpbb.zip ####Unzip the zip file, it is a bit troublesome to compress a .tar.gz file under Windows
tar -xzvf curl-7.38.0.tar.gz to decompress the file
-z is used to decompress .GZ
-x to decompress a package file
-v to display detailed information
-f is required, indicating that the archive file is used
tar -zcxf command is to put the file first Package and recompress
the tar -zvxf command is to decompress the file and then package

rm to delete the file
3. Delete the file or folder
1. Delete the test directory under the home directory
rm /home/test

2. This deletion method without parameters often prompts that it cannot be deleted because the permission is not enough.
rm -r /home/test delete the folder

3. -r is to recursively delete the directory and its subdirectories in the parameter table. The directory will be emptied and deleted. The user is usually prompted when deleting a directory containing a write-protected file.
rm -rf /home/test

-4, f is to delete all files in the directory without prompting the user. Please pay attention to check the path, it would be a tragedy to lose it to another directory.
rm -ir /home/test

5. -i is the interactive mode. With this option, the rm command prompts the user for confirmation before deleting any files.

chmod u+x *.sh start tomcat permission./startup.sh
start tomcat
vi myfile enter vi
: wq (input "wq", save and exit vi)
: q! (input q!, force quit vi without saving)

copy and cut
cp file name path copy file
cp -r file name path copy directory
mv file or folder name path cut file

copy
and paste file content copy: ctrl+insert
paste: shift+insert

ping www.baidu.com
exit ping ctrl +c
ping 3 times
ping -c 3 192.168.1.1

Linux centos restart command:
  1. reboot
  2. shutdown -r now restart immediately (for root user)
  3. shutdown -r 10 automatically restart after 10 minutes (for root user)
  4 、shutdown -r 20:35 Restart at 20:35 (for root users)
  If the restart is set by the shutdown command, you can use the shutdown -c command to cancel the restart of the
Linux centos shutdown command:
  1. halt to shut down immediately
  2. poweroff to shut down immediately
  3. shutdown -h now to shut down immediately (for root users)
  4. shutdown -h 10
  to Restart to

view
the current full path: pwd

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326764227&siteId=291194637