Summary of linux (centos) project deployment phase related commands

1、 SSH login without password

Main command

cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys-->Add public key

service sshd restart --> restart ssh service

Reference link:

http://jingyan.baidu.com/article/2fb0ba4043124a00f2ec5f0f.html

2、 View system related information:

uname -a View OS details

file /bin/ls

Display system program information, you can see how many bits

Get machine word length

getconf LONG_BIT

View OS version

cat /proc/version

Reference link:

http://blog.sina.com.cn/s/blog_537de4b50100zw1n.html

View detailed os parameter information

getconf -a

3、 File remote copy example

Local to remote: scp -r ./file to be transferred user@remoteip:/path/to/destination folder

Remote to local: scp user@remoteip:/path/to/destination file./

4、 mysql

Delete the mysql command completely:

yum remove mysql mysql-server mysql-libs compat-mysql51

rm -rf /var/lib/mysql

rm /etc/my.cnf

Check if there is still mysql software:

rpm -qa|grep mysql

If yes, continue to delete

Reference link:

http://www.cnblogs.com/shenliang123/p/3203546.html (installation)

http://www.cnblogs.com/ikodota/p/use_yum_update_mysql.html (upgrade to 5.5.37)

Permissions:

grant all privileges on . to 'root'@'%' identified by 'hjhjhj' with grant option;

Login:

mysql -h ipaddress -P3306 -uroot -p

Export and import data:

mysqldump -uroot -ppassword -h ipaddress -P port --routines --default-character-set=utf8 --databases mydatabase > /tmp/my.sql

mysql> source /tmp/my.sql

5、 Install jdk, jetty, nginx

jdk:

rpm -ivh jdk-8u91-linux-x64.rpm

jetty:

wget http://central.maven.org/maven2/org/eclipse/jetty/jetty-distribution/9.3.14.v20161028/jetty-distribution-9.3.14.v20161028.tar.gz

tar zxvf /home/jetty-distribution-9.3.14.v20161028.tar.gz -C /usr/share/

mv jetty-distribution-9.3.14.v20161028/ jetty/

nginx:

Reference link:

http://blog.chinaunix.net/xmlrpc.php?r=blog/article&uid=29791971&id=4702007

For the configuration of jetty and nginx[load balancing] (https://cloud.tencent.com/product/clb?from=10680), you can refer to this article:

Overview of nginx+jetty load balancing deployment on mac

6、 glibc version upgrade

Reference link:

http://www.cnblogs.com/gw811/p/3676856.html

7、 gitlab installation (multiple pits on the Internet, according to the standard document, select the corresponding version to install)

Reference link:

https://github.com/gitlabhq/gitlab-recipes/tree/8-1-stable/install/centos

8、 Firewall configuration

Reference link:

http://blog.csdn.net/jemlee2002/article/details/7042991/

9、 View java process and parameter configuration

jps

jinfo -flags 18311

jinfo -flag UseSerialGC 18311

10、 Other commands:

netstat -anp|grep 8099 View port 8099 occupancy

Install a specific jar package:

mvn install:install-file -Dfile=./my.jar -DgroupId=com.dong -DartifactId=my -Dversion=1.0.0 -Dpackaging=jar

Recommended Posts

Summary of linux (centos) project deployment phase related commands
CentOS deployment method of flask project
Concise summary of Ceph deployment on Centos7
Linux firewall related configuration commands and operations (centos and ubuntu)
Deployment of graphite on centos7
Centos6.5 installation and deployment of KVM
Summary of Ubuntu commonly used commands
Centos-6.5 installation and deployment of LNMP environment
Centos7 installation and deployment of gitlab server
Centos7 installation and deployment of Airflow detailed
Some Centos Python production environment deployment commands
Summary of CentOS method to set static IP
LVM disk expansion problem of Centos7 in Linux
IP and network settings of CentOS Linux 7 VMware
Distributed deployment of Apollo configuration center under CentOS8